Projects / Schmitt NAND oscillator

Schmitt NAND oscillator

Beginner1.7 hGuided buildReviewed

Build it step by step

0 of 9 done
  1. ++

    Wire power

    Pin 14 to battery plus, pin 7 to battery minus.

  2. Tie unused inputs

    Pins 5, 6, 8, 9, 12 and 13 to GND.

  3. Tie gate 1 inputs

    Pins 1 and 2 together.

  4. Add the feedback

    Output pin 3 through 10 kilohm and the pot to pins 1 and 2.

  5. Add the 10 microfarad capacitor

    Plus to pins 1 and 2, minus to GND.

  6. 13.3 mA

    Add the LED

    Output pin 3 through 4.7 kilohm and the LED to GND.

  7. ++13.3 mA

    Connect the battery

    The LED blinks a few times a second.

  8. Turn the pot

    The blink speed changes.

  9. Swap in the 100 nanofarad capacitor and the buzzer

    A tone replaces the blink.

In short

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

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
Chip pin 14 (VCC)9 V battery plusPower
Chip pin 7 (GND)9 V battery minusGround
Gate 1 inputs, pins 1 and 2Tied together as the oscillator inputForms a Schmitt inverter
Output pin 3Feedback through 10 kilohm and the pot to pins 1 and 2Sets the speed
Capacitor from pins 1 and 2GNDCharges and discharges to make the oscillation
Output pin 3Red LED through 4.7 kilohm to GND, passive buzzer to GNDBlink and tone outputs
Unused gate inputsGNDNever 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.

CheckExpected
10 microfarad and pot at minimumFast blink, about 8 Hz
10 microfarad and pot at maximumSlower blink, about 4 Hz
100 nanofaradAudible tone
No capacitorOutput stays steady or buzzes at a very high pitch
Unused inputs left openErratic 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 →

Ask Lark AI

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.