# Calculating current in the inverting op-amp

Okay, so I know the "correct" way to calculate current.

Let's first analyze the circuit:

KVL left side:

$-V_{in} + i_1 \cdot R_{in} + 0 = 0$

$V_{in} = i_1 \cdot R_{in}$

KVL right side:

$V_{out} = -R_f \cdot i_f$

$i_1 = i_f = i$

Gain is:

$\frac{V_{out}}{V_{in}} = \frac{-R_f \cdot i}{i \cdot R_1} = \frac{-R_f}{R_{in}}$

$V_{out} = -18.6 V$

$i = \frac{V_{out}}{-16k} = 1.1625 mA$

How come, applying reasoning that since there's only one voltage supply, the current through $R_{in}$ and $R_f$ is just voltage divided by equivalent resistance?

$R_{in}$ and $R_f$ are in series

$i = \frac{V_{in}}{R_{in} + R_f} = \frac{7}{6k + 16k} = 0.318 mA$

What's wrong with this reasoning? Why is the current not correct?

• >since there's only one voltage supply I don't see ANY voltage supplies. If you mean this is a single rail op-amp with bottom side grounded, it can't put out negative 18V, only close to zero. The virtual ground at the inputs can no longer be established. It is no longer an op-amp, just a pull-down on the right side of Rf. If that is NOT what you meant, see Sarthak's answer. – Trevor_G Dec 3 '17 at 6:41
• "Rin and Rf are in series" - wrong . The non-inverting input (the connection between the resistors) is a virtual earth (=0V) – JIm Dearden Dec 3 '17 at 13:01
• @JImDearden: No, you're wrong. The resistors most definitely ARE in series, with the same current flowing through both. The "virtual ground" exists only by virtue of the fact that the opamp's negative feedback forces it there. – Dave Tweed Dec 3 '17 at 13:35

You are correct in assuming that $R_{in}$ and $R_f$ are in series but the potential difference between them is not $V_{in}$ but $V_{in} - V_{out}$. So instead of the current being (as you suggest): $$i = \frac{V_{in}}{R_{in}+R_f}$$ It is: $$i = \frac{V_{in} - V_{out}}{R_{in}+R_f}$$

Another required equation would be: $$V_{in} - iR_{in} = AV_{out}$$ Solving these equations you can calculate the gain of the amplifier and if you take the limit as $A -> \infty$ you will get the same result as you calculated before.
Thus you can see that you could have saved all these calculations by assuming the gain is $\infty$ in the first place and potential difference between its inputs is zero like you did in your initial calculations with virtual ground.

Using Nodal Analysis analyze the currents at the circuit node that includes the ideal op amp's inverting input:

$$\frac{V_i-V_{in}}{R_{in}} + \frac{V_i-V_{out}}{R_f} = 0 \;\;\;\;\;\;\;\;\;\;(1)$$

where

Vi   := The voltage at the op amp's inverting input


Assuming an ideal op amp, and for the inverting voltage amplifier circuit shown in your figure, the voltages at the op amp's inverting and non-inverting inputs are equal; therefore, $V_i=0\,V$, and equation (1) can be simplified as shown in equation (2):

$$\frac{-V_{in}}{R_{in}} + \frac{-V_{out}}{R_f} = 0 \;\;\;\;\;\;\;\;\;\;(2)$$

and equation (2) rearranged to yield equation (3):

$$\frac{-V_{out}}{R_f} = \frac{V_{in}}{R_{in}} \;\;\;\;\;\;\;\;\;\;(3)$$

Regarding equation (3), note the following:

1. The left-hand side of equation (3) is the current $i_{R_{f}}$ that's flowing through resistor $R_{f}$, and
2. The right-hand side of equation (3) is the current $i_{R_{in}}$ that's flowing through resistor $R_{in}$, and
3. The currents flowing the two resistors are equal in magnitude (equation 4).

$$\left | \frac{-V_{out}}{R_f} \right | = \left | \frac{V_{in}}{R_{in}} \right | \Rightarrow |i_{R_{f}}| = |i_{R_{in}}| \;\;\;\;\;\;\;\;\;\;(4)$$