Traffic light using TTL parts
Overview
This was one of my first hardware projects involving a dedicated PCB layout, in 2009. It resembles a simple traffic light going through the phases red / red + yellow / green / yellow. It consists only of sequential and combinational logic, without using a microcontroller. While being dead simple, it still can teach a lot of basic concepts.

About the circuit
The circuit consists of three parts:
- A clock generator, implemented by a NE555 timer which is configured to produce a 0.2 Hz square wave.
- A sequencer, implemented by a 74LS74 which is configured as a 2-bit binary ripple counter.
- A decoder, implemented by a 74LS00 from which 3 out of 4 NAND gates are used.
The truth table for associating the binary counter states with LED states looks fairly simpe, but one needs to keep in mind the low-activate nature of the 74LS parts, meaning 0 is ON and 1 is OFF (because the TTL totem pole outputs are great current sinks but poor current sources).
| Q2 | Q1 | Red | Yellow | Green | State |
|---|---|---|---|---|---|
| 1 | 1 | 0 | 1 | 1 | Red only |
| 1 | 0 | 0 | 0 | 1 | Red and yellow |
| 0 | 1 | 1 | 1 | 0 | Green only |
| 0 | 0 | 1 | 0 | 1 | Yellow only |
Transformed into equations for each individual LED:
| LED | Intuitive approach | Using NAND only | Reduced output load |
|---|---|---|---|
| Red | NOT Q2 | NAND(1, Q2) | NAND(1, Q2) |
| Yellow | Q1 | Q1 | NAND(1, /Q1) |
| Green | Q2 OR NOT Q1 | NAND(NAND(1, Q2), Q1) | NAND(/Q2, Q1) |
The last column addresses the design decision to put load onto the NAND gates' outputs only, but not on the flip-flops' outputs. The reason for this is that I didn't want to degrade the output characteristics, so that the signal stays clean for the next stage. The number of gates didn't change, so why not.

About the PCB
I believe I manufactured the board by myself using an UV light facial tanning lamp for exposition and iron(III) chloride as etching solution, long before PCBWay became a thing and when professional PCB manufacturing cost a fortune (like 35 € per board).
References
- Schematic and layout (Version 1.1 from 2012-12-02, Eagle 6 format)
- Article on main page (German)