Calculate the output of a resistor divider and check it against your microcontroller’s ADC range. Useful for battery, solar and DC bus voltage sensing.

Formula

Vout = Vin × R2 / (R1 + R2)

Design notes

  • Keep the divider impedance low enough for the ADC sample-and-hold. For high-value dividers, add a 10–100 nF capacitor at the ADC pin or a buffer op-amp.
  • For inputs above about 50 V, split R1 into two or three resistors in series to stay within each resistor’s voltage rating and creepage.
  • Use 0.1–1% resistors for measurement; calibrate in firmware to remove the remaining error.
  • Add a series resistor and clamp (or rely on the pin’s protection diodes within their current limit) to survive transients.

More calculators

Need this designed for your product? We design power electronics, embedded firmware and industrial IoT hardware. Message us on WhatsApp or use the contact form.