Electronics · Beginner · AGES 12–18

Traffic-light circuit

Program a model crossing with a repeatable red, amber and green sequence.

Illustrative classroom circuit. Instructor inspection is required; no mains power or real traffic control.

Learning outcomes

  • Build resistor-limited outputs.
  • Translate a timing table into a sequence.
  • Test repeatability and identify a fault.

Materials

  • Arduino Uno and USB cable
  • Red, amber and green LEDs
  • Three 330 Ω resistors, breadboard and jumper leads

Plan, build and test

  1. With USB disconnected, wire each LED through its own 330 Ω resistor: D8 red, D9 amber, D10 green; each cathode returns to GND.
  2. Ask the instructor to inspect polarity and the series resistors before powering.
  3. Plan a timing table: red 5 seconds, green 5 seconds, amber 2 seconds. Only one LED should be on at a time.
  4. Implement the table using digitalWrite and delay; test three complete cycles.
  5. Improve the model with a pedestrian request in a later lesson, then explain why a classroom model is unsuitable for controlling real traffic.
View the related course →

← All example projects