Electronics-Lab.com Community

# Stupid op-amp question

## Recommended Posts

I'm trying to amplify the voltage DIFFERENCE between two inputs. One input (V2) is a reference voltage of about 1 volt. The other input (V1) is from a heat sensor that is fairly linear at 0.1 volt per degree Fahrenheit. So, for my application, the input from the heat sensor is about 0.7 volt.

I'm using 1/4 of a quad op-amp (LM324).

I've wired the op-amp as a differential amplifier, like this:

I'd like the gain to be 22, so I'm using 2, 220K resistors -- one between the output and the inverting input (feeback) and one between the non-inverting input and ground. I'm using 10K resistors in between my inputs (V1 and V2) and the op-amp inputs.

If my math is correct, I should have a gain of 22. For my example of V1=0.7V and V2 = 1V, the output should measure 6.6V, but when I use my voltmeter, I'm only reading about 1 Volt. ???

Any suggestions?

Is it possible that my quad op-amp is damaged? If so, is there a way to test it?

By the way, I grounded all the pins on the quad op-amp that I wasn't using.

Thanks for any advice. :)

Darrin

##### Share on other sites

Hi Darrins,
You don't need the "common-mode balancing resistors" that are the voltage divider resistors at the non-inverting input for V2. With those resistors then the reference voltage isn't exactly 1.0V. Just connect the non-inverting input directly to the reference.

I suspect that your lack of gain is because the sensor's impedance is not low, so it adds to the input resistor, reducing gain.
Please post your sensor circuit to see, and because I am curious at how it produces the high voltage change of 0.1V/degree F.

With the sensor at 0.7V, the output will be 7.66V, not 6.66V, because the reference voltage adds to the output voltage.

Don't ground the outputs of the opamps that you are not using, just ground the inputs and let the outputs set their own voltage level.
Better yet, connect them as followers with 100% negative feedback and the non-inverting inputs grounded, to avoid the outputs wildly swinging with noise.

##### Share on other sites

Thanks audioguru.

Actually, there's a typo in my original post. The output from the heat sensor (http://www.national.com/ds/LM/LM34.pdf) is 10 mV/deg F.

When you said that I don't need the "common-mode balancing resistors", are you referring to BOTH resistors connected to the non-inverting input?

I'll try your recommendation of wiring the unused op-amps as voltage followers with non-invert inputs grounded.

I'm still somewhat confused why a circuit that is in several of my textbooks doesn't function "as advertised".

Thanks again for your help.

Darrin

##### Share on other sites

Hi Darrin,
You don't need any resistor on the non-inverting input of your difference opamp. Just connect it directly to the reference voltage.

On the datasheet, only one application hinted at using a high-impedance load for the sensor, and yours is a fairly low 10K ohms. Most applications show it sourcing a voltage, for example the analog meter that is referenced to ground. Your difference circuit has it sinking current from your opamp's 10K input resistor. The first page mentions a 0.4 ohm output impedance but only with a 1mA load to a negative voltage. Surely that 1mA will cause it to self-heat and change its temperature measurement somewhat.

You can convert your difference opamp circuit into a high impedance load by buffering its 10K input with one of your spare voltage followers, with the follower's input lightly loading the sensor's output. Then your circuit will work "as advertised".

##### Share on other sites

Thanks audioguru.

I think I found something similar to what you are talking about.

High Input Z, DC Differential Amplifier (p. 15 on this datasheet)
http://www.national.com/ds/LM/LM124.pdf

Thanks again.

Darrin

##### Share on other sites

Try using the recommended load of 10kohms to the negative supply. Apply the 1 volt to the noninverting input directly. Then apply the .7v to the inverting input through the 10k. The voltage on the output will be 3V.

##### Share on other sites

Kevin,

Thanks. I'll try that too.

Darrin

##### Share on other sites

Hi Darrin,
You don't need the high Common Mode Rejection Ratio (same interfering signal that occurs on both inputs that are driven from perhaps a long unshielded pair of wires) of that high impedance circuit. A simple follower driving your 10K inverting-input resistor will be fine and allow for an easy gain calculation.

