Build it step by step
0 of 9 doneWire power
Pin 14 to battery plus, pin 7 to battery minus.
Tie unused inputs
Pins 5, 6, 8, 9, 12 and 13 to GND.
Tie gate 1 inputs
Pins 1 and 2 together.
Add the feedback
Output pin 3 through 10 kilohm and the pot to pins 1 and 2.
Add the 10 microfarad capacitor
Plus to pins 1 and 2, minus to GND.
Add the LED
Output pin 3 through 4.7 kilohm and the LED to GND.
Connect the battery
The LED blinks a few times a second.
Turn the pot
The blink speed changes.
Swap in the 100 nanofarad capacitor and the buzzer
A tone replaces the blink.
How do you build a schmitt NAND oscillator?
A single CD4093 gate with a resistor and capacitor makes a simple oscillator for blinkers and tones. You need CD4093 quad NAND Schmitt trigger, Resistor 10 kΩ, Potentiometer 10 kΩ, Ceramic Capacitor 100 nF, Electrolytic capacitor 10 µF, Passive buzzer, LED 5 mm red, Resistor 4.7 kΩ, 9 V battery, 9 V battery snap with DC jack and Breadboard 830 Tie Points. It takes 9 steps and about 100 minutes.
- Level
- Beginner
- Time
- About 100 min
- Parts
- 11
Parts list
- Integrated CircuitsBuy
- PassivesBuyResistor 10 kΩ × 1
- PassivesBuy
- PassivesBuy
- PassivesBuy
- Motors & ActuatorsBuyPassive buzzer × 1
- SemiconductorsBuyLED 5 mm red × 1
- PassivesBuyResistor 4.7 kΩ × 1
- BatteriesBuy9 V battery × 1
- PowerBuy
- PrototypingBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| Chip pin 14 (VCC) | 9 V battery plus | Power |
| Chip pin 7 (GND) | 9 V battery minus | Ground |
| Gate 1 inputs, pins 1 and 2 | Tied together as the oscillator input | Forms a Schmitt inverter |
| Output pin 3 | Feedback through 10 kilohm and the pot to pins 1 and 2 | Sets the speed |
| Capacitor from pins 1 and 2 | GND | Charges and discharges to make the oscillation |
| Output pin 3 | Red LED through 4.7 kilohm to GND, passive buzzer to GND | Blink and tone outputs |
| Unused gate inputs | GND | Never leave CMOS inputs open |
Code
A Schmitt-trigger gate has two thresholds: it switches high when the input rises above an upper level and low when it falls below a lower level. Feeding the output back to the input through a resistor, with a capacitor to ground, makes a relaxation oscillator. The capacitor charges up through the resistor until the upper threshold is crossed, the output flips, and the capacitor discharges until the lower threshold is crossed. The frequency is set by the resistor and the capacitor, roughly 1 divided by 0.8 times R times C, and it also depends a little on the supply voltage and the individual chip. With a 10 microfarad capacitor the blink is slow enough to see; with 100 nanofarad it speeds up to a tone you can hear on the passive buzzer. Never leave a CMOS input unconnected, so tie the three unused gates' inputs to ground. Use the 9 V battery with care: do not short its terminals, and disconnect it when you finish.
No code is needed. The circuit oscillates on its own. How it works: - The capacitor charges through the resistor from the output. - When its voltage reaches the upper threshold, the Schmitt gate flips low. - The capacitor then discharges through the same resistor. - At the lower threshold the gate flips high, and the cycle repeats. Rough frequency: f is about 1 / (0.8 x R x C) R = 10k + pot (10k to 20k) C = 10 uF -> about 4 to 8 Hz, a visible blink C = 100 nF -> about 400 to 800 Hz, an audible tone
Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| 10 microfarad and pot at minimum | Fast blink, about 8 Hz |
| 10 microfarad and pot at maximum | Slower blink, about 4 Hz |
| 100 nanofarad | Audible tone |
| No capacitor | Output stays steady or buzzes at a very high pitch |
| Unused inputs left open | Erratic behaviour |
If it does not work
Nothing happens
Check pins 14 and 7 and the battery clip.
Output stays high or low
Check pins 1 and 2 are tied and the capacitor is in place.
Blink too fast to see
Use the 10 microfarad part, not 100 nanofarad.
No sound
Use a passive buzzer and the 100 nanofarad capacitor.
Frequency drifts
Supply voltage changes the frequency, use a fresh battery.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the schmitt NAND oscillator?
CD4093 quad NAND Schmitt trigger, Resistor 10 kΩ, Potentiometer 10 kΩ, Ceramic Capacitor 100 nF, Electrolytic capacitor 10 µF, Passive buzzer, LED 5 mm red, Resistor 4.7 kΩ, 9 V battery, 9 V battery snap with DC jack and Breadboard 830 Tie Points.
How long does the schmitt NAND oscillator take to build?
About 100 minutes for a beginner maker, in 9 steps.
How do I know the schmitt NAND oscillator works?
10 microfarad and pot at minimum: Fast blink, about 8 Hz. 10 microfarad and pot at maximum: Slower blink, about 4 Hz. 100 nanofarad: Audible tone.
Nothing happens: what should I check?
Check pins 14 and 7 and the battery clip.
Output stays high or low: what should I check?
Check pins 1 and 2 are tied and the capacitor is in place.
Blink too fast to see: what should I check?
Use the 10 microfarad part, not 100 nanofarad.
No sound: what should I check?
Use a passive buzzer and the 100 nanofarad capacitor.
