Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Op Amp Gain

Status
Not open for further replies.

wuchy143

Member
Hi All,

Can anyone help me set-up my equations for the closed loop gain of this circuit? It's been a while since I've done the calculations and would like to brush up on it. Thanks for the help.
 

Attachments

  • untitled2.JPG
    untitled2.JPG
    25.7 KB · Views: 177
You could use the superposition method to find the gain.

First we short AC signal and we find the voltage gain for non-inverting input.

Vo1 = (V1 *(R2/R2+R4)) * (1 + R1/R3)

now we short DC voltage source (V1) and find the voltage gain
To find the gain we replace all component with their equivalent impedance.
untitled2-jpg.56503


Z1 = ( R1*1/sC1 )/(R1 + 1/sC1)
Z2 = ( R4||R2*1/sC2 )/( R4||R2 + 1/sC2)
Z3 = R3
Z5 = R5 + 1/sC3


And if we assume ideal op amp the the gain is equal

Vo2 = - Z1/Z3 = V2* [ -R1/R3 * 1/(1+ sR1C1)]

Full voltage gain for non-ideal op amp

Vo = - (Ao Z1 Z5 V2)/(Z1 (Z2 + Z3 + Z5) + Z3 (Z2 + Z5 + Ao Z5))

where
Ao = op amp open loop gain


And final Vout = Vo1 - Vo2
But since Vo1 is a DC voltage there will be DC-offset on the output equal to
Vo1 = 2.873313433V * 4.75 = 13.6482388V
So for sure the op amp will be in saturation or near saturation.
 

Attachments

  • untitled2.JPG
    untitled2.JPG
    11.6 KB · Views: 413
Last edited:
wuchy143,

Can anyone help me set-up my equations for the closed loop gain of this circuit? It's been a while since I've done the calculations and would like to brush up on it. Thanks for the help.

Didn't you ask the same question here on 8/26/2011? https://www.electro-tech-online.com/threads/op-amp-gain.121268/

Didn't I answer half of your question by calculating the DC gain of V1? I also asked you if you needed the AC gain of V2, but you did not answer. Have you noticed yet that you have V4 hooked up backwards? Are you aware that the V1 input is going to raise the output to 13.648 volts DC as I stated before? That does not leave much room for the AC voltage V2 to affect the output before it runs into the +15 volt rail. Are you aware of that? Again I ask, do you really need the calculation for the AC input V2?

Ratch
 
Jony130,

Plugging in the values for your derivation of the gain of V1, I get 3.8914E5.

My derivation of V1 is Vo = V1*R2(R1+R4)/(R4(R2+R4))=V1*3.3321= 13.684 volts . We both cannot be right.

Your derivation of V2 = -Z1/Z3 cannot be right because the + input of the opamp is not grounded. You still have to contend with Z2 and Z5 even if the opamp is ideal.

Ratch
 
Jony130,

Upon examining your AC derivation, I see you are correct about V2 after all. Z5 will have no voltage across it and no current will exist in it, so Z5 can be removed from the circuit. The + input of the opamp is connected to ground through Z2 with no current or voltage across Z2, so the + input can be connected directly to ground. That leaves V2 = -Z1/Z3 as you have derived it.

Ratch
 
Last edited:
Jony130,

Upon examining your AC derivation, I see you are correct about V2 after all. Z5 will have no voltage across it and no current will exist in it, so Z5 can be removed from the circuit. The + input of the opamp is connected to ground through Z2 with no current or voltage across Z2, so the + input can be connected directly to ground. That leaves V2 = -Z1/Z3 as you have derived it.

Ratch

sorry I wasted your time. I didn't see an email for your reply so I just assumed no one answered. Not sure how I got off the mailing list for that thread. Again I apologize and really appreciate the help I get on here.

I'm getting really confused with your calculations because well...I'm a little lost and need to RTFM. Or read up on op amps more. Probably both.

I attached my Simulation for this circuit. I have also wired it up and in real life this circuit acts just as it does in spice. Who woulda thunk?

I'm not sure where you got the 3.3321 for the op amp gain(referencing your post in the previous thread). You said that you used all the resistors.

So...this is where I'm at because ultimately I need to figure this out myself.

I'm pretty sure I can do a KVL equation for the V2, R3, R1, and Vout loop. I'd need to algebraically solve for V2/Vout.
 

