I am building a battery powered device. Almost all of my logic is running at 3.3v, although I do have a 5v supply for a few hobby servos.

I want to measure the battery voltage, but I can't do so directly with the ADC on my controller because the battery voltage (depending on the cell count of the lithium polymer battery that the user connects to the device) can vary between 6 and 36 volts. (My 5V and 3.3V supplies are fine with this input variation already.) The ADC can't measure anything above its supply voltage.

Obviously I need some sort of amplifier with a fractional gain, about 1/12 or so. Should I just use a simple voltage divider? How do I decide what values to use? Maximizing sleep-mode battery life is a concern, so that votes for using large values. What constrains how large those values can be? (The input impedance of the ADC, right?)

Am I better off using some sort of opamp amplifier circuit for some reason?

What's the usual solution here?


1 Answer 1


There is no one "usual" solution. Some are:

  1. Use a high side switch. Use a fairly low impedance voltage divider, but only turn it on for a short time around each battery reading. Since it's on for only a very small part of the total time, the average current draw will be low. This is usually done with a P channel FET so as not to add a offset voltage.

  2. Use as high a impedance divider as your A/D can tolerate. A/Ds are specified for some maximum source voltage impedance for two reasons, to charge up the sample and hold cap within the specified acquisition time, and so that leakage current causes a small enough offset to ignore. Too high impedance for the first reason can be overcome by a longer sampling time, which some A/Ds allow you to control. However, there is nothing you can do about the leakage. 100 nA will cause 100 mV error with 1 MΩ source impedance, for example.

  3. Use a high impedance divider followed by a buffer amp. You still have to consider leakage, but good opamp input leakage is usually a lot less than microcontroller pin leakage.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.