Op-amp offset removing problem

Thread Starter

Xieyl

Joined Nov 15, 2013
3
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.
 

JohnInTX

Joined Jun 26, 2012
4,787
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.

Post a schematic and a list of your goals
Agreed. Always the first step.
 

Thread Starter

Xieyl

Joined Nov 15, 2013
3
Sorry about the size of first post, i tried to make it as clear as I could :/


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?
 

crutschow

Joined Mar 14, 2008
34,285
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.
 

JohnInTX

Joined Jun 26, 2012
4,787
As for feedback, I didn't think it was required when the op-amp was used as comparator?
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.
 

#12

Joined Nov 30, 2010
18,224
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?
 

GopherT

Joined Nov 23, 2012
8,009
I really miss AudioGuru. He would have taken care of the post with comedic hast. Using the word 'lousy' several times.
 

SgtWookie

Joined Jul 17, 2007
22,230
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.
 

Thread Starter

Xieyl

Joined Nov 15, 2013
3
... Note that for the 741 the input and outputs can only go within a couple volts or so of the supply rails. ...
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.

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?
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.
 

AetherWerx

Joined Dec 30, 2011
16
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.
 

SgtWookie

Joined Jul 17, 2007
22,230
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.
 

AetherWerx

Joined Dec 30, 2011
16
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.
 
Top