Electronic – microcontroller low battery indicator


I am powering a board and circuit with a 9V battery (those alkaline ones). And I would like to read the 9V battery to keep track of how much power it has left. I have read that I can do this with a voltage divider since most ADC input on uCs take 5V max. That's good but wouldn't the voltage divider itself draw power and make the battery drain faster? I am not going to constantly measure battery level.

Best Answer

If you use a voltage divider with fairly high value resistors, e.g. two 499K in series and tap off the middle, your maximum voltage will be 4.5v and it will draw only 9 µA.

If even that much current were a concern, you could tie the bottom of the resistor divider into a open-drain output pin on the microcontroller and set it to ground only when you need to take a measurement. In that case, you could get by with lower value resistors.


As Russel McMahon mentions, many micros won't allow the input of the ADC rise much above their supply voltage (VDD), which would happen when the ground was removed on the resistor divider. So you would then need a high-side switch instead.