Objective
The objective of this two-part article is to explore, understand, simulate, and, finally, construct a Wien bridge oscillator. Part 1 will discuss the history of the Wien bridge oscillator and theory of operation while exploring simulations with idealized circuit elements. Part 2 will analyze and construct a practical Wien bridge oscillator and then measure its performance. As an added bonus, we will build and test an alternate circuit with considerably better performance.
Design files for a printed circuit board are available so you can build one of your own as you read along.
A complete video run-through of the experiment, including circuit construction, testing, and measurements, is available in the video “A Low-Distortion Wien Bridge Oscillator You Can Build!”
Background
The Wien bridge oscillator holds a significant place in electronics history. Hewlett Packard’s (HP) very first product, the model 200A audio signal generator, was based on Bill Hewlett’s 1939 master’s thesis1 at Stanford University. This groundbreaking device boasted impressive specifications for its time, including a 1 W output and distortion better than 1% over most of the audio range, powered by standard line voltage. Beyond testing telephone amplifiers and general audio circuits, one of its earliest and most notable applications was in the production of Disney’s Fantasia movie. You can even find a replica of Hewlett Packard’s original garage, complete with a model 200A, at Stanford University, commemorating its role as the birthplace of Silicon Valley’s “garage startup” culture. Bill Hewlett’s original master’s thesis1 offers a fascinating glimpse into the circuit theory and design from that era. Another insightful reference is in Appendix C, “The Wien Bridge and Mr. Hewlett,” in “Application Note 43: Bridge Circuits.”
Oscillators are circuits that generate periodic waveforms without requiring any input signal. They generally include some form of electronic amplifier stage—transistors, op amps, or vacuum tubes—with a frequency-selective feedback network consisting of a combination of passive devices such as resistors, capacitors, or inductors. The generality of this statement reflects the diversity of oscillator designs; there are plenty of other ways to make an electronic (or electric) oscillator. For example, the General Radio Type 213-B uses a mechanical tuning fork as the frequency selective component and a carbon microphone as the amplification stage.2 Regardless of the implementation details, in order to oscillate, a linear circuit must satisfy the Barkhausen stability criterion:
- The loop gain is equal to unity in absolute magnitude
- The phase shift around the loop is zero or an integer multiple of 2π
Consider the first requirement and its consequences in an oscillator: if the loop gain is less than unity, the oscillations will die out. If the loop gain is greater than unity, the oscillations will increase in amplitude, either forever (which is possible in a simulation) or until something limits the amplitude (hopefully gracefully and not as the result of a catastrophic failure). If the end application is not very sensitive to distortion (output frequencies at multiples of the desired fundamental frequency), then simple gain limiting methods can be employed—this could be as simple as allowing the amplifier output to clip at the supply rails. But if the application requires a pure sine wave, then carefully controlling the amplifier’s gain is critical.
Consider the second requirement; there are various feedback elements employed to generate the required frequency-dependent phase shift—quartz crystals, mechanical resonators, L-C (inductor-capacitor) networks. The Wien bridge was developed by Max Wien in 1891 as an extension of the Wheatstone bridge. Whereas the Wheatstone bridge consists of purely resistive elements, the Wien bridge can be used to measure capacitors. While initially intended as a measurement circuit, at balance, the phase shift of a Wien bridge is zero, so including a gain element with a phase shift of zero will satisfy one part of the Barkhausen criterion.
(It would have been impossible, or at least exceedingly difficult, to make an oscillator based on the Wien bridge in 1891 as no linear electronic gain elements existed—the audion tube was invented in 1906.)
There are several advantages to using a Wien bridge as the feedback element in an oscillator:
- Simplicity
- Low distortion
- Ease of frequency adjustment, via either:
- Variable resistors
- Variable capacitors
With the gain and phase shift requirements satisfied, the next step is to ensure a loop gain of exactly unity. At resonance, the reactive arm of the Wien bridge has an attenuation of 1/3, so the amplifier must have a gain of 3. The circuit shown in Figure 1 is a simple Wien bridge oscillator with a 1.0 kHz output that illustrates this principle.
Gain control is achieved with an incandescent light bulb (as it is in Bill Hewlett’s configuration). An incandescent bulb’s resistance increases with power dissipation, and as a rough rule of thumb the hot resistance is often about 10 times the cold resistance. The #327 lamp shown has an operating voltage of 28 V and operating current of 40 mA, for a hot resistance of about 700 Ω and a cold resistance of around 70 Ω, which matches the actual measurements of a few bulbs. To achieve a noninverting gain of 3, the lamp’s resistance must be half of the feedback resistance, or about 215 Ω.
Once the circuit is oscillating, the amplitude control can be intuitively understood as:
- If the gain is a bit less than 3, the lamp cools down, its resistance drops, tending to increase the gain.
- If the gain is higher than 3, the lamp heats up, its resistance increases, tending to reduce the gain.
Eventually, the gain settles to a value that is likely very close to 3—whatever is required to maintain oscillation—and the amplitude stabilizes. Now we have a practical circuit.
Simulation of a Wien Bridge Oscillator with Ideal Elements
Before working with real components and all their imperfections, a useful exercise is to build a few conceptual circuits in LTspice®, just to get a taste of what life would be like in an ideal world. The LTspice files can be downloaded here: Wien Bridge Active Learning Exercise LTspice files.
Wheatstone Bridge Simulation
In order to become familiar with the operation of a bridge circuit in general, open the wheatstone_bridge.asc simulation in LTspice and run it. The output should be similar to Figure 2.
Note that the bridge is initially unbalanced, and a small, but nonzero, voltage appears at Vcd (a voltage-controlled voltage source with a unity gain is a convenient way to measure the difference between two nodes such that it appears directly in the simulation results). Experiment with different values for R3, noting that a value of 10 kΩ should balance the bridge and give a zero output. Try reducing R1 and R2 to 1 kΩ—does this have any effect on the output voltage?
AC Wien Bridge Simulation
Let’s explore the operation of the Wien bridge, which has frequency-dependent elements. Open the basic_wein_bridge.asc simulation in LTspice, shown in Figure 3. The simulation is set up as an AC sweep from 100 Hz to 10 kHz, with the result shown in Figure 4. Note that a DC bridge supply would produce a fairly obvious output; after an initial transient, node C would settle to ground potential, and node D would be at 1/3 of the supply. Run the simulation and probe node C, the output of the reactive arm of the bridge. Notice the gentle hump in response, peaking somewhere slightly less than 2 kHz. Probe node Vcd next. Notice the extremely sharp null in response, making it very easy to locate the exact resonant frequency of 1.59 kHz.
Simulated Wien Bridge Oscillator
Now let’s amplifiy the bridge’s output and pipe it back to the input. Open the wien_bridge_vcvs_gain.asc LTspice simulation shown in Figure 5. This is a circuit that is impossible to build in real life—the gain stage is essentially perfect: infinite input impedance, zero output impedance, and no offset or gain error. But it allows us to experiment with ideal cases, to gain some intuition into the Barkhausen criterion, and test out some assertions made in the background information.
Ignoring V1 for the moment, note that when this simulation is started, all voltages are zero. There is no reason for it to do anything other than stay at zero forever. V1 is there to kickstart the circuit into operation by providing a step to the gain stage when the simulation is first started, then it ramps back to zero and has no further effect on the circuit’s operation. Run the simulation and probe the output node. Results should look similar to Figure 6.
Note that the circuit oscillates for a few milliseconds, but the amplitude exponentially decays to zero. This is because the gain is set 1% too low (as you might expect if you built an amplifier with 1% resistors and got unlucky in the low gain direction). Next, set the value for E2 to 2.997, or about 0.1% too low, as shown in Figure 7. Oscillations continue longer, but still decay.
Since we know that the gain needs to be exactly 3 to sustain oscillation, set the gain to 3.0 as shown in Figure 8 and run the simulation.
Notice that the operation is exactly as predicted, with a steady amplitude for the entire 250 ms simulation time. Such behavior is purely theoretical and wouldn’t occur in real-world circuits or realistic simulations using a model of a real amplifier; the finite open-loop gain, finite input impedance, offset, and other imperfections will always cause the gain to be slightly more or less than 3.
As a final illustration that simulations can model situations that would be impossible in the real world, set the gain to 3.03 (1% too high, as you might expect if you built an amplifier with 1% resistors and got unlucky in the high gain direction), as shown in Figure 9, and run the simulation.
The output amplitude hits 800 teravolts after 250 ms, with no end in sight. Again, this simulation is only to build intuition about the Barkhausen criterion and has no basis in reality. If you were to build this circuit with an op amp configured with a gain of 3.03 and powered by ±5 V, oscillations would build until they approached 5 V amplitude, then simply clip (producing a distorted waveform).
Questions
- These simulations focused on the amplitude of the oscillator’s output. In the ideal case (gain = 3.0), is the output distorted? That is, is it anything other than a perfect sine wave?
- What would happen if you built the circuit in Figure 5 with a real op amp in a noninverting gain of 3.0, but the actual gain was a little higher than 3? Would the output increase to the ±15 teravolts shown in the simulation? (Hint: Put it into LTspice, and don’t forget to use reasonable power supply voltages for the op amp.)
You can find the answers at the StudentZone blog.
In Part 2, we’ll simulate a practical oscillator, then come back to reality and build the circuit and measure its performance.
References
1 Bill Hewlett. “A New Type Resistance-Capacity Oscillator” (master’s thesis). kennethkuhn.com, May 2020.
2 Charles E. Worthen. “A Tuning-Fork Audio Oscillator.” The General Radio Experiment, April 1930.
U.S. Patent 2,268,872: Variable Frequency Oscillation Generator.
“Using Lamps for Stabilizing Oscillators.” Tronola, October 2011.
Wien_Bridge_Oscillator. Wikipedia.
Williams, Jim. “Thank You, Bill Hewlett.” EDN, February 2001.
Williams, Jim and Guy Hoover. “Application Note 132: Fidelity Testing for A-D Converters.” Linear Technology, February 2011.