74HC00 Quad-NAND Logic Oscillator

Two NAND gates, one resistor and one cap make a square-wave clock — a textbook intro to digital logic without a microcontroller.

Difficulty: Breadboard. Estimated build time: about 25 minutes. Estimated parts cost: about US$2.20. 6-line bill of materials. Compare supplier offers when available. An oscillator built from two NAND gates inside a single 74HC00 quad-NAND IC, blinking an LED at a few hertz.

Power and decoupling

Place the 74HC00 across the breadboard divider. Pin 14 → +5 V, pin 7 → GND. Drop a 100 nF ceramic capacitor directly across pins 14 and 7, leads short, right next to the IC. CMOS chips switch fast and pull supply spikes; without this cap the oscillator chirps unpredictably.

Wire gate 1 as an inverter

Tie pins 1 and 2 together (the two inputs of NAND gate 1) — when both inputs are the same logic level, NAND becomes NOT. The output is pin 3. This first gate is the active element of the oscillator.

Wire gate 2 as a second inverter and add the RC feedback

Tie pins 4 and 5 together (NAND gate 2 inputs), output is pin 6. Now connect pin 3 (gate 1 output) → 100 kΩ resistor → pin 4/5 junction (gate 2 input). Then a 1 µF capacitor from gate 2 output (pin 6) back to gate 2 input (pin 4/5). The cap charges and discharges through the resistor, and the gates flip whenever the threshold is crossed — that is your oscillation.

Buffer and drive the LED

Take pin 6 (gate 2 output) into pin 9/10 of gate 3 (tied together as another inverter). Pin 8 is gate 3's output. Run pin 8 through a 470 Ω resistor and into the anode of an LED, cathode to GND. The LED now blinks at f ≈ 1/(2.2·RC) ≈ 4.5 Hz. The fourth gate (pins 11–13) is unused — leave its inputs tied to GND, never floating, or the chip will draw extra current and pick up noise.

Tune the frequency

Want it faster? Replace R with 10 kΩ → 50 Hz. Want it slower? 1 MΩ → 0.5 Hz. Want audio? Use 10 kΩ + 100 nF → 5 kHz, swap the LED for an 8 Ω speaker via a 100 µF series cap. Probe pin 6 with an oscilloscope and you will see a clean rail-to-rail square wave — the dream of every analog circuit, handed to you for free by digital logic.