# Ideal operational amplifier circuit with variable voltage gain, how can I calculate the current?

#### Peterpan101

Joined Mar 4, 2017
20
I am currently calculating various quantities for the circuit shown below. However, I am stuck on how to calculate the current (Ix) and the input resistance (0 output current). The node behind R1 should be a virtual ground so it would make sense for the voltage across R1 to be the same as across the variable resistor (VR*(1-a)+Vx but I am not sure whether the addition of the variable resistor changes this? #### WBahn

Joined Mar 31, 2012
26,398
If by "node behind R1" you mean the inverting input of the opamp, then it is NOT a virtual ground unless the positive node of the opamp is connected to ground, which in this circuit it isn't.

It is better to think of there being a virtual short between the two opamp inputs in that, in the active region, the are at nearly identical voltages (like a real short) but no current can flow between them (unlike a real short).

So, with that in mind, can you find the voltage at the non-inverting input of the opamp (as a function of the input voltage and the pot setting)?

With the voltage at the non-inverting input, can you find the voltage across the input resistor (R1)?

#### Peterpan101

Joined Mar 4, 2017
20

The way I understood it the pot is there so that the voltage at the non-inverting input can be varied. The voltage this input receives should then be Vin minus the voltage across the top part of the pot?

The voltage across the input resistor would then be the same?

When I asked my teacher for an explanation he told me that V1 should be the voltage acrosse the top part of the pot plus Vx, so basically just the whole voltage across it. Why is this? The virtual ground explanation made sense to me but didn't seem to work out. Now I know why.

#### dl324

Joined Mar 30, 2015
13,122
Welcome to AAC!
I am stuck on how to calculate the current (Ix)
If the voltage at the non-inverting terminal is Vx, what does the zero differential input theorem tell you the voltage at the inverting terminal will be?

#### dl324

Joined Mar 30, 2015
13,122
When I asked my teacher for an explanation he told me that V1 should be the voltage acrosse the top part of the pot plus Vx, so basically just the whole voltage across it. Why is this?
The pot is forming a voltage divider. Can you write a general formula for Vx?

#### Peterpan101

Joined Mar 4, 2017
20
The pot is forming a voltage divider. Can you write a general formula for Vx?
Vx=R*a*I
so then the input voltage at the other terminal is the same?

#### dl324

Joined Mar 30, 2015
13,122
not quite. Does the voltage divider equation have currents in it?

If you called the bottom part of the pot $$\small \alpha R$$ and the top part $$\small R - \alpha R$$, what would $$\small V_X$$ be?
so then the input voltage at the other terminal is the same?
Isn't this what the zero differential input theorem says for ideal opamps?

#### WBahn

Joined Mar 31, 2012
26,398

The way I understood it the pot is there so that the voltage at the non-inverting input can be varied. The voltage this input receives should then be Vin minus the voltage across the top part of the pot?

The voltage across the input resistor would then be the same?

When I asked my teacher for an explanation he told me that V1 should be the voltage acrosse the top part of the pot plus Vx, so basically just the whole voltage across it. Why is this? The virtual ground explanation made sense to me but didn't seem to work out. Now I know why.
What if I asked you what Vfred was? There would be no way for you to tell me because I haven't told you what Vfred was. Well, you haven't told anyone what V1 is. Even if I guess (and engineering is NOT about guessing) that you meant the voltage across R1, you would still need to define its polarity.

So, guessing that you mean both that V1 is the voltage across R1 AND that V1 is defined as the left side of R1 relative to the right side of R1, then you are correct.

As for what your teacher told you, there are three possibilities:
1) You misunderstood what your teacher told you.
3) Your teacher shouldn't be teaching this course.

Note that none of the possibilities include the explanation, as you interpreted it, being correct.

#### WBahn

Joined Mar 31, 2012
26,398
Vx=R*a*I
so then the input voltage at the other terminal is the same?
Which current is I? You define exactly one current, namely Ix.

STOP using terms you haven't defined!

#### Peterpan101

Joined Mar 4, 2017
20
I'm so sorry! With I I meant the current flowing into the pot. Please see the updated drawing below. I am aware that he should not be teaching the course, that is why I am asking for help here. Thank you so much for your replies.

#### Peterpan101

Joined Mar 4, 2017
20
not quite. Does the voltage divider equation have currents in it?

