# Op-Amp Design Resistor Values vs. Actual Values - Gain Calculation

I have created the following differential op-amp circuit with the aim of converting a 0-3.28V analog signal into a -10V to +10V output. I have calculated the gain required 3.28/20 = 6.1

From looking at differential circuits the gain is equal to the ratio of resistors used so I chose a 10k and 61k. However when testing the circuit I needed close to 74k to get the required output range. Can anyone explain why there is such a difference between the design values and the actual resistor values?

PS. The voltage divider in the top left is to provide the midpoint value 1.64V for the circuit.

This should really be added as a comment but need to add the link. I found a formula on the following website, maybe I misinterpreted it.

http://cnx.org/content/m13778/latest/

Clearly this is not the case, thank you for your explanation, it is by far the easiest to understand that I have seen so far.

First, look at the signal gain from the non-inverting terminal (setting the rheostats to 0)

$$\dfrac{V_{OUT}}{V_+} = 1 + \dfrac{69k}{10k+1.91k||10k} = 6.95$$

The voltage at the non-inverting terminal is

$$V_+ = V_2 \dfrac{69k}{10k + 69k} = V_2 \cdot 0.873$$

The overall signal gain is thus

$$\dfrac{V_{OUT}}{V_2} = 6.95 \cdot 0.873 = 6.07$$

Which is very close to the desired value. How did you arrive at the conclusion that 61k and 10k should give the correct gain?

Two possible problems:

1. The voltage divider you say is generating a 1.64V reference will be affected by the output current of the op-amp. You may need to buffer the 1.64V before the second 10k$$\\Omega\$$ resistor.

2. Another possible problem (though I don't think it's quite as likely), is that the op-amp gain is reduced when the output is near the supply rails. Check your op-amp datasheet. As an example, here is a line from the datasheet of a random rail-to-rail op-amp I found, the AD8565 (looks like it's designed for single supply operation, but the principle is the same): You can check if this is the problem by cutting the DAC output voltage in half and seeing if the gain is more accurate.