Traffic Light Controller in Logisim-evolution
The traffic light controller is the most popular digital-design course project: a finite state machine that cycles two directions through green → yellow → red with realistic timing.
Step 1: Define the states
A minimal two-direction controller needs four states:
- North-South green, East-West red
- North-South yellow, East-West red
- North-South red, East-West green
- North-South red, East-West yellow
Encode them with two D flip-flops (00–11) and draw the transition diagram — each state simply advances to the next, which keeps the excitation logic small. This is the same method as our sequence detector tutorial.
Step 2: Slow the clock down
A raw clock ticks far too fast to watch. Divide it with a Counter: let the counter run and use one of its high bits (or its carry output) as the slow state clock. Larger counter → longer green phases. See the counter tutorial and digital clock tutorial for the technique.
Step 3: Decode the outputs
Each state code drives six lamps (two directions × red/yellow/green) through simple combinational logic, or use two Hex Digit Displays as a compact stand-in while debugging. Remember Simulate → Ticks Enabled (Ctrl-K), or nothing moves.
Extensions instructors like
- Pedestrian button: an input that forces an early transition to the yellow state.
- Night mode: a control input that blinks only the yellow lamps.
Studying FSMs for an exam? Digital design courses on Udemy cover state machine design in depth.
As an affiliate partner, we may earn a commission on qualifying purchases — at no extra cost to you.
Related: sequence detector · digital clock
