74LS138 3-to-8 Demux LED Chaser
An eight-LED chaser driven by the textbook 74LS138 3-to-8 line decoder — binary counter on the inputs, one-hot LEDs on the outputs.
Difficulty: Breadboard. Estimated build time: about 35 minutes. Estimated parts cost: about US$2.80. 8-line bill of materials. Compare supplier offers when available. A self-running LED chaser that walks a single lit LED across eight positions, demonstrating the core building block of every memory chip and address decoder ever made: the 1-of-N decoder.
Power and enables
Insert the SN74LS00N — no, the SN74LS138N — across the breadboard centre divider. Pin 16 (VCC) goes to +5 V, pin 8 (GND) to ground. Drop a 100 nF ceramic right at the chip between VCC and GND. The chip has three enable pins: E1 (pin 4, active-LOW) and E2 (pin 5, active-LOW) must both be tied to GND, and E3 (pin 6, active-HIGH) must be tied to VCC. If any of the three enables are wrong, ALL outputs stay HIGH and no LED ever lights.
Build the clock and counter
On a separate part of the breadboard, build a 555 astable: NE555 with two 10 kΩ resistors and a 10 µF capacitor gives roughly 5 Hz — a comfortable chase speed. Feed the 555 output (pin 3) into a CD4040 ripple counter's clock input (pin 10). Tie the CD4040's reset (pin 11) to ground. Take the counter's Q0 (pin 9), Q1 (pin 7), Q2 (pin 6) outputs and run them to the 74LS138's A (pin 1), B (pin 2), C (pin 3) inputs. These three bits count 000, 001, 010, 011, 100, 101, 110, 111 and then wrap back — exactly the binary sequence the decoder needs.
Wire the LEDs
Each of the eight outputs Y0 (pin 15) through Y7 (pin 7 — watch the pinout, it is not in obvious order) drives one LED. The trick: the 74LS138 outputs are ACTIVE-LOW, meaning the selected output goes to ground and the rest stay HIGH at +5 V. So wire each LED with its ANODE to +5 V through a 330 Ω current-limit resistor, and its CATHODE to the corresponding Y output. When that output goes LOW, current flows through the LED, lighting it up. The other seven LEDs stay dark because both ends sit at +5 V.
Verify the count
Power up. You should see one LED at a time walking from position 0 to position 7 and looping back. If two LEDs light at once, the decoder is broken — most likely an enable pin is mis-wired. If they light in the wrong order, you swapped A0/A1/A2 — the input order maps to the binary count, not the physical pin numbering. If nothing happens at all, check the 555 with a multimeter on pin 3 — you should see it toggle between 0 V and roughly 5 V.
Slow it down or speed it up
The chase speed is set entirely by the 555's RC: f ≈ 1.44 / ((R1 + 2·R2) · C). Swap the 10 µF for a 1 µF to chase ten times faster, or for a 100 µF to chase ten times slower. For a fancier display, take the CD4040's Q3 output too and use the 74LS138's MSB to address a second 74LS138 — you get a 16-LED chase with two chips. That is exactly how a 4-to-16 decoder works internally.