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.
The circuit consists of three parts:
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.
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).