How do you get a bi-color LED (3-pin) to accept two inputs and operate without a mechanical switch or relay?

Example: computer has an "I'm on" light, and an "I'm working" light. I want the LED green whenever powered on, and amber when it is being accessed?  Should be a simple transistor solution without a logic chip, I'm thinking.

sort by: active | newest | oldest
If this is for a computer, the motherboard has pins for status lights that only require connection to the LED.  In this case, you would simply connect the cathode (longest pin) to common and each anode to the status pins via a resistor (the value depends on the LED and the voltage from the motherboard).

A 3-pin LED is actually a tri-color LED, as when both diodes are lit it will produce a different color (i.e., a green and red together will produce yellow).  In this example, the LED will be green (or red, depending on how you wire it) when powered on, and yellow when working; you'll never see the third color because the computer cannot be working while powered off, of course.

If this is for a different application, the "powered on" LED leg must be connected to a source that is only supplied when the unit is on (which is usually the power switch, but this could vary).  The "working" leg could vary depending on the device.
pensic (author)  MahavishnuMan7 years ago
Thank you for the quick reply.  That would certainly work, but it gives me the "both on" color, which is really not different enough to be noticed.  What I would like is a circuit that turns off the green and lights the amber when active, and reverts back to green only when inactive. I've seen external hard drives that do this, but I don't have one to operate on.
Strange, I didn't realize the LED would have green and amber - usually it's green and red, and the combined color is amber.

In that case, use a NAND gate to power the green side.  The power status pin will go to one side of the NAND, and the busy status will connect to both the amber LED and the other side of the NAND.  When both status lines are powered, the NAND gate will switch the green off.
pensic (author)  MahavishnuMan7 years ago
steveastrouk and MahavishnuMan, I've seen  mostly red and green, too.  These have equal length leads, as well. Maybe it was a reject batch (or partially burned...)  But I've got several to use so I'm going for it.

I will try out the NAND gate. Sounds like a winner.  At a quick search, a single 2 input NAND is what I need.  Any idea off the top of your head on a specific part that would be good for this?   

Thank you very  much! I will pursue online with Google and Mouser Electronics(or any other suggestions you have.)
No problem.  As far as NAND gates go, they're extremely common and come in all sorts of flavors (due to the fact that you can literally build many things from them, like any logic gate you can name - even memory).  This one seems like it should be sufficient to drive your average LED (it is rated for 32 mA), although if this isn't enough you may need to run the output of the NAND through a buffer.
I haven't seen bi-colour LEDs that aren't usually red/green.  The only way to get amber IS to put red and green on together.