Capacitors and DC offset

Started by WaveshapeIllusions, January 04, 2013, 05:43:13 PM

Previous topic - Next topic

WaveshapeIllusions

Capacitors block DC and pass AC, no? So if there is an AC signal with DC offset (for example the 4V5 center point in single supply designs) the cap will pass the AC wave centered around 0V.

To what extent does this correct the offset though? Say you have an asymmetric wave with a net DC component; the area the wave takes up above 0V is greater than what it takes below 0V. Will a series capacitor shift the wave so that there is no DC offset?

For example, in a full-wave rectified octave up, the negative portion of the wave is flipped up above the midpoint and there is a net DC component in the wave, right? But the series cap corrects this so that there is an equal amount of the wave on each side of the 0V line?

Another example would be a variable-width pulse wave, let's say 33% duty cycle. This would have DC offset, right? The signal spends 2/3 of it's time negative, so it follows that it would have net DC. A series cap to block the DC would shift the wave around the zero point, wouldn't it? So the thinner positive pulses would be higher amplitude than the negative, but the total area would be equal, so no DC.

Am I on the right track here or very confused?

Just curious about this function and how DC offset is corrected. Thanks for any explanations.

R.G.

The capacitor will cause equal volt-seconds to appear above and below zero after it.

If you have a 9V peak to peak square wave signal with 50% duty, it will come out of a cap DC blocker with +4.5, -4.5V peaks.

If you have a 9V peak to peak rectangular signal with 33% duty, it will com out of the cap with +6V/-3V peaks.

Strictly speaking the integral of volts*time after a capacitor has to be zero.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

merlinb

Quote from: WaveshapeIllusions on January 04, 2013, 05:43:13 PM
Am I on the right track here or very confused?

You are quite correct! I always recant my analog lecturer when he used to say
"The mean current in a capacitor must be zero!"
(Except for transient conditions).

So the capacitor will remove the DC such that the mean current (and therefore the mean voltage measured across a resistor after the cap) is zero. So yes, the area of the tall thin positive bit of the waveform will be equal to the wide negative bit, so the two cancel out to give zero mean.

WaveshapeIllusions


ashcat_lt

Worse yet, it seems that the "0V biased" end of a blocking cap will float to a point where it is at that average voltage.  This means that assymetrical clipping to ground can sometimes be not as assymetrical as you might expect.  

Freaks me out and pisses me off and makes me wonder how or if the sound of my Rat clone would change if I removed the cap after the opamp and had the diodes to Vref rather than ground.  I tried a pulldown resistor parallel to the diodes, but that don't help none.

R.G.

Quote from: ashcat_lt on January 04, 2013, 07:28:44 PM
Worse yet, it seems that the "0V biased" end of a blocking cap will float to a point where it is at that average voltage.  This means that assymetrical clipping to ground can sometimes be not as assymetrical as you might expect. 

Freaks me out and pisses me off and makes me wonder how or if the sound of my Rat clone would change if I removed the cap after the opamp and had the diodes to Vref rather than ground.  I tried a pulldown resistor parallel to the diodes, but that don't help none.
It has no effect on the sound at all, to the extent that the cap is not leaky or nonlinear. Your ears cannot respond  down to "DC" pressure levels in the sense of really hearing them as sound.

Both ends of a cap will float to the average DC level on that side. The AC comes through.

If your asymmetrical clipping before/after a cap rectifies signal and makes a changing DC level on one or the other side of the cap, the cap floats to that level. This trick was used in the early days of radio and TV (especially) as a "DC restorer". The circuit used a diode to clamp one end of an AC signal to ground and force the signal to have an average DC level after the cap.

But even this does not affect the sound coming through, at least if the diode drops and turn-on/off imperfections can be ignored.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

ashcat_lt

#6
Hate to hijack here, but...

I was wondering whether that specific cap (C7 in this scheme) was rolling off any audible bass.  Pretty confident its plenty big to not be an issue.

That leaves the question of whether the cap on the other side of the clipping (C9 above) will float around and mess things up again.  Should I just DC couple the thing all the way to the output buffer?


Edit - looking again maybe DC coupling won't work either, since the input to the transistor is referenced to ground?

R.G.

It's very unlikely that you're losing bass there, but you could sub in a 47uF and see if the sound changes.

It's more likely that you're losing subjective bass (if you are) in C1, C5, and/or C6.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

ashcat_lt

Oh C5 and C6 reduce gain on the lower freqs significantly. 

Should/can I remove C9 also?

WaveshapeIllusions

I'm going to bring this up with another cap question that I don't think warrants another thread.

Does the charge on a cap affect its reactance? I think that's the proper term. I'm looking at a vcf and the filter section is two RC lowpasses in series, with diodes between the caps and ground. The CV is injected at the junction of the caps and diodes. To me, it looks like the CV affects the charge across the cap, which I think changes the time constant which would shift the cutoff frequency?

R.G.

It changes the forward resistance of the diodes, not the impedance of the caps.

While imperfect real-world caps probably do change capacitance with their state of charge, it's way down in the mud.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.