Help with Led and on off switch

GreenRock

Member
I figured out how to wire an LED to a power source, but I can't quite figure out how to wire in a slide switch. The switch has three little metal pieces on the bottom with holes in them. Why are there three? Is it positive, negative and ground? Anyway I just want to wire one led to that slide switch to be able to turn it on and off. Any advice is appreciated. Thanks
 
Slide switches are usually wired by connecting to the centre pin and one of the outer pins. It doesn't matter which. For your circuit, you'll need a break in one of the wires between the LED and the power source. Again, it doesn't matter which. Connect one side of the break to the centre pin of the switch and the other side of the break to one of the outer pins.

Code:
 o LED
| |
| |_____
|  ___| |= Switch
| |  _|_|
| | 
- +

There are three pins because in each position, the slide connects the centre pin to one of the outer pins, and disconnects it from the other. For your project you're only interested in making and breaking (switching on and off) one connection; so you only need to use one of the outer pins.
 
Good to know, I'm working on a similar project, but with a string of about 10 LED's with one power source and a switch. I'm not trying to thread-jack, but would the same principle be true for that situation Knightjar? Good luck Greenrock, from one LED noob to another!
 
It doesn't matter if you put the resistor before of after the switch, it just needs to be between the power source and the led connection.
 
To answer the other question, about the 10 LEDs, the samed principle will work. However, you'll probably have to do parallel branches of LEDs, depending on your power source. Standard LEDs drop about 2V, while ultra-brights are typically around 3V (roughly).

So if you put them all in series, depending on LED type, you'd need a 20 or 30V source. Run parallel branches and you could power them off a couple of AA batteries (wouldn't have a long run time of course). :)


ATM
ShackMan
 
To answer the other question, about the 10 LEDs, the samed principle will work. However, you'll probably have to do parallel branches of LEDs, depending on your power source. Standard LEDs drop about 2V, while ultra-brights are typically around 3V (roughly).

So if you put them all in series, depending on LED type, you'd need a 20 or 30V source. Run parallel branches and you could power them off a couple of AA batteries (wouldn't have a long run time of course). :)


ATM
ShackMan

Awesome, thanks for the input!
 
Yes, you can place the resistor anywhere in that circuit.

I agree with ShackMan that for the ten LED project you'd connect the additional LEDs in parallel, using the same principal. Also you're unlikely to need a resistor in this case.
 
This thread is more than 13 years old.

Your message may be considered spam for the following reasons:

  1. This thread hasn't been active in some time. A new post in this thread might not contribute constructively to this discussion after so long.
If you wish to reply despite these issues, check the box below before replying.
Be aware that malicious compliance may result in more severe penalties.
Back
Top