Attachments

  • untitled3.JPG
    untitled3.JPG
    100.5 KB · Views: 139
wuchy143,



Didn't you ask the same question here on 8/26/2011? https://www.electro-tech-online.com/threads/op-amp-gain.121268/

Didn't I answer half of your question by calculating the DC gain of V1? I also asked you if you needed the AC gain of V2, but you did not answer. Have you noticed yet that you have V4 hooked up backwards? Are you aware that the V1 input is going to raise the output to 13.648 volts DC as I stated before? That does not leave much room for the AC voltage V2 to affect the output before it runs into the +15 volt rail. Are you aware of that? Again I ask, do you really need the calculation for the AC input V2?

Ratch

I fixed V4. This amp is only used from 1V to about 3.6V to get an output from 0V to 10V. This is seen on my simulation. Your welcome to help with the AC but I'd like to understand the DC gain first...
 
Last edited:
wuchy143,

Setting up the DC gain equations is easy. Just a lot of algebra. Disconnect all the capacitors, and remember no current exists through the + and - inputs of the opamp. So the three equations are (V2-Vn)/R3 = (Vn-Vo)/R1, (V1-Vp)/R4 = Vp/R2, Ao*(Vp-Vn) = Vo , where Vn and Vp are the voltages at the - and + input terminals of the opamp, and Ao is the finite gain of the opamp. Solving for Vo we get Vo = R2*V1*(R1+R4)*Ao/(R2*R1+R4*R2+R2*R4*Ao+R4*R1+R4^2+R4^2*Ao) . I forgot to mention that V2 is set to zero in the above 3 equations for the DC analysis because it has no DC component.

If you want an ideal opamp, make Ao go to infinity. Simplify the equation by making R3=R4 to get Vo = R2*V1*(R1+R4)/(R4*(R2+R4)). Plug in the numbers to get Vo/V1=3.3321 .

If R1 were to equal R2, as is usually the case, then Vo/V1 would be R2/R4 .

The gain for V2 was explained in the previous posts of this thread. What don't you understand about it? It is discernable just by inspection.

Ratch
 
Last edited:
Ok DC gain first:

I was incorrect in my original post for V2. It's actually a DC signal coming in there. Not an AC. I fixed it in my second post showing the circuit and the LTspice Sim. That said then you wouldn't say V2 != 0 and that will change your gain?

I easily follow your initial set-up for the equations. I haven't done out the algebra yet to solve for Vo but will soon.

How come the math doesn't follow my spice model and how the circuit works when i proto it up? For example at 1V input I should get exactly 10V out. That means the gain is 10. But then that wouldn't make sense because as you increase the voltage input on this amp you get less of an output. The input is on the - terminal

sorry to make a mountain out of a mole hill....
 
Last edited:
hi,
Assume that V2 =0v

The Inverting gain is 75k/20k = 3.75

this means the Non Inverting gain is 1+3.75 =4.75

The 4.096v voltage is divided down by R4 and R2 to 2.87V

So the OPA output due to the non inverting input will be 4.75 * 2.87v = 13.6V

If you now make V2 = +1V , due to the inverting gain of 3.75 that will drive the OPA down by 3.75 * 1v ie 3.75v

So the net output from the OPA is 13.6v - 3.75 = ~ +10V

If you made V2 = 2v , then the OPA output would be 13.6V - 7.5V = +6.1v

I have rounded the values for simplicity
 
Last edited:
hi,
Assume that V2 =0v

The Inverting gain is 75k/20k = 3.75

this means the Non Inverting gain is 1+3.75 =4.75

The 4.096v voltage is divided down by R4 and R2 to 2.87V

So the OPA output due to the non inverting input will be 4.75 * 2.87v = 13.6V

If you now make V2 = +1V , due to the inverting gain of 3.75 that will drive the OPA down by 3.75 * 1v ie 3.75v

So the net output from the OPA is 13.6v - 3.75 = ~ +10V

If you made V2 = 2v , then the OPA output would be 13.6V - 7.5V = +6.1v

I have rounded the values for simplicity

I guess you figured out what I was trying to ask without me really asking it. Thanks. This makes much more sense now.

Do you guys know of other OPA circuits I could look at...or better yet. What other op amp circuits should I look into so I have a better understanding. You guys did all the work here so I'd like to do some stuff on my own...sim it in LTspice.

