LED with Switch help!

[nCn]Preacher

Supreme [H]ardness
Joined
Nov 16, 2000
Messages
4,744
Complete LED newb here.

LED.JPG


In this diagram, if the line from the PSU is 12V, what would I need to attach an LED to show that the circuit has been closed? I am guessing, from the comments I have heard here in passing, that I need some kind of resistor?

I can get this from Radio Shack? I would need about 10 of them.....
 

Jaden

Weaksauce
Joined
Jul 2, 2003
Messages
117
In your diagram, the LED will always be on. I'm not sure if that's what you're aiming for, but if you only want the LED to be on when the device is on, run the LED in parallel with the device. You will also need a current limiting resistor in series with your LED. For an LED to shine its best, you need about .02A. You have 12V going in, and the LED itself absorbs about ~1.25V, so... : R=V/I ; R = (12-1.25)/.02 which is roughly 500Ohms, or two 1k's in parallel. Hope I helped :)
 

aL Mac

Gawd
Joined
Jul 20, 2002
Messages
949
The problem here is 12 V is most likely too much for your LED if you put any resistor in line with the LED none of the current will flow through it since the resistance of that switch is near zero.
 

Jaden

Weaksauce
Joined
Jul 2, 2003
Messages
117
Actually I made a mistake. The LED will be on when the switch is off and be off when the switch is on because there is no voltage drop when the switch is on. There is 12V before and 12V after the switch, so no voltage drop. Do what I said in my first reply and everything should work fine :)
 

[nCn]Preacher

Supreme [H]ardness
Joined
Nov 16, 2000
Messages
4,744
aL Mac said:
Here I modified your picture to show what I think will work.

LED2.jpg

Thanks, both of you!

Now how about this...

I would love to have one red LED be lit up when the juice is off to the device, and a green one lit up when the juice for the device is on. How would I do that?
 

aL Mac

Gawd
Joined
Jul 20, 2002
Messages
949
[nCn]Preacher said:
Thanks, both of you!

Now how about this...

I would love to have one red LED be lit up when the juice is off to the device, and a green one lit up when the juice for the device is on. How would I do that?

Well in the picture I gave you make that one the green one and it will light when the device is on.

For the other led you need a different kind of switch I believe it's a SPDT switch. (single pole double throw with 2 posistion) The switch should have 3 poles. in position A. Poles 1 + 2 are connected. in position B poles 2 and 3 are connected.

Therefore the diagram I gave you would remain the same from the psu to pole 2. Then from pole 1 to your led / device in paralell (which then goes to ground) Pole 3 then would be connected to your RED LED in series with a 500 ohm resistor then to ground.
 

DJFatben

n00b
Joined
Nov 1, 2004
Messages
41
[nCn]Preacher said:
Thanks, both of you!

Now how about this...

I would love to have one red LED be lit up when the juice is off to the device, and a green one lit up when the juice for the device is on. How would I do that?
Basically just like the last picture, except have another led on the other side of the switch hooked up the same way, but with a larger value resistor
 

aL Mac

Gawd
Joined
Jul 20, 2002
Messages
949
LED3.jpg


btw, I hope you know LEDs matter which way you connect them. The side with a flat side and the short lead is negative.
 

aL Mac

Gawd
Joined
Jul 20, 2002
Messages
949
DJFatben said:
Basically just like the last picture, except have another led on the other side of the switch hooked up the same way, but with a larger value resistor

Why would he need a larger resistor? 500 ohms will still give him the same current with 12V.
 

DJFatben

n00b
Joined
Nov 1, 2004
Messages
41
aL Mac said:
Why would he need a larger resistor? 500 ohms will still give him the same current with 12V.
Because if they both had the same resistance, they'd both light up when it's on, otherwise it'll go through the path of least resistance. I think.
 

[nCn]Preacher

Supreme [H]ardness
Joined
Nov 16, 2000
Messages
4,744
aL Mac said:
LED3.jpg


btw, I hope you know LEDs matter which way you connect them. The side with a flat side and the short lead is negative.

This is using the same SPST switch or is this a SPDT switch like was mentioned above? I already bought 10 SPST switches so I hope it's that... :D


I have been doing a lot of reading on the web today and I retained that much. I have to say that a lot of what is out there is a bit confusing. I guess it will make more sense once I start actually doing it.

Thanks for the diagram and for the advice, it is MUCH appreciated!
 

DJFatben

n00b
Joined
Nov 1, 2004
Messages
41
Let's work on some definitions here. SPST has two leads. When the switch is off, the leads remain seperate. When on, the switch connects the two. Single pole, single throw. SPDT, or single pole dual throw, has three leads. When the switch is up, it connects the center lead to the top lead. When the switch is down, it connects the center lead to the bottom lead. The switch aL Mac just illustrated uses a SPDT switch. When "off", it passes the power going to it's center lead to just a red LED, and when it's "on" it passes the power to the green LED and to the device. So unless you get new switches, his won't work. But I believe the way that I talked about earlier will work as I described, but you never know until you try. Get a few spare parts together and play around; that's the best way to learn.
 

[nCn]Preacher

Supreme [H]ardness
Joined
Nov 16, 2000
Messages
4,744
DJFatben said:
Let's work on some definitions here. SPST has two leads. When the switch is off, the leads remain seperate. When on, the switch connects the two. Single pole, single throw. SPDT, or single pole dual throw, has three leads. When the switch is up, it connects the center lead to the top lead. When the switch is down, it connects the center lead to the bottom lead. The switch aL Mac just illustrated uses a SPDT switch. When "off", it passes the power going to it's center lead to just a red LED, and when it's "on" it passes the power to the green LED and to the device. So unless you get new switches, his won't work. But I believe the way that I talked about earlier will work as I described, but you never know until you try. Get a few spare parts together and play around; that's the best way to learn.

I was pretty solid on the difference between the switches, but I was hoping it was his drawing skills and not the switch, know what I mean? ;)

I can go back to Radio Shack and return half of the switches I bought (I bought the other half on the web and it's not worth the hassle of returning them) and buy the right switches. I can sell the other half here, maybe.

Will Radio Shack have the LEDs I need or is there a better source on the net that I should order from?
 

aL Mac

Gawd
Joined
Jul 20, 2002
Messages
949
I'd compare prices if you buy switches and LED's I'd probably search for a better price online since radiohack probably is a rip off..

DJFatben: Can you draw or better describe how you were proposing he hook them up. . Remember the resister is supposed to limit the current to about 20 mA if he increases the resistance in some scheme to make the current flow through the other led.. when it flowed through the higher resistance LED it wouldn't light or would be very dim..

Preacher: You are going to have to get SPDT switches for every device that you want a RED LED for the off position I think. Any other way would probably involve relays and such and be much more complicated.
 
Top