Hi Kevin,
Your idea will work only if the resistor that is connected to a negative supply has a current that is greater than the current that is being pulled-up by the opamp's 10K input resistor.
I think that Darrin doesn't have, and is trying to avoid using, a negative supply.
I don't see how the opamp, with a 0.3V signal to amplify with a gain of 22 plus the 1.0V reference, will have an output voltage of only 3.0V. It will be 0.3 X 22 = 6.6 + 1.0 = 7.6V.

##### Share on other sites

He is applying the .7v through the 10kohm resistor which will make the input .86v. 1-.86 x 22=3v.

##### Share on other sites

No Kevin,
You must realise that because an opamp has such a high open-loop voltage gain of 100,000 or more, its inverting and non-inverting pins' voltages are virtually the same when negative feedback is applied.
The input voltage of 0.7V pulls-down on the 10K input resistor, creating 0.3V across it and therefore 30microamps through it. The opamp maintains the inverting input pin to be the same voltage as the non-inverting input pin (1.0V reference) by increasing its output voltage so that the current through its feedback resistor equals the current through its input resistor. Therefore 30 microamps through the 220K feedback resistor makes the opamp's output 6.6V higher than the reference voltage. Try it and see.

##### Share on other sites

if my math is correct, I should have a gain of 22. For my example of V1=0.7V and V2 = 1V, the output should measure 6.6V,
Correct
##### Share on other sites

Sorry GPG,
As I said before, the output won't be 6.6V, but will actually be 6.6V above the 1.0V reference voltage, so the output voltage will be 7.6V.

##### Share on other sites

In his original circuit, the output will be 6.6V It only goes to 7.6 volts in your modified design. There is nothing wrong with the original design that requires modification, and it provides much better common mde rejection since the gain from both inputs is equal.

##### Share on other sites

Hi GPG,
You are absolutely right!
I am the one who is stupid, because I thought that 0.05V drop in the original diff-amp was negligible, but it's not when it is amplified with a gain of 22. When I added numbers to the schematic, I realised my error:

##### Share on other sites

In his original circuit, the output will be 6.6V It only goes to 7.6 volts in your modified design. There is nothing wrong with the original design that requires modification, and it provides much better common mde rejection since the gain from both inputs is equal.

GPG, good of you to notice. Audioguru strikes again with redesign of something that already works... I am sure there will be more to come...

MP
##### Share on other sites

I'm trying to amplify the voltage DIFFERENCE between two inputs.
I've wired the op-amp as a differential amplifier.
I should have a gain of 22. For my example of V1=0.7V and V2 = 1V, the output should measure 6.6V, but when I use my voltmeter, I'm only reading about 1 Volt. ???

Any suggestions?

By the way, I grounded all the pins on the quad op-amp that I wasn't using.

Darrin

MP,
His differential amp doesnt work, that's why he started this post.
It fails probably because the inverting input of it has a resistance that is too low for his sensor to drive, so I simply suggested using his spare opamp to buffer it.
What is your fix for his problem?
##### Share on other sites

Previous post

gain of 22.
Gain of 23
The sensor is easily able to drive a 10K load. The amp is probably stuffed through shorting the outputs.
##### Share on other sites

Hi GPG,
1) The gain of this diff amp depends on what you call its input.
The entire circuit has a differential gain from between the inputs, V1 and V2, of exactly 22 (not 23).
An input from the inverting input, V1, to ground has a gain of exactly 22.
An input from the non-inverting input, V2, to ground also has a gain of exactly 22.
Only an input from the non-inverting point, V3, to ground has a gain of 23.

2) The LM34 has an NPN emitter-follower with resistors-to-ground output. At 0 degrees F, the entire IC (excluding its emitter-follower which will have 0V output) has a quiescent current of 60uA.
Its increase in quiescent current of only 15uA at 75 degrees F occurs only in its emitter resistors, which will have 0.75V across them, and therefore calculate to total 50K ohms. Any sourcing load will cause enormous inaccuracy.
Therefore it is not capable of sinking any current from a load that has a positive voltage source like our diff amp that sources 25uA.
It can source a current to a grounded load like an analog meter, or drive a high impedance load.

