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

Bookmark and Share

14 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. Savvo:

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

  5. 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

  6. Steve:

    Savvo! Right you are!

  7. Dude:

    Give up!

  8. SPDT switch wiring explained | DiyUs.com:

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

  9. Steve:

    Dude! Never!

  10. andy:

    visualize a manual transmission next…

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

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

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

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

  13. 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.

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

Leave a comment

You must be logged in to post a comment.