0
\$\begingroup\$

I'm working on a switching circuit for a guitar amplifier that uses one DPDT relay which is powered by 12V DC supply. A SPST switch (panel mount or footswitch) will power the relay and switch to a second amplifier channel.

Is it possible to wire a common-cathode RGB LED to glow one color (red) when relay is off and other color (blue) when relay is on?

The closest circuit I could find is this Alternating between two LEDS using BJTs but it has common anodes.

Is it possible to rework the circuit to use common cathodes?

If that's possible, I could bring a positive voltage to R4 when I turn the relay on.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ That question you linked has a mixture of solutions, some are common cathode and some are common anode. The one in the question itself is common cathode. \$\endgroup\$ – Finbarr Jan 10 '18 at 15:56
  • 1
    \$\begingroup\$ If red is permanently on, switching green gives you red and yellow. \$\endgroup\$ – Brian Drummond Jan 10 '18 at 16:09
  • \$\begingroup\$ Note there are also exist bi-colored LEDs which may save some space in case needed (these have 3 pins). \$\endgroup\$ – Michel Keijzers Jan 10 '18 at 16:27
1
\$\begingroup\$

If you switch high side you can use a P-MOSFET as shown below.

schematic

simulate this circuit – Schematic created using CircuitLab

As others have mentioned, a simpler solution is simply to mix the colours.

schematic

simulate this circuit

\$\endgroup\$
10
  • 1
    \$\begingroup\$ thanks! Switching between red and blue is what I need (i.e. without mixing colors). The solution with mosfet seems like the one to use then. One question, how does turning the second LED on make the first LED go off? It still seems to be connected to the +ve supply. \$\endgroup\$ – Branislav Stojkovic Jan 10 '18 at 16:18
  • \$\begingroup\$ @BranislavStojkovic the left led is only on if the switch is closed. and will be pulled down through the relay when the switch is open. That turns on the mosfet which lights the other LED. \$\endgroup\$ – Trevor_G Jan 10 '18 at 16:20
  • \$\begingroup\$ @BranislavStojkovic please not I changed the resistors in the first schematic. This is important to prevent the left diode from being back biased when the MOSFET is on. It also lets you set the brightness of each colour separately. \$\endgroup\$ – Trevor_G Jan 10 '18 at 19:38
  • 1
    \$\begingroup\$ thanks for the update, good to know. I just need to find a P-MOSFET and will breadboard it. I think that only one store in my city carries BS250 and that's about it when it comes to P-MOSFETS :) \$\endgroup\$ – Branislav Stojkovic Jan 11 '18 at 9:06
  • 1
    \$\begingroup\$ Looks like I wired the MOSFET reversed. It works as expected after I flipped it around. Thanks again for your help! \$\endgroup\$ – Branislav Stojkovic Jan 15 '18 at 22:16
0
\$\begingroup\$

If all you want is to have two different colours depending on whether a SPST switch is on, the simplest possible way is to have one on permanently and one switched, giving you either red or yellow. This answers the question as written. Trevor's answer would work to give one on or the other on (without mixing colours), which may be what you meant, however requires more complexity and components.

schematic

\$\endgroup\$
0
\$\begingroup\$

This trick is based on differences in the forward voltages of the diodes, which are mostly unknown so far. If the forward voltage of D3 is less than the combined Vf of D1 and D4, then when the switch closes, D3 will come on and D1 will go off.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
  • \$\begingroup\$ duplicate answer \$\endgroup\$ – Trevor_G Jan 10 '18 at 17:38
0
\$\begingroup\$

This trick is based on differences in the forward voltages of the diodes, which are mostly unknown so far. If the forward voltage of D3 is less than the combined Vf of D1 and D4, then when the switch closes, D3 will come on and D1 will go off.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
1
  • \$\begingroup\$ I'd be concerned about the reverse voltage on D3 at 12V supply with this one though. \$\endgroup\$ – Trevor_G Jan 10 '18 at 17:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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