# OP Amp as differential amplifier

I'm learning about op amps, and I have the following circuit where the amplifier is used as differential amp Since both inputs are the same, I was expecting the output to be zero. But instead, I got this (around 9 mV peak) I don't understand where this output comes from. I simulated the circuit using livewire

• Take a look at this page on the 741. Ask yourself about how the Early Effect (largely unaddressed in that schematic) might yield what you see. – jonk Jun 8 at 4:53
• I would advise simulating with an actual differential source. your two input signals are now not really differential (and area only made differential because of the feedback). – Joren Vaes Jun 8 at 5:48

There are several effects buried in that 1 Hertz output of 0.009 volts, for 2 volts input.

As was stated, the resistor tolerances matter. But this is a simulation.

The opamp has FINITE GAIN, probably only 100,000X or 100dB.

Your circuit has 40dB gain (100X).

The opamp has 100 ohms (?) Rout.

The circuit achieves (before gain) 0.009/100 = 90 microVolts Referred To Input of Common Mode Rejection at 1Hertz.

The voltage you see is due to the tolerances of the resistors in addition to a parameter of the opamp itself called common mode rejection ratio.

You have the amplifier set up for a gain of 100 so if R4 was connected to ground you would expect 200V pk-pk at the output (yes I know that is well beyond the capabilities of the amplifier).

You are getting ~20mV pk-pk so you have a rejection of about 10,000 times (or 40dB).

You only need an error of 0.01% in the resistors to result in that error so I think you are doing very well. If you adjust one of the input resistors slightly you may be able to improve it.

An important parameter of a differential amplifier is the common-mode rejection and as you have seen it requires extremely good matching to achieve rejections of even 40dB.

Wikipedia - Common Mode Rejection

• All absolutely true, but the OP’s output looks like simulation, not a scope shot. So the results might be due to other non-idealities in the model as resistors in simulation (unless using Monte Carlo or other tolerance analysis) should be identical. – John D Jun 8 at 2:14
• That was really helpful. Thank you! – Emiliano Jun 8 at 2:18
• Yes, it is the output of a simulator. For a moment I thought that maybe some parameter in the software could be causing that output, but I wasn't sure @JohnD – Emiliano Jun 8 at 2:21

It is a powerful idea to explain the abstract electronics circuits by simple electric concepts. Thus, the common-mode operation of the 4-resistor op-amp differential amplifier can be easily explained by the basic electric circuits of voltage divider and balanced bridge.

## Equivalent electric circuits

1. Voltage divider. The pairs of resistors R1-R2 and R3-R4 form two identical voltage dividers. Both are grounded (the first - by the virtual ground at the op-amp output; the second - by the real ground) and their inputs are driven by the same input voltage source.

2. Balanced bridge. Actually, the two voltage dividers form a balanced Wheatstone bridge with varying supply. Its unique property is that the voltage drops across the opposite resistances (R1<->R4 and R2<->R3) are equal; so the difference between them is zero.

## Operation

1. VIN = 0. Initially, the input voltage is zero. So the op-amp output voltage is zero and the R1-R2 voltage divider is virtually grounded.

2. VIN = var. When the circuit input voltage changes (common-mode), both op-amp input voltages simultaneously change with the same rate so that their difference is always zero. The op-amp output voltage does not change since it depends only on the difference between the input voltages... and this difference is zero. So the R1-R2 voltage divider remains virtually grounded.