Advanced · Project 7
Traffic Light Controller
Build an automatic traffic light that goes red, green, yellow, red… all by itself. A counter chip steps through the sequence and diodes combine its outputs.
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×4×AA battery holder with wire leadsHolds four AA batteries for 6 volts. Used for the 555 timer chip, which needs a bit more push.
- 4×AA batteryA regular household battery. Each one gives 1.5 volts.
- 1×NE555 timer chipOne of the most famous chips ever made: it makes blinks, beeps and timers from a resistor and capacitor.
- 1×CD4017 decade counterCounts clock pulses and turns on one of its ten outputs at a time, in order. Made for LED chasers.
- 1×10 kΩ resistor — brown, black, orange, goldColors: brown, black, orange, gold.
- 1×47 kΩ resistor — yellow, violet, orange, goldColors: yellow, violet, orange, gold.
- 1×10 µF capacitor (can-shaped)A small can-shaped capacitor. The striped leg is −.
- 5×1N4148 diodeA small, fast one-way valve for signals. The end with the black band is the cathode (−).
- 3×5 mm LED (any color) — one red, one yellow, one greenA tiny light that only lets current flow one way. The long leg is +.
- 18×Jumper wireA short wire with stiff ends that push into the breadboard.
✨ The finished project
Real traffic lights are run by a controller that steps through a sequence on a timer. Ours uses the same chips as the LED Chaser: a 555 clock and a CD4017 counter, which turns on its outputs Q0, Q1, Q2… one per tick. We just decide which outputs light which LED:
| Outputs | Light | How long |
|---|---|---|
| Q0, Q1, Q2 | 🔴 red | 3 ticks |
| Q3, Q4 | 🟢 green | 2 ticks |
| Q5 | 🟡 yellow | 1 tick |
| Q6 | back to Q0 | (instant) |
Two new tricks
Diodes as one-way valves. The red LED is fed by three outputs. If we joined them with plain wires, the one output that’s ON would be shorted straight into the two that are OFF. A diode only lets current flow one way (from its plain end to its banded end), so each output can push current into the LED but nothing can flow back.
Resetting early. Q6 is wired back to the chip’s MR (reset) pin. The instant Q6 turns on, the chip resets to Q0, so it never gets to Q7, Q8 or Q9. Our 10-step counter becomes a 6-step one.
Build it
Rail bridges: red T+29 → B+29 (bottom red + rail, column 29), black T-28 → B-28 (bottom blue − rail, column 28).
The 555 clock: pin 1 in f5. Red a5 → T+5 (top red + rail, column 5); black j5 → B-5 (bottom blue − rail, column 5); red j8 → B+8 (bottom red + rail, column 8). 10 kΩ a6 → T+7 (top red + rail, column 7); 47 kΩ c6 → c2. Blue b7 → b2, e2 → f2, i6 → i2. 10 µF capacitor + a2, − T-2 (top blue − rail, column 2).
The CD4017: notch on the left, pin 1 in f18. Red a18 → T+17 (top red + rail, column 17); black j25 → B-25 (bottom blue − rail, column 25); black a21 (INH) → T-21.
Clock: yellow h7 (555 OUT) → h10, f10 → e10 over the gap, c10 → c20 (CLK).
Early reset (Q6 → MR): white h22 → h26, f26 → e26 over the gap, b26 → b19 (MR).
Red: three diodes, bands on the left: g19 → g15 (Q1), h20 → h15 (Q0), i21 → i15 (Q2). Red LED long leg j15, short leg B-14.
Yellow: only Q5 drives it, so no diode: long leg j18, short leg B-17.
Green: two diodes, bands on the right: g24 → g27 (Q3) and a24 → a27 (Q4, top row). Green wire e27 → f27 joins them over the gap. Green LED long leg j27, short leg B-26.
Power: 4×AA red into T+1, black into T-3. 🚦
The counter wakes up on a random step, so the first few seconds might be dark (if it wakes on Q7–Q9). Within a few ticks it reaches Q0 and runs normally.
The build check stepped the simulated chip tick by tick: red, red, red, green, green, yellow, then the Q6 reset back to red. It also ran the real 555 timing to check yellow comes round about every 4 seconds.
Not working?
- A light never comes on? Check its diodes: the band must point toward the LED.
- Two lights at once? A diode is missing or backwards, so one output feeds the wrong light.
- Goes through 10 steps with long dark gaps? The Q6 → MR wires (white) aren’t connected.
- Never changes? Check INH goes to −, and the yellow clock wires.