Darrin's results will confirm it.

##### Share on other sites

I thought that 0.05V drop in the original diff-amp was negligible, but it's not when it is amplified with a gain of 22.
~43.5mV, 23 gain
The LM34 has an NPN emitter-follower with resistors-to-ground output.
Its increase in quiescent current of only 15uA at 75 degrees F occurs only in its emitter resistors, which will have 0.75V across them, and therefore calculate to total 50K ohms
Therefore it is not capable of sinking any current from a load that has a positive voltage source like our diff amp that sources 25uA.
Capable of doing so down to 5
##### Share on other sites

Hi GPG,
It is all in the datasheet of the LM34 temp sensor that was linked earlier:
http://www.national.com/ds/LM/LM34.pdf
but they sure don't explain it very well.

Their block diagram shows an emitter-follower output (I hate emitter followers because of their unequal pull-up and pull-down ability) and 2 resistors to ground.

The emitter-follower can source current very well (for an analog meter to ground), but only the resistors sink current. Those resistors have high value to keep the quiescent current down, so any external current into them (like the 25uA from our diff amp) raises the voltage across them. That voltage is the "temperature", so the accuracy is ruined.

From the specs and curves in the datasheet, the current in those resistors is only 15uA at 75 degrees F. But the 25uA from the input of our diff amp will pull their voltage (which is the output voltage) up.
So our diff amp's output adjusts itself to be the same as the reference voltage, which is what Darrin measured.

Therefore our diff amp's input needs a high impedance buffer.
Even the tiny input current of an LM324 follower will cause an error of up to nearly 2%.

##### Share on other sites

audioguru,

I tried a couple of different things. Removing the resistors from the non-inverting input, as you suggested, appears to work fine. :)

You've mentioned in a couple of your posts that the op-amp will affect the accuracy of my temperature sensor. I'm no theory expert (I'm a mechanical engineer), so could you explain, in very simple terms, how the diff op-amp will degrade the accuracy of my temp sensor?

Thanks

Darrin

##### Share on other sites

Hi Darrin,
Didn't I explain it well?
Your LM34 sensor needs a high impedance load, like an opamp voltage follower, which can feed the 10K resistor of your diff amp.

How much temperature accuracy do you need? The LM34 has an error, your diff amp resistors have error, the offset voltage of a voltage follower and of the opamps in your diff amp cause errors and even the tiny input current of a voltage follower causes an error. Those errors can simply be cancelled by adjusting your reference voltage, which will cause an error anyway and will also be cancelled with adjustment.

You probably don't need the good common mode rejection of a full hi-z diff amp (like in the datasheet) because your sensor is far away but the reference is local. Therefore your sensor will need a good shielded cable anyway. You should also add the bypass cap and RC-damper to the sensor like figure 4 (page 7) in the datasheet.
A full diff amp (made from the same IC so that all opamps have the same offset voltage error) has twice the offset voltage error of a buffered diff amp which takes time to stabilize after power-up.

So just add the voltage follower and let us know how well it performs!

##### Share on other sites

Thanks audioguru.

I will use one of my spare amps as a voltage follower between my sensor and my diff amp. I'll post my results when I get a chance.

One more question. I've noticed that when the differential input goes negative, i.e. when my sensor voltage is greater than my reference voltage, I'm still measuring some small voltage at the output of my diff amp. I'd like the output to go to zero when this occurs. Is there a way to do this? ???

Thanks again.

Darrin

##### Share on other sites

Hi Darrin,
The minimum output voltage of an LM324 opamp will be pulled down to about 10mVDC or less with a 2K load to ground. It is spec'd to be able to drive a 2K load nearly as high as it can drive a 10K load. With a 13V supply the IC and resistor will stay cool and you can use a 1.2K resistor so the minimum output voltage will be even lower, but with a 30V supply the IC will be warm at 15V output and the 2K resistor will dissipate 392mW (quite hot for a 1/2W resistor) at 28V output.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.