Here is a simple circuit that I simulated with LTSpice using UniversalOpamp2 component. C1 was initially added to remove DC voltage on inverting input. Sinus has a 0 offset, so C1 seems unneeded, but I kept it because I observed unexpected simulation results.

In this inverting configuration with a 1 gain, I expected an output of 5V - sine input. In simulation I get 2.5V - sine input, C1 capacitor removes 2.5V from dc offset on output. Why?

enter image description here enter image description here

EDIT : From calculations, I we get this formula for :

Vout = 2.5*(1+R2/(R1 + 1/jC1w)) - Vin*R2/(R1 + 1/jC1w)

Said in others terms, offset and Vin have same gain

G = R2/(R1 + 1/jC1w), only sign changes.

But offset on positive input, as a DC component has only a 1 gain as R2/(R1 + 1/jC1w) is 0 for a DC signal.

At 1kHz, Gain for sine should be

100k/sqrt(100k^2 + 1/(2*pifC1)^2) = 0.78.

That corresponds to our max voltage of 3.3V ~ 2.5+1*0.8

So to sum up... do not forget reactance when calculating opamp gain!

  • \$\begingroup\$ If you say you found the answer helpful, then don't forget to select it as the answer, maybe even upvote if it was particularly helpful. Future people viewing this will have problems understanding whether this really solved your problems, or not, thus unsure if it will solve their problems, as well, or not. \$\endgroup\$ Commented Apr 11, 2018 at 14:35

1 Answer 1


If I understand your schematic correctly, you have a 1 kHz oscillator, DC-blocked by 2 nF, feeding a 100K input unity-gain inverting buffer that is DC-referenced to 2.5V.

2 nF at 1 kHz is 80 Kohms capacitive reactance, so you are going to have some attenuation of your oscillator signal on its way into the buffer.

As somebody once said, you have to mind your Z's and Q's.

Try using a 1 uF nonpolarized capacitor instead and see what happens. Better, dial down the oscillator amplitude, so you KNOW that your +2.5 VDC reference will always be bigger, and try about a 220-250 uF electrolytic capacitor, appropriately polarized.

  • \$\begingroup\$ I think I found by myself the solution, see edits in my post. Thanks for your help. \$\endgroup\$
    – rem
    Commented Apr 10, 2018 at 21:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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