Simple op amp question!

Thread Starter

rougie

Joined Dec 11, 2006
410
Hello,

Please view the attachment below called "Circuit".

I think that, initially, this op amp is in inversion mode since the non-inverting input senses 1.5VDC and the inverting input senses 2VDC... I could be wrong!!! But this is how I see it. The op amp will stabilize its input voltages so the are equal to each other which will be at 1.5VDC as shown in the "Circuit" attachment below.

At RA, we have a VRA of 0.5VDC voltage drop with an IRA of 50ua. At RF, we also have a 0.5VDC voltage drop with an IRA of 50ua. If we begin at v1, we can say, 2VDC - 0.5VDC (VRA) - 0.5VDC(VRF) equals an output of approximately 1.0VDC which is what I measured when I built the circuit.

But as a text book formula (see TBFormula attachement), we can see the following formula:

Vout = Rf/Ra (v2 - v1)

If I plug in my measurements into this formula, I get 3.0VDC as an output instead of 1VDC??

Vout = 10K/10K (5 - 2) = 3VDC

Why doesn't the formula work?
confused!

All help very appreciated!

thanks
 

Attachments

Jony130

Joined Feb 17, 2009
5,487
Let me use the superposition to find Vout for your circuit.

Vout1 = V1 * - RF/Ra = 2V * -1 = -2V

Vou2 = V2* R4/(R3 + R4) * 1 +(Rf/Ra) = 5V*0.3 * 2 = 3V

So Vout = Vou1 + Vou2 = -2V + 3V = 1V

So your op amp circuit work as expected.
 

Jony130

Joined Feb 17, 2009
5,487
But why text book formula not work?
Vout = Rf/Ra (v2 - v1)
Vout = 10K/10K (5-2) = 3V??
This formula work only for one special case
RF/RA = R4/R3
Haven't you noticed that in your book all resistors have the same value?

Vout1 = V1 * - RF/Ra = 3V * -1 = -3V

Vou2 = V2* Rin/(Rb + Rin) * 1 +(Rf/Ra) = 6V*0.5 * 2 = 6V

So Vout = Vou1 + Vou2 = -3V + 6V = 3V
 

Thread Starter

rougie

Joined Dec 11, 2006
410
ah! I see...


Haven't you noticed that in your book all resistors have the same value?
Yes but I thought the formula was more generic and would work in all scenarios!

Thanks Jony130
 
Last edited:

Jony130

Joined Feb 17, 2009
5,487
ah! I see...
Yes but I thought the formula was more generic and would work in all scenarios!
I hope that now you know the general formula for this circuit.
Simply use a superposition principle and treat this circuit as two separate amplifiers.
 

Thread Starter

rougie

Joined Dec 11, 2006
410
yes I will keep the following close to me ... :)

Vout1 = V1 * - RF/Ra
Vout2 = V2* R4/(R3 + R4) * 1 +(Rf/Ra)
Vout = Vou1 + Vou2

thanks
 

LDC3

Joined Apr 27, 2013
924
But why text book formula not work?
Vout = Rf/Ra (v2 - v1)
Vout = 10K/10K (5-2) = 3V??
Actually, it would work if you used the correct voltage. You do not have 5V at the negative input, you have 1.5V. Also, your gain is 2, so you should have:
Vout = (Va - Vb) * (1 + Rf/Ra)
Vout = (2V - 1.5V) * (1 + 1)
Vout = 0.5V * 2
Vout = 1V
 

Thread Starter

rougie

Joined Dec 11, 2006
410
LDC3,

So the real formula is:
Vout = (1 + Rf/Ra) * (V2 - V1) ??

so I guess the reason they give this formula:
Vout = Rf/Ra (v2 - v1)

is because the actual voltages at the op amp's inputs of the text book example are equal to 3VDC? As Jonny130 said "Special case".

In any case, Jonny130's way also works for both scenarios since we calculate one voltage component at a time and then take the diff.

thanks for your help guys

r
 

Attachments

Last edited:

Jony130

Joined Feb 17, 2009
5,487
I give you a tip. Simply forget LDC3 post.
As a summary your text book formula is correct if resistors meet this condition RF/RA = R4/R3. End of a story.
 
Last edited:

LDC3

Joined Apr 27, 2013
924
rougie,

I just simulated both the circuits and came up with the following:
For the first one:
V1 = 2V, V2 = 5V
V-: 1.5V
V+: 1.5V
Vout: 1V

