Why does this circuit oscillate

Discussion in 'General Electronics Chat' started by Adrian Mayer, Aug 20, 2015.

  1. Adrian Mayer

    Thread Starter New Member

    Aug 20, 2015
    6
    0
    Simulation made with Multisim. http://i.imgur.com/3Gsij5Z.png

    As soon as I close the switch (simulation of an input signal) the circuit begins to oscillate at a very high frequenzy (705 khz), when i open the switch afterwards the circuit continues to oscillate. I also made a prototype of this circuit turns out the simulation was correct. I read that IC Amplifiers start to oscillate when theres is a phaseshift of 180° (my load are just 2 optocouplers?!).

    Any ideas why it oscillates?

    Data sheets: http://goo.gl/cbwYl1

    https://goo.gl/QCDzeD

    The whole circuit: http://i.imgur.com/K4tY2ae.png (the first picture just shows the part that oscillates)
     
  2. pwdixon

    Member

    Oct 11, 2012
    488
    56
    What were you expecting to happen?
    Just think in gross terms for a moment, assume the first amp output is say -12V the two optos will be ON this leads to the amp neg input getting -12V and the amp will immediately try to set its output to +12V, this chokes off the optos and the amp neg input will again see a positive voltage (whatever position the switch is in), this leads to the amp output going to -12V and the cycle repeats. The period is just up to the speed of the various components.
     
  3. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    But if you were to put those leds in the optos in the other direction, then it might do what you originally expected.
     
  4. pwdixon

    Member

    Oct 11, 2012
    488
    56
    If we knew what the OP was expecting in the first place!
     
  5. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
  6. pwdixon

    Member

    Oct 11, 2012
    488
    56
  7. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,546
    1,252
    There is input signal voltage visible at the virtual ground node. That is the clue.


    The polarity of the feedback loop is correct with the optos connected as shown. When the output goes down, the feedback signal into the inverting input goes down, just like with a resistor.

    A 4N26 does not have signal processing circuitry between the phototransistor and the output, so it is an old, non-very-linear opto coupler. The non-linearlty translates into a feedback network impedance that changes with amplitude. Also, with rise and fall times of 2 us it is not very fast, and contributes a phase shift at high frequencies that is part of this problem. Non-linear and slow, not a good combination for what should be a linear circuit.

    But the main reason the circuit is oscillating, the final culprit, is the open loop gain/phase curve of the opamp. This is what is setting the oscillation frequency. At high frequencies the opamp loses so much gain that the loop gain is 1, and injects enough phase shift into the forward signal that the loop phase shift is 180 degrees. These satisfy the Barkhausen criteria for oscillation (The other 180 degrees come from the inverting input.). The opamp is running open loop, as indicated by input signal presence at what should be a virtual ground node. More than any other single factor, that is the reason this circuit oscillates.

    ak
     
  8. Adrian Mayer

    Thread Starter New Member

    Aug 20, 2015
    6
    0

    So an RC component in the negative feedback would help?
    I also increased the input resistor, because otherwise the signal would reach
    the AMPs max-min voltage.

    INPUT : 5Vpp 50kHz
    [​IMG]

    I dont know if its the best solution but it seems to work (at least in the simulation).
    Maybe the accuracy is somehow improveable? (using faster optos as you said?)

    Im not very experienced with the assortment of optos out there.
    So the main criteria is that its linear and has a fast , fall and rise time?
     
  9. Adrian Mayer

    Thread Starter New Member

    Aug 20, 2015
    6
    0
  10. Adrian Mayer

    Thread Starter New Member

    Aug 20, 2015
    6
    0
    Forgot to mention that i had to swap the pins. (mistake from the wiki)
    This circuit works, however only with "ideal amplifiers".
     
  11. pwdixon

    Member

    Oct 11, 2012
    488
    56
    It's the pin swap that has caused the problem. Can you post the original link and just for completeness what pins you swapped and why?
     
  12. Adrian Mayer

    Thread Starter New Member

    Aug 20, 2015
    6
    0
    https://de.wikipedia.org/wiki/Trennverstärker

    I swaped the +/- input pins of the amps. (i also have a book with the same circuit but with these pins swaped)

    As i allready wrote the circuit works (with swaped pins) when i use virtual components.

    Input signal = Output signal , as its meant to be. No phase shift at all, no oscillation, no accuracy loss

    [​IMG]
     
  13. Adrian Mayer

    Thread Starter New Member

    Aug 20, 2015
    6
    0

    Build another prototype with the RC component. Turns out the simulation was wrong? It still oscillates :(

    Maybe this also caused some confusion. These two are not connected to each other! (blue,red)
    [​IMG]
     
    Last edited: Aug 21, 2015
Loading...