Relaxation Oscillators: Building Square Waves with a Single Op-Amp and RC Network

2026-05-24

Sometimes you don't need a precision sine wave or a crystal-locked clock — you just need a cheap, reliable square wave to blink an LED, drive a buzzer, or clock a slow logic circuit. The relaxation oscillator is the answer: one op-amp, two resistors for feedback, one resistor and one capacitor for timing. No inductors, no crystals, no specialty parts.

The topology is a Schmitt trigger with a capacitor charging through a resistor into the inverting input. The non-inverting input sees a fraction of the output through a divider — call it β = R2/(R1+R2). When the output is at +Vsat, the cap charges toward +Vsat through R. When the cap voltage crosses +β·Vsat, the comparator flips, output snaps to −Vsat, and the cap now discharges toward −Vsat. When it reaches −β·Vsat, it flips again. Endless oscillation.

The period works out to:

T = 2RC · ln((1+β)/(1−β))

Handy shortcut: pick R1 = R2 so β = 0.5. Then ln(3) ≈ 1.0986, and T ≈ 2.2·RC. That's the rule worth memorizing. For a 1 kHz square wave: T = 1 ms, so RC = 1 ms / 2.2 ≈ 455 μs. Use C = 10 nF and R = 47 kΩ. Done.

Real-world example: a panel-mount "power on" indicator that blinks at 2 Hz instead of staying solid — easier to spot in peripheral vision. Use an LM358 (cheap, single-supply capable), set R1 = R2 = 10 kΩ, C = 1 μF, R = 220 kΩ. That gives T ≈ 0.48 s, close enough to 2 Hz. Drive an LED through a series resistor off the op-amp output.

Gotchas to watch for:

For sub-1% frequency accuracy, this isn't your circuit — use a 555 with a precision cap, or better, a crystal-based oscillator divided down. But for "I need a blinker, now, from my parts bin," nothing beats it.

See it in action: Check out Always working 2xBD139 square wave oscillator (low frequencies) demo and schematic by radiofun232 to see this theory applied.
Key Takeaway: A Schmitt trigger plus an RC timing network gives you a free-running square wave with period T ≈ 2.2·RC when the hysteresis divider uses equal resistors — the simplest oscillator you can build with an op-amp.

All newsletters