Charles Eric LaForest, PhD., 2026
This circuit implements an analog sine wave oscillator with low distortion, fast settling, and a steady amplitude across 7 to 8 octaves. It uses no expensive or particularly precise parts, and can directly drive a few tens of mW into a load. I designed it as a more interactive alternative to my digital signal generator, which can only be set by typing in numbers.
This design is a conventional analog sine oscillator which uses controlled feedback to generate oscillations at a specific frequency. In a theoretical nutshell, the design has to continually adjust itself to meet the Barkhausen stability criterion where the total loop gain, the sum of all feedbacks, add up to unity at only the desired frequency. This total unity gain is a complex-numbered value, so the amplitude is 1 and the phase is 0.
In this implementation, we pass the negative (inverting) output feedback through a notch filter so it reaches a minimum amplitude and zero phase offset at the notch frequency, and any other frequency sees a larger negative feedback. Since the negative feedback constrains the phase and frequency, the positive (non-inverting) output feedback can be a simple resistive voltage divider to attenuate all frequencies equally by the same ratio as the notch filter minimum. Both feedbacks then sum to a loop gain of unity at the desired frequency and a loop gain of less than unity for all other frequencies, which causes them to quickly fade into the noise floor, leaving one very pure sine wave.
However, this is a very unstable operating point. If the total loop gain at the desired frequency is not held at exactly unity, then one of the feedback paths will dominate the loop and the oscillator output quickly either grows until it clips, or fades down to nothing. In this implementation, we control the positive feedback with its own negative feedback such that if the output starts to increase or decrease, the positive feedback decreases or increases, stabilizing the total loop gain back towards unity against any perturbations from non-ideal components and environment.
For the practical details and an overview of what's possible, go read Rod Elliott's Sinewave Oscillators - Characteristics, Topologies and Examples, which covers the real-world methods and difficulties when generating extremely pure sine waves.
Let's go over the schematic, from left to right, which goes from signal generation to output. The bias voltage (virtual ground) generation (U0A, bottom right) and op-amp supply and decoupling are as usual, and assume a 9V minimum single-ended supply. There are two TL072 ICs (U0 and U1).
Both positive and negative feedback paths exist on the oscillating op-amp (U0B).
The negative feedback path is a Bridged-T band-stop filter, tunable from 47 Hz to 9 kHz via a dual 100k potentiometer, which needs to be logarithmic so the change in octave is roughly constant as the knob is turned. Otherwise the higher frequencies are all smushed at the end of the range. This Bridged-T configuration has a maximum attenuation of -9.5 dB (0.335x) and a phase shift of zero at the selected frequency.
To keep the oscillator stable, the positive feedback path must supply exactly the same -9.5 dB (0.335x) attentuation of the output, also with zero phase shift. We do this with a 2:1 voltage divider (0.333x output) where the upper leg is a 100k resistor and the lower leg is a home-made vactrol composed of back-to-back green LEDs driving a plain CdS light-dependent resistor. The back-to-back LEDs remove the need for separate rectifier diodes.
Usually, the oscillating op-amp output directly drives the LEDs, but I found this leaves the LEDs off most of the time, only pulsing on while the instantaneous output voltage is greater than their forward voltage drop of 1.9V. This irregular light output won't help keeping the CdS cell resistance steady at lower frequencies, will slow down tracking amplitude changes, and forces the oscillating op-amp output to levels higher than I'd like, given I wanted an adjustable-gain low-impedance output stage.
Instead, a second op-amp (U1A) takes the output from the oscillating op-amp and drives the LEDs in a constant-current configuration, adding the needed forward voltage drop to always keep the LED current (and thus, light output) proportional to the input voltage, thus reducing the per-cycle variation in CdS cell resistance, particularly at low frequencies, and both making the oscillator output level independent of the LED forward voltage drop, and relieving the oscillating op-amp from supplying the LED current, which might (I was guessing) add distortion.
However, adding the forward voltage offset to the input voltage means switching the output voltage very quickly from +1.9V to -1.9V (and vice-versa) at crossover, which creates EMI manifesting as a 2nd harmonic, which is normally absent. But we will reduce it later by reducing the LED current.
To get an estimate of the range of values I'll need to work in, I first measured the vactrol output resistance under a range of diode DC currents, starting with a 9V supply and a 10k current-limiting resistance, and halving it at each step until the current reached the practical limits an op-amp could supply (and the LED could tolerate). For this vactrol, this current ranged from 0.7 mA up to 13 mA, for an output resistance of about 90k down to 5k. The LED forward voltage varied from 1.85V up to 2.17V.
Since the vactrol isn't a precision device, you have to adjust the positive feedback path until both the oscillating op-amp output steady level is such that, at maximum gain, the final output stage (U1B) doesn't distort, and the voltage across the CdS cell is minimized as its resistance is slightly voltage-dependent, which creates 3rd harmonic distortion.
While adjusting the oscillator, I observed the output on both an oscilloscope (for output level) and a spectrum analyzer (for output distortion) and adjusted resistance values to get the best usable output voltage range and minimize the 2nd and 3rd harmomic output distortion. I did this via trial-and-error, but you can do better this way:
Finaly, the output stage (U1B) is a conventional non-inverting adjustable gain stage, with a maximum gain of 5. If the oscillating op-amp output is about 600 mVp, then we can get up to 3 Vp, well within the undistorted output range of the TL072 op-amp given the supply and bias voltages. The stabilizing capacitor must be small enough to not significantly affect the gain at any of the oscillator output frequencies. The output bias-blocking capacitor must be large enough to not affect the output when driving low impedance (say 200R) loads.
After fine-tuning, I measured the oscillator's output at 1 kHz and at its minimum and maximum operating frequencies, with the output stage at unity gain. To measure distortion, I plugged in the 2nd and 3rd harmonic levels into the THD Calculator from RFWirelessWorld. Higher harmonics were below -80dB and didn't affect the THD calculation results for this range of distortion levels. I give the peak-to-peak voltage level as the output capacitor was leaky, leaving an offset voltage when driving the high-impedance scope probes and thus skewing the measured RMS values.
| Frequency (Hz) | Voltage (Vpp) | 2nd Harmonic (dB) | 3rd Harmonic (dB) | Approx. THD (%) |
|---|---|---|---|---|
| 47 | 1.70 | -68 | -45 | 0.6 |
| 1k | 1.66 | -74 | -72 | 0.04 |
| 9k | 1.64 | -69 | -60 | 0.1 |
I'm happy with the distortion results, as I was aiming -60dB or more for all harmonics. The distortion levels are about as good as can be for vactrol-based feedback control according to Rod Elliott, and I think using the constant-current LED drive improved the low-frequency distortion levels.
The output level is stable enough, varying by only 0.3 dB over the entire frequency range. The output stage did not add measurable distortion, and could reach 7.60 Vpp at max gain. I could drive a 200R coil without added distortion and only a small drop in output voltage.