Op Amp design - more help needed!!

Discussion in 'The Projects Forum' started by paulsoulsby, Feb 2, 2013.

  1. paulsoulsby

    Thread Starter New Member

    Jan 9, 2013
    20
    0
    Hi,
    I need more op amp design help! I'm trying to design a circuit that takes the PWM 0-5V output of my arduino, filters off the PWM frequency (62.5kHZ) and then turn it into a line level output (+/- 0.5V).

    This is the circuit I've created:
    [​IMG]

    The first stage is a 3rd order filter designed using this:
    http://sim.okawa-denshi.jp/en/Multiple3tool.php

    The second stage does the gain and biasing. I used this to work out the values:
    http://www.ti.com/lit/an/sloa097/sloa097.pdf

    Then I put a non-inverting buffer on the output, in the hope of making it less sensitive to load impedance.

    When analysing it directly on the board, the output looks great!
    [​IMG]

    The notches in the sine wave are fine - it's just because it is sampled at 8-bit.

    However whenever anything is connected (audio interface or even just a jack lead), the whole thing gets distorted, with a lot of high frequency interference.
    [​IMG]

    This type of interference seems to vary every time I plug it in and can also change over time. I have also seen some other very strange distortions: entire waveform modulated by +/-0.5V 62.5kHz sine wave (which is the PWM freq) and also strange phasing issues (square wave input becoming pulse wave output, with pulse width dependant on input frequency).

    Any ideas why this circuit is going crazy the second I plug something into it? Presumably it has something to do with the impedance of whatever I plug into it? I don't see why just plugging a jack lead in (with nothing on the other end) would cause this.

    cheers
    Paul
     
  2. crutschow

    Expert

    Mar 14, 2008
    13,024
    3,236
    Sounds like circuit oscillation due to output load capacitance. Try adding a 100 ohm resistor in series with the output.

    Do all the op amps have decoupling capacitors across their power pins to ground?
     
  3. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,648
    764
    Hola Paul,

    Could you please post the duty cycle's upper / lower limits?

    Is the schematic coming from any simulator program?
     
  4. paulsoulsby

    Thread Starter New Member

    Jan 9, 2013
    20
    0
    Hi,
    Thanks for the advice. Will try the 100 ohm resistor. The schematic was drawn in QUCS. Will post the output transient and freq analysis to prove the theory. Will also get duty cycle info. Away till Sunday eve, so will post again then.
    Paul
     
  5. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,648
    764
    The signal generator on the left, riding +2.5 V, is it the way to simulate a 62.5 KHz PWM signal (0 to 5V)?

    Edit/

    Further questions:

    What frequency do you expect the output sinewave to have?

    How many different values the PWM signal has? In other words, how many steps in a full cycle of your output signal? Maybe 28?

    /Edit
     
    Last edited: Feb 2, 2013
  6. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    Your opamps have no part number and have no power supply.
    The second opamp has NO gain (it has a signal loss) and is biased wrong.
     
  7. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,648
    764
    Not much, really.

    Paul, are you sure that you are not doing a D to A conversión?

    I did. Things looked as in the picture.
     
  8. paulsoulsby

    Thread Starter New Member

    Jan 9, 2013
    20
    0
    Hi,

    The 100Ohm resistor fixed the instability thanks! I do now have a new issue with the ICL7660S providing the op amp negative supply, but I'll put it in a separate post.

    Paul

    P.S. I ditched the final op amp that was providing no gain. I was trying to buffer the output, but it proved to be unnecessary. The Op Amp I am using is a TI OPA2134PA.
     
  9. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,648
    764
    Thanks for ignoring my questions.
     
    Ron H likes this.
  10. paulsoulsby

    Thread Starter New Member

    Jan 9, 2013
    20
    0
    In reply to your questions:
    Yes it is a 62.5kHz 0->5V oscillator. It was to see how much of the modulation frequency would get through the filter.
    The sine wave output frequency is anything between 8Hz and 8kHz (depending on user input)
    The sinewave has 32 8-bit values.
    It is not a DA conversion. The reason for the notches in the output is because the filter still isn't filtering out all of the PWM modulation frequency. If you zoom in on the oscilloscope you can see the modulation frequency ringing at every step change.
    I have a 5th order Butterworth filter on order which I hope will improve this.

    thanks
    Paul
     
Loading...