Wien bridge oscillator with diodes in feedback loops

Mar 29, 2011 50 Replies

Hi all,



I built a Wien bridge oscillator on a breadboard according to the guidelines in the LM324 datasheet (Fig. 11)

formatting link
. The output is a distorted sine wave. I set to oscillate less than 1kHz. For diodes I used the



1n4148.

Can someone give me some hints on what I am doing wrong?



Regards, Jozamm


nes in the LM324 datasheet (Fig. 11)

formatting link
The output = is a distorted sine wave. I set to oscillate less than 1kHz. For diodes I u= sed the 1n4148.

Yeah diode AGC is like that. You might check out App note AN-43 from Linear Technologies. There is a nice discussion of the Wein bridge there that tells you how the circuit works. You might try adding a variable pot to the 50k feed back resistor (Rf). If I remember the numbers correctly the circuit will just start to oscillate when Rf is a bit more than 30 kohms. That should give you less distortion. But still not great... it is only a diode after all.

George H.

the LM324 datasheet (Fig. 11)

formatting link
. The output is a distorted sine wave. I set to oscillate less than 1kHz. For diodes I used the

1n4148.

Wien Bridge Oscillators are a PITA to amplitude stabilize.

Try this....

formatting link
...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | Remember: Once you go over the hill, you pick up speed

the LM324 datasheet (Fig. 11)

formatting link
. The output is a distorted sine wave. I set to oscillate less than 1kHz. For diodes I used the

1n4148.

In addition to other comments, LM324s have a lot of distortion all on their own. You can even see it at 60 Hz. Horrible opamp.

John

Hey Jim:

I'm sure I could figure that out if I weren't lazy. Could you save me some effort and give a run down on the theory? Obviously you're engaging in some trickery with that upper op-amp, and I assume that the diodes are limiting the output at least semi-softly, but that's all I get before the urge to grab some paper and a pencil battles with the urge to have another sip of tea.

Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html

Using a circuit out of a data sheet? Designed by an applications engineer who either really loves his job or couldn't get a 'real job' as a circuit designer? And whose job is to puff off chips, not make things work?

Traditionally, using diodes to stabilize a Wien bridge oscillator has been asking for a little bit of distortion. The idea is that you design the circuit carefully so the distortion is minimized, usually by setting it up so that it has just barely enough gain before the diodes kick in, and just barely too little after they start to conduct. So at zero amplitude there's enough gain to oscillate, and the effective gain gets lower and lower the higher the amplitude gets (thanks to the diodes conducting). At some amplitude the gain is stabilized and the thing steadies out.

It looks like the problem in that circuit is that the gain with the diodes out of the circuit is at least ten times the gain with them in (look at the ratio of the 50K vs. the 50K in parallel with that 5K pot that may be turned down).

The old traditional way of stabilizing a Wien bridge oscillator was with a light bulb, with circuit impedances set so that it just barely start getting warm from the audio. That would increase its resistance, which would (if you put it in the right place in the circuit) decrease the overall gain, and would stabilize the gain. As a method it worked really really fine in a vacuum tube circuit, and sorta-OK in an op-amp circuit back when you could get "grain of wheat" incandescents, and it really sucks now that everyone uses LED's for illumination at that sort of size/power scale.

I've always wanted to try building one of these with a variable shunt element that's either a multiplying DAC, a FET, or a resistor and a switch that brings it on-line at a really fast PWM rate. Then control the shunt element from a small microprocessor to keep the amplitude dead nuts on to what it's supposed to be, no muss, no fuss.

Of course, by the time you go that far down the mixed digital-analog road, you're probably better off using a small DDS just so that engineers fresh from college will be able to understand the circuit if for no other reason.

Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html

A while back there was a thread here on Sedra-Espinosa filters. I'll have to look to be sure, but I think the gimmick is that it has very high Q, then the diodes roll the Q down softly. (It's been awhile ;-)

For the Shuttle program I did something like that, but used comparators to set the amplitude accurately. ...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | Remember: Once you go over the hill, you pick up speed

One thing I can suggest adding: An added variable resistor in "rheostat mode", in parallel with the diode pair. I would suggest a 100 one.

Variable resistors are usually sold as "potentiometers".