Again. Thanks for the help.

-mike
 
hi
This is a simple circuit often used with a PIC for ADC projects.

The Vsig can swing between +/-2.5V and pin 1 has to swing from 0V thru +5V.

The second half of the LM358 is used to generate a Vref for the PIC's ADC, if required.

Use a LM358 OPA in LTS

Post your LTspice asc files when you need help with LTS circuits.
 
Last edited:
hi
This is a simple circuit often used with a PIC for ADC projects.

The Vsig can swing between +/-2.5V and pin 1 has to swing from 0V thru +5V.

The second half of the LM358 is used to generate a Vref for the PIC's ADC, if required.

Use a LM358 OPA in LTS

Post your LTspice asc files when you need help with LTS circuits.

Sweet. Thanks. Though, when i click on it it shows nothing. I think it might be a dead link?
 
wuchy143,

As Jony130 pointed out, you can calculate the two inputs by superposition. This time I will assume an ideal opamp. First calculate Vo1 with V2 zeroed, then Vo2 with V1 zeroed. Finally combine the two for the total Vo.

The equations are (VX+0)/R3 = (Vo1-VX)/R1, (VX-V1)/R4 = (0-VX)/R2 for Vo1 and (VX-V2)/R3 = (Vo2-VX)/R1, (VX+0)/R4 = VX/R2 for Vo2. Solving for Vo1 and Vo2 we get Vo1=R2*V1*(R1+R3)/(R3*(R2+R4)) and Vo2=-R1*V2/R3 . Combining we get Vo=Vo1+Vo2=(R1*R2*V1+R3*R2*V1-R1*V2*R2-R1*V2*R4)/(R3*(R2+R4)) . Plugging in the values we get Vo=-5.102

Ratch
 
Sweet. Thanks. Though, when i click on it it shows nothing. I think it might be a dead link?
Looks as though there a pdf upload problem, tried again , no luck.

So its now a GIF.
 

Attachments

  • AAesp08.gif
    AAesp08.gif
    19.8 KB · Views: 155
hi w143
You may find this helpful while studying OPA's

Calculations based on an ideal OPA.

Suffix used:
n = non inverting input
i = inverting input

Let Gain: K = Rf/Ri ; in the example circuit K = 75k/20k = 3.75

Gi = Vi*K ; inverting gain

Gn = Vn * (1 + K) ; non inverting gain

So, Vout = Gn - Gi

Vout = Vn * (1 + K) - (Vi * K)

Expanding:
Vout = Vn + Vn * K - Vi * K

Vout = Vn + K( Vn - Vi) ; ............ eq(1)


check1:
Vn= 2.8733v
Vi = 0v
Vout = 2.8733 + 3.75 ( 2.8733) = 13.64v

check2:
Vn = 2.8733v
Vi = 1v
Vout = 2.8733 + 3.75 ( 2.8733 -1) = 9.898v ; down by ~3.75v

check3:
Vn = 2.8733v
Vi = -1v
Vout = 2.8733 + 3.75 ( 2.8733 + 1) = 17.39v ; up by ~ 3.75v
 

Attachments

  • Ideal_OPA1.asc
    1.3 KB · Views: 112
  • Ideal_OPA1.gif
    Ideal_OPA1.gif
    34.4 KB · Views: 159
Thanks for the equations. Very useful.

I couldn't find the OPA you mentioned probably due to me using the free version of LTspice..not sure. I used a plain vanilla one just for the sake of sim.

I have been able to simulate the circuit you sent me and have also done some calculations to try and make sense of it all. My calculations match what I'm seeing in PSpice. Though, I'm not achieving the correct output according to the schematic. I left out the 220 ohm resistor because I wasn't entirely sure how to incorporate it into the equations. Do you know the effect of that resistor?

Also I wonder why my output appears to be somewhat opposite of what I should be getting. I attached my LTspice files in case anyone wants to dig into that.

Thanks all.

