Battery measurement with Capacitor Voltage Divider & ADC

Ian0

Joined Aug 7, 2020
9,838
Neat! It's amazing what useful device are out there if only you know what words to type into Google for it to find them!
 

basreflex

Joined May 11, 2020
1
using a capacitive divider you can only measure change of voltage. for example when you enable the battery voltage to it's load using an external switch.
no need for any external components using the MCU port. just need to know the vdd exactly, and you can usually compare the vdd against the internal vref.
precharge the capacitor node on the ADC input by setting the MCU port temporarily as output. for upgoing voltages precharge to gnd, for negative going voltages precharge to vdd. after waiting 5 tau, (cap value and output driver resistor), you can convert the output to ADC input. then enable the voltage change, and quickly after that sample the ADC input, or keep sampling until the input is stable and start conversion. capacitor values need to be accurate, so use 5% ceramic NPO.
 
Top