1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Wien bridge oscillator distorted output

Discussion in 'General Electronics Chat' started by Jony130, Mar 9, 2012.

  1. Jony130

    Jony130 Active Member

    Joined:
    Feb 1, 2009
    Messages:
    292
    Likes:
    28
    I have a wien bridge circuit.

    op amp LM358

    [​IMG]

    But the output signal has a strange "tooth" distorted output

    View attachment 61949

    Can anyone tell me what cause this strange distorted output.
    I assume that op amp cause these distortions but how?
     
  2. simonbramble

    simonbramble Active Member

    Joined:
    Nov 22, 2010
    Messages:
    433
    Likes:
    64
    try another op amp. I could be changes in the input bias current that is causing a strange voltage drop across the 10k resistors. The LM358 is not really a high quality op amp
     
  3. unclejed613

    unclejed613 Well-Known Member

    Joined:
    Apr 3, 2009
    Messages:
    1,828
    Likes:
    99
    it's the diodes in the feedback loop. that's a poor choice of limiter for a sine wave oscillator. usually wien bridge oscillators use a slow nonlinear element for maintaining a constant signal, such as an incandescent lamp or a fet driven by a rectified and filtered portion of the output signal.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ

    Hi Jony,

    I have to agree that the main reason for the 'hump' is because of the diodes. The diodes have a relatively sharp IV curve so although they do limit the gain, they do so very abruptly and this shows up as distortion on the output. This of course assumes that the frequency of operation is within the limit that the op amp can easily handle.

    There are at least two ways to deal with this...
    First is to increase the output voltage so the hump isnt as significant relative to the total amplitude. This means increasing the gain and making sure the power supply voltage is high enough.
    Second, you can soften the two diode curves by placing a resistance in series with them. You then work the diodes plus series resistance against a bigger resistance value (bigger than 10k) so you still get automatic gain adjustment. Say you start with 20k in series with the diodes, then maybe 50k in parallel and adjust the impedance of the other two resistances in the negative feedback network to provide approximately the same gain (but maybe a bit higher as above). Once the diode curves are softened the gain change wont be as abrupt and should provide for a cleaner output. So really all you would be doing is placing a resistance in series with the two diodes, then adjusting the impedance of the other negative feedback elements (going higher) so they can still work effectively with the 'new' diodes.
     
    Last edited: Mar 9, 2012
  6. simonbramble

    simonbramble Active Member

    Joined:
    Nov 22, 2010
    Messages:
    433
    Likes:
    64
    I thought about the diodes, but I have built a Wien Bridge oscillator with diode limiters and it gave superb performance. Unfortunately, it was not in the same configuration as the one above... and it had a JFET limiter. Circuit attached
     
  7. Jony130

    Jony130 Active Member

    Joined:
    Feb 1, 2009
    Messages:
    292
    Likes:
    28
    I build another Wien Bridge oscillator. But I use NE5532
    And this is what I got.
    [​IMG]

    [​IMG]

    [​IMG]

    No 'hump" in output signal.

    Longtime ago I read in the book about audio amplifier what cause these distortions.
    But I don't remember where it was and what cause this distortion.
     
    Last edited: Mar 9, 2012
  8. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ
    Hi Jony,


    Try using the LM358 with a somewhat higher output voltage too, at least 3v like this last run.
     
  9. WTP Pepper

    WTP Pepper Active Member

    Joined:
    Jan 24, 2012
    Messages:
    648
    Likes:
    41
    Location:
    UK
    In terms of the maths, a wein bridge exhibits a 1/3 loss at resonance and this needs to be overcome by the gain of the amp. Try setting the gain to 4 but use the diodes to pull it down to just above 3 using series resistors with one bypassed by opposite diodes. BTW the LM358 will work fine at audio frequencies providing you run off decent power supply rails.

    You can also use a JFET in the feedback to give an AGC result of your oscillator.
     
  10. Jony130

    Jony130 Active Member

    Joined:
    Feb 1, 2009
    Messages:
    292
    Likes:
    28
    I know how to "properly" design the wien bridge oscillator. I'm interested in something else. What caused this strange distortion.
    Tomorrow I play some more with this circuit.
     
  11. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ
    Hi Jony,

    Sorry but you're missing the point. The point is that if the output is too low the diodes might affect it more. If you try it with the LM358 it should work with a higher output voltage as i was saying in my previous post.
    It could very well be partly due to the crossover distortion of the LM358 too, but that's also helped somewhat with a higher output voltage.
    So you cant test one op amp with 0.6v peak output and another op amp with 10v peak output and then say one op amp doesnt work. They both have to be tested with the same output level.
    A better op amp should work better, but if the frequency is low enough the LM358 should work too.
     
  12. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,585
    Likes:
    950
    Location:
    Canada, of course!
    ONLINE
    Absolutely not!
    It is low power so it has a poor high frequency response. Its slew rate is so low that it has trouble above only 2kHz. Audio goes up to 20kHz. The "hump" in the oscillator waveform is caused by the delay of the distortion caused by the clipping diodes.
    It is low power so its output transistors are not biased enough so it has crossover distortion. You do not want crossover distortion in a sinewave oscillator nor in audio.
     
    Last edited: Mar 9, 2012
  13. WTP Pepper

    WTP Pepper Active Member

    Joined:
    Jan 24, 2012
    Messages:
    648
    Likes:
    41
    Location:
    UK
    So why do you have a variable resistor to set the gain when a simple JFET will control the gain automatically?
     
  14. Jony130

    Jony130 Active Member

    Joined:
    Feb 1, 2009
    Messages:
    292
    Likes:
    28
    As I promised I played around a bit more whit this circuit.
    I remove the diodes from the feedback resistor and I increase the oscillation frequency to 10KHz.

    And this is what I got:

    LM358 without the diodes

    [​IMG]

    And NE5532 also without the diodes

    [​IMG]

    So it is clear to see that these distortions has nothing to do with the diodes.

    There must be some other mechanism which causes this "hump".

    And some measurements with diodes in the feedback loop.

    LM358 with the diodes


    [​IMG]

    NE5523 with the diodes

    [​IMG]
     
  15. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,585
    Likes:
    950
    Location:
    Canada, of course!
    ONLINE
    The lousy old LM358 is low power so it does not have enough bias current in its output transistors which causes crossover distortion.
    It has a poor high frequency slew rate which delays the crossover distortion notches.

    An LM358 is dual opamp which is exactly the same as an LM324 quad opamp.
    Here is what the crossover distortion looks like at 5kHz:
     
  16. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ
    Hi there audioguru and Jony,

    Where did you get that scope picture from? That crossover distortion looks to be too great even for the LM358. Can you post a schematic of the circuit that was used to create that scope shot?

    LM358's do work up to a certain point for frequencies lower than some limit set by the slew rate and gain bandwidth product. They should be able to produce a clean enough sine wave for some applications. They do however require proper biasing to get good response.

    Jony:
    The LM358 functions as an op amp but it does have some restrictions on frequency and gain bandwidth which set the upper limit for use in a given application. Also, to get good distortion the op amp has to be properly biased.
     
    Last edited: Mar 10, 2012
  17. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,585
    Likes:
    950
    Location:
    Canada, of course!
    ONLINE
    I don't know where the 'scope photo of crossover distortion of an LM324 came from. I looked in Google and couldn't find it.
    I have had it since July, 2009.

    I don't have and don't want to have a lousy old LM358 or LM324 to try it.

    I installed Korean telephone systems for a few years. They had the worst soldering I have ever seen. Customers complained about buzzing in the speakers (crossover distortion from a class-B amplifier) so I added one resistor to pass the audio from the driver to the speaker and it worked perfectly.
     

    Attached Files:

  18. MrAl

    MrAl Well-Known Member Most Helpful Member

    Joined:
    Sep 7, 2008
    Messages:
    11,049
    Likes:
    961
    Location:
    NJ
    Hi again audioguru and Jony,


    OH yes very nice. It effectively bypasses the transistors i guess. Lower level output perhaps, but cleaner.

    The poor LM358 often gets a bad rap for a number of reasons, probably the main reason for this is that there are several significant errors on the data sheet. When i read the LM358 data sheet i get the feeling that one of the oldest problems in manufacturing products for public use comes up: the person who wrote the datasheet/manual was not the same person that designed the product. The errors can be subtle, but the ramifications are anything but subtle and lead to gross misuse of the product. This leads to the informational domino effect, where one person tells another person tells another person, and soon everbody thinks the product doesnt work right. It's not the individual people's fault either, it's the manufacturers fault for allowing the bad information to hit the market. So it's not really a bad product, it's bad information, and since it comes directly from the manufacturer there is no reason not to believe the false information.

    Im going to attempt to clear up this problem once and for all with the LM358. The data sheet tries to explain how to use this thing effectively, but fails because whoever wrote it either didnt understand the device themselves or simply made a subtle error because of a small oversight.
    I'll start a new thread for this and hopefully it helps, possibly with the circuit Jony is building and possibly with other circuits too.
     
    Last edited: Mar 10, 2012
  19. Jony130

    Jony130 Active Member

    Joined:
    Feb 1, 2009
    Messages:
    292
    Likes:
    28
  20. WTP Pepper

    WTP Pepper Active Member

    Joined:
    Jan 24, 2012
    Messages:
    648
    Likes:
    41
    Location:
    UK
    Well I have to disagree. I have used the 358 in many circuits without any of the issues highlighted here. I suspect many of the problems are layout/component choices or simply forgetting what to do with the other half of the op amp since they share the same substrate.
     
  21. audioguru

    audioguru Well-Known Member Most Helpful Member

    Joined:
    Mar 16, 2004
    Messages:
    32,585
    Likes:
    950
    Location:
    Canada, of course!
    ONLINE
    The LM358 is very noisy (too noisy for audio) HISSSSS!
    The LM358 has horrible sounding crossover distortion. BUZZZZZ!
    The LM358 has trouble with frequencies above 2kHz but our hearing goes 10 times higher. MUFFLED!
     

Share This Page