low THD Wienbrigde sinewave generator


Generator and buffer

Generator and buffer

Just for fun, a wienbridge based oscillator based on the principle of Bill  Hewlett and described by Jim Williams. I did not have the USA type # lights so I did a junkbox dive and searced for some lights. After some experiments I found some ” rules” for such an oiscillator.

Principle, do not look at the values. A TL072 is not capable of running at 10 kHz.

Principle, do not look at the values. A TL072 is not capable of running at 10 kHz.

In fact, the oscillator can be split in two. The first part is a a sort of filter. A parallel RC and a series RC. The principle is based on a bridge. The reference is set with a voltage divider at inverting imput. At first the C’s are empty so the opamp will trow the output high to fill the C until the voltage is equal to the reference. The RC in the feedback have a RC time that dictates the time that takes. That must be the same time as the RC at the input. If it is at the same level the output goes low again but bgecause the lag it will go to the negative rail. The R parallel to the C starts discharging the cap at the same rate helped by the low output  until it reaches the reference level and the output goes high again. So it starts clipping. Tat is unavoidable because we need a massive gain to start.

The reference is just the same as the gain defining elements of a non inverting amplifier. If we  increase the resistance of the gain setting resistor we could reduce gain.  So it would be nice if we could make it in such a way the amplifier reduces its gain by itself. For that we need a ptc. A resistor that increases its value when it gets more current. A lightbulb has a ptc like behaviour. Cold the resistance is very low, hot it get upto 15 times higher.

But how to deterine the value of the feedback resistor and lamp. I figured some rules of tumb.

– pick a lamp that is rated for about 10-15 times the voltage you expect over the lamp
– measure the current at the rated voltage. V / I = Rhot
– now devide that Rhot by 4 to get the resistance your lamp should get.
– 2.75 x “cold” resistance calculated  is the value for the R-feedback in series with the lamp.

This will get you in the ballpark. At least upto something like 50-100 kHz if you use a small R-trimmer in series with the resistor to finetune. If you want a broad use I use a second light parallel with an extra resistor to the first light. This because the thermal mass of a lightbulb. It heats up, changes resistance and then has to cool down quick enough. You see this if you change frequency, this is called hunting, the amplitude goes up and down and then stabilizes. If thermall mass is to large it keeps hunting. This gives AM distortion.

Very important is the tracking of the stereo potentiometer and the matching of the capacitors. And be sure the opamp can run on the wanted frequency. If you build it well it will be rocksteady. If you add an amplifier/buffer behind it it can be part of a very good function generator. Trigger some fast 74 logic with the sinewave and you have a rockstable squarewave. From that you can make a triangle and ramp using a few opamps more.


121 kHz 1st, 2nd and 3rd harmonic


Sciope screenshot


Harmonic leftovers


The signal itself


The generator at 1,84 kHz




Test setup for harmonic measurement,. The box right is an active notchfilter

Test setup for harmonic measurement,. The box right is an active notchfilter

Total harmonic distortion is very low. It can be even better using a few more opamps and an phototransistor/led combi instead of the lamp. Jim Williams desribes this in appnote 43 (from Lineair technology) But that makes it much more complex.




If you want it even cleaner you can add a filter. For instance:



The 4 R values are all equual. At 1 kHz you need 12 kOhm, at 10 kHz, 1200 Ohm and for 100 kHz it is 120 Hz.


This entry was posted in Homebrew Projects, measurement projects. Bookmark the permalink.

Comments are closed.