# Removing DC offset at the input of an op-amp

#### jaydnul

Joined Apr 2, 2015
175

(assuming all ideal components)

Am I correct in assuming that if the source has a DC offset, it will not be removed from the input of the op-amp? Since the second leg of the capacitor is floating, the voltage of the source will just pass right by the cap.

#### wayneh

Joined Sep 9, 2010
17,498
The capacitor will remove any DC from the source. But you shouldn't let the input float like that. Unpredictable.

#### jaydnul

Joined Apr 2, 2015
175
Could you explain why it will remove the DC offset? A capacitor with one lead floating will have the same potential on both plates, will it not?

#### wayneh

Joined Sep 9, 2010
17,498
It's not really floating, it's attached to an op-amp. The op-amp has a high impedance, but it's not infinite. A change in charge on one plate causes a movement of charge on the opposing plate. So AC comes through, but not DC. You cannot drive continuous DC current across a capacitor. Once study state is achieved, it's open.

I concede that achieving steady state will take a while, if a DC voltage is applied to the capacitor.

#### jaydnul

Joined Apr 2, 2015
175
Sounds good, thanks wayneh!

#### ErnieM

Joined Apr 24, 2011
8,377
Well... there is a complication here. The op amp input does have some offset current running into or out of it. So without a DC path the offset current will charge the cap so that input pin will wander way off ground, and the amp will amplify that DC. So eventually the output will tend to one power rail or the other.

The solution is to add a resistor from the input going to the cap to ground. The value of the resistor depends on the value of the cap.

That's because the R and C also form an RC low pass filter.

#### GopherT

Joined Nov 23, 2012
8,009
Could you explain why it will remove the DC offset? A capacitor with one lead floating will have the same potential on both plates, will it not?
All parts of your circuit should have a "return path to ground". The node between the capacitor and Op amp is trapped. You will likely get some amplification when you turn it on and it will get quiet in a few seconds (time lag will depend on teh value of the cap, the input impedance of the Op Amp and the insulation of the circuit board. Depending on your input signal impendance and cap value will determine the best resistor size, but you can start with a 1M ohm resistor from non-inverting op amp input to ground should help (assuming you have a dual power supply). If you have a single supply, a 1 M resistor to a virtual ground (reference voltage) is needed.