Calculate op amp gain

Hello,

For example, jus by external measurements with our

VOM, can we figure out an amplifier’s gain when

the op amp is wired up with some unknown resistor values

ra, rf, r1 and r2 (op amp in a black box)?

If so, how’s it done?

thanks

DC gain = (DC output voltage)/(DC input voltage)

both measured with respect to ground, of course.

By definition the (voltage) gain is the change in Vout / change in Vin. So by applying a range of voltages and measuring the output voltage, you can determine the DC gain. It’s the slope of the output voltage. If you want to know the AC gain at some frequency you’ll need a AC source, a function generator, to supply the input signal.

Hello,

So in reference to the attachment below, (Assuming V rails are +/-15Vdc) I know that the output is approximately 0.5Vdc.

So if I move V1 from 2 Vdc to 3 Vdc, my output will then be approximately -1.5Vdc

Ao = deltaVout/deltaVin

Ao = -1.5-0.5/3.0-2.0

Ao = -2.0Vdc/1Vdc

Ao = -2

Is this correct?

http://www.ecircuitcenter.com/Circuits/opdif/opdif.htm

“Missed it by that much”

http://cdn.bleacherreport.net/images_ro … 1307725924

Almost correct. If the Delta Vout was -2V for a 1V change in input, then A0 = -2 (not +2).

Hello,

Yes, I apologize, I had corrected it… to -2.

Okay, so this is called the amplifier’s gain. Right?

But what if I wanted to find out the gain used to get 0.5Vdc at the output… in other words, the gain used to multiply the difference between inputs V1 and V2. Surely this is another type of gain all together and its not -2 right ?

I know that given:

Vout = Acm * Vcm + Ad * Vd

Vout = (-1.1 * 3.5Vdc) + (1.45 *3Vdc)

Vout = 0.5Vdc

So my question is, we know the common mode gain and we know the differential mode gain, which are respectively: -1.1 and 1.45 respectively. So why is it that the sum of these two gains don’t equal the actual gain required to get 0.5Vdc ???

For example:

-1.1 + 1.45 = 0.35

So why isn’t 0.35 the gain used to amplify the difference at V1 and V2 of the op amp:

5Vdc - 2Vdc = 3Vdc

3Vdc * 0.35 = 1.05Vdc ? <<< should this give 0.5Vdc instead ?

Confused

The gain formula to use and the reasoning behind it is given in the link I posted previously, in addition to many other sources. You have to do the math, and it works.

8Volts:
Okay, so this is called the amplifier’s gain. Right?

Well it's the DC gain for the V1 input. You could also compute the DC gain for the V2 input.

8Volts:
But what if I wanted to find out the gain used to get 0.5Vdc at the output… in other words, the gain used to multiply the difference between inputs V1 and V2. Surely this is another type of gain all together and its not -2 right ?

Yes and there are probably a couple of ways to do this. If I were to continue with the prior thinking I might compute the V2 gain and use the superposition principle for linear networks. Forgetting about any offsets (in this case they are theoretically = 0);

Vo = A1V1 + A2V2

You know A1 = -2. I know A2 to be 0.9

So ;

Vo = -2V1 + 0.9V2

Verify this using your initial inputs ;

Vo = -22 + 0.95 = 0.5 so it checks.

You can check for yourself that it works for the revised input voltages.

8Volts:
So my question is, we know the common mode gain and we know the differential mode gain, which are respectively: -1.1 and 1.45 respectively. So why is it that the sum of these two gains don’t equal the actual gain required to get 0.5Vdc ???

So now it's time to redefine the above into your common mode and differential mode gains.

The common mode gain is ;

Acm = delta(Vo)/delta(Vcm) with Vcm = (V1+V2)/2, aka the average of the input voltages

Ad = delta(Vo)/delta(Vd) with Vd = V1-V2. And alternate and equally good defn would be Vd = V2 - V1.

So now it’s time for algebra. Let’s make 1 simplification here, knowing there’s zero offsets in the circuit and so ;

Acm = delta(Vo)/delta(Vcm) = Vo/Vcm and Ad = delta(Vo)/delta(Vd) = Vo/Vd

So we have ;

Vo = A1V1 + A2V2 (from superposition)

and from the definition of common and differential mode gains ;

Vo = AcmVcm + AdVd = Acm*(V1+V2)/2 + Ad*( V1-V2) = AcmV1/2 + AdV1 + AcmV2/2 - AdV2

Collect the V1 and V2 factors ;

Vo = V1*(Acm/2 + Ad) + V2*(Acm/2 - Ad)

So by inspection ;

A1 = Acm/2 + Ad

and

A2 = Acm/2 - Ad

So solve for Acm by adding the above 2 equations ;

A1 + A2 = Acm/2 + Ad + Acm/2 - Ad = Acm/2 + Acm/2 = Acm

Acm = -2 + 0.9 = -1.1

Now subtract the prior 2 equations ;

A1 - A2 = Acm/2 + Ad - Acm/2 + Ad = 2*Ad

Ad = (A1 - A2)/2 = (-2 + 0.9)/2 = -1.45

