# Differential amplifier gain calculation

I am currently working on a project and I found this differential amplifier for a shunt. I perfectly understand what is going on with the voltage follower op-amp, but I dont understand what is going on with the other op amp.

as seen in the image i already have the formula, but this is only for a case when R2, R4 are the same and R1 and R3. Can anyone tell me the general formula, without any simplification and how to get it please?

Thank you

• Try googling differential amplifier Dec 13, 2023 at 19:23
• I tried googling, but in all the examples, tutorials, papers they make it so that Vref is connected to ground Dec 13, 2023 at 19:39
• Well, it works exactly the same except the output voltage is raised to Vref instead of being at 0 volts. Dec 13, 2023 at 20:02
• @Pablo9026 Why, specifically, do you want the general formula? Can you explain your goal in knowing it? It would help a lot to know why you want it when considering any form of an answer. (This is especially pointed because it seems you don't actually understand the schematic. So providing an appropriate answer would need to focus on the meaning of what you need to know and why.) Dec 13, 2023 at 21:22
• My answer here may help. You'll need to work out both DC and AC equivalent of the circuit (remember superposition). Dec 13, 2023 at 22:07

I've never seen a diff amp configured that way. I've seen a similar configuration in this book where the gain equation is explained.

Page 513 - Figure 18.4

Small Signal Audio Design

By using superposition, you can figure this out. Follow the below diagram: Starting with V-

$$V_{o1} = V_- * (-\frac{R4}{R3})$$

Now for V+ $$V_{o2} = (\frac{R2}{R2+R1}) * V_+ * (1+\frac{R4}{R3}) \\ => V_{o2} = (\frac{R2}{R2+R1}) * V_+ * (\frac{R3+R4}{R3})$$ To provide same amplification magnitude we need R2+R1 = R3+R4 and R2 = R4 which also implies R1 = R3

$$=> V_{o2} = V_+ * (\frac{R4}{R3})$$

Vref is only used to shift the signal to the preferred baseline. Similar to V+, we get

$$V_{o3} = V_{ref} * (\frac{R1}{R3}) = V_{ref} \\$$ Now adding the individual outputs $$V_o = V_{o1} + V_{o2} + V_{o3} \\ => V_o = V_- * (-\frac{R4}{R3}) + V_+ * (\frac{R4}{R3}) + V_{ref} \\ => V_o = (V_+ - V_-)*(\frac{R4}{R3}) + V_{ref}$$

The differential amplification would only make sense when R1 = R3 and R2 = R4