For the second one:
V1 = 3V, V2 = 6V
V-: 3V
V+: 3V
Vout: 3V

I'm not sure why the equation did not work. WBahn would be able to tell you what is happening.
 

Jony130

Joined Feb 17, 2009
5,487
Textbook formula work only if RF/RA = R4/R3 . Because only for this case common mode voltage gain is equal to zero. The common mode voltage Vcm = (V1 + V2)/2 = 7/2 = 3.5V present at the amplifier input has no effect on the output voltage.
But in rougie circuit the common mode voltage gain is equal to
Kcm = K1 + K2 = [-RF/Ra] +[ R4/(R3 + R4) * (1 + (Rf/Ra))] = -1 + 0.6 = -0.4V/V.
And because of this non zero common mode voltage gain Kcm, common mode input voltage will have an impact on the output voltage.

So to find Vout we need to use this equation

Vout = Kd * Vd + Kcm* Vcm

Kd - differential gain = (K2 - K1)/2 = (0.6 - (-1))/2 = 1.6/2 = 0.8V/V
Vd = input differential voltage = V2 - V1 = 5V -2V = 3V

And we end up with this

Vout = Kd * Vd + Kcm* Vcm = 0.8 * 3 + (-0.4)*3.5 = 1V
 
Last edited:

LDC3

Joined Apr 27, 2013
924
I see a mistake I made. I was thinking that these were non-inverting amplifiers.

From this web site, it will show you how to get the equation.

V1 = 2V, V2 = 5V, R1 = 10kΩ, R2 = 3.5kΩ, Rf = 10kΩ and Rg = 1.5kΩ
Vout = 5V * ((10kΩ + 10kΩ) * 1.5kΩ) / ((3.5kΩ + 1.5kΩ) * 10kΩ) - 2V * 10kΩ / 10kΩ
Vout = 5V * (20kΩ * 1.5kΩ) / (5kΩ * 10kΩ) - 2V
Vout = 5V * (30) / (50) - 2V
Vout = 3V - 2V
Vout = 1V

You can do the same for the second circuit.
 

t_n_k

Joined Mar 6, 2009
5,455
I imagine it's a result of predictive texting.

Replace "command mode" with " common mode" & all will be revealed
 

WBahn

Joined Mar 31, 2012
29,978
Part of the problem is that you appear to have a textbook that is all about throwing formulas at you and not about teaching the basic skills needed to analyze circuits so that you don't need a list of formulas and a bunch of rules for deciding when to pick this one over that one.

So let's do that analysis and see how the results (1) show the general case; (2) are consistent with the superposition approach used by JoeJester; (3) reduce to the special case reflected by the formula from your textbook; and (4) can be expressed in terms of the "common mode" and "differential mode" input signals that Jony130 talked about.

I've written a blog entry that walks through this pretty carefully.

Wbahn Blog: Analysis of the basic differential amplifier topology
 
Last edited:

Thread Starter

rougie

Joined Dec 11, 2006
410
Sorry for the confusion with this "command mode" VS " common mode" due to my inattention.
no need to apologize .... it's not easy to explain these things to noobs like me.

WBahn, that's an impressive explanation ! Not that I completely
understand it all .... I started op amps 2 days ago lol... I sort of
need to keep it simple.... Does everyone that uses op amps need
to know all those details.... if so... wow I have a lot of catching up
to do LOL!

For now I am still experimenting with:

Vout1 = V1 * - RF/Ra
Vout2 = V2* R4/(R3 + R4) * 1 +(Rf/Ra)
Vout = Vou1 + Vou2

and I see some other all in one complete formulas posted by other
fellows which reflect pretty much the same formulas as above.

The only thing now.... is that often the formulas above work
when we know the resistor values. But what if one knows his
input and output voltages but needs to figure out the resistor values....
I haven't had time to try and solve resistors yet.... as i am
still experimenting simple op amp circuits and getting my feet
wet with those. But later on i may need to solve resistor values
instead of vouts!! And that's because I may want to play around with doing different ramps as you
are aware of one in particular the 2.0 to 2.5 input with a 1.4 down to
a 0.531vdc .... I know I know that you know how to do it but don't tell me the answer right away please , I
would like to experiment by myself with the simple formulas above.
when I get a chance I will post if I have problems doing that.

thanks all for your help
 
Last edited:
Top