A traffic light for a two-street intersection built with 4000-series chips: an NE555 provides the clock, a binary counter counts the seconds and a few gates decide which light is on at each moment. The complete project, from the schematic to the breadboard.
Digital Techniques · Six ICs · The simulation runs on the same circuit that is drawn.
Street A runs from left to right and street B from top to bottom. The cars obey what the traffic lights show: they stop at red and at yellow, unless they are already so close to the line that they cannot stop in time. Drag to rotate the view and use the wheel to zoom in.
The sixteen counter states, one per clock pulse. The blue band marks where the circuit is right now.
The counter runs through states 0 to 15 and starts over. The first half of the cycle belongs to street A and the second to street B; in each half, the last two states are yellow. The highlighted row is the one the simulation is showing.
The wires carrying logic signals change color with the simulation: green is a high level and dark gray is a low level. The small numbers next to each pin are the IC’s pin numbers. On a phone, the drawing scrolls sideways.
Each drawing is the IC seen from above, with the notch at the top: pin 1 is at the top left and the numbering runs counterclockwise. The color of each pin follows the simulation: green for high, gray for low, orange for +9 V, blue for ground.
When building on the breadboard it helps to check them off one at a time. “U4·12” means pin 12 of U4.
All the traffic light times are multiples of T: green 6 T, yellow 2 T and red 8 T. If R2 is replaced by a 100 kΩ trimmer in series with a fixed 22 kΩ resistor, the full cycle can be adjusted without changing the proportion between the lights.
Testing each stage before moving on to the next saves a lot of time: if something fails, the error is in the last thing that was added.
Three improvements to tackle with the same circuit as a base: