This question already has an answer here:
- Low current battery monitoring 3 answers
I'm facing a problem that is completely strange for me. This is simple, I build a small electronics device and in that one I just set up a voltage bridge divider to obtain battery voltage to be able to indicate what is the level of the battery.
Behavior: It works quite fine, means that when battery voltage is decreasing, it decreases on the input ADC on the MCU. The main problem, is that it discharges the battery same when the circuit is turned off.
What we tried: OK, we have to find a system that permits to turn off the bridge divider when I turn off the circuit. That's why I simply added a transistor which is driven by the 3.3v regulator of the circuit:
- When circuit is ON, 3.3v from the regulator drives a transistor BC547A (just for test) on the Base with a 10k resistor.
- The transistor becomes "passing", and provide battery voltage to the bridge divider.
- We read VBAT2 on the MCU, when system is powered
Strange behavior: But... this is not working, we observe that the transistor is acting like a regulator because it seems to be not "passing" enough to provide the voltage variation from the battery. This is the circuit that we are trying.
And when we measure variation at the input of the MCU, the transistor seems acting like a regulator O_o. It means that when battery voltage decreases slowly, voltage on the MCU input stay completely constant and stable.
Here are the measure that I've done:
The blue line is VBAT2 (the one that goes to the MCU), and the red one is the probe that is on the battery +.
The battery is a standard single cell lithium ion polymer, with battery voltage that move from 4.15 V (full charge) and 3.1 V (discharged).
Does someone can help me to solve this problem or explain to me why I observe this behavior?