JOVANA
Explore Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Sine-Wave Oscillators: Wien Bridge and Phase-Shift

Guide 1 gave you the Barkhausen recipe; now we cook a clean sine with nothing but resistors, capacitors and an op-amp. Meet the two classic RC oscillators — the gentle Wien bridge and the scrappy phase-shift — and the amplitude trick that keeps them singing one pure note instead of crashing into the rails.

From Barkhausen to a single clean note

From guide 1 you carry one recipe: an oscillator is just an amplifier wrapped in positive feedback, and it will sustain a steady wave only when the Barkhausen criterion holds — the signal that travels all the way around the loop comes back exactly the same size (a loop gain of 1) and exactly in step (a total phase shift of 0, or 360, degrees). Guide 1 left the picture deliberately frequency-blind. The question this guide answers is sharper: how do we make those two conditions true at one frequency only, so the output is a single pure sine wave rather than a buzzing mess of many tones?

The answer is to put a frequency-selective network in the feedback path — a little filter that hands the signal back in perfect phase at exactly one frequency and out of phase everywhere else. At that one frequency the loop closes cleanly and a sine grows; at every other frequency the phase is wrong, Barkhausen fails, and nothing builds. The network does the choosing; the amplifier just supplies the energy.

Why build that filter from resistors and capacitors? Because at audio and instrumentation frequencies — a few hertz up to a few hundred kilohertz — the inductors an LC tuned circuit would need are bulky, lossy and pick up hum, exactly the complaint you met in the filters rung. R and C are cheap, precise and tiny. The price is that an RC network has no sharp resonance of its own, so the phase only crosses zero gently; we lean on the amplifier and a careful gain choice to pin the oscillation down. Two arrangements do this beautifully: the Wien bridge and the phase-shift ladder.

The Wien-bridge oscillator

The Wien-bridge oscillator is the gold standard for a low-distortion audio sine. Its positive-feedback network is a tiny band-pass filter: a resistor and capacitor in series (the top branch) feeding a resistor and capacitor in parallel to ground (the bottom branch), with the output tapped at the junction. The series RC blocks low frequencies, the parallel RC shunts high frequencies, and in between there is one frequency where the phase shift through the network is exactly zero. Call it f0 = 1 / (2 times pi times R times C). That zero-phase point is the only frequency the loop can support, so it is the frequency you get.

Here is the elegant part. At that exact f0 the Wien network does not just give zero phase — it also passes exactly one third of the voltage, no matter what R and C you chose. So Barkhausen's magnitude condition becomes wonderfully simple: the amplifier must make up that loss with a gain of exactly 3. Wire the op-amp as a non-inverting amplifier (which keeps the phase at zero, matching the network) and set its gain with two resistors: gain = 1 + Rf/Rin. Choose Rf = 2 times Rin and you get 1 + 2 = 3. Loop gain is now magnitude 1, phase 0, at f0 alone.

  WIEN-BRIDGE OSCILLATOR   (example: R = 16k, C = 10nF)

  POSITIVE feedback = frequency-selecting Wien network

     Vout o---[ R ]---| |---+----> Vp   (Vp goes to + input)
              series    C   |
                          [ R ]  === C   (R parallel with C)
                            |      |
                           GND    GND

  NEGATIVE feedback = gain-setting divider on the - input

     Vout o---[ Rf = 20k ]---+---[ Rin = 10k ]---GND
                             |
                            (-) input

  gain = 1 + Rf/Rin = 1 + 20/10 = 3
  f0   = 1 / (2 x pi x R x C)
       = 1 / (2 x pi x 16000 x 10x10^-9) ~ 1 kHz
  at f0:  network passes 1/3 with 0 deg phase  ->  loop gain = 1
A Wien-bridge oscillator is two feedback paths at once: a Wien network into the + input picks the frequency, and a plain Rf/Rin divider on the - input sets the gain to 3.

Let us put numbers on it. Pick C = 10 nF and R = 16 k. Then f0 = 1 / (2 times pi times 16000 times 10 times 10^-9), which is about 1 kHz — a clean audio tone. To tune the frequency you change R or C; ganging two identical pots (one in each branch) lets you sweep the pitch while keeping the magic 1/3 intact. To change the note by a decade you scale R or C by ten. Notice the design splits cleanly in two: the Wien network sets the frequency, and the Rf/Rin divider sets the gain. That separation is exactly why this circuit is so pleasant to design.

The amplitude problem: why exactly-3 is impossible

