Bi color LED drive

Status
Not open for further replies.

Mosaic

Well-Known Member
Just a simple one....using 1 pin and tristate a BI color 2 pin LED can be driven to display either color, say green or red.
What colors can be realised from green & red placed on a duty cycle to blend...

Orange?


thx
 
2-leg (reversed) bi-colour LEDs can be driven from 1 PIC pin into a 2 resistor voltage divider. It's not energy efficienct and won't allow both LEDs to be OFF, but it will allow 3 states; red green and yellow.

I've done it in the past but more commonly now the bi-colour LEDs all seem to have 3 legs.

Mosiac, I don't think you will get many colours that you can recognise. You might get 4 colours; red orange yellow green. If you try to get more they will be too similar and you probably won't be able to tell the difference.
 
Last edited:
2-leg (reversed) bi-colour LEDs can be driven from 1 PIC pin into a 2 resistor voltage divider. It's not energy efficienct and won't allow both LEDs to be OFF, but it will allow 3 states; red green and yellow.
That would be horridly inefficient.

I guess making it input would turn it off.

Mike.
 
Mike:
It's not exactly a one pin application.
I am driving an array of 20 LEDs using 9 pins, 4 banks of 5 LEDS each. That means I have both the bank selector pin AND the LED selector pin to do control. Thus I am not using a voltage divider at all, only a 220 ohm dropping resistor. I chose an LED that is a two pin with a close Vf for both colors. Thus I can reverse the voltage on the LED using the two pin control to give fully efficient bi colors. I can also make it go off properly since I have two pin control of all the LEDs.
 
That would be horridly inefficient.

I guess making it input would turn it off.

Mike.

Whoops! Of course it would.

The efficiency is not that bad, those LEDs normally only need 3 or 4 mA to give a decent indication and have a Vf of about 1.7v so 2 resistors each about 470 ohms works fine.

With the LEDs off it uses about 5.3mA and with a LED on it uses about 7mA with about 3.5mA going through the LED.

It's a "good enough" working solution to get a bi-colour LED on 1 PIC pin.
 
One would think that you should be able to create slightly greener or redder hues of orange.
If say you run a PWM signal with
50% cycle = Orange
0%(100% 0V) = Red
100% = Green
25% = Redange
75% = Greenge

I'm not sure how it would look to the eye, but if you cycle it through the five colours you might notice a difference.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…