toggle switch wiring problems fixed and explained
I’m working on my arduino project box, specifically the wiring. I ran into a really strange problem with the blue Single-pole-dual-throw (SPDT) switches I had selected for my digital i/o pins. Strange to me until I thought about it, and then I realized how not-strange it is
The problem is that all of my toggle switches were working backwards to my expectations. (If you’re reading this and have already learned this lesson, you know where we’re going.
)
Here’s a photo of the switches I’m using (thanks to banzaieffects for having a really nice photo of this component online)
Miyama is the manufacturer… Anyway! Here’s the deal:
I wired things up to what I thought would be a logical way. Wire this to that, just like the slide switches I’d also been using without incident.
Then I had my epiphany about how these toggle switches work. I tried to imagine cutting one in half to visualize how they worked based on the scientific research that had been forced on me. My slide switches work great, but my toggle switches are all working backwards.
Aha, so based on what would now make a lot of sense, if I wanted to have my switches indicate directionality on my panel, I would need to switch how they’re wired on the back of the panel in order to emulate the behavior I want!
And now, look at that. Switching the wires will in fact give me the results I had originally intended, even though it seems like a trick I have to pull on my brain in order to get it to do what I want. Not really, but.. without being able to actually see inside the switch, visually it looks like the opposite of what made sense.
Sooo… yeah, now I have a lot of clean up work to do on my project. Recut and strip a bunch of wires, desolder and remove a bunch of work I’ve already done… sigh… Oh well. Such is the price of Doing It Yourself.
my hard lesson learned will hopefully translate into less of a mystery for you.
Technorati Tags: arduino, componentry, design, DIY, diy, electronic, howto, panel, programming, wiring





SPDT switch wiring explained | Clint Is A Geek.com:
[...] Learning the ropes with electronics hardware can be full of little ‘gotchas’ – but don’t be discouraged! Steve writes – One of the most common pieces of circuit bending hardware is the single-position-dual-throw (SPDT) switch. I recently ran into a wiring problem and made an illustrated post on how I figured out the solution and some guesses as to why I came to the solution i did. Hopefully it could save some people the hassle of having to rewire their project up like i did. – toggle switch wiring problems fixed and explained [...]
18 September 2008, 3:30 pmSPDT switch wiring explained » Developages - Development and Technology Blog:
[...] – toggle switch wiring problems fixed and explained [...]
18 September 2008, 3:45 pmmacegr:
Did you consider leaving the switches wired as they are, and simply rotating them 180 degrees? If you bothered to cut a key hole for the locator pin, you can just make another one or do what I do and turn it upside down. The locator pin is usually not essential to keeping the switch aligned.
18 September 2008, 4:09 pmSavvo:
SPDT — that’s single POLE double throw. Single position wouldn’t be much of a switch.
18 September 2008, 4:28 pmSteve:
Ah, yeah. Good point, Garrett! I did in fact cut alignment key holes. That plus when I wired things up, I was pretty conservative with the length of wires coming off the switches. It seemed to make more sense to just re-wire them. Hey, you must be local because I debated in my head heavily whether or not to make time to get up to techshop to laser-cut the panel of my project out of acrylic, and opted to spend the money on a scroll saw instead of a month membership. Are you aware of Share-SJ? You might like it.. it’s primarily music, but there’s also a lot of DIY kinds of visuals and whatnot. It’s pretty cool.
http://share-sj.org
hey, I dig your blog, btw. plug for you: http://www.macetech.com/blog/
18 September 2008, 4:32 pm-steve
Steve:
Savvo! Right you are!
18 September 2008, 4:33 pmDude:
Give up!
18 September 2008, 5:05 pmSPDT switch wiring explained | DiyUs.com:
[...] – toggle switch wiring problems f… [...]
18 September 2008, 5:31 pmSteve:
Dude! Never!
18 September 2008, 5:47 pmandy:
visualize a manual transmission next…
18 September 2008, 6:46 pmElectronics-Lab.com Blog » Blog Archive » SPDT switch wiring explained:
[...] SPDT switch wiring explained – [Link] [...]
19 September 2008, 12:54 amGB Vehicles Info » Blog Archive » SPDT switch wiring explained:
[...] – toggle switch wiring problems fixed and explained [...]
20 September 2008, 2:43 pmJohn Honniball:
There’s a “snap-action” mechanism inside the toggle switches that causes the reversal that you’ve found. This mechanism is not present in the slide switches. It makes the toggles work much better, by making the opening and closing of the circuit happen much more quickly, even if the operator moves the toggle slowly. It’s what makes the toggle “click”, too. If you have a multimeter, it’s always best to check the operation of things like switches and connectors before installation.
25 September 2008, 5:48 amSPDT switch wiring explained | thekevinpipe.com:
[...] Learning the ropes with electronics hardware can be full of little ‘gotchas’ – but don’t be discouraged! Steve writes – One of the most common pieces of circuit bending hardware is the single-position-dual-throw (SPDT) switch. I recently ran into a wiring problem and made an illustrated post on how I figured out the solution and some guesses as to why I came to the solution i did. Hopefully it could save some people the hassle of having to rewire their project up like i did. – toggle switch wiring problems fixed and explained [...]
16 November 2008, 6:24 am