# Can't balance differential amplifier circuit

I'm trying to build a circuit which involves an Op Amp in differential amplifier configuration. However I've been having difficulty balancing my output. My understanding of the differential amplifier is that if configured such that R1 = R2 = Rf = Rg then Vout should be about 0 volts except I'm always getting about 0.5-0.8 volts.

I've currently set it up so that there are 5 volts going directly into R1 and R2 with all my resistors equal to 10K ohms and still I'm getting about 0.63 volts. These are diagrams of my circuit I made:

Please also ignore the dashed lines.

This is what I was trying to build:

Edit: Original Circuit

• I suspect you're seeing inaccuracies in your resistor values. EDIT: never mind, that wouldn't be this significant. @stowoda has the right idea. Commented Oct 30, 2018 at 11:01
• The Opamp will not go to 0 V if you have an unsymmetrical supply. Keep that in mind. There is also some offset error in an ideal Opamp. Commented Oct 30, 2018 at 11:02
• I've checked and re-checked the resistor values using a bridge (same voltage drops) and I'm not sure what you mean by unsymmetrical supply (R1 and R2 receive 5V each) Commented Oct 30, 2018 at 11:04
• You are supplying the Opamp with +5 V. This is unsymmetrical. If you would supply it with -5 V to + 5 V that would be called symmetrical. Another hint to what I have stated above: Figure 11 (Output Characteristics Current Sinking). Have a look for that in the Opamp's datasheet (I guess yours is LM358) Commented Oct 30, 2018 at 11:10
• Should I invert one of the inputs via another Op Amp configuration? Commented Oct 30, 2018 at 11:18

## 2 Answers

The LM358 (like other op-amps in that similar range) has the ability to pull-down its output to close to 0 volts because it uses a 50 uA current sink on the output. Without that current sink, the minimum output voltage would be about 0.6 volts above the negative rail (0 volts in your example): -

And here comes the problem; your feedback resistor is acting like a pull-up resistor to 2.5 volts (set by R2 and Rg) and this negates the effectiveness of the internal 50 uA current sink because Rf will try and inject 250 uA into the output pin thus lifting it up above 0 volts.

• Thank you for the reply. Is there some way I can prevent Rf from behaving as a "pull-up resistor" for my purposes? I'm not sure I fully understand what current-sinks are and how to deal with them Commented Oct 30, 2018 at 13:28
• @p.chives you could load the output with (say) 1 kohm to your ground (the negative rail) in order to reduce that offset down to something more reasonable like 30 mV but you will struggle to get closer than 5 mV. If you are intent on getting close to 0 volts then add a negative supply. Not even "so-called" rail-to-rail op-amps can get their outputs very close to either power rail. Commented Oct 30, 2018 at 14:01
• Thanks. I tried the 1k ohm resistor on Vout and it seemed like it was working. I also tried increasing Rf and Rg (keeping R1 = R2 = 1k ohm) and found that Vout "shrunk" but then seemed to scale somewhat reliably with the resistors (Rf = Rg = 560k ohm was about 6 times larger than Rf = Rg = 100k ohm). Is this because the larger resistors also cancel this unwanted current and therefore I'm not getting the "pull up resistor" behaviour? edit: when using the larger resistors for Rf=Rg I didn't use the 1k ohm ground on Vout* Commented Oct 30, 2018 at 14:54
• The larger resistors will pull-up less current so this helps but beware of excessive gain if Rf and Rg are too high. Also beware of raising +Vin too high because you will hit problems with the +Vin input being too high given the limited positive supply rail. And finally, after making any value changes please ensure you have signal input-output linearity; it's dead easy to convince yourself the output is fine but it could be stuck at close to 0 volts because of a value error or too much gain (input offset voltage effect). Commented Oct 30, 2018 at 15:11

lm358 need operating voltage +-16 ( 32 volt) so Arduino can supply just 5 volt so you need an op-amp operating voltage up to 5 volt

• According to the datasheet the min supply voltage is 3V or ±1.5V. Commented Apr 22, 2022 at 5:49