# Can't remove DC offset from a square wave with a coupling capacitor... why ?

#### dyn_o

Joined May 29, 2017
35
Could someone explain me why I can't remove a DC offset from a square wave with a coupling capacitor ?

This square wave comes from the output of a 555 in astable mode, and the
peak to peak voltage is +5V from 0V to +5V, at a frequency of 1KHz, duty cycle is 50%.
NI Multisim says that the DC offset is +2.5V.

No matter the capacitor value I use, nothing happens, but when I try with a sine wave instead,
oh oh oh it works !

If you want the schematic just ask.

#### ebeowulf17

Joined Aug 12, 2014
3,306
Could someone explain me why I can't remove a DC offset from a square wave with a coupling capacitor ?

This square wave comes from the output of a 555 in astable mode, and the
peak to peak voltage is +5V from 0V to +5V, at a frequency of 1KHz, duty cycle is 50%.
NI Multisim says that the DC offset is +2.5V.

No matter the capacitor value I use, nothing happens, but when I try with a sine wave instead,
oh oh oh it works !

If you want the schematic just ask.

#### Danko

Joined Nov 22, 2017
1,444
Could someone explain me why I can't remove a DC offset from a square wave with a coupling capacitor ?
Use coupling capacitor 1uF.
After capacitor connect load - resistor 1k between capacitor and ground.
See voltage on resistor without offset.

#### MrChips

Joined Oct 2, 2009
27,144
Could someone explain me why I can't remove a DC offset from a square wave with a coupling capacitor ?

This square wave comes from the output of a 555 in astable mode, and the
peak to peak voltage is +5V from 0V to +5V, at a frequency of 1KHz, duty cycle is 50%.
NI Multisim says that the DC offset is +2.5V.

No matter the capacitor value I use, nothing happens, but when I try with a sine wave instead,
oh oh oh it works !

If you want the schematic just ask.
Either you are doing something wrong or you are misinterpreting the results.
What is connected at the output node of the capacitor?

#### ebp

Joined Feb 8, 2018
2,332
If you have only a "virtual instrument' connected to the output side of the capacitor, then the time constant of the capacitor (any value) and load (infinite resistance) is infinite, so it "can" pass DC. You must have a finite resistance on the output side.

The square wave is centred around half of the supply voltage, or thereabouts. That is, it swings from about 0 V to close to the positive supply (very close with a CMOS 555, not so close with the bipolar 555). It is very likely that the sine wave swings symmetrically around 0 V by default, unless you specify an offset voltage. You can verify by looking at both sides of the capacitor at the same time (two meters or scope channels, or however the sim package does these things).

#### dyn_o

Joined May 29, 2017
35

Now it works, yet I did the exact same thing, I think...

I put a potentiometer to vary the frequency from almost 20Hz to 20KHz. Under 100uF the signal gets deformed, ie the high and low level have a slight slope. But with a 100uF capacitor the DC offset is cancelled after a lot a time, maybe 20 secondes. Why?

#### bertus

Joined Apr 5, 2008
22,096
Hello,

Put a resistor on the signal output after the capacitor.
Try 1K for instance.

Bertus

#### ebeowulf17

Joined Aug 12, 2014
3,306
View attachment 163819
Now it works, yet I did the exact same thing, I think...

I put a potentiometer to vary the frequency from almost 20Hz to 20KHz. Under 100uF the signal gets deformed, ie the high and low level have a slight slope. But with a 100uF capacitor the DC offset is cancelled after a lot a time, maybe 20 secondes. Why?
What's connected to the "signal" output? Does it connect to something else, not shown in the schematic?

Also, 100uF is huge! If it takes that just to pass a signal cleanly, something strange is going on. Seems to me like it's behaving as if there's a load downstream of the "signal" output symbol. If not, what you're describing doesn't quite make sense to me.

#### ebp

Joined Feb 8, 2018
2,332
It may be that the virtual instrument actually has finite input impedance to more closely model a real oscilloscope which will normally be a 1M load with direct connection of 10M with an actual attenuator probe. Perhaps this is something that can be configured for the instrument.

The fact there is droop with smaller capacitors certainly suggests a real instrument is being emulated.

100 µF and 10M ohms give a 1000 second time constant, and it will take at least 3 time constants to get close to the final DC level (in each time constant the current will drop by about 63%).

If you can't find configurable properties for the instrument, you can test it.
Connect a 1M resistor in series with a 1 volt DC source and measure the voltage at the "free end" of the resistor. You can then directly calculate the instrument's input resistance.