Baker Steve
Member
I needed to do two-level monitoring of the voltage of a lithium Ion battery. What I mean by that is to detect two threshold voltages during discharge and create an active low output when each is reached. Both thresholds needed a hysteresis gap to avoid oscillation. I built this to work with an Adafruit Powerboost 1000 module: Vcc of the circuit is connected to the Powerboost's BAT terminal, which is a direct battery connection. The essential bit is a 47k+47k potential divider across Vcc and ground, with the 08M2's ADC input connected to its mid-point. The circuit works due to the 08M2's ability to operate across a wide range of supply voltages that nicely bracket the working range of a lithium cell, plus its internal ADC and voltage reference. In this case the range of interest is 3.2-4.2 volts.
I have attached the code. The novel thing about the circuit is that the chip monitors its own supply voltage.
To understand this application, it helps to know that when a lithium battery works through a boost converter such as the Powerboost 1000, the actual battery voltage fluctuates with the load on the converter even though it is maintaining a stable output voltage. This application allows control signals to be derived that indicate what the battery is actually doing.
The strange problem... Clearly a battery monitor should not load the battery it is monitoring unduly. The 2x47k potential divider gives a drain of some 45uA, while the 08M2 might add a few hundred uA more. So consternation ensued when I measured a drain of 20mA – which is actually enough to stop charge completion on the PB1000.
To cut a long story short, replacing the 08M2 with a fresh one dropped the drain to 640uA. I do not know why, other than the fact that there was clearly something bad about the original 08M2 chip. Maybe it had got accidentally abused in its past.
I have attached the code. The novel thing about the circuit is that the chip monitors its own supply voltage.
To understand this application, it helps to know that when a lithium battery works through a boost converter such as the Powerboost 1000, the actual battery voltage fluctuates with the load on the converter even though it is maintaining a stable output voltage. This application allows control signals to be derived that indicate what the battery is actually doing.
The strange problem... Clearly a battery monitor should not load the battery it is monitoring unduly. The 2x47k potential divider gives a drain of some 45uA, while the 08M2 might add a few hundred uA more. So consternation ensued when I measured a drain of 20mA – which is actually enough to stop charge completion on the PB1000.
To cut a long story short, replacing the 08M2 with a fresh one dropped the drain to 640uA. I do not know why, other than the fact that there was clearly something bad about the original 08M2 chip. Maybe it had got accidentally abused in its past.

