1
\$\begingroup\$

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:

Circuit schematic

Circuit fritzing

Please also ignore the dashed lines.

This is what I was trying to build:

Differential Op Amp

Edit: Original Circuit

Original circuit

\$\endgroup\$
  • \$\begingroup\$ I suspect you're seeing inaccuracies in your resistor values. EDIT: never mind, that wouldn't be this significant. @stowoda has the right idea. \$\endgroup\$ – Hearth Oct 30 '18 at 11:01
  • 2
    \$\begingroup\$ 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. \$\endgroup\$ – stowoda Oct 30 '18 at 11:02
  • \$\begingroup\$ 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) \$\endgroup\$ – p.chives Oct 30 '18 at 11:04
  • 1
    \$\begingroup\$ 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) \$\endgroup\$ – stowoda Oct 30 '18 at 11:10
  • \$\begingroup\$ Should I invert one of the inputs via another Op Amp configuration? \$\endgroup\$ – p.chives Oct 30 '18 at 11:18
3
\$\begingroup\$

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): -

enter image description here

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.

\$\endgroup\$
  • 1
    \$\begingroup\$ 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 \$\endgroup\$ – p.chives Oct 30 '18 at 13:28
  • 2
    \$\begingroup\$ @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. \$\endgroup\$ – Andy aka Oct 30 '18 at 14:01
  • \$\begingroup\$ 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* \$\endgroup\$ – p.chives Oct 30 '18 at 14:54
  • 1
    \$\begingroup\$ 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). \$\endgroup\$ – Andy aka Oct 30 '18 at 15:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.