In previous articles, we have looked at how operational amplifiers work and the basic applications of them. In this article, we will look at one of the most important implementations: the differential amplifier. This circuit outputs the difference between two voltage inputs, along with an amplification gain, if desired. We’ll also look at the instrumentation amplifier, which is a close relative with an additional feature.
Differential Amplifier
Note that in this schematic, resistors having the same label means that they have the same value. Ex. If R1 = 1 kΩ, that means all resistors labelled R1 are 1 kΩ resistors.
Let’s analyze this circuit so that we can understand how the inputs affect the output. Remember that when we analyze op amp circuits, we are relying on two fundamental rules:
1) The voltages at the two inputs are the same.
2) No current flows into or out of the inputs.
To find the relationship between the inputs and the output, we will use a technique called superposition, where we consider the effect of just one input at a time and sum the results at the end to find their combined effect. First, we will consider just V1 and connect V2 to the ground.
Because the voltage at V+ will be zero and no current flows into V-, we know that R1 and R3 have the same current. Therefore, we can write the following equation:
Rearranging, we get:
Next, we consider the effect of V2 and connect V1 to the ground:
V+ is a voltage divider between V2 and ground, and V- is a voltage divider between Vout and V1. Since these voltages are the same, we can write the following equation:
Rearranging, we get:
When both V1 and V2 are applied, Vout is equal to the sum of these two results.
We can simplify this as,
We have created an amplifier that takes the difference between two inputs, and the ratio between R2 and R1 allows us to set the gain. If we just want the difference between the inputs with no amplification, we can set R2 equal to R1 (i.e. all four resistors have the same value).
Instrumentation Amplifier
With the differential amplifier, if you wish to change the gain, you need to change the value of at least two resistors. It would be nice if we could change the gain by varying just a single resistor. This means we could even replace this resistor with a potentiometer, allowing us to adjust the gain at any time. We can do this with an instrumentation amplifier.
This circuit may look intimidating, but it is actually fairly simple once we break it into chunks. First, notice that the right side of the circuit is just the differential amplifier we saw above, with the inputs being the voltages at A and D, and with a gain of 1 because the four resistors have the same value. This means our output is simply the difference between the voltage at A and the voltage at D, so we just need to analyze the new circuitry we have added to figure out what those voltages will be.
The two new op amps are buffers (or voltage followers). The top one ensures that the voltage at B is equal to V1 without allowing any current to flow from it, and the bottom one does the same with C and V2. This means the voltage across the gain resistor is V2 – V1, and you can divide by the resistance to get the current through it:
Because no current flows to the op amp inputs, this same current also runs through the resistors above and below it. Therefore, we can write the following equation for the voltage between A and D.
op
And if we factor out the voltage difference, we get what we are looking for:
And, as mentioned, the rest of the circuit is just a differential amplifier with a gain of 1 connected to A and D.
Therefore, the output with respect to V1 and V2 is:
This is essentially the differential amplifier again, but now the gain can be changed by changing the value of just one resistor, which is why we call it the gain resistor.
Differential Amplifier vs. Instrumentation Amplifier
The advantage of the instrumentation amplifier is the ability to easily change the gain, so you may be wondering why we wouldn’t always use it. The answer is that while this is a useful feature, many applications do not require changing the gain, so once it has been designed with the correct resistors, there is no need to change them out. When this is the case, the differential amplifier is preferable as it is a much simpler and cheaper circuit, having only one op amp instead of three.