Go Down

Topic: BEGINNERS: Simple guide to switches (Read 835 times) previous topic - next topic


Apr 26, 2019, 06:17 am Last Edit: Apr 26, 2019, 06:23 am by lastchancename
Choosing a switch to use in a miccroprocessor project is really simple.
Switches may in-fact be simple contacts from any device that changes the electrical path bewteen contact pins.

Usually an SPST switch (either momentary or 'static' toggle either way) is all that's needed on an Arduino input pin.
The use of a DPDT switch with a micro is only required if you are switching 'something else' along with the input, or want to waste money, space and wire.
(There are other use-cases, but if you're here it's unlikely those others are your requirements.)

A DPDT switch is merely two SPDT switches that change state - lock-step side-by-side.
An SPDT switch is simple one wiper 'pole' - snapping between two 'throws'.

With a microprocessor input, you only need one throw of one pole  - a 1P1T if you will.
The input bias current* and logic can do the rest.  Two wires, any option possible.

Switch poles have two or more of the following designations
On an input it's highly likely, you only need two.  COM and one of the others.
Which one, and how you use them depends on what input pins, bias (pullup or puldown) and voltages are present in your project.

* On Arduino - digital input pin bias is provided with INPUT_PULLUP if needed.
Pull-Up is far more prevalent than Pull-Down as a hangover from the electrical limitations of early TTL logic, and that 0V/Gnd is far mode likely to be 'everywhere' in your circuit - so a single 0V/return can service multiple switches - minimising risk of accidental short-circuits to the case or 'ground'.
Experienced responders have a nose for laziness, (they were beginners once)... Sure, there are trolls, chest-beaters, and pretenders - but the help you'll get here is about as good as it gets - if you try to help youself!.

Go Up