If you called the bottom part of the pot $$\small \alpha R$$ and the top part $$\small R - \alpha R$$, what would $$\small V_X$$ be?
Thank you so much!
The general formula was Vx/Vtot=(Rx/Rtot)
Vx is the bottom part so the resistance there would be αR and Vtot would then be Vi in this case.
So then Vx=Vi*(αR/(αR+(R-αR))=Vi*(αR/R)=Vi*α?
I'm sorry for any mistakes I make/made I have been trying to figure this problem out for hours now.

MOD NOTE: Edited quote tags

Last edited by a moderator:

#### dl324

Joined Mar 30, 2015
13,122
So then Vx=Vi*(αR/(αR+(R-αR))=Vi*(αR/R)=Vi*α?
That's correct, so now you should understand this
When I asked my teacher for an explanation he told me that V1 should be the voltage acrosse the top part of the pot plus Vx, so basically just the whole voltage across it. Why is this?

#### WBahn

Joined Mar 31, 2012
26,398
I'm so sorry! With I I meant the current flowing into the pot. Please see the updated drawing below. I am aware that he should not be teaching the course, that is why I am asking for help here. Thank you so much for your replies.
Much better. In general, get in the habit of annotating your schematic with EVERY quantity that you use in ANY equation. This applies even if it is a scribbled sketch that no one but you will ever see. Plus, be sure to indicate the polarity of any current or voltage designator you use. If you don't, you WILL occasionally make mistakes that otherwise you wouldn't have and, when you do, you make it a lot harder to track them down.

Now that you have Vx, write an expression for V1 as a function of the input voltage and the pot setting.

Using that, come up with an expression for Ix.

Using that, come up with an expression for Vo.

#### Peterpan101

Joined Mar 4, 2017
20
As I understood it now, the voltage across R1 should be Vx because both terminals have the same input voltage.

That would mean that Ix is simply Vx/R?

#### WBahn

Joined Mar 31, 2012
26,398
As I understood it now, the voltage across R1 should be Vx because both terminals have the same input voltage.

That would mean that Ix is simply Vx/R?
What is the voltage on the left side of R1?

What is the voltage on the right side of R1?

What is the voltage across R1?

#### dl324

Joined Mar 30, 2015
13,122
That would mean that Ix is simply Vx/R?
Think about what you're asking. Does it make sense? What is the formula for calculating the current in R1?

#### Peterpan101

Joined Mar 4, 2017
20
Not really, that's why I asked again.

What is the voltage on the left side of R1?
On the left side of R1 it would be the input voltage so Vi

What is the voltage on the right side of R1?
On the right side it would be the input voltage of the inverting terminal?

So then the voltage across R1 should be Vi-Vx? So basically the same as the voltage across the top part of the pot?

What is the formula for calculating the current in R1?
Then the current would be V1/R so (Vi-Vx)/R ?

#### dl324

Joined Mar 30, 2015
13,122
Then the current would be V1/R so (Vi-Vx)/R ?
Yes. Now you should be able to write the equation for Vo in terms of pot wiper position or, if you prefer, Vx.

#### WBahn

Joined Mar 31, 2012
26,398
Not really, that's why I asked again.

On the left side of R1 it would be the input voltage so Vi

On the right side it would be the input voltage of the inverting terminal?

So then the voltage across R1 should be Vi-Vx? So basically the same as the voltage across the top part of the pot?

Then the current would be V1/R so (Vi-Vx)/R ?
Which R? Rfred?

Other than that, yes. But express it in terms of Vi, R1, and α (the the pot wiper position).

You are making progress.

#### Peterpan101

Joined Mar 4, 2017
20
Which R? Rfred?

Other than that, yes. But express it in terms of Vi, R1, and α (the the pot wiper position).

You are making progress.
Now that I know that Vx=Vi*α the equation for Ix would then be:

Ix= (Vi-(Vi*α ))/R1=(Vi(1-α ))/R1

no more Rfreds!

Yes. Now you should be able to write the equation for Vo in terms of pot wiper position or, if you prefer, Vx.
Vo should be Vx minus the voltage across R2 from left to right, shouldn't it?
That voltage (across R2) would be equal to Ix*R2 where R2=R1 so then Vi(1-α)
Therefore Vo=(Vi*α)-(Vi(1-α)=Vi*α-Vi-Vi*α=-Vi
That doesn't seem right?