Calculations: (all ref. des's are from my pspice simulation)

U2:
Inverting
Gi = r2/r1(Vi) = .94(Vi)

Non-Inverting
Gn = Vn(1+ .94) = 2.425

Output of U2 always:
Vout = 2.425 - 0 = 2.425(verified in LTspice)


U1:
Inverting
Gi = Vi * 1.128

Non Inverting
Gn = Vn * (1 + 1.128) = Vn + Vn*1.128

Output of U1 @ 0V
Vout = (Vn + Vn * 1.128) - 0 = 2.66(verified in LTspice)
 

Attachments

  • Opa.asc
    2.6 KB · Views: 120
  • untitled4.JPG
    untitled4.JPG
    114.7 KB · Views: 144
Last edited:
hi,
The inversion is what the original OP wanted as an output.:)
I will modify it for you.

EDIT:
You may find this circuit more challenging.

I suggest you start a new thread on the Simulators Forum.;)
 

Attachments

  • 10V_5_5v.asc
    2.8 KB · Views: 124
  • AAesp02.gif
    AAesp02.gif
    33.9 KB · Views: 145
Last edited:
Hi All,

Can anyone help me set-up my equations for the closed loop gain of this circuit? It's been a while since I've done the calculations and would like to brush up on it. Thanks for the help.


Hi there,

The first thing you have to think about is just how theoretical or how practical you want to get with this circuit. For example, assuming the gain of U1 is infinite and has fast response (often appropriate assumptions) we can immediately eliminate C2, C3, and R5. This would leave us with a much simpler system where we have an AC amplifier with a DC bias.

Using nodal analysis the defining equation for the output of the op amp with infinite gain comes out to be:
Vout=-(s*C2*E2*R1*R2*R4+E2*R1*R4-s*C1*E1*R1*R2*R3-E1*R2*R3+E2*R1*R2-E1*R1*R2)/((s*C1*R1+1)*R3*(s*C2*R2*R4+R4+R2))

where
E1 is the DC source, and
E2 is the AC source, and
some components were eliminated because of the infinite gain.

Solving for the DC output we get:
VoutDC=E1*R2*(R1+R3)/(R3*(R2+R4))

and solving for the AC output we get:
VoutAC=-(E2*R1)/((s*C1*R1+1)*R3)

where we see we have been able to reduce this to a first order response because without some components we just have an AC amplifier with DC bias.

The amplitude of the AC output is:
VoutACampl=(E2*R1)/(sqrt(w^2*C1^2*R1^2+1)*R3)

and that will of course ride on the DC output.

Note that if we wish to do a more complete analysis we would leave the gain at some finite value Ao and go from there. We end up with a much more complicated expression for the total output though:
Code:
Vout=-(Ao*(s*C2*E2*R1*R2*R4+E2*R1*R4-s*C1*E1*R1*R2*R3-E1*R2*R3+E2*R1*R2-E1*R1*R2)*(s*C3*R5+1))/(Ao*s^3*C1*C2*C3*R1*R2*R3*R4*R5+s^3*C1*C2*C3*R1*R2*R3*R4*R5+Ao*s^2*C2*C3*R2*R3*R4*R5+s^2*C2*C3*R2*R3*R4*R5+Ao*s^2*C1*C3*R1*R3*R4*R5+s^2*C1*C3*R1*R3*R4*R5+Ao*s*C3*R3*R4*R5+s*C3*R3*R4*R5+s^2*C2*C3*R1*R2*R4*R5+s*C3*R1*R4*R5+Ao*s^2*C1*C3*R1*R2*R3*R5+s^2*C1*C3*R1*R2*R3*R5+Ao*s*C3*R2*R3*R5+s*C3*R2*R3*R5+s*C3*R1*R2*R5+s^2*C2*C3*R1*R2*R3*R4+s^2*C1*C3*R1*R2*R3*R4+Ao*s^2*C1*C2*R1*R2*R3*R4+s^2*C1*C2*R1*R2*R3*R4+s*C3*R2*R3*R4+Ao*s*C2*R2*R3*R4+s*C2*R2*R3*R4+s*C3*R1*R3*R4+Ao*s*C1*R1*R3*R4+s*C1*R1*R3*R4+Ao*R3*R4+R3*R4+s*C3*R1*R2*R4+s*C2*R1*R2*R4+R1*R4+s*C3*R1*R2*R3+Ao*s*C1*R1*R2*R3+s*C1*R1*R2*R3+Ao*R2*R3+R2*R3+R1*R2)
This last expression although complicated would however allow us to study the effects of having C3 and R5 in the circuit.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top