Author Topic: TL431 + RGB LED for power on + low battery indicator  (Read 1236 times)

0 Members and 2 Guests are viewing this topic.

Offline okwTopic starter

  • Frequent Contributor
  • **
  • Posts: 333
  • Country: no
TL431 + RGB LED for power on + low battery indicator
« on: December 28, 2024, 01:16:27 am »
I'm using a TL431 and a RGB LED to indicate both power on and low battery level. Green LED for power on, yellow (green+red) for low battery (~3V and below).
Battery is 18650 (Li-Ion 3.7V).
R: 1.6-2.4V@8mA. This will be limited to 2-3mA (need to experiment how much is needed to blend to yellow.
G: 2.4-3.2V@5mA.
Can the TL431 work in this configuration (without a transistor) down to 3V (or even 2.8V), and still power the red LED properly?
(The RGB needs to be common anode for other project reasons.)
And how do I add a small hysteresis for this? Or is it not needed, if red LED might gently glow more and more as battery level drops closer to the trigger point? I don't want it to blink like crazy at the trigger point.
« Last Edit: December 28, 2024, 06:24:16 pm by okw »
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7413
  • Country: pl
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #1 on: December 28, 2024, 08:46:37 am »
If the common cathode is grounded and the red anode pulled up to Vbat, TL431 "cathode" could be connected to the LED anode directly.

TL431 can work with any cathode voltage starting from ~2V and this could potentially be a problem - it may be unable to fully turn off the LED. Probably the simplest solution is to use a 1.24V variant, these are called TLV431 or similar.

It will probably turn on the LED gradually rather than blink. For hysteresis, I'm afraid you'd need an extra transistor.
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 2076
  • Country: au
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #2 on: December 28, 2024, 08:54:20 am »
Can the TL431 work in this configuration (without a transistor) down to 3V (or even 2.8V), and still power the red LED properly?
Not directly.
The TL431 is designed to clamp at Vref, it can only go slightly under Vref before it saturates.
 There are 4 terminal Vref parts that can saturate the NPN output much lower.
However, if you want common cathode, you need to source current, so additional parts are needed.
 

Online inse

  • Frequent Contributor
  • **
  • Posts: 981
  • Country: de
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #3 on: December 28, 2024, 09:09:53 am »
Do you HAVE to use the TL431?
A comparator with integrated reference would give you all freedom to define the behaviour.
Microchips MCP65R41 is even available with push-pull output, no inverter necessary.
 

Offline okwTopic starter

  • Frequent Contributor
  • **
  • Posts: 333
  • Country: no
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #4 on: December 28, 2024, 12:22:53 pm »
Can the TL431 work in this configuration (without a transistor) down to 3V (or even 2.8V), and still power the red LED properly?
Not directly.
The TL431 is designed to clamp at Vref, it can only go slightly under Vref before it saturates.
 There are 4 terminal Vref parts that can saturate the NPN output much lower.
However, if you want common cathode, you need to source current, so additional parts are needed.

The TL431 Vref is 2.5V. Why is that a problem, since I want it to trigger at approx. 3V? Or are we talking about the base voltage for the NPN, which should be much lower than 2.5V?
« Last Edit: December 28, 2024, 12:33:08 pm by okw »
 

Offline okwTopic starter

  • Frequent Contributor
  • **
  • Posts: 333
  • Country: no
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #5 on: December 28, 2024, 12:28:31 pm »
Do you HAVE to use the TL431?
A comparator with integrated reference would give you all freedom to define the behaviour.
Microchips MCP65R41 is even available with push-pull output, no inverter necessary.

I don't have to use 431, but it's cheap and a lot of low battery indicator examples use this.
For production reasons, I can choose LM393D and LM358D.  In some previous projects I've used the 358 as a comparator, and was told by peers using an opamp as a comparator sometimes has benefits in some areas compared to dedicated comparators.

If I do chose to replace the 431, should I go for a comparator or the opamp?

What about current consumption, TL431, LM393D and LM358D?
 

Online inse

  • Frequent Contributor
  • **
  • Posts: 981
  • Country: de
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #6 on: December 28, 2024, 12:51:02 pm »
For something simple like a lo batt LED, a OPAMP is suitable as well.
It’s more for high speed applications that dedicated comparators are better than OPAMPs.
Sure you can build the circuit with TLV431 and additional components as well.
As long as a power indicator LED is OK from current consumption, some single mA for additional circuits should not matter, right?
The formerly proposed comparator would be hard to beat current consumption wise.
« Last Edit: December 28, 2024, 12:53:11 pm by inse »
 

Offline okwTopic starter

  • Frequent Contributor
  • **
  • Posts: 333
  • Country: no
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #7 on: December 28, 2024, 12:54:15 pm »
For something simple like a lo batt LED, a OPAMP is suitable as well.
It’s more for high speed applications that dedicated comparators are better than OPAMPs.
Sure you can build the circuit with TLV431 and additional components as well.
As long as a power indicator LED is OK from current consumption, some single mA for additional circuits should not matter, right?

Thanks. How would I modify the existing TLV431 circuit?
 

Online inse

  • Frequent Contributor
  • **
  • Posts: 981
  • Country: de
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #8 on: December 28, 2024, 12:59:32 pm »
What is the existing circuit like?
Did you show it yet?
 

Offline Terry Bites

  • Super Contributor
  • ***
  • Posts: 2572
  • Country: gb
  • Recovering Electrical Engineer
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #9 on: December 28, 2024, 02:44:45 pm »
Yeah, save yourself some pain https://www.aliexpress.us/w/wholesale-1S-2S-3S-4S-5S-Lithium-Li%2525252dion-Battery-.html?spm=a2g0o.home.search.0
Here's a knife and fork solution using low voltage (push pull op) comparators eg TLV7032 and a TL431. It would cost more than the Alixpress special [ Attachment Invalid Or Does Not Exist ] l.
 

Offline okwTopic starter

  • Frequent Contributor
  • **
  • Posts: 333
  • Country: no
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #10 on: December 28, 2024, 03:05:55 pm »
Yeah, save yourself some pain https://www.aliexpress.us/w/wholesale-1S-2S-3S-4S-5S-Lithium-Li%2525252dion-Battery-.html?spm=a2g0o.home.search.0
Here's a knife and fork solution using low voltage (push pull op) comparators eg TLV7032 and a TL431. It would cost more than the Alixpress special (Attachment Link) l.

Hehe, thanks, but that's absolutely not what I'm looking for. It's for an integrated design. And for the learning.
 

Offline okwTopic starter

  • Frequent Contributor
  • **
  • Posts: 333
  • Country: no
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #11 on: December 28, 2024, 03:07:16 pm »
What is the existing circuit like?
Did you show it yet?

Sorry, forgot to add the existing design. Have updated the original post with it now :)
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20281
  • Country: gb
  • 0999
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #12 on: December 28, 2024, 04:46:07 pm »
How accurate does it need to be?
 

