# Efficiently sensing the voltage of a battery pack

I'm looking to sense the voltage of a battery pack that is powering a device by the device. Depending the the level of the pack (2 cell LiPo 1200mAh) the device will change it's behavior. As the pack voltage decreases the device will shut down peripherals until it safes completely. Also when the device is being charged that it will only partially function.

The sense circuit will be attached all the time and i'm trying to minimize the drain on the battery from it. My though is to use a voltage divider with very high value resistors then buffer the signal with a low quiescent current OpAmp. I'm looking at the TI LPV511 OpAmp and a 1M and 3M ohm resistors. The OpAmp is rated at 1.5uA max and the voltage divider should be 2.5uA worst case. The uC is a 3.3v device.

Is this circuit sufficient or are there alternatives I haven't thought of? simulate this circuit – Schematic created using CircuitLab

Instead of leaving the resistors attached all the time, consider turning them on and off. The procedure would be:

• Turn on the divider by asserting the POLL signal. Enable your ADC.

Repeat the above only as often as you need to update your reading of the battery voltage, which is probably rather infrequent. Therefore, the resistors are on for a really low duty cycle. simulate this circuit – Schematic created using CircuitLab

Notes:

• Since they are rarely on, just select R1||R2 for a reasonable resistance for your ADC to read.
• I assume you made an error and interchanged the values of the divider in your question. You need to get the maximum input voltage down to 3.3V or whatever your ADC voltage is.
• I like it, thank you. You are correct, I got those values reversed. – vini_i Oct 23 '15 at 22:13
• If board space is a concern, you can probably find that switch circuit in an integrated pack. – Houston Fortney Oct 23 '15 at 22:38
• do you have a suggestion for M1? Q1 i suppose a 2n2222 would work just fine... – Alex Oct 20 '16 at 20:41

If the case is that you have a Micro Controller in your circuit, I guess there's no need for external circuits to measure your battery's voltage as most of the Micro Controllers have internal Analog-to-Digital Convertors (ADC) that can measure any voltage you want (problem is the reference voltage).
My suggestion:
As you have a MicroController, I assume that you have a 4-5V fixed dc voltage in your circuit (variable in different ICs, I assume that its 5v). you should connect that fixed dc voltage to your ICs VREF Pin (this is the pin that ADC is compared to. for example if you have a 5V VREF, and 2.5V in ADC, and assuming you have a 10bit ADC, the output should be 512 out of 1024 and thats the exact half of the maximum value).
next thing to do is to divide your battery's voltage to fit in 0-VREF range. for example if you have a 12V battery, the voltage that should be given to ADC is 5v, therefore you need a 5/12 voltage divider:
R1 / (R1 + R2) = 5/12
R1 = 5k, R2 = 7k should do the trick so with this configuration, the thing you should do is:
read the ADC in your IC's infinite loop, and whenever it is less than 853 ( 10 / 12 * 1024), it shows that battery's voltage has been dropped to 10V or less.

• While many ICs have ADC and an internal voltage ref it should be mentioned that many have a variance in their internal VREF. For example the ATMEGA328 has a 1.1V VREF however in practice it can range from 1.0V to 1.2V depending on which chip. You can calibrate a given chip by attaching an external known VREF and measure the internal VREF, then save it to the EEPROM. Future measurements can take into account the actual value of the internal VREF. – HighInBC Oct 22 '15 at 14:31
• My main concern is not hocking the voltage sense to an ADC. My main concern is minimizing the current draw on the battery. With the circuit i'm also going to use a current sense chip (Diodes ZXCT1010) which has a quiescent current of 4uA. I'm trying to match that level. If the voltage sense is consuming 1mA then that's almost 3 orders of magnitude greater then the current sense. – vini_i Oct 22 '15 at 16:43
• thats not a problem. I solved the equations for R1 and R2 without any concern on the current. you can adjust them for the current you want. this way you will have an another equation for the resistances: Vb / (R1 +R2) = I (I is the Current you need) Changing the resistances to 5M and 7M, turns the current to 1uA and I guess thats proper for your work. – Mohammadreza Rezaei Oct 22 '15 at 18:13
• @MohammadrezaRezaei The problem with that is and ADC can't sample with the resistances that high and have a half way decent sampling rate. The capacitor inside the sample and hold circuit of the ADC would charge at a snails pace with that kind of input resistance. This was the reason for the buffer. – vini_i Oct 23 '15 at 10:49