An interesting application for an 08M2 – and a strange problem

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.
 

Attachments

Great work. I like the 08M2 as it tolerates wide supply voltage range.
I read out and store the mVolt difference in each 256 step of calibADC. By taking readings against a multi meter in memory and value locations in EEPROM. Each calibADC address value is a step height (+ nominal starting voltage). When all added together this interpolates the supply voltage to within a few 10's of mVolts.
 
A read of the Microchip old testament "PIC12(L)F1840 Data Sheet"and a few weeks of Poking SFRegisters I managed to crash through the Sub uAmp layer. Along the following lines:
1791270025393.png
Most projects here idle in the single digit uAmp twilight zone. I.e. a decade off a CR2032 coin cell novelty. I set all Pins high OR low as floating voltages and noise keep internal systems active. Pin3 is especially sensitive. I silence Pin3 and spare pins using WPU. The programming if connected can affect results too.
 
Most projects here idle in the single digit uAmp twilight zone. I.e. a decade off a CR2032 coin cell novelty. I set all Pins high OR low as floating voltages and noise keep internal systems active. Pin3 is especially sensitive. I silence Pin3 and spare pins using WPU. The programming if connected can affect results too.

Sounds like you could write a useful article about micropower PICAXE techniques and applications. Battery consumption is an issue with my current project, but I am at the opposite end of the scale, with a 13,400 mAh battery.
 
Back
Top