Sine wave using a Wein Bridge Oscillator for a certain frequency  - Page 1
Forum section: electronics / projects

author: Siddhat
author_rank: Regular Contributor
timestamp: May 15, 2019, 05:07:49 pm
content: Hello Everyone,I am trying to make a circuit that outputs a sine wave using a Wein Bridge Oscillator circuit at a frequency of 47 kHz. The values of the resistors R3 and R4 was calculated to 3386.2 ohms and C1 and C2 to be 1 nF (for the sine wave to oscillate at 47 kHz).But the results were not as desired. Instead of the required frequency (i.e. 47 kHz), I am getting an oscillating frequency of around 36 kHz and could not figure out what is wrong with the circuit or the values. Could someone help me out??Also how do you change the amplitude of the sine wave?

author: Benta
author_rank: Super Contributor
timestamp: May 15, 2019, 06:29:36 pm
content: Your calculation of the resistors and caps is OK, but I'm missing the automatic gain control for the amplifier. If you think you can do that with a trim pot, think again.

author: duak
author_rank: Super Contributor
timestamp: May 15, 2019, 06:34:59 pm
content: I think the 741 opamp is too slow for the desired frequency, especially with greater output voltage swings. The 741 will give the desired gain of X3, but it will cause a delay or phase shift that will lower the frequency.R2, the gain setting, will control the amplitude but it will not be stable. You will have to add some sort of amplitude stabilization to vary the gain. Examples using non-linear components are back to back diodes or an incandescant lamp. Here is an example of back to back diodes:https://www.analog.com/media/en/technical-documentation/application-notes/80206653AN580.pdfFor various other methods and explanations search for "wien bridge amplitude stabilization"

author: radix
author_rank: Contributor
timestamp: May 15, 2019, 09:02:33 pm
content: Judging from the screenshot, your time step also seems a bit too large for this simulation. Try changing that to a smaller value and you might get a more "stable" frequency. But a circuit like that still won't work in reality, as others have mentioned.You can change the output amplitude with an additional adjustable gain stage after the oscillator (pot + amplifier).

author: RoGeorge
author_rank: Super Contributor
timestamp: May 15, 2019, 09:15:26 pm
content: It'sWienBridge, not Wein.In real life you'll need an active control of the amplification, in order to get stable oscillation and constant amplitude. Having fixed amplification works only on paper.The light bulb lamp trick is famous for stabilizing the amplitude with incredibly small distortions. I think HP had a famous generator back in the days, based on a Wien Bridge stabilized with a light bulb lamp.

author: Audioguru
author_rank: Super Contributor
timestamp: May 15, 2019, 10:13:31 pm
content: Why are you using an antique 741 opamp designed 53 years ago? Many of them need plus and minus 15V for a power supply. The datasheet shows that the 741 opamp has trouble above 9kHz.Use a modern opamp that works perfectly up to 100kHz or higher.

author: Zero999
author_rank: Super Contributor
timestamp: May 15, 2019, 11:03:23 pm
content: Try the NE5532 or TL072.Note that there's no point in specifying so many significant figures for the resistors, because the capacitors will have 1% tolerance, at best, 10% being more typical. If you use 1% tolerance capacitors, then use the nearest standard E96 resistor value of 3k4.The circuit should work. The simplest way to limit the output, without horrible clipping is to use diodes to bypass a resistor, once the output voltage gets too high. In this caseAV = 1+(R4+R5)/R3When either D1 or D2 start conducting R5 is bypassed lowering the gain towards 1+R4/R3.Increasing the voltage across the diodes reduces the output, but will increase the distortion. Replacing them with Schottky diodes, such as the BAT54,, will lower the output voltage.Taking the output from the other side of R5 will give a cleaner sinewave, but it's a high impedance node, so will need a unity gain buffer, but if you're using a dual op-amp, it's free.

author: Siddhat
author_rank: Regular Contributor
timestamp: May 16, 2019, 03:38:17 am
content: Quote from: Benta on May 15, 2019, 06:29:36 pmYes, the calculations are correct, but according to the calculations shouldn't the frequency be as calculated? And I'm working on the amplitude control of the circuit.

author: Siddhat
author_rank: Regular Contributor
timestamp: May 16, 2019, 03:44:30 am
content: Quote from: duak on May 15, 2019, 06:34:59 pmOh, the 741. I didn't know that. Which op-amp will work best with the frequency of 47 kHz?Yes, I'm working on the amplitude stabilization portion.

author: Zero999
author_rank: Super Contributor
timestamp: May 16, 2019, 08:37:31 am
content: Quote from: Siddhat on May 16, 2019, 03:44:30 amI've already mentioned two possible candidates: NE5532 and TL072, but there are lots of op-amps which will work perfectly at 47kHz.The problem with the 741 will be the increased delay which will slow it down, i.e. lower the frequency and the slew rate will limit the output amplitude. I've just repeated the above simulation with a similar op-amp to the 741: GBWP = 1M and SR = 1V/µs, a gain of 3.07 and no diode limiter. It gives a reasonable sine wave, thanks to the slew rate limiting the output, before clipping, but the frequency is much lower, about 37kHz, which agrees with your simulation.

author: Siddhat
author_rank: Regular Contributor
timestamp: May 16, 2019, 10:34:04 am
content: Quote from: Zero999 on May 16, 2019, 08:37:31 amYes, I tried the same circuit using TL072 and the circuit worked fine. It's about time that I will complete the amplitude limiter circuit. Thank you.

author: Zero999
author_rank: Super Contributor
timestamp: May 16, 2019, 01:06:31 pm
content: There are other ways to limit the output voltage, which are more linear: an incandescent lamp or transistor AGC circuit are often used. See the threads linked below.https://www.eevblog.com/forum/beginners/best-way-to-amplify-a-sine-wave-without-distorsion/25/https://www.eevblog.com/forum/projects/wien-bridge-oscillator-ltspice-simulation/

author: rvalente
author_rank: Frequent Contributor
timestamp: May 18, 2021, 12:35:10 am
content: Hello,a little old thread but, how is wien oscillator frequency stability over a few °C of temp variation, to bad? Is 0.5 to 1% to much to expect?

author: Vovk_Z
author_rank: Super Contributor
timestamp: May 18, 2021, 11:48:16 am
content: Quote from: rvalente on May 18, 2021, 12:35:10 amYou'll have about 0.5% stability with usual components ('usual' film caps and usual 100-300 ppm MF resistors).It can be several times more stable with NP0 caps and precision (<=50 ppm) resistors - you'll have <0.1%..0.2%.