Jump to content

0V - 24V Power Supply with RGB led

Earl Talatala

Good day. I want create a power supply that ranges from 0V up to 24V. But what I want as a twist is that, I want the led color to be green on 0V - 8V, color blue on 8.1V - 16V, and color red on 16.1V - 24V. The schematic is a bit easier to find but what I like to know is how to wire the leds so it'll function as mentioned above. Thanks!

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, Earl Talatala said:

Good day. I want create a power supply that ranges from 0V up to 24V. But what I want as a twist is that, I want the led color to be green on 0V - 8V, color blue on 8.1V - 16V, and color red on 16.1V - 24V. The schematic is a bit easier to find but what I like to know is how to wire the leds so it'll function as mentioned above. Thanks!

What kind of led(s), 3 separate led's or a single RGB led ? If a single RGB led, common anode or common cathode ? How precise does it need to be ?

Link to comment
Share on other sites

Link to post
Share on other sites

@Earl Talatala : Since it sounded like fun I gave it a go and came up with this, tried and tested on breadboard. The 3 LED's could be replaced with a single, common anode RGB LED since all the anodes are tied to the positive supply.

 

TL431_LED_Diagram.jpg.9a22a8ad6548476b3763c028c915ce7d.jpg

Circuit operation:

The TL431 will allow current to flow from (c)athode to (a)node once it's (r)eference to anode voltage reaches 2.5V. Resistor divider R7/R8 is chosen so it reaches 2.5V when V-TEST is 8V, turning IC1 on and lighting LED2. Resistor divider R11/R12 is chosen so it reaches 2.5V when V-TEST is 16.1V, turning IC2 on and lighting LED3. When IC2 is on, it turns off IC1 by pulling it's reference voltage down trough D3. It also turns of Q1 by pulling it's base voltage down trough D2. When IC1 is on, it turns Q1 off by pulling it's base voltage down trough D1. Resistors R6 and R10 are there to prevent their respective LED's from lighting due to the minimum 1mA bias current requirement of the TL431.

 

When using the 0.5% precision version of the TL431, combined with 0.1% precision resistors for R7/R8 and R11/R12, around 1% total precision should be attainable.

Link to comment
Share on other sites

Link to post
Share on other sites

The easiest to do with off the shelf parts would be to buy a regular adjustable power supply and then use that chip like LM3914 or LM3916  which lights up a number of leds or a single led depending on an input voltage  ... so for example you power it with 5v and use a voltage divider to divide the 0.. 24v down to  0.. 5v and depending on the input voltage, the chip will light one of the leds on the output (like a percentage of the maximum voltage)

 

Here's a long tutorial : https://learn.sparkfun.com/tutorials/dotbar-display-driver-hookup-guide

 

Here's some more stuff  : http://kuzyatech.com/lm3916-led-bargraph-vu-meter

 

 

Another option would be to use a plain boring 8-10 pin microcontroller with an ADC and 3 outputs ... same story , use two resistors as voltage divider to feed 0..1v or 0..4v into the micro, measure it into the microcontroller, and depending on value turn on or off one of the leds.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×