# How do I design a circuit for a bi-color led to display power?

I'm trying to create a simple circuit that will turn a Red/Green LED green when the power is on and red when it is off. I figure the simplest way to do this would be using a SPDT switch, but the switch in the circuit I'm designing is a 40 amp relay, and I found a SPST one for about a buck while the SPDT one was almost 4. For future reference, and also to cut the cost of designing my current circuit I'm trying to come up with some way to wire it up and basically make a "normally on" switch for the red and "normally off for the green.

The closest I've come is finding this circuit which would work except for the fact that the bicolor led shares a cathode.

Is there any way to change up the circuit, or is there something else I can try which would free up the cathode to make it so I can independently switch on the two LEDs?

• When the power is OFF, how do you power-up the RED Color LED?
– AKR
Aug 9, 2013 at 5:05
• This circuit would be used to power up the red LED when the switch is open, then the green LED would simply be wired up to the switch. Problem is I'd need two seperate LEDs for this particular circuit to work, and what I have is a bi-color with a common cathode.
– Sean
Aug 9, 2013 at 5:08
• Can you share the part number of LED you have
– AKR
Aug 9, 2013 at 5:11
– Sean
Aug 9, 2013 at 6:47

A resistor, R4, is used to pulldown VLOAD when the SPST switch, SW1, is open. This means that when SW1 is closed, VLOAD is high, and when SW1 is open, VLOAD is low.

An NPN digital logic inverter is used to provide the complement of the VLOAD signal. The input to the inverter is VLOAD, and it is powered by the voltage source. The output of the inverter is VLOADN.

D1 and D2 have shared cathodes. Since VLOADN = ~VLOAD, there is always one LED that is on while the other is off:

• If SW1 is closed, the inverter input is high. D1 is on and D2 is off.
• If SW1 is open, R4 pulls the input of the inverter low. D1 is off and D2 is on.

simulate this circuit – Schematic created using CircuitLab

• I don't understand though, with the switch open, how does anything get power?
– Sean
Aug 9, 2013 at 6:42
• @Sean: The logic is driven off a separate regulator. Aug 9, 2013 at 6:45
• Any chance you could further explain the circuit for the inverter? I'm still just starting out with circuitry and from what I understand, I could make it with a series of transistors, and/or diodes, but it is possible to make a super simple one with a single transistor. Problem is, that is basically what I had in the first example. Could you show what would be the easiest way to make the inverter? Is it an IC or something that I'd have to create?
– Sean
Aug 9, 2013 at 6:56
• @Sean, there you have it. I don't know if it works, or the resistor values you need, but I hope it makes sense. Aug 9, 2013 at 7:41
• That's the magic of Q1. When Q1 is turns on, it provides a path from VLOADN to ground. From the link, "The output (of the inverter) is discharged to ground, getting close to 0 V but never quite reaching it (it reaches a voltage drop away from 0 V)." So when Q1 is on, D2 will have close to ground at both terminals so it will not be on. Aug 9, 2013 at 7:55

simulate this circuit – Schematic created using CircuitLab

This curcuit will do it for you, assuming D1 is red and D2 is green. R3 specifies current through LEDs. The trick is that when D2 lights up, R1 makes voltage on D1 less than its forward voltage drop need to light it.

• Hmm but what if there is some other load we want to drive with that switch? Aug 9, 2013 at 15:43
• R4 is the load. It may have any type. But be careful with inductive load such as motor as it may break LED. Aug 9, 2013 at 16:00
• Would something like the coil on a relay harm the LED?
– Sean
Aug 9, 2013 at 19:28
• That's interesting to carefully balance the two lines so that even when the circuit is closed for both, only one would light up. As long as the voltage source is well regulated, there is no danger of damaging the LEDs, unless the switch itself doesn't behave like an ideal open or short. But none of these designs are really safe against that. Aug 10, 2013 at 1:07
• trav1s, unbalanced circuit (too large R1) will have green brighter than red, so there's only task is to tune R1 for aestetic. If you worry about bad regulator you can take more powerful LED to survive maximum voltage. Aug 12, 2013 at 10:58

Here is another method that I came up with. When the switch is open, there is no voltage drop across the resistor and the IRF closes. Just make sure the Vgs of the MOSFET is close to 5V.

Or tie the gate of the transistor to the cathode, and expect a 1.5V drop across LED with 0 current flowing through it.