# Op-Amp gain calculation

I'm trying to find R4 that will make:

$$\frac{V_{out}}{V_{in}}=-120$$

The operational amplifier is ideal.

My attempt: In the '-' input there is a virtual ground, so the equivalent resistor above is $$(R2||R3) + R4$$

Using the formula for inverter amplifier:

$$G = -\frac{(R2||R3) + R4}{R1}$$

The answer is approximately $$R4=120M\Omega$$

I know from a simulation that the answer is around $$24k\Omega$$ Where is my mistake?

simulate this circuit – Schematic created using CircuitLab

• are you positively sure about the value of R1? – Marcus Müller Jan 5 at 13:37
• I do. Here is a screenshot of the simulation: link – bp7070 Jan 5 at 13:47
• That simulator isn't very good. It's allowing 120 V out of an op-amp. Your maths appears correct. – Transistor Jan 5 at 13:53
• Edit: I fixed the simulation the, op-amp voltage is 15V - -15V Link and same result with 24kOhm – bp7070 Jan 5 at 13:55
• @bp7070 by using a smaller input voltage. You need to assume a lot of things to be more ideal than they typically can be. For example, tolerances of the resistors become pretty interesting, considering the scale of R3 compared to the rest. – Marcus Müller Jan 5 at 13:59

One option to determine the gain of this circuit is to use superposition and determine the voltage at the inverting pin which should be 0 V with an idealized op-amp. First, set $$\V_{out}\$$ to 0 V and determine $$\V_{-}\$$:

$$\V_{(2a)}=\frac{R_4||R_3+R_2}{R_4||R_3+R_2+R_1}V_{in}\$$

Then, set $$\V_{in}\$$ to 0 V and determine again the voltage at $$\V_{-}\$$:

Doing the simple maths ok leads to;

$$\V_{(2b)}=V_{out}\frac{R_3}{R_3+R_4}\frac{R_1}{R_1+R_2+R_3||R_4}\$$

Then you say that $$\V_{-}=V_{(2a)}+V_{(2b)}=0\$$ and you solve for $$\V_{out}\$$ and factor the result. You should find:

$$\G=-\frac{R_2(R_3+R_4)+R_3R_4}{R_1R_3}\$$

and the value of $$\R_4\$$ to have -120 V as an output of this op-amp is given by

$$\R_4=-\frac{R_2R_3-120R_1R_3}{R_2+R_3}=23.895\;k\Omega\$$

The below SPICE simulation confirm the value with a perfect op-amp:

Another option would have consisted of using the EET or extra-element theorem which is part of the FACTs but using superposition is already part of the FACTs toolbox.

Here is an alternative solution:

Applying the star-triangle-transformation we get thee other resistors.

However, two of them play no role for the closed-loop gain because they are located at the output to ground (pure load) resp. between the inverting input and ground (no influence on closed loop gain). Hence, there is only one resistor RF left between output and inverting input (one single feedback resistor).

Using the known resistor values it is no problem to find the value of this feedback resistor RF which is a function of the unknown resistor R4.

My result: R4=23.995k-0.09998k=23.895kohms.

• Guten-tag LvW, you have been faster than me for this one : ) – Verbal Kint Jan 5 at 16:56
• As always: I do my very best....however, primarily regarding the content of a answer and not the speed.... – LvW Jan 5 at 17:52
• Good comment, quality versus speed: I agree! Why are you now flagged as a new contributor? – Verbal Kint Jan 5 at 17:58
• I have changed the PC machine - and suddenly they have treated me as a new member. Don`t know why....Up to now I have used Windoes-XP and now I am with 10...I had a lot of problems, but now it seems to be OK. – LvW Jan 5 at 18:15

Given the value of R2 (500 kohm) it will barely be loading the 100 ohm resistor (R3) and so, to obtain a gain of -120, a close approximation (given that R4 will need to be orders of magnitude greater than R3) is to choose a value for R4 that is 120 times R3. But, noting that R2 and R1 have a ratio of 0.5, the real value for R4 is close to 240 times that of R1 i.e. 24 kohm.

Where is my mistake?

You could do it more thoroughly by estimating the equivalent Thevenin source voltage and impedance produced by the op-amp output, R4 and R3 of course. Then recognize that the source impedance is in series with R2.

• Thanks, why did you conclude that the ratio of R1 and R2 doubles the needed value of R4? – bp7070 Jan 5 at 14:29
• Because if R1 and R2 were equal (at say 1 Mohm), the attenuation brought about by R4 and R3 would only need to be 120:1 to obtain an overall gain of -120. – Andy aka Jan 5 at 14:41

Ok, time for idealized opamp rules.

1. No current into opamp inputs

So, all current that flows through R1 also has to flow through R2.

(derivative rule) An opamp in negative feedback will coerce its inputs to take 0V difference.

That means V⁻ will be 0V (GND potential).

From that follows that the right hand side of R2 (where the other resistors attach) is at - (Vin/2), since R1 = 2 R2 (and the same current flows through both).

Since the voltage across R3 is $$\V_\text{node}=-\frac12 V_\text{in}\$$, the current through R3 is

$$I_3 = \frac{-\frac12 V_\text{in}}{\mathrm R3}\text,$$

which leaves us with

\begin{align} I_4 &= I_\text{in} - I_3\\ &= \frac{V_\text{in}}{\mathrm R1} - \frac{-\frac12 V_\text{in}}{\mathrm R3}\\ &=V_\text{in}\left(\frac1{\mathrm R1}+\frac1{2\mathrm R3}\right) \end{align} to flow through R4.

That yields an output voltage of

\begin{align} V_\text{out} &= V_\text{node} + I_4\cdot \mathrm R_4\\ &=V_\text{node} +V_\text{in}\left(\frac1{\mathrm R1}+\frac1{2\mathrm R3}\right)\cdot \mathrm R_4\\ &= -\frac12 V_\text{in} +V_\text{in}\left(\frac1{\mathrm R1}+\frac1{2\mathrm R3}\right)\cdot \mathrm R_4\\ &= V_\text{in}\left(\frac{\mathrm R4}{\mathrm R1}+\frac{\mathrm R4}{2\mathrm R3} - \frac12\right)\text. \end{align}

The gain is hence

\begin{align} \frac{V_\text{out}}{V_\text{in}} &= \frac{\mathrm R4}{\mathrm R1}+\frac{\mathrm R4}{2\mathrm R3} - \frac12 \\ &\overset != -120\\ -119.5 &= \mathrm R4\left(\frac{1}{\mathrm R1}+\frac{1}{2\mathrm R3}\right) \end{align}

I must admit I can't find a non-negative solution for R4, so I must've gone wrong somewhere.

• Thanks for the explenation, as you said the voltage at the node between R3 and R4 is $$-\frac{V_{in}}{2}$$. Using voltage devider: $$-\frac{V_{in}}{2}=V_{out}\frac{100}{R4+100}$$, while $$\frac{V_{out}}{V_{in}}=-120$$ gives the answer $$R4=23.9k\Omega$$ – bp7070 Jan 5 at 14:58
• hm, can't do the voltage divider here, since R3 isn't unloaded and the current might also go into R2 – Marcus Müller Jan 5 at 16:16