Op-amp offset removing problem

Discussion in 'General Electronics Chat' started by Xieyl, Nov 18, 2013.

  1. Xieyl

    Thread Starter New Member

    Nov 15, 2013
    3
    0
    I am working on a simple circuit which requires detecting small changes in voltage. For that purpose I decided to use an op-amp. The problem is that once I started making the circuit, the op-amp output came completely different from what I expected from simulations etc.

    Since it was pointless to go ahead and make the whole circuit, I simply connected up the op-amp with V+ at 9V and V- at ground with both inputs shorted together to see if I was using it right. I got the following results trying to see what went wrong.
    When both inputs were at ground (0V) the output read 8.4V.
    With both inputs were at 9V or 4.2V the output came at 1.94V.

    I tried using offset null pins with 50kΩ variable resistor but all it did was reduce output from 1.94V to 1.90V :(. I am using uA741. What am I doing wrong?
    I have tried changing supply, the op-amp chip, the connecting wires even (assuming noise or something...), the offset resistor.
     
  2. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,383
    495
    Too many words.
    Too little information.

    Post a schematic and a list of your goals.
     
  3. JohnInTX

    Moderator

    Jun 26, 2012
    2,341
    1,022
    You don't mention what feedback you have in the circuit. The offset voltage of a 741 * open loop gain is more than enough to rail the output.

    Agreed. Always the first step.
     
  4. Xieyl

    Thread Starter New Member

    Nov 15, 2013
    3
    0
    Sorry about the size of first post, i tried to make it as clear as I could :/
    [​IMG]

    I wanted a zero volt at the output when both inputs were at the same voltage as shown and the op-amp is used as comparator.

    As for feedback, I didn't think it was required when the op-amp was used as comparator?
     
  5. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,227
    You can't short both inputs together and expect 0V output in practice. That only works in theory with perfect devices. The intrinsic input offset of a practical op amp will cause the output to go to either the maximum or minimum output voltage, depending upon the offset polarity, as John noted.

    To use it as a comparator you need a reference voltage (such as from the resistor divider) to one input and supply the voltage being detected to the other input.

    A small amount of positive feedback (from the output to the positive input) is generally needed to provide some hysteresis to the trip point and avoid oscillations around the trip point. You typically select the feedback resistors to give several tens of millivolts hysteresis.

    Note that for the 741 the input and outputs can only go within a couple volts or so of the supply rails. Thus, with the negative supply input connected to ground, the input trigger point must be greater than 2V and the output will go from about 7V to 2V for a 9V supply.

    A dedicated comparator IC such as the LM339 is much better if you need a comparator circuit. It's faster and will go to ground at the inputs and output with a single supply.
     
    Xieyl likes this.
  6. JohnInTX

    Moderator

    Jun 26, 2012
    2,341
    1,022
    It isn't BUT to stabilize the output, the inputs must be at least Voffset apart. Keep in mind that its still an op-amp. The comparator function is just running it open loop (and uncompensated when you have a choice). As the voltage on one input crosses the other, the output will be driven to the other rail because its amplifying the difference. As connected, you still have different input voltages because of the internal offset.

    Try separating the two inputs with a 200ohm resistor. That should generate about 10mv of difference which is enough to overcome the unadjusted 6mv of offset. As you have it drawn the output should drive to the (-) rail.

    With a single supply as shown, your 0 ref point is V1 / 2.

    A couple of things to keep in mind:

    741 usually wants dual supplies and the max/min output will not be the rails. I don't know if the offset adjustment will work like you want with only one supply. Note that all the specs are at a minimum +/-12V. You are running it a +/- 4.5V.

    Its an OLD part. There are much better alternatives for the same cost.

    Internally compensated op-amps running open loop as comparators will have pretty lousy performance (look up gain-bandwidth product and slew rate). Devices sold as comparators are uncompensated, usually have open collector outputs and are optimized for low input offset (which affects sensing accuracy) and speed.

    EDIT: crutschow types pretty fast but it looks like we agree on your problem.
     
    Xieyl likes this.
  7. #12

    Expert

    Nov 30, 2010
    16,257
    6,757
    OK. We have established that a 741 will not output zero volts unless it has a negative supply voltage. The, "small" voltage you want to detect...is it AC or DC? How small is it? Is it a small difference from zero volts or from some other voltage?
     
  8. GopherT

    AAC Fanatic!

    Nov 23, 2012
    5,991
    3,737
    I really miss AudioGuru. He would have taken care of the post with comedic hast. Using the word 'lousy' several times.
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    It really does help if you can learn how to read the datasheet for the part in question.
    One of the parameters that tripped you up was the "common mode input voltage range"; in this case for a ±15V supply, the guaranteed minimum range is ±12, which means there's a 3v area next to either power "rail" (supply voltage) that will result in indeterminate output. The "typical" range is ±13, which results in a 2v area next to either rail that's a "keep out" area - you can usually get away with the "typical" specifications, but if you want to make certain that it's going to work, use the minimum specification.
     
  10. Xieyl

    Thread Starter New Member

    Nov 15, 2013
    3
    0
    Thanks, that was my actual problem, I didn't know that the output can not actually reach the value of supply rails. I will use LM339 instead. I will also keep in mind the input offset.

    But will a positive feedback still be required if I use LM339? If so, would that not drive the output to negative rail if there is any voltage at the inverting input?

    As for 741 being an old part, this was my first time using op-amp so I went for the only one I had heard about... But I will keep everything I learned here in mind now.

    Both the change and reference voltage are dynamic. The change can be from 40mV to 2V DC and the reference voltage can be from 4-7V. I had a working simulation for these conditions, but due to op-amp problem I wasn't able to even start working on it yet. I will try changing it to account for the supply of the comparator to be appropriate.

    Thanks for all the replies.
     
  11. AetherWerx

    New Member

    Dec 30, 2011
    16
    2
    You can always use a precision op-amp as a comparator if you need rail-to-rail input and output performance. You'll get uV levels of offset too.
     
  12. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,645
    759
    Yes, also you can use a comparator as a comparator.
     
  13. AetherWerx

    New Member

    Dec 30, 2011
    16
    2
    Except...when you can't. ;)
     
  14. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    While opamps are frequently pressed into service as comparators and comparators are sometimes forced into opamp duty, the results may not be optimal - or even functional.

    If you need an analog (continuously variable) output, then select a suitable opamp. Id your output will be digital (yes/no; 1/0) then select a comparator, as your propagation delay and rise/fall times will be minimal compared to an opamp.

    If the only tool you know how to use is a hammer, pretty soon everything looks pretty much like a nail.
     
  15. AetherWerx

    New Member

    Dec 30, 2011
    16
    2
    While not necessarily germane to the OP, the statement "Use an op-amp when needing and op-amp, use a comparator when needing a comparator" is just as erroneous as "Any old op-amp can be used as a comparator."

    There are plenty of real world applications where op-amps are used as comparators as long as one understands the trade-offs.

    Besides, most comparators are open-drain/collector and you will not find these used as error amplifiers in power supply circuits, That one extra resistor has a BOM insertion cost. Some comparators have push-pull output stages, but they may not have the necessary offset requirements.

    One particular company of the fruit variety uses these throughout their computing products.
     
Loading...