# Gain calculation//instrumentation amplifier

Discussion in 'Analog & Mixed-Signal Design' started by sohamkul, Jul 27, 2016.

1. ### sohamkul Thread Starter Member

Jun 24, 2016
43
2
Hello Everyone !!
I am using an instrumentation amplifier for my project .
The differential signal applied to amplifier through sensor is 0-2mV

i was wondering if i replace 2k2 resistor with a 5k pot ...would i be able to achieve a gain of 1000
i.e i want the output of this circuit to be 0-2 Volts .

p.s. i cannot use the instrumentation amplifiers like ad620...due to some reasons...

Thank you !!

2. ### crutschow Expert

Mar 14, 2008
13,055
3,245
The gain goes down, not up with an increase in the value of R5.
The gain of that amp is 1+ 2R6/R5, so for a gain of 1000, R5 = 20k / 999 = 20Ω.
So you likely want a pot closer to 100Ω

Note the plus and minus inputs are incorrectly reversed on U3.
The way it is drawn, there is positive feedback and the output will go to one of the rails.

3. ### sohamkul Thread Starter Member

Jun 24, 2016
43
2
I did'nt notice the incorrect arrangement of u3 ...would have altered the output //
also now i am using a 5k preset ...i will see if i can find the one with lesser R

Thank you !!!!

4. ### AlbertHall Well-Known Member

Jun 4, 2014
1,969
388
Would it be better to spread the gain across the two stages and get some of the gain from U3?

5. ### crutschow Expert

Mar 14, 2008
13,055
3,245
Depends upon the frequency of the signal.
Spreading the gain will give a higher amp bandwidth but has no other advantage.

sohamkul likes this.
6. ### AnalogKid Distinguished Member

Aug 1, 2013
4,546
1,252
One minor advantage of keeping the circuit as it is (in terms of gain distribution) is that when all of the fixed resistors have the same value, you can combine them in a resistor network for better ratio tracking and *much* better temperature tracking. This was a bigger deal back when 0.1% resistors were expensive and through hole parts spread out the layout, but the concept still applies to SMT assemblies.

ak

Last edited: Jul 30, 2016
GopherT and sohamkul like this.
7. ### MrAl Well-Known Member

Jun 17, 2014
2,440
492
Hi,

Partly joking here but isnt that like saying, "Having more money will allow you to buy more things but has no other advantage".

8. ### crutschow Expert

Mar 14, 2008
13,055
3,245
Perhaps.
But we can usually use more money but not necessarily more bandwidth (which can add unnecessary noise to the signal).

sohamkul likes this.
9. ### MrAl Well-Known Member

Jun 17, 2014
2,440
492
Hi again,

Well you know i always like to purchase 5 dollar a piece op amps that have bandwidth of 100MHz and then tack a whole bunch of capacitors on them to reduce the bandwidth down to 1MHz so i can reduce the noise
You are right though, sometimes too much gain is too much.

But on the more serious side...

If we assume infinite gain for each op amp section and low input offset and also perfectly matched resistors where necessary, then the output voltage is:
Vout=((Vin2-Vin1)*(R7+R6+R5))/R5

and of course that means the gain (or rather the absolute value gain) is:
Gain=(R7+R6+R5)/R5

We also assume here that the last stage has been fixed by swapping the inverting and non inverting terminals, and that all four resistors on that stage are equal (shown on the schematic they are all 10k). Note the feedback resistor always goes to the inverting input so you can tell right away if it's not right.

What the gain tells us for this circuit is that yes, all of the gain is being performed with the first two op amps. There might be an accuracy hit if we move some of that gain to the output stage due to input offset however (do an analysis to find out how much keeping in mind that the input offset is multiplied by the gain).

If we dont make the gain of each op amp infinite as is usually assumed for this simplified analyses, then the output expression gets more complicated.

sohamkul likes this.
10. ### crutschow Expert

Mar 14, 2008
13,055
3,245
Not sure I understand your distinction about where the gain is generated versus the input offset.
The input offset is multiplied by the total gain of the amp, independent of how the gain is distributed.
What do you mean by "accuracy hit"?

sohamkul likes this.
11. ### AnalogKid Distinguished Member