"Rheostat mode" means use only 2 leads - the "wiper" lead and one of the two "ends".

First, set the 100K rheostat to maximum. Then, set the 5k one already shown to get you a voltage level of AC that you like, or a little more. After that, adjust the added 100K variable resistor to your tastes, for sufficiently low distortion and sufficiently high stability of the oscillation.

- Don Klipstein (don@misty.com)

The later method for solid state wein bridge stabilisation was to use a small glass encapsulated thermistor, which provides very low distortion. The thermal time constant of the thermistor keeps the resistance pretty constant at stabilisation point, but this starts to degrade at very low frequencies. The Mullard "Manual of Transistor Circuits" from 1962 used this method, fwir.

There's also the dual integrator op amp sine / cosine oscillator which can give good results. Don't have a circuit to hand but it was one of the examples in the old nat semi linear circuits data book. Most likely on the web as well...

Regards,

Chris

Right, mainly crossover distortion. You can make them much better by a drain resistor from the output to one of the rails. A mA or two is usually enough...

Regards,

Chris

I did forget to add in my previous response, that LM324 is prone to "crossover distortion". It appears to me that LM324 is some approximation of a Class B amplifier, while its main competitors for audio are Class AB.

An LM324 can often be "cleaned up" by adding a 2.2K or a 1.0K resistor from output to either supply rail - preferably the lower one.

Then again, my favorite "audio workhorse" op-amp is TLO84 / TL084, notably Texas Instruments TL084CN.

- Don Klipstein (don@misty.com)

Since V(U2.IN+) = V(U2.IN-) you could just as well connect U1.IN- to U2.IN+. Then you could replicate the R1, R2 divider so both opamps have their own.

Loop gain from U1.OUT to U1.IN+ is ~ -6dB and 0 degrees @ 20 KHz. U1 is a voltage amp with 6 dB gain.

You get +45 degrees phase shift from U2 and -45 degrees from R4,C2.

Why? Run the math... caution... your foot is rapidly approaching your mouth ;-)

...Jim Thompson

| James E.Thompson, CTO | mens | | Analog Innovations, Inc. | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | Phoenix, Arizona 85048 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | Remember: Once you go over the hill, you pick up speed

s
n

Newark still carries them, I can give you a part number.

I think my first post on SED was about motorboating in 'my' light bulb stabilized Wein bridge oscillator. If I didn't post the solution before. The motorboating problem was cured by replacing mylar film caps with lower distortion polypropylene(sp). I still have no idea what caused the problem.

But as Tim points out to get nice low distortion you run the circuit down where it just turns on.... I retro-spec it's a high Q circuit.

No one will duplicate the 'nice' bouncy amplitude stabilization you get with a light bulb. I still remember an old hp200 used in some student lab (circa 1980's).

George H.

=A0 =A0 =A0 =A0...Jim Thompson

=A0 =A0 ...Jim Thompson

=A0 =A0| =A0 =A0mens =A0 =A0 |

=A0 | =A0 =A0 et =A0 =A0 =A0|

=A0|

=A0 =A0 =A0 |

quoted text -

Hic, I swear I didn't read tha before posting... makes sense!

George H.

s

It's probably a Widlar circuit!

n

C'mon, Tim, I learned half of my electronics by assuming that all data sheet circuits were junk and then finding out why. ;)

Cheers

Phil Hobbs

Dr Philip C D Hobbs Principal ElectroOptical Innovations 55 Orchard Rd Briarcliff Manor NY 10510 845-480-2058 email: hobbs (atsign) electrooptical (period) net http://electrooptical.net

nes in the LM324 datasheet (Fig. 11)

formatting link
The output = is a distorted sine wave. I set to oscillate less than 1kHz. For diodes I u= sed the 1n4148.

What did you use for a circuit at the common reference voltage node????

I don't think one do what Mr. Holme is suggesting - U1's inverting input connection to the other opamp's inverting input is how the system obtains very close to precisely unity gain. If you attempted to give U1 its own voltage divider to set the gain to +6 dB to compensate for the

-6 dB drop across the voltage divider, small variations in component tolerance would probably cause U1 to either hit the rails or fail to oscillate.

Correction - I meant the -6 dB drop through the RC network.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required