Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Challenge of the day : Dual color LED

Status
Not open for further replies.
awt has the best idea.
You can fine-tune the current so both LEDs are equal brightness.
**broken link removed**
 

Attachments

  • EqualBrightness.gif
    EqualBrightness.gif
    2 KB · Views: 314
Last edited:
I agree, but you only need 2 resistors and ONE diode, if that simplification is important.

For the LED that needs the higher value resistance it only uses the one resistor.
For the LED that needs the lower resistance (or more current etc) the diode is on and it gets 2 resistors in parallel.

As a practical suggestion, you really need to power up the LEDs and look at them! They may need specific currents to APPEAR correctly balanced in brightness, both the LED efficiency will be different between the 2 colours as will your eye's response to the 2 different wavelengths. I've used bi-colour LEDs a number of times and often needed to run the 2 LEDs at quite different currents to make them look right.
 
Here is my solution:

**broken link removed**

You can design it so that when Port0 is high and Port1 is low, the current flows through R2 to the RED led. When Port0 is low and Port1 is high then the R1 and R2 are connected parallel and current flows through GREEN led and both resistors.

Assuming 5V high voltage:

If R2 = 160 ohms and R1 = 3300 ohms then the current for 2.0V red led is 18.2 mA and the current for 2.2V green led is 18.3 mA. And the "wasted" current through R1 while the red led is lit, is 0.6 mA.

Sorry for the poor schematics, I didn't have a good symbol for bicolor led. Below are schematics for the two states:

**broken link removed**

If you want the LED currents to be exactly the same, then:

R1 = R2*(V+Vr-Vg) / (Vg-Vr)

where V is supply voltage, Vr and Vg are the green and red led voltages and R1, R2 are the resistors.
 
Last edited:
For the circuit in post #21 or #23 the two resistors could be combined into a trimpot (250R for the first circuit). That would simplify setting the relative brightness.
 
Wow! colin55 & misterT, good thinking, good circuits with fewer components but a bit complex analysis required.

It's not complex.. I just had some time to kill and made it look complex :)
 
Wow guys ! Thanks for the solutions !!

misterT, I really like it, thanks for the diagrams ! Now that I look at it, it seems so obvious !! Still needs some math to find out the values, but I like the fact its only 2 resistors !!

If you don't have a copyright on that solution, it will end up directly in my project !! :D

Thanks again !
TG

P.S.
Sorry for the poor schematics, I didn't have a good symbol for bicolor led.
Yeah... It really is a shame... :rolleyes:
 
Last edited:
Hi,

From what i have read it appears that you want to drive a two leaded bicolor red/green LED with two uC port pins. The problem is that with the selection of any single resistor the red LED draws more current than the green LED.

The simplest solution is probably to use two resistors and three uC port pins. You can then direct current as needed and also switch resistor values.

Another idea might be to use two resistors and two diodes, directing the diodes to conduct through the appropriate resistors for each color LED.

Another idea is to scrap the current two lead LED and use a three lead LED. You can then use the right size resistors for each LED and still only two port pins. I did this with a project with a tri color LED and it works perfectly. These LEDs are not expensive these days either.

A really cheap idea is to use two different LEDs one green and one red which can be wired up each with their own resistor.
 
If you don't have a copyright on that solution, it will end up directly in my project !! :D

Of course you can use it, that's why I posted it. I don't think I'm the first one to come up with that circuit :) Although I didn't find similar circuits with google. I did find this one interesting circuit, but it is not very practical because it wastes so much current in the voltage divider: **broken link removed**
 
Last edited:
Hi,

From what i have read it appears that you want to drive a two leaded bicolor red/green LED with two uC port pins. The problem is that with the selection of any single resistor the red LED draws more current than the green LED.

The simplest solution is probably to use two resistors and three uC port pins. You can then direct current as needed and also switch resistor values.

Another idea might be to use two resistors and two diodes, directing the diodes to conduct through the appropriate resistors for each color LED.

Another idea is to scrap the current two lead LED and use a three lead LED. You can then use the right size resistors for each LED and still only two port pins. I did this with a project with a tri color LED and it works perfectly. These LEDs are not expensive these days either.

A really cheap idea is to use two different LEDs one green and one red which can be wired up each with their own resistor.

the idea1 is out of it. Idea2, i have suggested something like that earlier while colin55 & misterT have come out with better one. Idea3 is a good one if there is no restriction to the chosen 2 lead LED.
 
Hi,

Gee, almost forgot the ultra simple solution:
Using a single resistor chosen to light the green LED properly, then when it's time to light the red LED use pulse width modulation to lower the average current through it. That way one resistor alone will do it. Probably a 50 percent duty cycle would do it but you can experiment.
 
Last edited:
Status
Not open for further replies.

Latest threads

Back
Top