# Op amp not respecting the gain?

Discussion in 'General Electronics Chat' started by rougie, Aug 19, 2013.

1. ### rougie Thread Starter Active Member

Dec 11, 2006
410
2
Hello,

Intuitive deductions in reference to attachment:

1) We know that Vout will be a positive voltage.

2) We also know that increasing Va (Inverting input) will cause Vout to ramp down!

3) If Vb = 1.5VDC, Then, Va should also equal to 1.5VDC

4) Iri = (v1-va)/Ri = (2v-1.5V)/10K = 50ua

5) We can see that Vri is 0.5VDC... and now we need to solve for Vrf.
If Iri = 50ua, then Irf also equals 50ua, then Vrf is:
50ua x 20K = 1VDC

6) Vout = v1-Vri-Vrf = 2 - 0.5 - 1 = +0.5VDC

7) Op amp gain = Rf/Ri = 20K/10K = 2

8) Using Differential op amp formula:

Vout = V2 (R2/(R1+R2)) ((Ri+Rf)/Ri) - V1(Rf/Ri)
Vout = 5(1.5K/5K) (30K/10K) - 2(20K/10K)
Vout = 4.5 - 4 = +0.5VDC

My question is, in reference to the attachment, if the op amp amplifies the voltage difference between va and vb by a gain factor of 2, why is the amount divided by 2 instead of multiplied by 2. In other words, I would like an *intuitive* explanation on how the gain functions in relation with the input voltages

I am a little confused on how the gain applies here.... We know we have a gain of -2 right! So what exactly is multipied by -2??

Quote cleaned up to avoid confusion! I now know the answer to this question.

r

• ###### T7.jpg
File size:
75.3 KB
Views:
62
Last edited: Aug 20, 2013
2. ### bountyhunter Well-Known Member

Sep 7, 2009
2,498
507
Feedback always forces the voltage at both inputs to be equal. Do the simple voltage drops and you will see the answer.

rougie likes this.
3. ### Ron H AAC Fanatic!

Apr 14, 2005
7,050
657
This is just a bunch of nonsense. Assuming that the initial op amp output is 0V is useless, because it isn't 0V.

This is the only thing you posted that makes any sense to me.

rougie likes this.
4. ### LvW Active Member

Jun 13, 2013
674
100
Rougi, your calculation is not correct.
However, I would not agree that setting the output to zero is "useless", because this is part of the calculation in case you are using the superposition theorem.