Let’s see if I’ve done the algebra correctly and verify via the inputs and outputs we know.

With V1 = 2V and V2 = 5V ;

Vo = Acm*(Vavg) + Vd*(V1-V2) = -1.1*(3.5) -1.45*(2-5) = -3.85 + 4.35 = 0.5V It checks !

And with V1 = 3V and V2 = 5V

Vo = -1.1*(4V) -1.45*(-2V) = -1.5V and it checks again.

So this Acm and Ad are correct. You had the sign of Ad reversed.

Note that since the Acm is not= zero, you can’t find Vout from just the difference of the inputs.

Hi jremimngton,

I have been doing those formulas for two weeks now. But I am talking about when one has this formula:

Vout = Acm * Vcm + Ad * Vd

How can we calculate the differential gain just from this formula alone. Maybe, what I am asking is not possible… don’t mind me :oops:

1 Adam-12 … 1 Adam-12 … see the analysis above or this one via circuit components (akin to jr’s link)

http://www.ntu.edu.sg/home/aschvun/FAQ/DiffAmp.html

Honestly, the only way to understand this material is to go through the math, satisfying yourself one line at a time, that every step is correct. It is just simple algebra!

If you can’t take the time to do that, don’t bother asking for simpler explanations. The result is not really intuitive and can’t be explained any other way.

hi Mee_n_Mac,

first I would like to thank you for your detailed reply…

Okay so I see that in a configuration like this

there always is two gains we need to take into

consideration.

So my last question is, why would we go ahead

and solve vout this way when one can use:

vout = V2(r2/(r1+r2))(1+rf/ra) - V1(rf/ra)

we do note that the above equation still gives

is 0.5vdc at vout!!!

is there any reason for knowing that that Acm = -1.1

an that Ad is 1.45.

Sorry for all the questions

8Volts:
is there any reason for knowing that that Acm = -1.1

an that Ad is 1.45.

Ad = -1.45.

As for expressing the gain of the circuit that way vs using all the resistors … it’s your choice really. When trying to understand how the circuit works and how it might vary with component tolerance and change w/temp and time, etc, etc … you’re better off using all the resistors.

If you look at the circuit as a black box and just want to express it’s functionality (w/o knowing the details of how it does what it does), then perhaps using Acm and Ad are the best choice. Look at op-amp specs. The specs try to express the function of the op-amp as a black box, w/o going through all the circuitry analysis of the hundreds of transistors that make up the op-amp.

Hi Mee_n_Mac,

if we look at this circuit and we put it in a black box meaning

we only know:

V1=2v

V2=5v

Vout = 0.5Vdc

Can u give me an example of why we would want to know Acm and Ad???

Bof…It’s been 2weeks I have been chiseling away at the maths related

to common mode and differential mode gains…

and I feel like I learned all that math starting with Vcm and Vd down

to Vout = (Acm)(Vcm) + (Ad)(Vd) for nothing!!!

I know how to do the math but I don’t know where and why

I would use it!!

Aaaaaanyways…

thanks all for your help!

Again look at the specs for an op-amp. You will see both specs. That’s because the simple “1’st order” model of how an op-amp works isn’t the whole truth. For example the simple assumptions that Ad is infinite and Acm = 0. When you get into demanding applications these assumptions will lead to a circuit that may not work as desired. Ad has some limit and that has effects; on linearity, on frequency response to name two. That Acm != 0 means there will be some output even when the + and - signals are identical but non-zero. If you’re designing a differential amp using op-amps, you need to understand that and then do the math to see if the effect of Acm is important (or not) for your design.

A lot of circuitry is so complex that you, as a designer, don’t have the time or the resources to understand all the inner workings. Instead, those that do understand their design and it’s inner workings, will give you as set of specs that try to describe how the “black box” will work in almost all usages … assuming you understand the specs and what they mean. That’s one reason why EE’s get paid the medium $$s.

Okay Mee_n_Mac,

I think I get it! I think it’s time for me to take two steps back

and clear my head …

As for the specs, they says

Common-Mode. DC,VCM =0VtoV+ −1.5V,

so I guess this means :

Vcm = V1 + V2/2. where Vcm MAX is (V1) -1.5vdc

okay … thanks for your help…

very appreciated

8Volts:
As for the specs, they says

Common-Mode. DC,VCM =0VtoV+ −1.5V,

so I guess this means :

Vcm = V1 + V2/2. where Vcm MAX is (V1) -1.5vdc

The above looks like a common mode input voltage range (there are various acronyms for this) ... that is that any common mode voltage must be in that range or the op-amp won't work as expected. You might want to read this long thread on that :

https://forum.sparkfun.com/viewtopic.ph … p&start=15

Op-amps will also have a Acm spec, different from the above, but it’s usually expressed as a common mode rejection ratio:

http://en.wikipedia.org/wiki/Common-mod … tion_ratio

Thanks Mee_n_Mac,

I appreciate very much your replies because of their

pertinence and relevance to my questions being

posted. In summary, it’s nice to receive straight cut

no beating around the bush replies just as you have done.

I know you have put a significant amount of effort in your

replies and for this I sincerely thank you.

Regards