Offline okwTopic starter

  • Frequent Contributor
  • **
  • Posts: 333
  • Country: no
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #13 on: December 28, 2024, 05:05:51 pm »
How accurate does it need to be?

Not accurate at all. 2.9 or 3.1 :) It's just a heads up to the user, that it's soon time to charge the battery :)
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20281
  • Country: gb
  • 0999
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #14 on: December 28, 2024, 05:14:44 pm »
How accurate does it need to be?

Not accurate at all. 2.9 or 3.1 :) It's just a heads up to the user, that it's soon time to charge the battery :)
Three 1N4148 and a resistor in series with the red LED.
 

Online inse

  • Frequent Contributor
  • **
  • Posts: 981
  • Country: de
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #15 on: December 28, 2024, 05:21:54 pm »
The schematic shows a common Anode LED, you entioned common Cathode, so which is right?
 

Offline okwTopic starter

  • Frequent Contributor
  • **
  • Posts: 333
  • Country: no
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #16 on: December 28, 2024, 05:27:33 pm »
The schematic shows a common Anode LED, you entioned common Cathode, so which is right?

Sorry, common anode. Original posted fixed now.
 

Offline okwTopic starter

  • Frequent Contributor
  • **
  • Posts: 333
  • Country: no
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #17 on: December 28, 2024, 05:33:11 pm »
How accurate does it need to be?

