1
\$\begingroup\$

Please help me understand why this op amp integrator output has a DC offset. Why doesn't the coupling capacitor block it?

LTSpice Circuit

Simulation Result

EDIT: Running the simulation for longer time resulted in the expected output behavior

enter image description here

\$\endgroup\$
8
  • 1
    \$\begingroup\$ no load at the output, no path to dc ground, then floating dc wise. Add a load, even if it is 1GOhm, and see what happens. \$\endgroup\$ Commented Mar 11, 2018 at 0:13
  • \$\begingroup\$ I tried that but the result was the same. Anyways, I thought that when you used the voltage probe in LTspice you were essentially adding a high resistance load to ground, correct? It's not clear to me how the bias on the non-inverting input could be the issue because when I remove the feedback capacitor and feed in a sine wave signal, I get the expected AC output with no DC offset. \$\endgroup\$ Commented Mar 11, 2018 at 0:18
  • 2
    \$\begingroup\$ Uhm, run the simulation for longer, say, 1 minute, you're running it for only 1ms. I think it may be a transient state. \$\endgroup\$ Commented Mar 11, 2018 at 0:23
  • \$\begingroup\$ The peaks of the triangle waves are dropping, as you look from left to right. However, given the DC blocking on vin(-), the opamp still needs ZERO VOLTS between Vin- and Vin+, or you'll have rail-to-rail Vout. And the bias on Vin+ is +4.5 volts. \$\endgroup\$ Commented Mar 11, 2018 at 1:04
  • \$\begingroup\$ Ah, yes, running the simulation for a longer time did indeed result in zero offset in the output. I'm going to edit my question to show the new result. But, my question now is what time constant causes this behavior? \$\endgroup\$ Commented Mar 11, 2018 at 1:20

1 Answer 1

3
\$\begingroup\$

A couple things to keep in mind.

In your setup, you have a gain of 20V/V (at dc and before the cutoff frequency \$\frac{1}{2\pi R_fC_f}=723\text{Hz}\$), your opamp will stop amplifying at this gain values for frequencies greater than 723Hz. After that frequency, the gain decreases 20dB/dec.

This is way lower than the frequency of your input signal (11.63KHz). After 723Hz your circuit acts as an integrator, and that is why you get a triangular wave instead of the square wave.

I ran a quick test on LTspice:

enter image description here

Notice I downsized the feedback capacitor so that I have still a square wave for an input frequency of 11.63KHz. The cutoff frequency where the opamp will integrate the signal instead of amplifying is now about 200KHz. This may not what you want to do with your circuit...Another thing I think is important, is to run your simulation starting your dc sources at zero volts. That way, you will get the real transient response. This is very useful when using capacitors and inductors. Just check the box that says 'Start external dc voltages at 0V', it will be the same as having a step input.

Here is the input and output:

enter image description here

Also notice I added some resistance to after the dc blocking cap at the output. This form a high-pass filter with cutoff frequency determined by the capacitor and the resistor at the output \$\big(\dfrac{1}{2\pi R_5C_3}\big)\$. The value of the resistor is important here because if it's too great (an open, for example), you may end up passing the dc component of the signal. Just choose C and R in a way that you get the frequency you want. 100K would have worked too.

Why does it take longer to reach steady state? Because of the RC time constants. At the input, you have a 47\$\mu\$F capacitor, along with the 5K\$\Omega\$ resistance. The feedack resistor also influences this time constant (100k\$\Omega\$). The time constant is \$\tau = (47\mu \text{F})(5\text{k}\Omega+100\text{k}\Omega)= 4.935\$ seconds.

Now, initially V+ is greater than V- (in linear mode V+ \$\approx\$ V-) so the output will saturate at about +9V. This is the voltage that will charge the input capacitor (your input signal is essentially 0Vdc). At the 4.935 seconds the voltage at the capacitor will be about 0.63*9V = 5.67V. But as soon as V- reaches the offset voltage of 4.5Vdc (present at V+ through the divider), the opamp will enter the linear region (now V+ \$\approx\$ V-) and the V- voltage will stay there. So, it takes a less than \$\tau\$ to reach 4.5Vdc. But the takeaway here is that the time constant could be reduced by downsizing the capacitor at the input, that way you don't sacrifice your dc gain.

For example, take a look at how much time it takes the inputs to come together and not surprisingly, the output starts to behave at that point:

enter image description here

If you downsize the input capacitor (1\$\mu\$F), this is what you get:

enter image description here

Look how quicker the inputs (V+ and V-) get close to each other, and the opamp behaves linearly.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Very helpful! Thanks so much for the explanation. \$\endgroup\$ Commented Mar 11, 2018 at 16:57

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.