Aug 1, 2013
4,546
1,252
My *guess* is that Al means that there are two offset sources, the input amp(s) and the diff amp, but different variations of the same overall gain have different output effects. Example: if the total gain is 1000 and the diff stage is unity gain, it's offset is a relatively minor contribution to the total output error; almost all of the output offset is the input stage offset times 1000. If the diff stage gain is 100 and the input stage gain is 10, then the input stage offset still sees a gain of 1000, but the diff stage now contributes its own offset times 100 to the output.

ak

sohamkul likes this.
12. ### MrAl Well-Known Member

Jun 17, 2014
2,440
492
Hi there,

Yes, something like AnalogKid was talking about.

The three op amp instrumentation amp has a very important fundamental property if designed right: the input offset of any op amp is not multiplied as it is in a single stage op amp amplifier.

For example, for a single stage with gain of 10 and input offset of 1mv, the output offset is 10mv because it is amplified by the gain of the stage. But what if we could design an amplifier with a gain of 10 that only had an output offset of (approximately) 1mv just like any single op amp? That's one of the properties of the instrumentation amp, and that comes because the output stage has a gain of 1 and all the gain is obtained in the first two op amps stages.
A simple analysis shows that the output stage is a subtractor, so it subtracts the two outputs of the first two stages. The simple analysis for the two outputs shows that any input offset (as well as other things) shows up at BOTH outputs, and of course that means that any input offset appears at BOTH inputs to the last stage, the subtractor.
With the same input offset in the first two op amps means that the output offset is the same for both, despite the gain factor, so the subtractor subtracts the two offsets and comes up with zero offset. Mathematically this would look like:
Vout=Vo2-Vo1
and with input offset and gain we have:
Vout=(Vo2+os*G)-(Vo1+os*G)
and this is true because the gains are set the same and we always assume good tracking between the first two op ampst. Since os*G is common to both terms above, it effectively disappears. We still have the input offset of the subtractor though, and if the gain is 1 then the output offset is the same as the input offset almost, it isnt really 1 it is really 2 i think, so we end up with a slight increase in output offset but much much less than a single stage op amp. With a gain of 10 in the first two and input offset of 1mv, we get 10mv output offset for both amps (and that would be the same as a single stage op amp) but the output of the subtractor only would have an output offset of 2mv, an improvement of 5 fold.

Now shift some of the gain to the output stage, lets say 3.2 for the two input op amps and 3.2 for the subtractor, and now the output of the subtractor for the same 1mv input offset is (3.2+1)*0.001=4.2mv, which is more than twice as high as the setup where all the gain was in the first two op amps.
Of course increasing the gain in the subtractor results in even more error. with the gain all in the subtractor stage, we get about 10*0.001=10mv output offset again. So we lost one of the properties that makes the instrumentation op amp so attractive.

There are other properties too that improve i think such as CMRR, drift, but the assumption is always that the two op amps track reasonably well, and of course that the resistors are highly matched where necessary.

13. ### AnalogKid Distinguished Member

Aug 1, 2013
4,546
1,252
I think I disagree with one of your premises. In round numbers, an instrumentation amplifier (IA) is grown from three separately packaged chips, three of the four devices in a quad opamp chip, or is a true integrated IA. In all three cases, the two input amps are separate circuits. Granted that with each successive method the matching of almost all parameters of the two input amps is better and certainly tracks more closely with temperature, BUT they still are separate circuits. Specifically, they have separate input stage differential pairs with different Vbe matching errors. So it seems to me that the third amp subtraction might in some cases *sum* two offset errors of opposite polarities. I certainly will concede that statistically things improve with each successive circuit method, but I don't see guaranteed-by-design input offset error cancellation in there.

ak

Last edited: Aug 2, 2016
14. ### MrAl Well-Known Member

Jun 17, 2014
2,440
492
Hi there,

I disagree also because there is no guarantee to make both of the first op amps track. But i already stated that the assumption was that they both track, so am i disagreeing with myself? The answer is no. I am disagreeing with the theory of instrumentation amps. But just a little, because all we have to do is make sure they both have the same input offset. If you read some of the theory you can find out more and keep in mind that if this isnt so then what is the purpose of using THREE op amps when we could be using just ONE.

Now there is also the secondary analysis that you where thinking about. which is what happens when things are not set up right. But if you read my second paragraph in post number 12 you'll see that second assumption, "if it is designed right". If nothing is designed right then nothing works right, so just like any other circuit, this has to be designed right.

The bottom line is that if the two input stages are not matched then there is no reason to build an instrumentation amp that minimizes output offset. I think CMRR also improves but that's another issue if we want to improve that.