When you need a clock signal, a microcontroller's internal oscillator or a dedicated crystal is usually the right call. But when you need a cheap, rugged, and easily tunable square wave for a switched-mode power supply, a PWM dimmer, or a simple timing delay, a relaxation oscillator circuit is the workhorse of the bench. Unlike harmonic oscillators (like crystals or LC tanks) that rely on resonance, a relaxation oscillator generates a non-sinusoidal waveform by repeatedly charging and discharging a capacitor through a resistor, triggered by a threshold device.
This guide cuts through the textbook theory and gives you a decision-forward framework to pick the right topology, calculate exact component values, and debug the circuit on your bench.
The Decision Path: Picking Your Relaxation Oscillator Topology
Not all relaxation oscillators are created equal. The three most common topologies are the Schmitt-trigger inverter (74HC14), the classic bipolar timer (NE555), and the comparator (LM393). Here is how to choose, terminating in our default recommendation for general-purpose logic-level clocks.
| Criterion | 74HC14 (Schmitt Trigger) | NE555 (Bipolar Timer) | LM393 (Comparator) |
|---|---|---|---|
| Max Practical Freq | ~20 MHz | ~300 kHz | ~500 kHz |
| Part Count | 2 (1 IC, 1 R, 1 C) | 4 (1 IC, 2 R, 1 C) | 5+ (1 IC, 3 R, 1 C, pull-ups) |
| Supply Voltage | 2V to 6V | 4.5V to 16V | 2V to 36V |
| Output Drive | Low (~6 mA) | High (200 mA sink) | Open-collector (needs pull-up) |
| Power Supply Noise | Very Low (CMOS) | High (crowbar current spikes) | Low |
Core Topology: How the 74HC14 Schmitt-Trigger Oscillator Works
The 74HC14 contains six independent Schmitt-trigger inverters. A Schmitt trigger has two distinct switching thresholds: a higher positive-going threshold ($V_{T+}$) and a lower negative-going threshold ($V_{T-}$). This hysteresis is what makes the oscillator work.
Node Labels & Wiring:
- VCC (Pin 14): Tied to 5.0V DC.
- GND (Pin 7): Tied to circuit common.
- Node A (Pin 2 - Output): The square wave output.
- Node B (Pin 1 - Input): The RC junction.
Connect a resistor (R1) between Node A and Node B. Connect a capacitor (C1) between Node B and GND. Tie the inputs of all unused inverters in the IC to GND to prevent floating-gate oscillation and excess current draw.
The Cycle: Assume Node A is HIGH (5V). Current flows through R1, charging C1. When the voltage at Node B hits $V_{T+}$ (typically 2.5V at a 5V supply), the inverter snaps its output LOW (0V). Now, C1 discharges through R1 back into Node A. When Node B drops to $V_{T-}$ (typically 1.6V), the inverter snaps HIGH again, and the cycle repeats. The result is a sawtooth wave at Node B and a square wave at Node A.
Design Walkthrough: Sizing Components for a 100 kHz Clock
Let's design a 100 kHz relaxation oscillator circuit using the SN74HC14N. According to the Texas Instruments SN74HC14 datasheet, the frequency of this topology is governed by the RC time constant and the specific hysteresis thresholds of the IC.
For a 5V supply, the empirical formula for the 74HC14 is:
f ≈ 1 / (0.82 × R × C)
Step 1: Pick the Capacitor (C)
At 100 kHz, we want a capacitor small enough to avoid parasitic inductance but large enough to swamp the IC's internal input capacitance (typically ~3 pF). A 1 nF (102) NP0/C0G ceramic capacitor is ideal. Avoid X7R or Y5V dielectrics here; their capacitance drops significantly with applied DC bias voltage, which will cause your frequency to drift.
Step 2: Calculate the Resistor (R)
Rearranging the formula: R = 1 / (0.82 × f × C)
R = 1 / (0.82 × 100,000 × 1 × 10-9)
R = 12,195 Ω
Step 3: Select the Standard Value
The closest E24 standard value is 12 kΩ. Using a 12 kΩ 1% metal film resistor, our actual expected frequency is:
f = 1 / (0.82 × 12,000 × 1 × 10-9) = 101.6 kHz.
Bill of Materials (BOM):
- U1: SN74HC14N (DIP-14) or 74HC14 SOIC
- R1: 12 kΩ, 1/4W, 1% metal film
- C1: 1 nF, 50V, C0G/NP0 ceramic
- C_bypass: 100 nF (0.1 µF) ceramic, placed physically adjacent to Pins 7 and 14.
Behavior Matrix: What Happens When You Change One Element
When tuning or debugging on the bench, you need to know how the circuit reacts to component variations. Here is the behavior matrix for the 74HC14 topology.
| Parameter Changed | Effect on Frequency | Effect on Duty Cycle | Edge Case / Warning |
|---|---|---|---|
| Increase R | Decreases inversely | Stays ~50% | If R > 1 MΩ, leakage currents and stray capacitance cause erratic jitter. |
| Increase C | Decreases inversely | Stays ~50% | Large electrolytic caps have high ESR, skewing the charge/discharge symmetry. |
| Increase VCC (e.g., 5V to 5.5V) | Increases slightly | Shifts slightly | The $V_{T+}$ and $V_{T-}$ thresholds scale with VCC, altering the 0.82 constant. |
| Add Capacitive Load to Output | Decreases | N/A | Loading Pin 2 with >50 pF adds to the RC time constant and causes edge ringing. |
Failure Modes: What Breaks at the Extremes
Understanding how a circuit fails is just as important as knowing how it works. If your scope shows a flatline or a chaotic mess, check these extremes:
- Shorted Resistor (R = 0 Ω): Node A is directly tied to Node B. The inverter's output is shorted to its input. The IC will bias itself in its linear transition region (around VCC/2). It will stop oscillating, and the IC will draw massive shoot-through current (tens of milliamps instead of microamps), causing the chip to overheat. Fix: Check for solder bridges between Pins 1 and 2.
- Open Resistor (R = ∞): The feedback path is broken. C1 will charge or discharge to the last state and sit there. The output (Node A) will lock permanently HIGH or LOW. Fix: Measure R1 out-of-circuit.
- Shorted Capacitor (C = 0 Ω): Node B is hard-tied to GND. The input is perpetually below $V_{T-}$. The output (Node A) will lock permanently HIGH at VCC. Fix: Check for a crushed ceramic cap or miswired ground bus.
- Open Capacitor (C = ∞): Node B is left floating, relying only on stray PCB capacitance (usually 2-5 pF). The circuit will either lock up or oscillate erratically in the 10 MHz to 30 MHz range, picking up ambient RF noise. Fix: Ensure the capacitor legs are fully seated in the breadboard.
Step-by-Step Breadboard Testing and Verification
Do not just wire it up and hope for a square wave. Follow this systematic verification sequence to prove the circuit is operating within spec.
- Power Off & Prep: Insert the 74HC14 into the breadboard. Wire Pin 14 to your 5V rail and Pin 7 to GND. Insert the 100 nF bypass capacitor directly across Pins 7 and 14. Tie the inputs of the five unused gates (Pins 3, 5, 9, 11, 13) to GND.
- Insert Timing Components: Insert the 12 kΩ resistor between Pin 2 (Node A) and Pin 1 (Node B). Insert the 1 nF capacitor between Pin 1 (Node B) and GND.
- DMM Sanity Check (Power Off): Set your multimeter to continuity mode. Verify there is no short between the 5V rail and GND. Verify there is no short between Pin 1 and GND (which would indicate a shorted C1).
- Power On & DC Bias Check: Apply 5.0V. Set your DMM to DC Voltage. Probe Node B (Pin 1). You should read an average DC voltage of approximately 2.05V (the midpoint between the 1.6V and 2.5V thresholds). If you read 0V or 5V, the circuit is locked up (refer to Failure Modes).
- Oscilloscope Verification: Connect your scope probe to Node A (Pin 2). Set the timebase to 5 µs/div and voltage scale to 2V/div. Trigger on the rising edge. You should see a clean 0V to 5V square wave. Measure the period; it should be approximately 9.84 µs (101.6 kHz).
- Probe the Sawtooth: Move the scope probe to Node B (Pin 1). You should see a sawtooth wave oscillating strictly between ~1.6V and ~2.5V. If the sawtooth spans 0V to 5V, your capacitor is open or missing.
By choosing the 74HC14 over the legacy NE555, you eliminate the need for heavy decoupling, avoid the 300 kHz frequency ceiling, and achieve a highly stable 100 kHz clock with just three passive components. For deeper characterization of the hysteresis thresholds across temperature, consult the NXP 74HC/HCT14 datasheet, which provides excellent typical performance curves for $V_{T+}$ and $V_{T-}$ drift from -40°C to +125°C.






