Looking for how to go about adding a low battery indicator to my circuit

Thread Starter

TISHBITE

Joined Dec 9, 2020
2
Hello, i'm working on a project and i want to add a feature where if the batteries of the product are running low, LED becomes red and if the batteries are full or new , the led stays green. thanks
 

jpanhalt

Joined Jan 18, 2008
11,087
Welcome to AAC.

There are many ways to do that. Perhaps the simplest is to get a battery management chip (BMS) that includes both charger and low-voltage indicators.

Are you using rechargeable batteries? If so, what type? If not, I would delete the green LED as that will only hasten their discharge. What battery capacity and voltage are you using?
 

crutschow

Joined Mar 14, 2008
34,282
A TLV431 programmable reference can perform that function, but we need to know more about the battery size and its voltage.
 

MrSoftware

Joined Oct 29, 2013
2,188
If you want to do it with individual components, then here is one possible way. Maybe not the best way, but functional. Adjust the resisters and zener to values that work for your case. Bump the resistors up a ton if you want less current waste. As-is the LED turns on when the battery drops to about 7.3-ish Volts.



1607537757562.png

1607537906954.png



Edit: Here's one possible solution for both green and red LED's by adding an AND gate, there's probably a better way:



1607541082910.png
 
Last edited:

Ian0

Joined Aug 7, 2020
9,668
1. The AND gate is superfluous. Join R3 to the output of the op-amp.
2. To make it work better at low current, replace the zener with a bandgap reference. Some of them will produce an accurate reference down to 10uA. A zener is only accurate at its rated current - usually 5mA.

The circuit will work pretty well but give false reading due to the internal resistance of the battery if a heavy load is connected.
 

crutschow

Joined Mar 14, 2008
34,282
Below is the LTspice simulation of a circuit using a TLV431 precision reference as a comparator to give a stable trip point.
It trips at a Ref voltage of 1.24V.
Pot U2 adjusts the trip point (arbitrarily set to 3V for the sim).

1607545570584.png
 

Ian0

Joined Aug 7, 2020
9,668
Just one very slight snag: the TLV431 output voltage never goes below 1.24V, so the transistor will always be switched on.
Try it with a small MOSFET, with Vgs(th)>1.5V
 

crutschow

Joined Mar 14, 2008
34,282
TLV431 output voltage never goes below 1.24V
Sort of.
The data sheet says the minimum output is about 1V when used as a comparator.
My Spice model doesn't show that. :oops:
Back to the drawing board.

Okay below is the circuit modified with an added diode and resistor so that Q1 turns off with a Vd of 1V.

1607554587723.png
 

Ian0

Joined Aug 7, 2020
9,668
I haven’t tried a TLV, but the normal TL431 can’t get below its 2.5V reference, which means it has to have a resistive divider to drive an npn transistor; but I suspect the TLV would be OK with a Diodes ( ex Zetex) ZVN MOSFET.
But I have tried a LM385 (which works the same as a TLV431 but attached to the positive rail) driving a p-channel MOSFET. LM385 also has a 6V zener built in, which protects the MOSFET gate.
 

MrSoftware

Joined Oct 29, 2013
2,188
1. The AND gate is superfluous. Join R3 to the output of the op-amp.
2. To make it work better at low current, replace the zener with a bandgap reference. Some of them will produce an accurate reference down to 10uA. A zener is only accurate at its rated current - usually 5mA.

The circuit will work pretty well but give false reading due to the internal resistance of the battery if a heavy load is connected.
I used the AND gate because otherwise if the OpAmp is powered off both LED's would be lit. Though it is probably reasonable to assume the circuit would be powered off in whole and not in part.
 

Thread Starter

TISHBITE

Joined Dec 9, 2020
2
Welcome to AAC.

There are many ways to do that. Perhaps the simplest is to get a battery management chip (BMS) that includes both charger and low-voltage indicators.

Are you using rechargeable batteries? If so, what type? If not, I would delete the green LED as that will only hasten their discharge. What battery capacity and voltage are you using?
NO sir. I am using normal batteries . 9v battery
 

jpanhalt

Joined Jan 18, 2008
11,087
NO sir. I am using normal batteries . 9v battery
That was the concern I had in post #2. Leaving an LED on will drain the battery. Heck, the anti-theft in my cars drains the battery in a few months. A 9V battery is rated about 900 mAh. That is, it will 1 mAh of about 900 hours or 10 mA for 90 hours. You can see how an LED that was on continuously would drain it. Flashing the LED is one way to conserve life. You might also consider using an LCD (liquid crystal) indicator that has very low current drain, and only show battery status when you turn it on.
 

crutschow

Joined Mar 14, 2008
34,282
I have tried a LM385 (which works the same as a TLV431 but attached to the positive rail) driving a p-channel MOSFET.
Since that's just a two-terminal reference how did you get the sharp switching needed for the MOSFET gate?
Or did you add a comparator to the circuit?
 

crutschow

Joined Mar 14, 2008
34,282
Here's a TLV431 circuit with an added CD40106 astable to pulse the green LED when the battery voltage is high.
When the voltage goes below the trip point (here set to 6V) the green LED stops pulsing and the red LED turns on.
The values show give a 200ms pulse every 10 seconds.

The LEDs should be high brightness types to minimize current draw.

1607968692165.png
 
Last edited:
Top