Understanding my OPAMP response

Discussion in 'General Electronics Chat' started by Simon Larsen, Apr 2, 2015.

  1. Simon Larsen

    Thread Starter Member

    Feb 22, 2015
    31
    1
    My main goal is to produce sound via the atmega 328p chip (using PWM). I am building up my circuits step by step and trying to understand what is going on.

    I am now at the stage where I have added an OPAMP as buffer to protect my Arduino output pin. The issue is that one of my two opamps is producing an output I don't understand.

    * description of schematic *
    You can see the schematic attached to this post (schematic.jpg). The status is that my arduino is powered by my PC (via USB). The arduino produces a Saw-tooth wave using my program. The pwm output is passed through 2 RC-filters to smooth the signal. At this stage the output is between 0v and 5v. The 2k resistor is added as a pull-up resistor and the resulting signal is between 2.5v and 5v (I wanted to be sure I was within operating range for the OPAMPs). The output is fed into an opamp with negative feedback (unit gain) and output is measured with my new oscilloscope (which most likely can make a screenshot - but I don't know how yet... well...). The OPAMP is powered by a 9V battery having common ground with the arduino.

    Using JRC062d (taken from an old multimeter) as opamp seems to work as expected. It produces the same output as its input (see attachedment: JRC062d_works.jpg).

    The other opamp: TS922 seems to have an issue. It does not produce the same output as its input. The output seems to have slew rate? = 2V/500us = 4 mV/us .. and datasheet sais MIN. 700mV/us... I am confused.

    any suggestions?
     
  2. Hypatia's Protege

    Distinguished Member

    Mar 1, 2015
    2,803
    1,237
    Hello -- Sorry about your difficulties! I know how frustrating these things can be!:rolleyes:

    A few thoughts...

    The TS922 features 'rail to rail' input swing -- hence no such accommodation is required...

    I am unable to locate a datasheet for the JRC062d, however should it feature a 'standard' (Op Amp) input 'range' such may explain the disparity in performance of the two devices (as regards your application).

    IOW The undesirable roll-off encountered with the TS922 may owe to input conditions corollary to the (unnecessary) input EMF shift... Please try disconnecting the pull-up on the non-inverting input...

    Best regards
    HP

    PS please let us know 'how it goes':)
     
    Last edited: Apr 3, 2015
  3. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    What is the frequency of the pwm signal (the standard 500Hz?) ? duty cycle?.

    Is the goal to make a sine wave out of it? How good a filter are you trying to build?
     
  4. Simon Larsen

    Thread Starter Member

    Feb 22, 2015
    31
    1
    Thanks for the responses!

    jrc062d datasheet
    ts922 datasheet

    @HP: I have tried without the pull-up. And it still has that "slow" reaction time from high to low (also from low to high).

    @MikeML: PWM signal is constant 62,5kHz. The duty cycle is varied to produce a tone. In this example the output is a 440Hz Sawtooth. The goal is to make a synth (it can produce following waveforms: noise, sawtooth, triangle and pulse). All waveforms works with the JRC062d chip. The filter is working great. Although I realized that I needed to increase the cutoff frequency (lowering the cap. value for both RC filters).

    I read somewhere (tangentsoftware.net I believe) that the guy had experienced that a gain of >3 was needed in order for his op amp to work properly (I don't recall the model). Could that be it? Does it make sense that the voltage follower setup is not supported by ts922?
     
  5. Hypatia's Protege

    Distinguished Member

    Mar 1, 2015
    2,803
    1,237
    Interestingly, the JRC062D exhibits the 'usual' input swing (i.e. Negative rail+2v through ~ the positive rail)

    So... A few more thoughts...

    First of all -- A readily checked long-shot...
    While the TS922's stated operating Vcc parameter ranges from 2.7v - 12v ( "-Vcc"=0) the device is characterized at Vcc{s} of 3v and 5v -- with, in each instance, identical minimum and typical slew rate figures... It is, nonetheless, frequently the case (especially with linear devices) that (even in Spec.) supply EMF differences manifest significant, and, often, less-than-predictable, effects upon operating characteristics -- while I cannot envision a greater, in-spec, supply EMF producing the described difficulty -- it is a simple matter to reduce same and recheck the output...:)

    Another (possible) point of interest is to be noted in the disparity of input device technology (i.e. CMOS vs JFET re: the TS922 and JRC062d, respectively) -- Again, I can't imagine this being an issue with your application, still, in light of the fact that the other Amp performs as expected, all bets are off...
    Please 'have a look' at the waveform at the non-inverting input of the TS922...

    While problems of that nature are not uncommon in 'standard' op-amps operating at "-Vcc"=Sig Gnd, rail-to-rail devices (such as the ts922) are designed for 'single supply' operation and should perform correctly in the basic unity gain follower shown in the attached schematic --- Frankly I would not have been surprised was your difficulty with the 'standard' device --- A poser indeed:confused:

    Well hey! Good luck and please keep us posted! I'm interested in the 'etiology' --- Then too, perhaps someone lots' smarter than I will happen along this thread!:cool:

    Best regards
    HP:)
     
    Last edited: Apr 4, 2015
  6. DickCappels

    Moderator

    Aug 21, 2008
    2,662
    633
    Are you looking at the output of the TS992 after the signal leaves the Arduino and passes through your two pole RC filter? In an LTSPICE simulation of the filter network I see a risetime of over one millisecond.
     
    Hypatia's Protege likes this.
  7. Simon Larsen

    Thread Starter Member

    Feb 22, 2015
    31
    1
    I'm not 100% of what you mean but here goes. I have measured at 4 nodes:

    1) The output directly from pin3 of my arduino is the PWM signal at 62.5kHz. Since the duty cycle is varied my oscilloscope cannot auto focus on that wave form - fair enough :).. The output is a pulse going from 0v to 4.7V .. seems ok.

    2) The output of first rc-filter. Now the oscilloscope can detect my 440Hz sawtooth waveform. I see a little noise on the slope going from 0 to 5V.

    3) The output of the second rc-filter. The noise on the slope is reduced significantly. Looks pretty. still 440hz sawtooth. (I believe this is what you refer to?)

    4) The output of the op amps. JRC062d-output looks like the output from two pole rc-filter. TS922-output is having that unexpected "ramp-down".

    oh: a note.. this was before I added the 2k pull-up resistor after the two pole filter which changed the voltage levels - the principle was the same though (pwm works, filter works).
     
    Last edited: Apr 4, 2015
  8. DickCappels

    Moderator

    Aug 21, 2008
    2,662
    633
    If you ran though Hypathia's Protoge's checklist and the TS922 is still not working correctly, then it is a good idea to assume that the TS922 is defective and should be replaced.
     
  9. Simon Larsen

    Thread Starter Member

    Feb 22, 2015
    31
    1
    Hypathia's Protoge's checklist:

    I have removed the pull up -> same issue
    I have measure the input of ts922 -> looks as expected

    I will try to set it op as non-inverting amp with gain 2 and see if it changes anything... thanks for input so far!
     
  10. Hypatia's Protege

    Distinguished Member

    Mar 1, 2015
    2,803
    1,237
    Dudes! That's Hypatia's Protege!... ;)

    Please check the circuit configured for unity gain (as shown) but with the (Op Amp) Vcc=5v --- As I said, a long-shot to be certain--- but then (as Mr. Plant would probably never say): "silicon is filled with good and bad the mortals never know...";);):D

    Seriously, it's worth a try...:)

    Best regards
    HP
     
  11. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,648
    764
    Next time be good to all

    schematic.png
     
  12. Simon Larsen

    Thread Starter Member

    Feb 22, 2015
    31
    1
    oh - ah, will try that!
     
  13. Simon Larsen

    Thread Starter Member

    Feb 22, 2015
    31
    1
    I tried with the vcc=5v .. but same result. I also did try to set it up as amplifier (with gain=2) ... but it was not really thought through so I might have done some mistakes there... I am not completely giving up on the ts922 - but it really seems like I have bought some damaged ts922 chips.

    I have also updated the circuit.. I believe it makes more sense now. Will post the updated schematics - just for future reference if anyone could be interested.
     
  14. Simon Larsen

    Thread Starter Member

    Feb 22, 2015
    31
    1
    schematic and simulated output (I currently have it on breadboard and it works).

    Note that it sais LMX321 .. it should be jrc062d - also the voltage generator (SINE) is to be replaced with the arduino pin 3 (pwm output).
    R6 could be a volume control (variable resistor)
    R5 is just there to "simulate" the headphone.

    circuit.jpg


    following is the simulated output:

    blue is the arduino output
    red is the op amp input
    orange is called "out" (its the wire between R5and R6)
    simulation.jpg
     
  15. Hypatia's Protege

    Distinguished Member

    Mar 1, 2015
    2,803
    1,237
    Ordinarily I 'look askance' at suspicion of unused components as etiology of unanticipated operation in new designs (à la fixing the blame for unexpected program behavior on 'compiler bugs') --- In this matter, however, I believe you're on to something!!! :D

    Best regards
    HP
     
Loading...