part · Level 1 · Light · input
Slide switch (SPDT): which legs to wire
Slide switch — Opens or closes the loop. On means the loop is complete.
What it is
A switch is the simplest part in electronics: a piece of metal that either bridges a gap or does not. Closed, the loop is complete and current flows. Open, the loop is broken and everything stops — no matter how much voltage the battery has.
Your slide switch has three legs. The middle leg is the common: the slider always connects it to one of the two outer legs. Push the knob one way, middle joins the left leg; push it the other way, middle joins the right leg. Engineers call this SPDT — single pole, double throw — one input, two possible outputs.
For an on/off switch you use only two legs: the middle and either outer one. The third leg just sits there. For a "choose A or B" switch you use all three.
How it works
A switch does not use up any voltage or current — it is either a wire (a few milliohms, practically 0 Ω) or an air gap (billions of ohms, practically infinite). That makes the maths trivial and the position flexible: anywhere in the loop breaks the same loop.
Take First Light: battery + → switch → 220 Ω → red LED → battery −. Switch closed: the loop is 220 Ω plus the LED, so current is (4.5 − 2.0) ÷ 220 ≈ 11 mA. Switch open: the resistance is effectively infinite, so 0 mA, and the pack loses nothing while it waits.
The three-leg version becomes useful in the Traffic Light: the common leg on + and one LED on each outer leg means only one lane can be lit at a time — the slider picks. Either way the current through whichever lane is chosen is still 11 mA with its own 220 Ω.
Switches only pass a limited current before their contacts wear — small slide switches are typically rated around 0.3 A at low voltage — but your projects draw 30 mA at most, so that is never a problem here.
The numbers
| Legs | 3 — middle = common; outer = the two positions |
|---|---|
| Type | SPDT — single pole, double throw |
| Resistance closed | ≈ 0 Ω |
| Resistance open | ∞ — no current, no drain |
| Contact rating (typical) | ≈ 0.3 A — far above any project here |
See it working
The First Light circuit, simulated live. Open it on the Workbench to change anything.
simulating…
Mistakes everyone makes
- Using the two outer legs. They are never connected to each other, so the switch is always "off". Fix: middle leg plus one outer leg.
- Battery + on one outer leg and − on the other. Sliding to the middle position is fine, but the common now shorts the pack in one position if it is wired to a rail. Fix: put the common on the side that feeds the circuit, not directly across the battery.
- Legs too far apart for the breadboard. Some switches are 2 mm pitch. Fix: bend the legs gently or use short jumpers from each pin.
- "It only works in one position". That is correct — it is a switch. If you wanted both positions to do something, wire both outer legs.
Questions people ask
- Which pins of a slide switch do I use?
- The middle pin (common) and one of the outer pins. The slider connects the middle to whichever outer pin it is pushed toward.
- Does it matter where the switch goes in the circuit?
- No. A loop broken anywhere is broken everywhere, so the switch can sit before or after the LED with exactly the same result.
- What does SPDT mean?
- Single pole, double throw: one input that can be connected to either of two outputs. Using just one output makes it a plain on/off switch.
Projects that use this part
- 🔦 First Light — Build a real flashlight circuit and learn why every circuit is a loop. L1 · 15 min
- 🎈 Twin Reds — Two red LEDs on one loop — same current, half the leftover push, and a lesson in how voltages stack when parts sit end to end. L1 · 15 min
- 🌿 Two Greens — Twin Reds with green LEDs — bigger voltage bites, less leftover for the resistor, and a great lesson in how far a 4.5 V battery can actually push. L1 · 15 min
- 🌙 Night Pin — One 10 kΩ, one red LED, one slide — the simplest dimmer. A single big resistor runs the LED at 0.27 mA: invisible in daylight, perfect for a dark room. L1 · 10 min
- 🚦 Tabletop Traffic Light — Three LEDs on three parallel lanes, all lit by one switch — build a tabletop traffic light and discover parallel circuits. L1 · 25 min
- 🚲 Bike Torch — One yellow LED, two switches: a slide for a battery-friendly low beam, a push button for a bright flash, both lanes feeding the same lamp in parallel. L1 · 15 min
- 🕯️ Dim Candle — A 1 kΩ and a 10 kΩ in series throttle a red LED to a candle glow. Flip the bypass slide — the 10 kΩ gets shorted and the LED pops to a clear, steady glow. L1 · 15 min
- 🔴 Three Sisters — Three red LEDs side by side from one battery — each with its own 220 Ω — proving parallel lanes do their own Ohm's law and the battery adds the bill. L1 · 15 min
- 🥀 One for All — Three LEDs on ONE shared 220 Ω — the shortcut that fails. Red and yellow dim-split the current; green sits dark. Lesson: each LED needs its own resistor. L1 · 15 min
- 📶 Step Up — Three 1 kΩ lanes in parallel into one red LED, each with its own slide switch. One slide = candle, two = glow, three = full lamp. The lanes stack. L1 · 15 min
- 🪜 Longer Loop — Three 1 kΩ speed bumps stacked end-to-end on one lane feed a single red LED. Resistors in series ADD up — the LED is throttled to a near-dark 0.87 mA. L1 · 15 min
- 🔦 Bright and Dim — Two red LEDs on one battery — one through 220 Ω (bright), one through 1 kΩ (candle). Same LEDs, two currents. The resistor sets each lane's brightness. L1 · 15 min
- 🌈 Rainbow Loop — Red, yellow and green LEDs on three parallel 220 Ω lanes under one slide. One flip lights all three, each lane running its own Ohm's law. L1 · 15 min
- 🔆 Reserve Beacon — A 10 kΩ in series with the LED keeps a dim always-on pilot glow. Flip the bypass slide — it shorts the 10 kΩ, and the pilot pops to full First-Light brightness. L1 · 15 min
- 🚫 Short Cut — First Light with a slide switch wired straight across the LED. Flip the slide and the LED goes dark even though the loop stays complete. L1 · 15 min
- 🚪 Do Not Disturb Sign — A green "chill" LED plus a switched red "leave me alone" LED — two lanes on one battery, and a switch that only touches one of them. L1 · 20 min
- 🤝 Handhold Chain — Three switches in a line — the LED only lights when all three are closed at once. AND, one step past The Vault. L1 · 15 min
- 🚪 Two-Door Signal — Two slide switches in parallel, one shared LED — either switch alone lights the lamp. The OR gate, at Level 1. L1 · 15 min
- 🚨 Signal Light — A slide switch and a push button in parallel — the slide is the steady beacon, the button is the extra flash. Either lights the lamp. L1 · 15 min
- 🛟 Escape Hatch — The Vault with a big red emergency button wired around both locks — turn BOTH keys, or hit the button, and the light comes on. L1 · 20 min
- 📻 Dial-a-Buzz — Dial-a-Brightness for sound — one knob rides the buzzer between full alarm and library silence, with no button in the way. L2 · 15 min
- 🚨 Arm & Ring — A doorbell that ignores you unless a hidden slide switch is armed first — series-AND with sound, plus an 'armed' LED that shows the state. L2 · 20 min
- 🔔 Twin Bells — One doorbell button rings two buzzers in parallel — one in your room, one in the kitchen — with a slide switch that mutes just the bedroom bell at night. L2 · 20 min
- 🔕 Silent Alarm — Three panic buttons wired in parallel, all inside an armed lane — any one of them fires the buzzer, and a small LED tells you the alarm is watching. L2 · 25 min
- 🔊 Loud/Polite Doorbell — One doorbell button, one buzzer, and a slide switch that shorts across a 1 kΩ resistor — flip it to swap between a startle-loud beep and a scratchy whisper. L2 · 20 min
- 🔐 Vault Chime — Three slide switches in a line, a buzzer and a red LED hanging off the end — the chime only sings and glows when every single switch is closed. L2 · 20 min
- 🤫 Hidden Mute — A doorbell with a secret slide switch tucked inside just the buzzer lane: flip it and the ring button still lights the LED, but the sound stays off. L2 · 15 min
- 🎚️ Shared Knob — One pot sits above the merge of two parallel LED lanes (red + yellow). Twist it and BOTH LEDs fade together — the knob throttles the shared rail. L2 · 15 min
- 🪤 Trip Wire Alarm — A thin wire across a doorway holds the alarm silent. Break the wire and the buzzer screams — until you connect it back. L3 · 25 min
- 🏝️ Vacation Nightlight — The Automatic Night Light with a manual override — flip the slide switch off and the lamp stays dark even in a pitch-black room. L3 · 25 min
- 📚 Study Lamp — The Automatic Night Light with a force-on override — flip the slide switch and the lamp stays lit even in daylight, ignoring the sensor. L3 · 25 min
- 🚨 Trip-Wire Chorus — Trip Wire Alarm with a red LED added in parallel with the buzzer — one thin wire holds the whole chorus silent; snap it and both mouths fire. L3 · 30 min
- 🌀 First Spin — Your first motor. A switch, a coil, and a diode that catches the voltage kick when the current stops. L4 · 15 min
- 🥤 Safety Blender — A slide lid switch and a push run button, both in series with the motor. Fan only spins when the lid is on AND your finger is on the button. L4 · 15 min
- 🕸️ Trip Wire Fan — Trip Wire Alarm's brain wearing a motor. The wire is intact — the fan is silent. Snap it — the fan spins as the alarm. L4 · 25 min
- ⚖️ The 3.3-Volt Rule — A zener diode holds 3.3 V for the LED no matter what the 9 V battery wants. Flick the switch to add a second load and watch the zener share. L5 · 30 min
- 🔋 The Zener Battery Tester — A zener in series with an LED makes it ignore the first 3.3 V. A fresh 9 V lights it; a run-down battery barely can. A sharper gauge than a bare LED. L5 · 25 min
- 💡 The Two-Switch Hall Light — A light with a switch at each end of the hall: flip either and the light changes. Four NAND gates in one CD4011 make an XOR. L6 · 60 min
verified against: SparkFun — Switch Basics · SparkFun — What is a Circuit?