Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

Hi I'm looking for a inline (sliding switch?)

When it's in the middle, it be in the off state

When it's slid to the right it turns a red led on

When it's slid to the left it turns a green led on

I'm sure this is simple but I cant seem to find a switch that dose what I need

Also it would be great if I could get a simple wiring diagram for what I need.

share|improve this question
what voltage is available and is ground available? – user11355 Aug 8 '12 at 22:00

3 Answers

You are looking for a switch like this one:

http://www.digikey.com/product-detail/en/MHS12304/450-1569-ND/1202280

It is single pole, double throw (SPDT), which means it has one middle contact that can be moved between two positions, left and right. This switch is also listed as being "on-off-on", which means it has a center position where neither position is connected to the middle contact.

The way you would hook it up to your LEDs is something like this:

schematic

Here, the switch is completing the circuit between one of your LEDs and ground, depending on which way you move it.

share|improve this answer
So Jim shouldn't you suggest a DPDT with a separate switch for the LED. He might be switching 220Vac. Then one contact must be gold plated for the LED. Like the example I posted. – user11355 Aug 9 '12 at 1:26

They're indeed called slide switches and typically look like this one from NKK:

enter image description here

This one has solder lugs, but you'll find many for PCB mount, either straight or at a 90° angle. Digikey has dozens of type in hundreds on stock, though you may find it difficult to locate switches with the LEDs built-in.

A minor disadvantage may be that almost all of these slide switches have a very limited travel, often no more than a few mm.

Connecting the LEDs is a piece of cake:

enter image description here

share|improve this answer
I was talking about slide switches with red and green LEDS.. They do have with RED LEDS or GREEN not both.. – user11355 Aug 9 '12 at 8:10

For one switch (with Red AND Green LEDs), you won't find stock anywhere. If you need 1K/mo , now you can work with the distributor.

I suggest you add the necessary resistors and LEDs to one of these slide switches and if you mean inline AC, then you need a protection diode or another LED back to back for two views of the inline assembly. Use Heat shrink to wrap the assembly in your cable.

http://www.digikey.com/product-search/en/switches/slide/1114211?k=switch%20ac&stock=1

From the above search, if you have not already seen the On-Off-On slide switches with LED's , you will notice you can choose one (1) LED colour ,but only one colour so you may as well custom make your own instead of paying $12 for less than what you want.

http://www.nkkswitches.com/pdf/msilluminated.pdf enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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