# Differential op amp feedback resistors

I understand if you do not have negative feedback in any op amp configuration then the output will be unstable (will oscillate for example) and the feedback resistor and input resistor on the negative input set the gain of the op amp.

What is the purpose of the 'feedback' resistor on the positive input of a differential op amp?

In the below example, there is a differential pair at the input of the op amp and a 2V DC bias being added to the +ve input. The red and blue traces are measured at the +ve and -ve inputs to the op amp and green trace measured at the output. It can be seen that the DC bias has reduced a little from 2V to ~1.98V because VR20(V +ve input)=1k/(10+1k)*2

If we remove R20 as shown below then the V at +ve input is now not split across a voltage divider and we get the full 2V.

So it seems having R20 is actually a bad thing? But I am sure I am missing something because in all textbook examples of differential op amps I have seen, there is always R20 on the +ve input. So what is its purpose?

• R20 is not a feedback resistor. Also feedback is not required to prevent oscillations. Commented May 22, 2023 at 13:37
• Okay what is R20 then if not a feedback resistor?
– MRB
Commented May 22, 2023 at 13:48
• I don't know of any particular name for R20. But it is not a feedback resistor because it doesn't feed the output signal back into the input network. R17 is a feedback resistor. Commented May 22, 2023 at 13:55
• I understand what you are saying in that R20 is not a feedback resistor (I did not know the name for it either I simply called it that because I saw it as an 'equivalent' to the actual feedback resistor on the -ve side). What is R20s purpose?
– MRB
Commented May 22, 2023 at 14:05
• If you removed R21 and V20 you would have a diff amp. The purpose of a diff amp is to amplify only the difference between two input voltages, and not their sum. R20 is one of the components necessary to achieve (as far as practical) that goal. Look up common mode rejection ratio (CMRR). Commented May 22, 2023 at 14:14

Referring to the upper schematic in post #1, in a classic differential amplifier there are four resistors that matter: R17, R18, R19, R20. For this analysis, delete R21 and V20.

In the standard circuit, the ratios of the two resistor pairs is exactly the same. Note this does not mean that all four resistors are equal in value; it is the ratios of the values that determines the circuit gain.

So, R17 / R18 equals R20 / R19. For a gain of 5, it might be

R17 = 10K

R18 = 2K

R19 = 200

R20 = 1K

What is the role of R20? R20 is the shunt leg of an attenuator.

In standard inverting opamp circuit, the gain is R17 / R18. But in a non-inverting circuit, the gain is (R17 + R18) / R18, or 1 + (R17 / R18). For the same feedback resistors, the gain is different for the inverting and non-inverting cases by an increment of 1.

Thus, in a differential amplifier circuit where there are both inverting and non-inverting signal paths, the non-inverting input is amplified more than the inverting input. To compensate for this, the non-inverting input needs an attenuator so that the two gains are not just opposite, but equal and opposite. If you crank through the full-form gain equations, it turns out that the attenuator resistance ratio is exactly the same as the feedback resistance ratio.

In the example above, the inverting gain is 5 and the non-inverting gain is 6. The non-inverting input attenuator is 1K / 1200, or 5/6. 6 x 5/6 = 5 for the net non-inverting gain.

In your circuit the four resistors are equal, so the inverting gain is 1, the non-inverting gain is 2, and the non-inverting attenuator is 1/2.

• Thanks for this. Would I be correct in saying you should make the inverting and non-inverting gains equal (i.e. make both gains 1 or two by adjusting the resistors on either branch) or should the non-inverting gain be higher than the inverting gain?
– MRB
Commented May 25, 2023 at 15:15
• There is nothing in your post about what kind of signal you are processing, so there is not a single, perfect answer. Usually, the two path gains are equal for maximum common-mode cancellation. Commented May 25, 2023 at 16:12

A differential amplifier subtracts two input signals.

For split supply operation an a attempt to perform $$\V_b-V_a\$$ is made in Figure 1. If the two input signals are equal, the output $$\V_o\$$ should be zero. Using the configuration gain equations and superposition reveals: $$V_o(V_b)-V_o(V_a)=\left(1+\frac{R_f}{R_i}\right)V_b-\frac{R_f}{R_i}V_a$$

Since both resistors are equal, the result becomes: $$V_o(V_b)-V_o(V_a)=2V_b-V_a\ne0$$ for equal inputs.

$$\V_b\$$ has twice the gain that $$\V_a\$$ does.

So a voltage divider is placed between $$\V_b\$$ and the non-inverting input to attenuate $$\V_b\$$ by 1/2, as shown in Figure 2. This is the standard reference diagram for a differential amplifier.

So now the output equation is: $$V_o(V_b)-V_o(V_a)=\left(1+\frac{R_f}{R_i}\right)\frac{R_2}{(R_1+R_2)}V_b-\frac{R_f}{R_i}V_a$$ Since all four resistors are equal, the result becomes: $$V_b-V_a=2\frac{1}{2}V_b-V_a=0$$ for equal inputs. The circuit now subtracts correctly.

This is why $$\R_2\$$ (R20 in the OP) is absolutely necessary to the operation of the differential amplifier.

simulate this circuit – Schematic created using CircuitLab

simulate this circuit

simulate this circuit

For single supply operation the op-amp inputs must operate at 1/2 VCC for equal output swing over the supply voltage. To acheive this R2 (R20 in the OP) is used for an additional purpose. Instead of connecting it to dc 0 volts, it is connected to a low impedance source voltage ($$\V_{bias}\$$) of 1/2 VCC as shown in Figure 3. If a different operating point is required, then $$\V_{bias}\$$ can be fixed to any desired value acceptable to the operation of the amplifier.

In the OP, the midpoint bias for VCC=5V would be 2.5V. A 2V bias will restrict the negative swing, but is allowed.

• Good explanation, though math is my weak spot and analogy works better for me. I would suggest you separate the 3 schematics so that CircuitLab makes larger images of them. The way you have them now is too small to see the details even when I open the image separately. Commented May 23, 2023 at 9:55
• @EdinFifić: The schematics are separated Commented May 23, 2023 at 23:31

Both diagrams are poor differential amplifiers. They are ruined by this shown in red below: -

R21 and V20 wreck the ability of the diff amp to provide decent common mode rejection. If you need to bias the op-amp then do this (inside lime green box): -

What is the purpose of the 'feedback' resistor on the positive input of a differential op amp?

It's not a feedback resistor.

So it seems having R20 is actually a bad thing?

No, it's vital for ensuring excellent common mode noise/signal/interference rejection.

• If the DC bias were not required (removing V20 and R21), what would be the purpose of R20? Why does the circuit diagram I have with R21 and V20 wreck the ability of the diff op amp to provide common mode rejeciton? Is it because By adding R21, you are adding another trace which noise can be added to and this trace does not have an equal on the -ve side?
– MRB
Commented May 22, 2023 at 13:44
• @MRB if you left R20 open circuit the input impedance of the signal line from V19 would be infinite but, the other line (from R17 would be 1 kohm). That totally imbalances the input impedances and, wrecks the performance. If R20 was shorted, GND would be on the non-inverting input and, you no longer have a differential input. The goldilocks value for R20 makes everything good. R21 and V19 short out R20 and thus, the goldilocks value for R20 is ruined. Commented May 22, 2023 at 13:53