Battery ADC Divider Calculator

Calculate battery divider ratio, ADC pin voltage, raw ADC code, battery-side LSB, divider current, and safety margin for MCU battery monitoring.

Battery ADC measurement and divider sizing

Inputs

Outputs

Divider ratio-
ADC pin voltage (current battery)-
ADC pin voltage (battery max)-
ADC raw code (current battery)-
ADC raw code (battery max)-
Battery-side LSB-
Divider current (current battery)-
Divider current (battery max)-
R top power at max battery-
R bottom power at max battery-
Suggested divider ratio-
Suggested R top for target-

Enter battery and ADC settings to evaluate divider safety and resolution.

Why use a voltage divider for battery ADC measurement?

Most microcontroller ADC pins cannot accept full battery voltage directly. A resistor divider scales battery voltage into the ADC input range.

Battery voltage divider formula

The divider ratio is Rbottom / (Rtop + Rbottom). ADC pin voltage equals battery voltage multiplied by this ratio.

ADC resolution and battery-side LSB

Battery-side LSB estimates how much battery voltage one ADC code step represents after divider scaling.

Choosing resistor values

Lower resistor values increase divider current and power loss. Very high resistor values reduce current draw but can increase ADC sampling error depending on ADC input impedance and sampling time.

Battery divider examples

Battery Max voltage Divider example ADC voltage Notes
1S Li-ion4.2 V100k + 100k2.10 VSafe for 3.3V ADC
2S Li-ion8.4 V200k + 100k2.80 VCommon 3:1 divider
3S Li-ion12.6 V300k + 100k3.15 VNear 3.3V full scale
12V Lead-acid14.4 V390k + 100k2.94 VCharging voltage example

ESP32 and Arduino ADC notes

This calculator uses an ideal ADC model. Real devices, especially ESP32 ADC channels with attenuation and calibration effects, can show nonlinear behavior and offset.

FAQ

How do I measure battery voltage with an ADC?

Use a resistor divider so the ADC pin stays below Vref, then convert ADC code back to battery voltage using the divider ratio.

What resistor divider should I use for a Li-ion battery?

For 1S Li-ion with 3.3V ADC, 100k/100k is a common starting point. For higher-cell packs, use a larger top resistor ratio to keep ADC pin voltage under Vref.

Why should I care about divider current?

Divider current flows continuously and can impact battery life in low-power designs. Higher resistances reduce current but may require ADC sampling adjustments.

Why is my ESP32 battery ADC reading not exact?

ESP32 ADC readings depend on attenuation, calibration, channel characteristics, and analog front-end behavior. This tool gives an ideal first-order estimate.

Should I disconnect the divider in low-power designs?

Many low-power designs gate the divider with a MOSFET or enable it only during measurement to reduce standby current.

Related tools