Op Amp problem

Discussion in 'The Projects Forum' started by bobk, Jul 20, 2008.

  1. bobk

    Thread Starter New Member

    Jul 20, 2008
    7
    0
    Probably really a designer problem :)

    I am trying to use a TL082 FET Op Amp to amplify a DC signal into a range useable by an A/D device. I have breadboarded the op amp as a non-inverting amplifier using two resistors to determine the gain. The circuit is the basic one that is shown in most op amp discussions. The resisters are measured at 9.82M, connected between the output and the inverting input, and 32.6K, connected between the inverting input and ground. These are the only components in the circuit. Calculated gain of ~ 302.

    My input signal varies from ~ 8 mv to 11.8 mv. The signal positive is connected to the non-inverting input, the signal negative is connected to ground. I have two 9V batteries supplying +/- 9V, with ground connected to the signal ground.

    My measurements show that a 8 mv input yields a 3.34V output, while an 11.8 mv input yields a 4.49V output. The gains are 417.5 and 380.5 respectively.

    I'm obviously not using the op amp correctly. The gains are wrong, but even more important, they are not the same. Varying the input signal results in varying gains, which definitely isn't right.

    All I want was a simple signal conditioner circuit, seems my very simple circuit is not very stable. Any advice ?

    Thanks,

    Bob
     
  2. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,347
    Hello,

    I think you are having trouble with an offset.
    The offset at an TL081 / TL082 can be upto 20 mV depending on the model.
    I will attach a schematic for offset compensation.

    Greetings,
    Bertus
     
  3. blocco a spirale

    AAC Fanatic!

    Jun 18, 2008
    1,440
    368
    I haven't done any calculations on this but 9.8M is far too high. I suspect the input impedance of the op-amp is influencing the gain by loading the voltage divider.
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    While the TL082 has high input impedance, it's not infinite. 9.82M is a very large resistance value.

    Try changing the inverting input to ground to 1k, and the feedback resistor to 302k. A 220k + 82k resistors in series will get you there.

    Resistors generate noise. Use a small cap, perhaps 470pF to 10nF, between the inverting input and ground to quiet things down.

    Bertus has a point with the offset, but TL082's don't have an offset adjust; that's only available with the TL081.

    Depending upon your particular model of TL082, your offset voltage may be anywhere from 2mV to 15mV.

    [eta]
    The TL082 is not really a great opamp for what you're doing. It has much higher noise than the TL07x series.
    If you want an opamp with much lower offset voltage, look at something like National Semiconductor's LMV2011 or Linear Technology's LT1007. Both of those have a guaranteed maximum offset of 25uV, but typical is much lower.
     
    Last edited: Jul 20, 2008
  5. bertus

    Administrator

    Apr 5, 2008
    15,648
    2,347
    Hello,

    Perhaps change to an OP07 opamp.
    It has no fet inputs so the input resistance is lower.
    You will have to use the resistorvalues sgtwookie recommened.
    This one has a maximum offset of 0.25 mV.
    It even has offsetcompensation inputs.

    Greetings,
    Bertus
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You would be better off going to a JFET-input opamp that either had compensation, or very low offset, than going to a non-JFET-input opamp, as the loading on your input signal may cause accuracy to suffer more than it is already.

    Using a low-offset, low-drift pre-trimmed opamp such as those I've already recommended will help to miinimize your errors without having to fiddle with external offset adjustments.
     
  7. bobk

    Thread Starter New Member

    Jul 20, 2008
    7
    0
    Thanks for the help, I'll try the suggestions. I'm an embedded SW engineer, so I try but don't alway get these circuit nuances :)
     
  8. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Your gain is actually (4.49-3.34)/(.0118-.008)=302.63. Darned close. As others have said, offset voltage is the culprit. It also gets multiplied by the gain. I don't agree that 9.82Meg is too high (from a bias current standpoint), because practically all the input bias current flows through the 32.6k resistor, resulting in (at 25C) only around 13uV max input offset due to the resistors (max Ibias=400pA@25C). A ~10Meg resistor will be noisier, though, than a lower value.
    BTW, we can conclude from your results that your input offset~3mV.

    SgtWookie wrote:
    Actually, a cap to GND will add to the noise gain, because Gain=(Zf/Zs)+1, where Zs is the impedance from the inverting input to GND, and the cap impedance goes down as the frequency goes up. To reduce noise, put a cap across the feedback resistor. Be aware that this will cause the bandwidth to suffer, although, with gain~300, your -3dB bandwidth will only be about 13kHz, even without a cap.
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    A 10nF capacitor across the 9.82M feedback resistor would cause loss of bandwidth noticable even at 1Hz!

    If you do add a cap across the feedback resistor instead of from the inverting input to ground, I suggest staying under 100pF. Even 47pF produces a phase shift that's quite noticeable at 100Hz.
     
  10. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Well, I considered that, but I sort of assumed bobk would change to lower resistor values. I agree that ~10Meg is not the optimum feedback resistor value. I would probably use something like 30.1k, and 100 ohms for Rs. Then the capacitor value would be something realizable, if he wanted to reduce the noise/bandwidth.
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK, I suggested 1k and 302k, because those values would be easy to achieve. 100 and 30.1k aren't bad either.

    Actually, after playing around with it for awhile, I figured the cumulative error on the OP's reading of the resistors is 0.6% off, and his offset voltage is 3.16mV.

    In a simulation, increasing the 32.6k resistor to 32.8k and providing a 3.16mV offset to a sinewave with peaks at 8 and 11.8mV results in readings that agree with his voltage readings, and also closely agrees with your 3mV offset assessment.
     
  12. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    3.01*10^x is a standard 1% value. So 30.1k and 100 ohms yields gain=(30100/100)+1=302, which is darned close to his original value. His resistor values predict gain=302.23.
    I calculated his gain as being (delta vout)/(delta vin), which comes out to be 302.63, as I said in my first post. Close enough for government work.:D

    To calculate offset voltage:
    Vout=Av*(Vin+Vos)
    Vos=Vout/Av-Vin
    Vos=3.34/302.63-.008
    Vos=3.037mV
    Using the other datapoint,
    Vos=4.49/302.63-.0118
    Vos=3.037mV

    This is how I came up with the 3mV offset value. Obviously, it is only as accurate (or precise) as his voltage readings.
    I'm not being argumentative. I'm just trying to explain my thought processes.
     
  13. Distort10n

    Active Member

    Dec 25, 2006
    429
    1
    The input bias current of the inverting input flows through the feedback resistor. It's contribution to total offset is determined by the IN- bias current multiplied by the feedback resistance (transimpedance).
     
  14. bobk

    Thread Starter New Member

    Jul 20, 2008
    7
    0
    So my understanding of this seems to be that this 3 mv offset is causing my problem. Also, the Op amp I have doesn't have a way to fix this. Anything else I can do, or do I have to change the part ? BTW, I'm pretty impressed with all the responses. I'm an embedded SW engineer, but obviously limited in HW design.

    Thanks,

    Bob
     
  15. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    You're right, of course. I must have had a brain fart.:(
     
  16. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Bob, the offset is certainly causing a problem.
    The values of the feedback network are also causing a problem, and that's also related to offset.

    If you want to start with minimal changes, try the reduction in the value of the resistors first; 1K & 302k, 100 & 30.2k, etc. The 1k & 302k might be easier to deal with - or perhaps just use 1k & 300k, since those are standard E24 values - so are 100 and 30k. See if that changes your offset.

    You can get just the amplified offset voltage by grounding the noninverting input.

    The offset of the TL082 is going to drift over time, and with temperature changes. How much the offset is going to change over time is hard to say; TI's datasheet does not offer clues - but it does say that the offset will change 18uV/°C.

    You could compensate for the offset in software. Ground the input for a few moments, read the ADC to get the amplified offset, and then subtract the offset from subsequent readings. You would need to periodically refresh the offset reading to ensure that it reflected actual offset, or errors would accumulate. Changes over temperature will happen rapidly. Device aging may take a few years to settle down, and even then can still fluctuate.

    If you used a device with an adjustable offset such as a TL081, it would still fluctuate with temperature and over time, and would need to be periodically re-adjusted. This is why I suggested using more modern devices that start with a much lower initial offset, and much lower drift. Both of those devices start with a couple orders of magnitude less offset guaranteed. The temperature drift is also much improved over the TL082, at less than 1uV/°C.

    Even if you do upgrade your op amp, I suggest that you still perform an occasional resample of the amplified offset voltage. If your signal input is supplied via a resistor, you could simply use a logic-level N-channel MOSFET to ground the input while you're sampling the offset via the ADC.
     
  17. bobk

    Thread Starter New Member

    Jul 20, 2008
    7
    0
    I tried different resistor values, 1K/302K, 32K/100, the offset hung around 2.7mv. I also tried a 10K/1K combo while driving the input of the second Op amp with the output of the first, one combo inverting one of the outputs, the other not. Curiously, the first Op Amp ended up with an offset of 6 mv, while the second retained the offset ~ 3mv as I've been experiencing. I noticed the spec sheet said a 2mv offset is typical. If I had know what that actually meant when I was buying the part I probably would have reconsidered :)

    Since this offset is a significant size relative to my signal input, I guess an Op amp upgrade is in my future. I'll look at the parts you mentioned. My project will allow calibration of the ADC values, I'm pretty sure I can add a zeroize cal function as well.

    Appreciate the help, I have gained yet further admiration for you HW guys !

    Bob
     
  18. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Resistors will also change resistance somewhat when cycled over temperature. Metalized film resistors will be more stable and contribute less noise than other types.

    Interesting that the offset in the other amp varied that significantly. You can obtain precision matched offset dual opamps, but for your application it appears that only a single op amp is needed.

    Seems that reducing the feedback network reduced your offset significantly. Not enough, of course - but roughly 10%.

    For the N-ch MOSFET, you might use something like a 2N7000 or 2N7002. With a Vgs of 4.5v, Rds is around 1.8 Ohms, which isn't much. You could control the 2n700x gate with a 5v CMOS I/O pin from a microcontroller. There are lots of other options.
     
  19. Jeepster

    New Member

    Jun 12, 2008
    5
    0
    Try downloading free SPICE simulator such as SwitcherCad III from Linear Tech. It contains hundreds of models for OpAmps and you should be able to enter your circuit within a half-hour and simulate the results accurately... much faster than breadboarding!
     
  20. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    He wouldn't find the op amp he's using in LT's library; he would've used another device in the simulation, and still been in the same predicament with the offset voltage.

    Unless of course he managed to figure out how to add the SPICE model for a TL082 into LTSpice's libraries.
     
Loading...