Measure a LiPo battery against a stable 1.1 V internal bandgap reference
When an MCU runs directly from a discharging LiPo cell (or through a dropping LDO), using VDD as the ADC reference fails because Vref falls right alongside the battery! Switching the ADC to its stable 1.1 V internal bandgap reference requires dividing the 4.2 V max cell voltage down to ~1.0 V.
At 10-bit resolution (1,024 levels), a 4.2:1 divider resolves ~4.5 mV per LSB—tracking 3.0 V to 4.2 V battery discharge across 265 clean steps.
Formulas
Target ratio = 1.0 ÷ 4.2 = 0.2381Full-scale Vin = 1.1 V ÷ Ratio_actual ≈ 4.62 V10-bit resolution = 4.62 V ÷ 1024 ≈ 4.51 mV/LSB
Worked example
In E96 with R_th ≤ 10 kΩ, R1 = 42.2 kΩ and R2 = 13.3 kΩ (R_th = 10.1 kΩ cap -> nearest ≤10 kΩ pair) yields ~1.00 V at 4.2 V with ~4.5 mV/LSB resolution and <80 µA draw.