Using DPDT Switch To Control All Three Colors Of An RGB LED

Thread Starter

jpalarchio

Joined Feb 2, 2010
9
I've been lurking for a while and I'm a complete newbie that's learning more every day by reading this forum.

I have a project where I'm using a center-off DPDT switch that is controlling a relay on one side and on the other side I would like to use an RGB LED to indicate status.

When the switch is up ("auto" for my project), I would like to light the blue LED.

When the switch is in the center position ("off" for my project), I would like to light the red LED.

When the switch is down ("manual on" for my project), I would like to light the green LED.

Unfortunately my lack of experience has me stuck in that I can't figure out how to light the "auto" or "manual on" LED without lighting the "off" LED at the same time.

Seems like I should be able to do this through some kind of combination of diodes but I've yet to come up with anything.

Any assistance in this area would be greatly appreciated. It seems like I need some type of logic to block the voltage to the red LED when either of the others is lit.
 
Last edited:

Ron H

Joined Apr 14, 2005
7,063
1. What is your power supply voltage, and
2. how much current do you want to run through each LED?

EDIT: Do you have a part number for the RGB LED?
 

Thread Starter

jpalarchio

Joined Feb 2, 2010
9
Thanks Ron.

I can't say I completely understand how it all works just yet but I'm doing some reading and it's another learning point for me.
 

Ron H

Joined Apr 14, 2005
7,063
Looking at this more, it was suggested to me that it could possibly be done more easily with a NOR gate.

Any ideas?
That will work, but it takes more than a NOR gate. I am not too thrilled with someone who throws out an idea without a schematic. Have your suggestor provide a schematic, and post it here.
 

Thread Starter

jpalarchio

Joined Feb 2, 2010
9
Unfortunately I don't have a schematic, it was just a thought tossed out.

Waiting for a few components to come in and then I'm going to build up the circuit you provided previously. I understand how that one works now and it's reasonably simple.

I'm going to have about 10-12 of these switches on my control panel so if there was a smaller footprint, I thought I'd try it.
 

Audioguru

Joined Dec 20, 2007
11,248
You should measure the cheap (expensive) Chinese LED because they say "common cathode" but show "common anode".
I wonder if it will last longer than 1 week.
 

Thread Starter

jpalarchio

Joined Feb 2, 2010
9
You should measure the cheap (expensive) Chinese LED because they say "common cathode" but show "common anode".
I wonder if it will last longer than 1 week.
Yeah, the quality is suspect sometimes, go figure...

I actually ended up ordering a diffused version from a different vendor but those chinese listings tend to have errors in the details all the time.
 

Ron H

Joined Apr 14, 2005
7,063
The following circuit is untested but *should* work. :D

That might be good enough. I simulated it, and the red LED was still getting 2.2mA wnen it was supposed to be off. That might still result in a fair amount of light.
I changed the red LED that you added to one with 3.6V drop (@20mA), and the red current dropped to 13uA when it was supposed to be off, but it was drawing only 15mA when on. That would probably be OK.
I certainly wouldn't trust simulation results for this circuit. it would need to be tested before committing to it.
 

eblc1388

Joined Nov 28, 2008
1,542
That might be good enough. I simulated it, and the red LED was still getting 2.2mA wnen it was supposed to be off.
I know. That's why it is untested. :p

Just replace LED D4 with a regular blue or white LED or a 3.9V zener diode and everything will be fine.
 

Thread Starter

jpalarchio

Joined Feb 2, 2010
9
Wow, you guys are really starting to make this too easy.

I'll pickup the parts to try and test these out. Both solutions are simple enough for me at this point; very cool to see the progression from something I thought was going to be near impossible to something that very achievable.

Thanks again.
 

Thread Starter

jpalarchio

Joined Feb 2, 2010
9
How about using a 2 pole 3 position switch? Not sure how locked into a ON-OFF-ON you are but ........
Not really locked into ON-OFF-ON but it seemed the most economical and that's what I bought.

I'm using a DPDT switch where one side of the switch is controlling a relay through manual input (on and off) or from an arduino (auto). The other side of the switch is going to control the status LED (red = manual off, green = manual on, blue = auto).

What I've learned here is that there's probably 25 different ways to accomplish this same functionality and at my scale, the cost difference of having one or two more components probably isn't significant.
 

RAC

Joined Feb 6, 2010
2
I tend to look at things from an electro-mechanical veiwpoint so the rotary switch seemed "easy" to me, but thats why I started to visit this site, so I could get a different perspective. Maybe I am missing something obvious but I do enjoy seeing the different solutions.
 
Top