Guided Project

Guided Project

LED Traffic Light

Keep a tiny intersection orderly with outputs, timing, and a sequence that does not show red and green together.

  • Output
  • Sequences
  • Timing
  • Loops
  • State
  • Debugging

Project brief

What students build

  • Three visible light states
  • A timed sequence
  • Safe transition rules
  • Optional pedestrian request
  • Repeat behaviour
  • Reset state

What students learn

  • Digital output
  • Sequence timing
  • State transitions
  • Loops
  • Safety constraints
  • Testing impossible combinations

What students need

  • Browser circuit simulator or paper state diagram
  • Optional LEDs and suitable supervised components

The state diagram and simulator version need no hardware. A physical build uses teacher-arranged components under supervision; availability is confirmed separately.

Suggested build order

  1. 01

    Name the states

    Task: Define STOP, READY, and GO before wiring or coding.

    Checkpoint
    Each state has one light pattern.
    Likely mistake
    Starting with timing before defining states.
  2. 02

    Test one output

    Task: Make one simulated or physical LED turn on and off.

    Checkpoint
    The output responds reliably.
    Likely mistake
    Using the wrong output or connection.
  3. 03

    Create the sequence

    Task: Move through states in a safe order.

    Checkpoint
    Red and green are never active together.
    Likely mistake
    Several scripts control the same lights.
  4. 04

    Add timing

    Task: Choose readable delays and repeat the cycle.

    Checkpoint
    A full cycle is easy to observe.
    Likely mistake
    Delays are too short to inspect.
  5. 05

    Test a request

    Task: Optionally add a button-request state without interrupting unsafely.

    Checkpoint
    The request is handled at a defined point.
    Likely mistake
    Button input jumps directly to an unsafe state.

Test questions

  • Can red and green appear together?
  • Does restart begin from STOP?
  • Can a request interrupt any state?
  • Does the loop preserve sequence order?
  • Can every output be tested alone?

Common mistakes

  • Outputs are controlled from competing scripts.
  • Timing hides a wrong state order.
  • Reset begins at an unsafe state.
  • A button press is read but not acknowledged.

Extension ideas

  • Add a pedestrian signal.
  • Display the current state.
  • Add a night flashing mode.
  • Draw a complete state transition map.

Challenge levels

LEVEL 1

Builder

Create a reliable three-state loop.

LEVEL 2

Inventor

Add a queued pedestrian request.

LEVEL 3

Boss Level

Design and test normal and night operating modes.

What to demonstrate

  • State diagram
  • Three outputs
  • Safe sequence
  • Readable timing
  • Complete reset
  • One impossible-state test