A Wien oscillator is an RC-based electronic circuit that generates stable, low-distortion sine waves by using a Wien bridge network for frequency tuning and a non-inverting amplifier with automatic gain control to sustain oscillation. In a real test or installation environment, it changes how you source audio-band signals: it replaces bulky LC tank circuits and high-distortion phase-shift networks, giving you a continuously tunable, low-THD (Total Harmonic Distortion) sine wave from 10 Hz to 100 kHz using only standard resistors and capacitors. Beginners frequently confuse the Wien oscillator (the complete active circuit with an amplifier and AGC) with the Wien bridge (which refers strictly to the passive RC feedback network, or the null-measurement bridge topology used for testing unknown capacitors).
The Core Mechanism: Barkhausen Criteria and the Gain of 3
To understand the Wien oscillator, you have to look at the two feedback paths wrapped around the operational amplifier. The circuit relies on the Barkhausen stability criterion, which dictates that for sustained oscillation, the loop gain must be exactly 1 (or 0 dB), and the total phase shift around the loop must be exactly 0° (or 360°).
The positive feedback path contains the Wien network: a series RC circuit in parallel with a parallel RC circuit. At most frequencies, this network shifts the phase and heavily attenuates the signal. However, at one specific resonant frequency ($f_r$), the capacitive and resistive reactances balance out. The phase shift drops to exactly 0°, and the network acts as a purely resistive voltage divider that attenuates the output by exactly 1/3.
Because the positive feedback path loses 2/3 of the signal, the negative feedback path (which sets the amplifier's closed-loop gain) must compensate. The non-inverting amplifier must have a gain of exactly 3 to satisfy the Barkhausen criterion ($3 \times 1/3 = 1$). If the gain is 2.9, the oscillation will slowly die out. If the gain is 3.1, the amplitude will grow exponentially until the op-amp hits its supply rails, clipping the sine wave into a square wave. Holding that gain at precisely 3.000 is the primary engineering challenge of the circuit.
Frequency Calculation and Component Selection Matrix
The resonant frequency where the phase shift is zero is determined by the classic Wien formula. Assuming the series and parallel components are matched ($R1 = R2 = R$ and $C1 = C2 = C$), the formula simplifies beautifully:
Worked Numeric Example: Designing a 1 kHz Test Tone
Let's design the RC network for a precise 1 kHz sine wave. First, we select the capacitor. For audio frequencies, a 10 nF capacitor is an excellent choice because it is large enough to ignore stray parasitic capacitances (which are usually in the 2-5 pF range) but small enough to avoid the high leakage currents associated with electrolytic capacitors.
Using C = 10 nF ($10 \times 10^{-9}$ F), we solve for R:
$R = \frac{1}{2 \pi \times 1000 \times 10 \times 10^{-9}} = 15,915.49 \, \Omega$
In practice, you cannot buy a 15,915 Ω resistor off the shelf. You would use a 15.8 kΩ 1% precision metal film resistor in series with a 200 Ω trimmer potentiometer, allowing you to dial in exactly 15,915 Ω to hit 1.000 kHz on your frequency counter.
| Target Freq | C1, C2 (Capacitors) | R1, R2 (Resistors) | Required Cap Dielectric | Expected THD (w/ JFET AGC) |
|---|---|---|---|---|
| 100 Hz | 100 nF | 15.9 kΩ | Polypropylene Film | < 0.05% |
| 1 kHz | 10 nF | 15.9 kΩ | NP0/C0G Ceramic | < 0.02% |
| 10 kHz | 1 nF | 15.9 kΩ | NP0/C0G Ceramic | < 0.03% |
| 100 kHz | 100 pF | 15.9 kΩ | Polystyrene / C0G | < 0.10% |
Taming Distortion: Automatic Gain Control (AGC)
Setting the gain to exactly 3 using fixed resistors is impossible in the real world. Component tolerances, temperature drift, and op-amp open-loop gain variations will push the gain slightly above or below 3. To fix this, we implement an Automatic Gain Control (AGC) loop in the negative feedback path.
The AGC circuit continuously measures the peak amplitude of the output sine wave and dynamically adjusts the negative feedback resistance to keep the loop gain locked at exactly 1.
The JFET Voltage-Controlled Resistor Method
The most common solid-state AGC uses an N-channel JFET (like the J211 or 2N5457) operating in its ohmic (linear) region. The JFET's drain-source channel acts as a voltage-controlled resistor. Here is the signal flow:
- The output sine wave is fed into a peak detector (a simple diode and RC low-pass filter).
- The resulting DC voltage represents the output amplitude.
- This DC voltage is fed to the gate of the JFET.
- If the output amplitude grows too large, the gate voltage becomes more negative, increasing the JFET's channel resistance.
- This increased resistance lowers the op-amp's closed-loop gain, pulling the amplitude back down.
Choosing the Right Op-Amp
The op-amp dictates your noise floor and high-frequency limits. Do not use an LM358 or LM324 for audio-grade Wien oscillators; their Class-B output stages suffer from severe crossover distortion that will cap your THD at around 1%.
- TL072: The classic bench choice. JFET inputs, low noise, and a slew rate of 13 V/µs. Perfect for 20 Hz to 50 kHz. Check the TL072 datasheet and specifications for exact bias current figures.
- OPA1612: For ultra-low distortion audio testing (THD < 0.001%). Bipolar inputs, incredibly low voltage noise density (1.1 nV/√Hz), and a 27 V/µs slew rate.
- NE5532: A good budget alternative for audio, though its bipolar inputs draw more bias current, requiring lower-value resistors in the Wien network to avoid DC offset errors.
Where You Meet the Wien Oscillator in Practice
While digital direct synthesis (DDS) chips like the AD9833 have taken over cheap function generators, the analog Wien oscillator remains a staple in specific high-performance and legacy domains:
- Audio Distortion Analyzers: High-end audio testing requires a sine wave source with lower distortion than the device under test. Classic analog analyzers (and many modern hybrid equivalents) use precision, multi-gang potentiometer-tuned Wien oscillators with incandescent lamp AGC to achieve THD below 0.005%.
- Analog Function Generators: The dial-tuned signal generators sitting on the desks of many university labs use a switched-capacitor Wien network for range selection and a dual-gang potentiometer for continuous tuning within the decade.
- Metal Detectors: In induction balance metal detectors, a highly stable Wien oscillator is often used as the reference frequency source, beating against the search coil's LC oscillator to produce an audio-frequency heterodyne tone.
Frequently Asked Questions
Why use a Wien oscillator instead of a phase-shift oscillator?
A phase-shift oscillator uses three cascaded RC high-pass or low-pass filters to achieve the necessary 180° phase shift. While it requires fewer components to start, the phase-shift network heavily attenuates the signal (requiring an amplifier gain of 29), and it is notoriously difficult to tune across a wide frequency range without altering the waveform shape. The Wien oscillator requires a gain of only 3, places less stress on the op-amp's bandwidth, and can be easily tuned with a dual-gang potentiometer.
Can I use an incandescent bulb for AGC instead of a JFET?
Yes, and for low-frequency audio (10 Hz to 2 kHz), it is often superior. An incandescent lamp (like a #327 or a small 12V pilot light) has a positive temperature coefficient. As the output amplitude rises, the filament heats up, its resistance increases, and the gain drops. This thermal averaging inherently filters out high-frequency amplitude modulation, yielding incredibly pure sine waves. However, bulbs are microphonic (sensitive to vibration), have a slow startup time (causing initial amplitude overshoot), and are becoming physically obsolete.
Why is my 100 kHz Wien oscillator outputting a triangle wave?
You have hit the op-amp's slew rate limit. A 100 kHz sine wave with a 5V peak amplitude requires a minimum slew rate of $2 \pi \times 100,000 \times 5 = 3.14 \, \text{V/}\mu\text{s}$. If your op-amp cannot change its output voltage faster than this, the peaks of the sine wave will flatten into linear ramps, turning it into a triangle wave. Switch to a faster op-amp like the OPA1641 or reduce the output amplitude.






