Beginner · Project 6
Traffic Light Picker
Use a slide switch to send electricity down one path or another, and pick red or green.
Build this only with an adult present. Before you start, read our safety notice and disclaimer.
🧰 What you need
- 1×Half-size breadboardA board full of little holes with metal clips inside, so you can build circuits without soldering.
- 1×3×AA battery holder with wire leadsHolds three AA batteries in a row and gives you a red (+) and black (−) wire.
- 3×AA batteryA regular household battery. Each one gives 1.5 volts.
- 1×Slide switch (SPDT)Three legs in a row: sliding it connects the middle leg to the left leg or to the right leg.
- 2×220 Ω resistor — red, red, brown, goldOur go-to LED resistor. Colors: red, red, brown, gold.
- 2×5 mm LED (any color) — one red, one greenA tiny light that only lets current flow one way. The long leg is +.
- 3×Jumper wireA short wire with stiff ends that push into the breadboard.
✨ The finished project
🔣 New schematic symbols
This project’s schematic has some symbols you haven’t seen before. Here’s what they mean.
- Slide switch
The middle leg connects to one side or the other. The picture shows the side it’s set to; slide it and the line swings to the other side.
- Ground
Three lines getting shorter mean “joined to the battery’s − side”. Every ground symbol is connected to every other one, even with no wire drawn between them.
A push button is either on or off. A slide switch can do something cleverer: it chooses where the electricity goes. In this project, sliding it one way lights a red LED, and sliding it the other way lights a green one, like a mini traffic light.
Meet the slide switch
A slide switch has three legs in a row:
- The middle leg is the common. Electricity comes in here.
- When the slider is on the left, the middle leg is connected to the left leg.
- When the slider is on the right, the middle leg is connected to the right leg.
Engineers call this an SPDT switch: Single Pole, Double Throw. One input (pole), two places it can go (throws). A railroad track switch that sends a train down one track or another works the same way!
Build it
Slide switch: push its three legs into e8, e9 and e10. The legs are thin, so press gently and straight down.
Red wire: T+9 (top red + rail, column 9) to a9. That’s the switch’s middle leg column, 9.
Red side, resistor: b8 (the switch’s left leg column) to b4.
Red side, red LED: long leg in e4, short leg in e3.
Red side, black wire: a3 to T-3 (top blue − rail, column 3).
Green side, resistor: b10 (the switch’s right leg column) to b14.
Green side, green LED: long leg in e14, short leg in e15.
Green side, black wire: a15 to T-15 (top blue − rail, column 15).
Power: battery red wire into T+1, black into T-2. Slide the switch back and forth: 🔴 stop, 🟢 go!
Follow the paths
Electricity enters the switch’s middle leg. Then:
- Slider left: middle → left leg → 220 Ω resistor → red LED → − rail.
- Slider right: middle → right leg → 220 Ω resistor → green LED → − rail.
Only one path is ever complete, so only one LED is ever lit. Each LED has its own resistor, because each path needs something to limit its current.
Not working?
- Neither LED lights? Check the red wire goes to the switch’s middle leg column (9). If it goes to an outside leg, the switch can’t steer anything.
- One color works, the other doesn’t? Only that side has a problem. Check its LED’s long leg, its resistor and its black wire.
- Both light at once? Something is joining the two sides. Make sure nothing else is plugged into columns 8, 9 or 10.