Maker Pro
Maker Pro

Single supply opamp calculations

M

MRW

Hi, I'm doing some more opamp calculations just to get used to opamp
golden rules some more. I decided to do an ideal analysis on an
inverting, single-supply opamp: http://i14.tinypic.com/5xebi4w.jpg

After applying some golden rules, I got the following equations:

(V1 / R1) + (Vo / R2) - [ (Va * (R2 - R1) ] / (R1 * R2) = 0

Re-arranging the terms, I get:

Vo / V1 = -(R2 / R1) + (Va * V1) * [ (R2 - R1) * R1] / (R2 * R2)

Did I make a mistake in my calculation? I was expecting something like
this:

Vo / V1 = -(R2 / R1) + V2

Thanks!
 
J

Jon Slaughter

MRW said:
Hi, I'm doing some more opamp calculations just to get used to opamp
golden rules some more. I decided to do an ideal analysis on an
inverting, single-supply opamp: http://i14.tinypic.com/5xebi4w.jpg

After applying some golden rules, I got the following equations:

(V1 / R1) + (Vo / R2) - [ (Va * (R2 - R1) ] / (R1 * R2) = 0

Re-arranging the terms, I get:

Vo / V1 = -(R2 / R1) + (Va * V1) * [ (R2 - R1) * R1] / (R2 * R2)

yes... your dimensions are not even correct.
Did I make a mistake in my calculation? I was expecting something like
this:

Vo / V1 = -(R2 / R1) + V2

Thanks!

Va = Vb = V2 for an ideal op amp, so...


I1 = (V2 - V1)/R1
I2 = (Vo - V2)/R2

since I1 = I2 for an ideal op amp we have

(V2 - V1)/R1 = (Vo - V2)/R2

or

R2/R1*(V2 - V1) + V2 = Vo

If V2 was 0 then you would just have -R2/R1*V1 = Vo which is the basic
inverting op amp. In this case you have shifted by voltages by V2...

i.e.

-R2/R1*(V1 - V2) = (Vo - V2)

Jon
 
B

Bob Myers

After applying some golden rules, I got the following equations:

(V1 / R1) + (Vo / R2) - [ (Va * (R2 - R1) ] / (R1 * R2) = 0

Looks like you're trying to sum the currents at the node labelled
"Va" - but don't forget, the current through R2 is NOT Vo/R2
unless Va = 0...which cannot be the case here, given the offset
voltage (V2) at the non-inverting (Vb) terminal. Nor is the current
through R1 simply V1/R1, for the same reason.

There are two ways to do this - assume (Va-Vb) is zero (which
basically assumes infinite gain for the op amp), in which case the
currents are (V1-V2)/R1 and (Vo-V2)/R2 - OR you can assume
that there is an error voltage here (Ve = Va - Vb) which is amplified
by the op-amp such that Vo = AVe (where A is the gain). The
latter path gives you the more accurate solution, which can then
be reduced to what you expect by assuming that A gets very, very
large and noting which terms will them drop out.

Bob M.
 
M

MRW

Thanks, Jon!

I also had the assumption that I1 = I2 and that Va=Vb=V2, but I think
I made a mistake when I split my initial equation into the following:

I1 = - (V1 - V2) / R1
I2 = - (V2 - Vo) / R2

to this....

(V1 / R1) - (V2 / R1) = (V2 / R2) - (Vo / R2)

(V1 / R1) + (Vo / R2) - (V2 / R1) - (V2 / R2) = 0


then I used the following relationship: (A / C) +/- (A / D) = [ A *
(D +/- C) ] / CD on

-(V2 / R1) - (V2 / R2) and turn it into

-[ V2 * (R2 - R1) ] / (R1 * R2)

so I had

(V1 / R1) + (Vo / R2) - (-[ V2 * (R2 - R1) ] / (R1 * R2))

.... I still can't quite pick out my exact mistake, yet.. but I'm sure
after much scrutiny it'll hit me like a light bulb.
 
M

MRW

Looks like you're trying to sum the currents at the node labelled
"Va" - but don't forget, the current through R2 is NOT Vo/R2
unless Va = 0...which cannot be the case here, given the offset
voltage (V2) at the non-inverting (Vb) terminal. Nor is the current
through R1 simply V1/R1, for the same reason.

I understand this portion.

There are two ways to do this - assume (Va-Vb) is zero (which
basically assumes infinite gain for the op amp), in which case the
currents are (V1-V2)/R1 and (Vo-V2)/R2 - OR you can assume
that there is an error voltage here (Ve = Va - Vb) which is amplified
by the op-amp such that Vo = AVe (where A is the gain). The
latter path gives you the more accurate solution, which can then
be reduced to what you expect by assuming that A gets very, very
large and noting which terms will them drop out.

Bob M.

I'm having a hard time grasping the last sentence in this paragraph.
Sorry.
 
J

Jon Slaughter

MRW said:
I understand this portion.



I'm having a hard time grasping the last sentence in this paragraph.
Sorry.

He's simply taking into account that a real op amp does not have infinite
gain... a needless assumption in this case.... don't worry about it. If you
can't do it for the ideal case you can't do it for the non-ideal case.
 
B

Bob Myers

Jon Slaughter said:
He's simply taking into account that a real op amp does not have infinite
gain... a needless assumption in this case.... don't worry about it. If
you can't do it for the ideal case you can't do it for the non-ideal case.

Well, yes, I was trying to get into the non-ideal case, because I
think it's important that people eventually see where all of these
magic formulas actually come from. If we take the usual
inverting-amp configuration with the non-inverting input grounded
(in other words, I'm going to ignore what was originally called
"V2" here as a needless complication at this point - all it will really
do is offset the output, anyway), the analysis really isn't all
that difficult.

We'll call the input (at the "free" end of R1) Vin, the output Vout,
and the voltage across the op-amp inputs Va. The "ideal"
analysis would have you assume that Va is zero, or call the
inverting input a "virtual ground," or some such, without really
explaining why you do that. But again, it's really not all that hard
to go through the full analysis, and what you'll wind up with is
the general formula for any amplier used in this configuration, no
matter how big the gain is.

We will, however, make the assumption that no current enters the
inverting input (i.e., the input impedance is way bigger than anything
else involved, such that any current into the input is negligible), and
that makes the summing of currents at this node very simple:

(Vin - Va)/R1 = (Va - Vout)/R2

But by definition, the output voltage must be the amp gain times
the voltage at the amplifier's input, which is Va, so:

If Vout = A(Va), then Va = Vout/A, and

(Vin - Vout/A)/R1 = (Vout/A - Vout)/R2

Solving for the overall gain (Vout/Vin), we get

Vout/Vin = R2 / [(1/A)*(R1/R2 + 1) - R1]

Note where the open-loop gain term "A" (i.e., the gain of the amplifier
itself, without the R2 and R1 external components) winds up. If A
gets very large, the 1/A term will approach zero, and take the whole
first part of the denominator with it. If that's the case (and it's a
reasonable
assumption for an op-amp, where the open-loop gain is very commonly
in the tens if not hundreds of thousands), then that first term drops
out completely, and the whole thing winds up with the familiar

Vout/Vin = - (R2/R1)

Simple, no?

Bob M.
 
M

MRW

We'll call the input (at the "free" end of R1) Vin, the output Vout,
and the voltage across the op-amp inputs Va. The "ideal"
analysis would have you assume that Va is zero, or call the
inverting input a "virtual ground," or some such, without really
explaining why you do that. But again, it's really not all that hard
to go through the full analysis, and what you'll wind up with is
the general formula for any amplier used in this configuration, no
matter how big the gain is.

I'm following so far.
We will, however, make the assumption that no current enters the
inverting input (i.e., the input impedance is way bigger than anything
else involved, such that any current into the input is negligible), and
that makes the summing of currents at this node very simple:

(Vin - Va)/R1 = (Va - Vout)/R2

I'm understanding this portion.
But by definition, the output voltage must be the amp gain times
the voltage at the amplifier's input, which is Va, so:

If Vout = A(Va), then Va = Vout/A, and

(Vin - Vout/A)/R1 = (Vout/A - Vout)/R2

Solving for the overall gain (Vout/Vin), we get

Vout/Vin = R2 / [(1/A)*(R1/R2 + 1) - R1]

This is clearer to me.
Note where the open-loop gain term "A" (i.e., the gain of the amplifier
itself, without the R2 and R1 external components) winds up. If A
gets very large, the 1/A term will approach zero, and take the whole
first part of the denominator with it. If that's the case (and it's a
reasonable
assumption for an op-amp, where the open-loop gain is very commonly
in the tens if not hundreds of thousands), then that first term drops
out completely, and the whole thing winds up with the familiar

Vout/Vin = - (R2/R1)

Simple, no?

Bob M.

That's much better! Thanks, Bob!
 
R

redbelly

Found your mistake, read on:

Thanks, Jon!

I also had the assumption that I1 = I2 and that Va=Vb=V2, but I think
I made a mistake when I split my initial equation into the following:

I1 = - (V1 - V2) / R1
I2 = - (V2 - Vo) / R2

to this....

(V1 / R1) - (V2 / R1) = (V2 / R2) - (Vo / R2)

(V1 / R1) + (Vo / R2) - (V2 / R1) - (V2 / R2) = 0

then I used the following relationship: (A / C) +/- (A / D) = [ A *
(D +/- C) ] / CD on

-(V2 / R1) - (V2 / R2) and turn it into

-[ V2 * (R2 - R1) ] / (R1 * R2)

Here is your error:

- (V2 / R1) - (V2 / R2)
= - [(V2 / R1) + (V2 / R2)]
= -[ V2 * (R2 + R1) ] / (R1 * R2)

Note the "+" sign in the (R2+R1) term, and the over-riding "-" sign in
front of the expression.
so I had

(V1 / R1) + (Vo / R2) - (-[ V2 * (R2 - R1) ] / (R1 * R2))

... I still can't quite pick out my exact mistake, yet.. but I'm sure
after much scrutiny it'll hit me like a light bulb.

Regards,

Mark
 
M

MRW

Found your mistake, read on:

Thanks, Jon!
I also had the assumption that I1 = I2 and that Va=Vb=V2, but I think
I made a mistake when I split my initial equation into the following:
I1 = - (V1 - V2) / R1
I2 = - (V2 - Vo) / R2
to this....
(V1 / R1) - (V2 / R1) = (V2 / R2) - (Vo / R2)
(V1 / R1) + (Vo / R2) - (V2 / R1) - (V2 / R2) = 0
then I used the following relationship: (A / C) +/- (A / D) = [ A *
(D +/- C) ] / CD on
-(V2 / R1) - (V2 / R2) and turn it into
-[ V2 * (R2 - R1) ] / (R1 * R2)

Here is your error:

- (V2 / R1) - (V2 / R2)
= - [(V2 / R1) + (V2 / R2)]
= -[ V2 * (R2 + R1) ] / (R1 * R2)

Note the "+" sign in the (R2+R1) term, and the over-riding "-" sign in
front of the expression.


(V1 / R1) + (Vo / R2) - (-[ V2 * (R2 - R1) ] / (R1 * R2))
... I still can't quite pick out my exact mistake, yet.. but I'm sure
after much scrutiny it'll hit me like a light bulb.

Regards,

Mark


Thanks, Mark!
 
Top