Setting Vout=0 and calculating the part of Va caused by the input voltage only leads to
Va=Vi(Rf/(Rf+Ri). This is simply a voltage division between two resistors.

I didn`t go in detail through your 8 steps - I am too lazy, because there are other methods that are much simpler.
Why not applying the superposition theorem in another way?
1.) Set V1=0 and use existing formulas for non-inv. gain
2.) Set V2=0 and use existing formulas for inv. gain.
3.) Combine both results.

5. ### rougie Thread Starter Active Member

Dec 11, 2006
410
2
Hello LvW,

That's fine, we all try to do things given the time we have.

P.S.
r

Last edited: Aug 20, 2013
6. ### LDC3 Active Member

Apr 27, 2013
920
160
rougie, WBahn has posted the analysis of a differential op-amp circuit, which is similar to what you are looking at. I think you want to analyze the circuit as a specific case (a single input non-inverting op-amp, or another one) where some of the ratios become 1 and the equation is simpler.

7. ### WBahn Moderator

Mar 31, 2012
18,064
4,904

You do NOT have an amplifier with a gain of 2. You have an amplifier that has BOTH a differential gain and a common mode gain. That was not only discussed in depth within the thread, but I put together a blog post SPECIFICALLY to walk you, and anyone else interested, through the steps of understanding how this thing works. If you would just walk through the first five steps, eqn 5 applied to your circuit yields an output of 0.5V.

Go through that blog post. Don't just skim it. Follow it through equation by equation and be sure that you understand HOW you go from one equation to the next. Don't just read it -- do it for yourself on a piece of paper. If you don't understand how to get a particular equation, then ASK, showing what you have done in your attempt to do so.

That is the ONLY way you are going to LEARN this stuff -- by fighting with it and doing the grunt work yourself. Consider the fact that the problem in the other thread is identical to this one except for a single resistor value that is different. People walked through it for you but yet, given another problem that is the same except for that one different resistor value, you are right back where you started trying to throw the same wrong equation at a circuit to which it does not apply -- because you won't make the effort to walk through the work yourself.

And you are STILL being sloppy with your units. Very soon I am going to stop even trying to help you if you don't start tracking your units properly.

8. ### rougie Thread Starter Active Member

Dec 11, 2006
410
2
Hi WBahn,

I will put the effort my dear friend, but for courtesy's sake, can you formulate in a phrase or so what my question is.

Because I think no one gets what I am trying to ask here?

9. ### WBahn Moderator

Mar 31, 2012
18,064
4,904
You seem to still be asking why the output of your circuit doesn't behave like a pure differential amplifier in which the gain is 20kΩ/10kΩ = -2. Though much of your reasoning makes no sense at all.

Why are you trying to apply the differential gain to 0.1667V?

The differential gain is the gain applied to the difference of V2 and V1 -- the two input voltages to the amplifier -- NOT the voltages at the opamp inputs, which are multiplied by the openloop gain of the amplifier, not the closed-loop gain.

Furthermore, the differential gain of this amplifer is NOT equal to Rf/Ri. That is a special case that applies ONLY when the other two resistors are specifically chosen to make the common mode gain identically equal to zero. If that is not the case -- which it isn't, here -- then your circuit is NOT a differential amplifier at all -- it is a two input amplifier whose output is a linear combination of amplifications of the two inputs.

The differential and common mode gains for the general case were developed in the blog entry and given in equations (22) and (23). From them we see that these gains, for this circuit, are

A_cm = -1.1
A_d = 1.45

The common mode input voltage is the average of V2 and V1 while the differential input voltage is V2-V1, so

V_cm = (5V+2V)/2 = 3.5V
V_d = 5V - 2V = 3V

The output, from equation (21) in the blog entry, is

Vout = A_cm * V_cm + A_d * V_d
Vout = -1.1*3.5V + 1.45*3V
Vout = -3.85V + 4.35V
Vout = 0.5V

STOP trying to insist that the circuit has a gain equal to Rf/Ri just because of an equation in your book that doesn't apply to this circuit!

It is not the circuit this is nor respecting the gain, it is YOU that is not respecting the circuit! You are trying to simply pronounce that it is something that it is not.

Last edited: Aug 19, 2013
10. ### rougie Thread Starter Active Member

Dec 11, 2006
410
2
Okay,

measured the correct output and everything is fine and dandy. Little do you know, I read your link a little at a time every evening trying to puzzle a piece of it together. Now patients I say, my dear WBahn.

Yes

Last edited: Sep 19, 2013
11. ### rougie Thread Starter Active Member

Dec 11, 2006
410
2
WBahn,

You posted while I posted... let me read your last post, cause I didn't see it before... so before you post again... wait please!

12. ### rougie Thread Starter Active Member

Dec 11, 2006
410
2
Because I thought that the op amp senses the actual voltage at the voltage divider and not at v1 and v2... okay, so I'm wrong... I'm wrong !

okay

okay ... there's more to this than I thought... So you are saying that when the common mode gain identically is equal to zero then I can use the op amp differential formulas as I have been applying. However, in any other case, I must calculate the differential and common mode gains from equations (22) and (23) and then figure out the common mode input voltage and the differential input voltage as shown above.... and then, apply equation (21)!

Okay until here I think I get you! But unfortunately, the following is a blur!

Also, can you tell me is there a reason to use all those calculations when I get the same result with:

Vout = V2 (R2/(R1+R2)) ((Ri+Rf)/Ri) - V1(Rf/Ri)

I mean I have to plead ignorance here, because either way there is no difference in the output!!!! So I keep thinking what is the incentive or the benefits of knowing equations (22), (23) and (21) and so forth when all I have to remember is the above formula or even the following formulas which would still work just as well:

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

??

Thanks WBahn

Last edited: Aug 19, 2013
13. ### rougie Thread Starter Active Member

Dec 11, 2006
410
2
Yup.. that's more what I want.... I think things are made out more complex than they have to be. If it's critical to learn, then okay, but I ain't designing any op amps here you know...

Anyways there will be assumptions I will need to iron out as usual ...lol

thanks

Last edited: Aug 19, 2013
14. ### t_n_k AAC Fanatic!

Mar 6, 2009
5,448
783
"Let me ask everyone here, what is the voltage of an op amp a Quintilianth of a second after it has been powered on? isn't it ZERO? Anyhow, I could be wrong on that. But I mean, we have to start somewhere!"

It's interesting how ideas become entrenched in our thinking and are often difficult to reconcile with reality. Someone told you the aforementioned idea applies universally and you have accepted it as the truth. Can one measure what happens in the first quintillionth of a second after powering on the op-amp? In other words within 10^(-18) seconds of powering on? I doubt it. Perhaps you have stated this as meaning the instant after power on.

It is probably not unreasonable to assume that at [say] 1 nanosecond after power up the LM324 op-amp output is still 0V. OK let's accept that's possibly the case. The output is 0V 1 nanosecond after power up. You then use voltage divider equations to find the non-inverting and inverting op-amp input voltages as 1.5V and 1.3333V. This is based on an assumption that the op-amp inputs have nominal infinite resistance. That may be OK to assume at steady state [well after the power up time] but by no means certain under the transient condition within the first nanosecond after power up. But we could also accept that as true for the sake of the argument.

So you have a differential input voltage magnitude at the op-amp inverting and non-inverting terminals of 0.16667V. You then ask why the output isn't twice the this differential input leading to a value of 0.3333V. This is based on a notional (albeit erroneous) amplitude gain of 2. But you have already stated these values are predicated on the starting basis that the output is assumed to be 0V at the instant after powering up. You can't have it both ways. At the instant after power up the output is either zero or it's not. You have required it to be zero. In any event, a difference of 0.16667V between the inverting and non-inverting inputs would be amplified by the op-amp's internal gain which is several orders of magnitude greater than 2.

For the time being I would forget about what happens in the circuit transient settling period and consider only what happens at steady state well after the power up instant.

rougie likes this.
15. ### WBahn Moderator

Mar 31, 2012
18,064
4,904
Not a threat. I've seen people die because they couldn't be bothered to track their units. It's I that won't warn you again -- and you won't be the first person that I've decided not to help because they choose to steadfastly refuse to use a simple error-detecting technique that could very well save lives someday just because they can't be bothered to do it.

And I suppose this was you making a point that you aren't going to be bullied into properly using units. Fine. Definitely your right. As it's my right to not help you any more. Goodbye.

16. ### bountyhunter Well-Known Member

Sep 7, 2009
2,498
507
You're trying to force equations into an answer when you should simply look at the circuit. You MUST always remember two things:

1) The voltages at the op amps inputs are the same.

2) The input currents are small enough to ignore.

Your circuit has 1.5V at the + input. Write the same value at the other input. Now do the simple voltage dividers across the resistors.

17. ### rougie Thread Starter Active Member

Dec 11, 2006
410
2
WBahn

when it isn't even

This question was about rationalizing "gain", which was never

...

more thing, you well!

Last edited: Sep 19, 2013
18. ### rougie Thread Starter Active Member

Dec 11, 2006
410
2
yes, I know but it's more complicated than that... when I
fiddle with these components, questions arise spontaneously
and then I'm not sure how to explain it the way I am supposed
to. Like for example, in my circuit how the heck can you tell
just by looking at it if the output will turn up positive or negative
without going through 1 month of maths.... its observations
like these that makes someone understand the intent behind
formulas .......and not the other way around... bof. I'm bushed right now.... continue tomorrow.

In any case, this is a classic example of a thread gone bad ..... lol...

so I call it day!
Rougie

19. ### bountyhunter Well-Known Member

Sep 7, 2009
2,498
507
You don't need any equations at all. You have simple voltage dividers. If you have V1 across a resistance, you will have twice that voltage across a resistor of double value. You need no equations at all to analyze the circuit you posted. In fact, you should avoid equations and try simply understanding the basic circuit.

rougie likes this.
20. ### atferrari AAC Fanatic!

Jan 6, 2004
2,662
782
Sorry to tell but you, the OP, talk too much.

By now you should have this solved. Telling again and again that you don't or that you can't or... is useless.

Stop posting and do as bounty said in his last post.

You could find that your probklem could be solved not even writing a single line.

Enough for me.

Last edited: Aug 20, 2013