Now for the honest snag, and it is the heart of every sine oscillator. A gain of exactly 3 is a knife-edge nobody can stand on. If the gain is a hair below 3, the loop gain is under 1, each lap around the loop is a little smaller, and the oscillation dies away to nothing. If it is a hair above 3, each lap is a little bigger, the amplitude grows and grows until the op-amp slams into its supply rails and clips — and a clipped wave is a square-ish mess full of harmonics, not a pure sine. Real resistors drift with temperature and tolerance, so you can never trim the gain to a perfect 3 and have it stay there.

The fix is amplitude stabilization: a gentle automatic gain control that starts the gain slightly above 3 so oscillation reliably builds from noise, then quietly squeezes the gain back to precisely 3 as the amplitude reaches the target. Think of it as a soft thermostat for loudness — never a hard wall, which would clip and distort. The trick is to make one of the gain-setting resistors change value with the output amplitude.

Three classic ways to do it. The oldest and sweetest is a small incandescent lamp in the Rin leg: as the amplitude rises, more current warms the filament, its resistance climbs, and the gain falls back toward 3 — a beautiful self-regulating element (the filament is a positive-temperature-coefficient resistor, a cousin of a reactive-free thermistor). The HP200A audio oscillator that launched Hewlett-Packard used exactly this lamp trick. A second way uses a JFET as a voltage-controlled resistor, with a small rectifier sensing the output and tuning the JFET's channel. A third clamps the gain with diodes or a back-to-back Zener pair that softly limit the swing.

The phase-shift oscillator

The phase-shift oscillator reaches the 360-degree total a different way. Here the amplifier is an inverting stage, which already flips the signal by 180 degrees. To close the loop in phase we need another 180 degrees from the feedback network — so the network is an RC ladder of three identical sections, each contributing roughly 60 degrees of phase shift, that add up to the missing 180. The frequency where the three sections together hit exactly 180 degrees is the one frequency the loop can sustain.

Why three sections, not one? A single RC can never reach 180 degrees on its own — it asymptotes toward 90 and gives up. Even two would have to crowd right up against 90 each, where the attenuation is brutal. Three sections share the load comfortably, each doing about 60 degrees in a region where it still passes a decent fraction of the signal. The cost of all that phase, though, is loss: at the oscillation frequency a three-section ladder attenuates the signal to 1/29 of its input. So Barkhausen now demands the inverting amplifier supply a gain of 29 (magnitude) to make up for it — far more than the Wien bridge's tidy 3.

The frequency for three equal high-pass sections (C in series, R to ground) is f0 = 1 / (2 times pi times R times C times sqrt(6)). Try R = 10 k and C = 10 nF: that sqrt(6) is about 2.449, so f0 = 1 / (2 times pi times 10000 times 10 times 10^-9 times 2.449), which works out to roughly 650 Hz. The phase-shift oscillator is charmingly simple — one transistor or one op-amp and a handful of equal parts — which is why it is a beloved first build. Its honest weaknesses: it is harder to tune (you must change all three sections together to keep the phase right), it needs that demanding gain of 29, and its sine is noticeably more distorted than a stabilized Wien bridge because the high in-loop gain and gentle filtering let harmonics through.

Designing one, and the honest limits

  1. Pick your tone. Choose the target frequency f0 and the topology — Wien bridge for low distortion and easy tuning, phase-shift for utter simplicity.
  2. Choose C first, then solve for R. Caps come in coarse values, so fix C at something sensible (say 10 nF) and rearrange the f0 formula to get R. Keep R between roughly 1 k and 100 k so it neither loads the op-amp nor lets stray currents matter.
  3. Set the gain just right. Wien: Rf/Rin = 2 (gain 3); phase-shift: gain 29. Aim a few percent high so it starts, never wildly high.
  4. Add amplitude stabilization (essential for the Wien bridge). Drop in a lamp, a JFET-plus-rectifier, or a diode clamp so the gain self-trims to the magic value once running.
  5. Verify on the bench. Watch start-up on a scope (it should build over many cycles), check the frequency, and look for clipping or a fuzzy, harmonic-laden waveform that says the gain or stabilization is off.

A few limits to respect, because a circuit perfect on paper can still sulk on the bench. Start-up depends on the loop gain being above 1 at switch-on — too marginal and the oscillation never gets going; the noise it grows from is real but faint, so give it a little headroom. The op-amp has a finite gain-bandwidth product and a finite slew rate: try to run a Wien bridge near the op-amp's bandwidth and the extra phase lag shifts your frequency and can stop oscillation cold, so keep f0 well below the part's reach. And a breadboard's stray capacitance — a handful of picofarads between every neighbouring strip — quietly adds itself to your timing caps; it is negligible at 1 kHz but it will pull a 100 kHz oscillator off frequency and is why precise or fast oscillators want a real PCB.