Not accurate at all. 2.9 or 3.1 :) It's just a heads up to the user, that it's soon time to charge the battery :)
Three 1N4148 and a resistor in series with the red LED.

How would that illuminate the LED below ~3V and keep it off above?
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20281
  • Country: gb
  • 0999
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #18 on: December 28, 2024, 05:41:00 pm »
How accurate does it need to be?

Not accurate at all. 2.9 or 3.1 :) It's just a heads up to the user, that it's soon time to charge the battery :)
Three 1N4148 and a resistor in series with the red LED.

How would that illuminate the LED below ~3V and keep it off above?
It won't. It'll turn the LED on when the voltage approaches 4V, which is what the schematic attached to the original post will do.
 

Offline okwTopic starter

  • Frequent Contributor
  • **
  • Posts: 333
  • Country: no
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #19 on: December 28, 2024, 05:45:37 pm »
How accurate does it need to be?

Not accurate at all. 2.9 or 3.1 :) It's just a heads up to the user, that it's soon time to charge the battery :)
Three 1N4148 and a resistor in series with the red LED.

How would that illuminate the LED below ~3V and keep it off above?
It won't. It'll turn the LED on when the voltage approaches 4V, which is what the schematic attached to the original post will do.

The green yes, but the red should turn on when voltage drops below ~3V.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20281
  • Country: gb
  • 0999
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #20 on: December 28, 2024, 05:51:08 pm »
How accurate does it need to be?

Not accurate at all. 2.9 or 3.1 :) It's just a heads up to the user, that it's soon time to charge the battery :)
Three 1N4148 and a resistor in series with the red LED.

How would that illuminate the LED below ~3V and keep it off above?
It won't. It'll turn the LED on when the voltage approaches 4V, which is what the schematic attached to the original post will do.

The green yes, but the red should turn on when voltage drops below ~3V.
That's not what the circuit attached to your original post will do.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7413
  • Country: pl
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #21 on: December 28, 2024, 06:33:35 pm »
Yeah, the original circuit works in reverse and it puts TL431 in series with the LED, so minimum supply voltage for operation is 2V + Vf or roughly 4V.

I would recommend breadboarding before committing to production, but this below looks like it might just meet your performance specifications...
It works by gradually stealing current away from G and towards R, using G as a voltage reference (resistor values assume Vf=2.25V).
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20281
  • Country: gb
  • 0999
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #22 on: December 28, 2024, 06:41:06 pm »
That'll work.

The LM393 is another option. Don't go for 3V, which is far too low for lithium ion. Aim for 3.5V. This uses the green LED as a voltage reference. The TL431 will give better results, but I wanted something cheap.
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7413
  • Country: pl
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #23 on: December 28, 2024, 06:44:23 pm »
A subtle feature of my circuit is that its exact reference voltage is Vf(green) - Vbe(3904). People say that tempco of red LEDs is fairly matched to tempco of silicon diodes/transistors, so if green LEDs aren't very far away, the two coefficients roughly cancel and such reference should be more stable with temperature than either a transistor or an LED alone.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20281
  • Country: gb
  • 0999
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #24 on: December 28, 2024, 08:18:03 pm »
LEDs have a negative temperature coefficient, just like silicon. The ΔVF/ΔT curves for red appear to be the same shape as blue and pure green, just steeper, which reflects the higher forward voltage.
https://www.ti.com/lit/an/slvaeb5/slvaeb5.pdf
 

