1
\$\begingroup\$

Hey all, I'm fiddling with a breadboard to make some logic gates and instead of buying spst switches, I bought dpdt switches because they were the only ones that would fit in the board. :/

Can I somehow use these dpdt switches as inputs in my logic gate?

\$\endgroup\$
3
\$\begingroup\$

I don't see why not -- just hook up one of the poles. If you have a NO SPST switch, you can just use one "half" of the DPDT switch. You should check the resistance between two of the pins on your DPDT switch so that when you throw it, it makes contact.

\$\endgroup\$
  • \$\begingroup\$ and just disregard the other one? sounds easy enough. \$\endgroup\$ – Trevor Arjeski May 7 '11 at 4:40
  • \$\begingroup\$ @TrevorMA: yes, you can just ignore the other one. Just don't hook up something else to it, as flipping the switch will connect the other circuit as well. \$\endgroup\$ – Dave May 7 '11 at 4:43
  • \$\begingroup\$ So it's basically just a switch that controls two things? \$\endgroup\$ – Trevor Arjeski May 7 '11 at 4:44
  • \$\begingroup\$ @TrevorMA that's how I've always seen it, though I haven't used those types of switches very much. \$\endgroup\$ – Dave May 7 '11 at 5:10
  • \$\begingroup\$ @Dave It's too bad the packaging says "Let your imagination be your guide." where the contact configuration should be \$\endgroup\$ – Trevor Arjeski May 7 '11 at 17:02
7
\$\begingroup\$

Use of a double-throw switch can be very good for debouncing. Wire one throw to VDD and the other to VSS; wire the pole to an input, adding a small cap to ground. Even if there's some bounce on the contacts, the switch signal won't go high until the high-side contact is closed, and once it's gone high it won't go low until the low-side contact is closed. There are some slightly more robust approaches feeding the signal through logic gates, but the capacitor-hold approach is nice and simple.

\$\endgroup\$
  • \$\begingroup\$ in superb SE style, you answer the question by teaching more then was needed, but enough that they can do the "best" job \$\endgroup\$ – Kortuk May 7 '11 at 7:39
  • \$\begingroup\$ If I don't use the capacitor-hold approach then it's likely that the LED will always shut off when I change inputs, right? \$\endgroup\$ – Trevor Arjeski May 7 '11 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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