3
\$\begingroup\$

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.

enter image description here

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?

\$\endgroup\$
4
  • \$\begingroup\$ When the power is OFF, how do you power-up the RED Color LED? \$\endgroup\$
    – AKR
    Aug 9, 2013 at 5:05
  • \$\begingroup\$ 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. \$\endgroup\$
    – Sean
    Aug 9, 2013 at 5:08
  • \$\begingroup\$ Can you share the part number of LED you have \$\endgroup\$
    – AKR
    Aug 9, 2013 at 5:11
  • \$\begingroup\$ Added link to the LED I'm using \$\endgroup\$
    – Sean
    Aug 9, 2013 at 6:47

3 Answers 3

5
\$\begingroup\$

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.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
10
  • \$\begingroup\$ I don't understand though, with the switch open, how does anything get power? \$\endgroup\$
    – Sean
    Aug 9, 2013 at 6:42
  • 1
    \$\begingroup\$ @Sean: The logic is driven off a separate regulator. \$\endgroup\$ Aug 9, 2013 at 6:45
  • \$\begingroup\$ 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? \$\endgroup\$
    – Sean
    Aug 9, 2013 at 6:56
  • 1
    \$\begingroup\$ @Sean, there you have it. I don't know if it works, or the resistor values you need, but I hope it makes sense. \$\endgroup\$ Aug 9, 2013 at 7:41
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ Aug 9, 2013 at 7:55
1
\$\begingroup\$

schematic

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.

\$\endgroup\$
7
  • \$\begingroup\$ Hmm but what if there is some other load we want to drive with that switch? \$\endgroup\$ Aug 9, 2013 at 15:43
  • \$\begingroup\$ R4 is the load. It may have any type. But be careful with inductive load such as motor as it may break LED. \$\endgroup\$
    – Vovanium
    Aug 9, 2013 at 16:00
  • \$\begingroup\$ Would something like the coil on a relay harm the LED? \$\endgroup\$
    – Sean
    Aug 9, 2013 at 19:28
  • \$\begingroup\$ 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. \$\endgroup\$ Aug 10, 2013 at 1:07
  • \$\begingroup\$ 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. \$\endgroup\$
    – Vovanium
    Aug 12, 2013 at 10:58
0
\$\begingroup\$

enter image description here

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.