Online nali

  • Frequent Contributor
  • **
  • Posts: 730
  • Country: gb
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #25 on: December 28, 2024, 08:29:27 pm »
An open-drain MCU reset supervisor should do this. One SOT23 device, one resistor, done.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20281
  • Country: gb
  • 0999
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #26 on: December 29, 2024, 12:40:17 pm »
How about the LM385?
 

Online Avelino Sampaio

  • Frequent Contributor
  • **
  • Posts: 283
  • Country: br
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #27 on: December 29, 2024, 01:54:40 pm »
When it comes to battery-powered projects, keeping an LED energized at all times is an issue to be considered. I don't see any need to indicate that the battery is sufficiently charged; it is enough to indicate with the red LED that it is time to recharge. Here is an example, in which the circuit consumes around 55µA, while the LED is not activated. Today's LEDs can also be used with very little current, and still achieve good brightness.
 

Online Avelino Sampaio

  • Frequent Contributor
  • **
  • Posts: 283
  • Country: br
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #28 on: December 29, 2024, 02:18:01 pm »
An open-drain MCU reset supervisor should do this. One SOT23 device, one resistor, done.

It is undoubtedly the simplest form. Low current consumption in Off and has an option for the desired reset voltage.

https://www.lcsc.com/datasheet/lcsc_datasheet_2410010301_KEC-Semicon-KIA7029AF-RTF-P_C69759.pdf
 

Online inse

  • Frequent Contributor
  • **
  • Posts: 981
  • Country: de
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #29 on: December 29, 2024, 05:59:26 pm »
Low Batt is usually a light that comes up when battery goes down.
The reset generator pulls down a common anode LED when the voltage drops below specified level - BINGO
 

Offline okwTopic starter

  • Frequent Contributor
  • **
  • Posts: 333
  • Country: no
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #30 on: December 29, 2024, 06:04:00 pm »
What about a dual opamp (to save space and cost)? One channel for low battery led and one channel for reset supervisor?
Not sure if the esp32-c3 powered from battery really needs reset supervisor?
 

Online nali

  • Frequent Contributor
  • **
  • Posts: 730
  • Country: gb
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #31 on: December 29, 2024, 06:05:18 pm »
https://www.diodes.com/assets/Datasheets/APX803L.pdf

Quote
These circuits perform the supervisory function by sending out a reset
signal whenever it founds the monitored VCC level falls below a
chosen threshold voltage level and the reset signal will remain until
VCC recovers to a level higher than threshold voltage. The APX803L
has an open-drain output with an active-low output pin and features
several delay time options (0ms, 55ms, 220ms and 450ms) for
system need.
« Last Edit: December 29, 2024, 06:32:04 pm by nali »
 

Online nali

  • Frequent Contributor
  • **
  • Posts: 730
  • Country: gb
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #32 on: December 29, 2024, 06:18:53 pm »
Or another idea... use a pair of NPN as a long-tailed pair which will switch over from green to red rather than power both LEDs when the battery is low. There may or may not be an available reference voltage to use (maybe even Vcc if the MCU is powered by a LDO rather than direct from the battery)
 

Offline okwTopic starter

  • Frequent Contributor
  • **
  • Posts: 333
  • Country: no
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #33 on: December 29, 2024, 07:06:12 pm »
Yes of course, would be better to switch, instead of blending colors.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 20281
  • Country: gb
  • 0999
Re: TL431 + RGB LED for power on + low battery indicator
« Reply #34 on: December 29, 2024, 08:20:35 pm »
Yes of course, would be better to switch, instead of blending colors.
Why didn't you say?

Presumably you're not using the blue LED? Here's an idea which uses it as a reference. It'll obviously glow dimly, but shouldn't be noticeable. There is some overlap when both red and green LEDs are on, giving three colours: green, amber and red, as it discharges.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf