A simple traffic light circuit using a 555 timer walkthrough — components, circuit connections, working principle, timing sequence, wiring steps, and an interactive traffic light you can explore in the browser.
Timing electronics · 555 + 4017
The 555 does nothing clever — it just ticks. A decade counter turns those ticks into steps, and a handful of diodes decide which steps belong to red, which to green, and which to amber. No microcontroller, no code.
Tap the signal head to start or stop the clock
Status: clock stopped
Parts bin
Two chips do all the work. The resistors and capacitor only set how fast it ticks, and the diodes only decide which ticks belong to which lamp.
Operating principle
Split the circuit in two and both halves become simple: one part makes time, the other part spends it.
Wired as an astable, the 555 charges C1 through R1 and R2, discharges it through R2 alone, and repeats — producing a steady square wave on pin 3. It has no idea what a traffic light is. It just ticks, and R2 and C1 decide how slowly.
The CD4017 takes over from there. It has ten outputs and keeps exactly one of them high at a time, advancing to the next on every rising edge of the clock. Feed it one tick per second and the high output crawls from Q0 to Q9 over ten seconds.
That's already a sequence — it's just the wrong shape. Real signals hold red and green for a while and flash amber briefly, so the outputs get grouped: four counts of red, four of green, one of amber. Wiring Q9 back to the reset pin snaps the counter home the instant it lands there, and the pattern loops.
Grouping outputs — the red LED needs to light on four separate counts, so four outputs have to drive one wire. Connect them directly and whichever output is high back-feeds current into the three that are low.
One-way valves — a diode on each output lets current out toward the LED but blocks anything coming back. The four counts then behave as one long phase.
Changing the timing is just re-grouping. Give amber two counts instead of one by moving the reset wire from Q9 to the next output and adding a diode. Nothing else changes.
Assembly
Five steps — get the 555 ticking on its own before you add the counter, so there's only ever one thing that can be wrong.
Seat the 555 across the centre gap. Tie pins 8 and 4 to +9V and pin 1 to ground. Run R1 from +9V to pin 7, R2 from pin 7 to pin 6, and bridge pins 6 and 2 together. Hang C1 from that junction down to ground, positive leg upward.
Power up and put an LED and a 220 Ω resistor on pin 3 temporarily. It should blink roughly once a second. If the rate looks wrong, change R2 or C1 — every phase length in the finished circuit is a multiple of this one tick.
Seat the 4017 on the board. Pin 16 to +9V, pins 8 and 13 to ground, and run the 555's pin 3 to the 4017's clock input on pin 14. Each pulse from the timer now walks the high output along one step: Q0, then Q1, then Q2, and so on.
Tie Q0 to Q3 together through four diodes and feed the red LED, Q4 to Q7 through another four into green, and Q8 straight into amber. The diodes let several outputs drive one LED without back-feeding each other. Give every LED its own 220 Ω resistor to ground.
Wire Q9 back to the 4017's reset on pin 15. The moment the counter reaches that step it clears itself back to Q0, so the sequence repeats forever: four ticks red, four ticks green, one tick amber.
If it misbehaves
Check the clock first, the diodes second. Those two account for nearly every fault in this circuit.