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:

1Toggleswitch Problemdescription

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.

2Toggleswitch Diagram

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.

3Toggleswitch Behindthescenes

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!

4Toggleswitch Fixed

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: , , , , , , , , ,

Comments

Powered by Facebook Comments

Bookmark and Share

26 Comments

  1. 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 [...]

  2. SPDT switch wiring explained » Developages - Development and Technology Blog:

    [...] – toggle switch wiring problems fixed and explained [...]

  3. macegr:

    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.

  4. macegr:

    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.

  5. Savvo:

    SPDT — that’s single POLE double throw. Single position wouldn’t be much of a switch.

  6. Savvo:

    SPDT — that’s single POLE double throw. Single position wouldn’t be much of a switch.

  7. Anonymous:

    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/
    -steve

  8. Steve:

    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/
    -steve

  9. Anonymous:

    Savvo! Right you are!

  10. Steve:

    Savvo! Right you are!

  11. Dude:

    Give up!

  12. Dude:

    Give up!

  13. SPDT switch wiring explained | DiyUs.com:

    [...] – t­oggl­e sw­i­t­ch w­i­ri­n­g probl­em­s f&#1… [...]

  14. Anonymous:

    Dude! Never!

  15. Steve:

    Dude! Never!

  16. andy:

    visualize a manual transmission next…

  17. andy:

    visualize a manual transmission next…

  18. Electronics-Lab.com Blog » Blog Archive » SPDT switch wiring explained:

    [...] SPDT switch wiring explained – [Link] [...]

  19. GB Vehicles Info » Blog Archive » SPDT switch wiring explained:

    [...] – toggle switch wiring problems fixed and explained [...]

  20. John 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.

  21. John 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.

  22. SPDT 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 [...]

  23. Ed:

    You should probably actually take apart a switch before posting things online claiming “this must be what it would look like”. Last time I took one of these apart the electrical connections where actually made by a see-saw style set-up where the centre connection(s) actually functioned like the fulcrum (pivot). The position of the switch lever then pushes down on one side of the see-saw or the other.
    Presumably (and this is where I bring in my own “original research” as wikipedia calls it) this is so that the areas of the internal parts that receive mechanical wear-and-tear from the switch's operation are not the areas that make the electrical connection, thus increasing the switches operational life and reducing the effect that continued operation has on the electrical properties (resistance due to corrosion, dirt build up, etc.).

  24. stevecooley:

    Thanks for your comment. I'd warn that not all switches are built the way the one you took apart are, so be careful when proclaiming that I'm wrong just because you experienced something other than what my own research has produced. Without any illustrations of your explanation, I'm having a hard time visualizing your account of how the see-saw electomechanical action would explain the counter-intuitive backwards wiring my research discovered. So bust out your drawing app of choice and post the URL to your fully illustrated article here, and I'll be happy to point people to it.

  25. Ed:

    You should probably actually take apart a switch before posting things online claiming “this must be what it would look like”. Last time I took one of these apart the electrical connections where actually made by a see-saw style set-up where the centre connection(s) actually functioned like the fulcrum (pivot). The position of the switch lever then pushes down on one side of the see-saw or the other.
    Presumably (and this is where I bring in my own “original research” as wikipedia calls it) this is so that the areas of the internal parts that receive mechanical wear-and-tear from the switch's operation are not the areas that make the electrical connection, thus increasing the switches operational life and reducing the effect that continued operation has on the electrical properties (resistance due to corrosion, dirt build up, etc.).

  26. stevecooley:

    Thanks for your comment. I'd warn that not all switches are built the way the one you took apart are, so be careful when proclaiming that I'm wrong just because you experienced something other than what my own research has produced. Without any illustrations of your explanation, I'm having a hard time visualizing your account of how the see-saw electomechanical action would explain the counter-intuitive backwards wiring my research discovered. So bust out your drawing app of choice and post the URL to your fully illustrated article here, and I'll be happy to point people to it.