Switches
For something that should stay on, you want a switch that stays where you put it.
The same circuit, with the + wire now ending in column 10. Take a toggle switch from the drawer. It has three legs in a row: plug them into columns 9, 10 and 11, in the top half of the board.
Click the switch's lever to flip it, and flip it back.
Poles and throws
Switches are named by how many separate circuits they switch (poles) and how many positions each can connect to (throws).
| Name | Stands for | What it does |
|---|---|---|
| SPST | single pole, single throw | on / off: one path, made or broken |
| SPDT | single pole, double throw | one way in, a choice of two ways out |
| DPDT | double pole, double throw | two SPDT switches worked by one lever |
The middle leg, the one that is always in use, is called the common (COM).
The toggle switch on this board has three legs. Which kind is it?
- SPST
- SPDT
- DPDT
Now use both ways out. Here the switch's common is fed from the + rail, and a red LED with its resistor runs from one outer leg (column 9) to the − rail.
Build the same from the other outer leg (column 11): a 470 Ω resistor, then a green LED, then a wire to the − rail.
The classic use of two changeover switches: a light on a staircase, with a switch at the bottom and another at the top, where either switch can turn the light on or off.
Here are two toggle switches. The first one's common is fed from +. The second one's common leads to the resistor and LED. Their outer legs aren't connected to anything yet.
Suppose each outer leg of the first switch is wired to the outer leg on the same side of the second. When will the LED be lit?
- Only when both switches are flipped towards the same side
- Whenever at least one of the switches is on
- Always: there's a wire for each position
Build it. Add two wires: one from the first switch's left leg (column 5) to the second switch's left leg (column 15), and one from the first switch's right leg (column 7) to the second's right leg (column 17).
Now flip either switch. Then the other. Each flip changes the LED, whatever the other switch is doing.
What you've found:
- A switch is a gap you can close. In series with a part, it turns that part on and off.
- A push button is momentary; a toggle switch stays put.
- An SPDT switch has a common and two ways out: use one for on/off, or both to choose between two paths.
- Two SPDT switches joined by two travellers let either one change the light.
On a real bench switch contacts bounce: for a few thousandths of a second after you press, they make and break many times before settling. An LED doesn't care, but a microcontroller counting presses can see one press as ten. You'll deal with that when you get to digital electronics.