# Blocking Cap Response

#### Management

Joined Sep 18, 2007
306
I have a quick question. I know that a blocking cap. should block DC and pass AC. I even have a circuit to test that this is what should happen. But in SPICE I have no idea why I get this (pictured) behavior. Can someone please explain this to me?

I have a this square wave that goes from -2 to 0 volts as my input. The capacitor is pictured going into the input of a D/A, well a bunch of resistors to model it (not shown). Shouldn't the cap. raise the square wave up giving me a -1 to 1 volt square wave? Well I know it should, but my question is why does it not happen in SPICE?

Thank you.

#### Attachments

• 4.2 KB Views: 37
• 40.3 KB Views: 31
• 41 KB Views: 36

#### bloguetronica

Joined Apr 27, 2007
1,372
You cannot expect the capacitor to give +1V when supplied by a pulse signal varying from 0 to -2V. Here you are charging and discharging the capacitor. So, expect negative voltages around the circuit. However I don't know the reason of this response of SPICE.

#### SgtWookie

Joined Jul 17, 2007
22,210
Try tying the output side of the cap to ground via a resistor, call it R2, somewhere between 1k to 100k Ohms.

Right now, the only current paths for the output side of the cap is either leakage through the cap (which may or not be implemented) and the impedance of the simulation's meter/scope (which may or not be implemented).

The larger R2 is, the longer it will take C114's output to center around 0v, eventually giving about -1v to about +1v P-P.

If the value of R2 is quite low, you'll notice that the peak output voltage spikes will approach -2v to +2v; a differentiator circuit. The presence of R179 will limit these spikes.

#### bloguetronica

Joined Apr 27, 2007
1,372
If the value of R2 is quite low, you'll notice that the peak output voltage spikes will approach -2v to +2v; a differentiator circuit. The presence of R1 will limit these spikes.
The input signal only goes from 0V to -2V.

#### SgtWookie

Joined Jul 17, 2007
22,210
The input signal only goes from 0V to -2V.
Yes, I'm aware of that.

Please see the attached .JPG so you'll understand what I'm talking about.

The effects of the edges of the -2v to 0v and 0v to -2v transitions are passed through C114, but R2 discharges the DC levels to ground. As R2 is decreased in value, the decay occurs more rapidly due to the decrease in RC time. Note that my crude representation of a waveform output is only an approximation, but is sufficient for this case.

#### Attachments

• 26 KB Views: 25

#### Management

Joined Sep 18, 2007
306
Thank you everyone for your responses. If you notice in the resonse pic it did not settle with a center at 0V and 2V P-P. I would like to know why there is still DC when I have a that capcitor there? I will try what you mentioned SgtWookie but I have this circuit on a board and it does what I want. Just not doing it in SPICE. I did not show the left side of the circuit but it has a bunch of resistors that would provide a current path to ground.

Be back later after I try a few more things. Thank you again.

#### niftydog

Joined Jun 13, 2007
95
That looks to me like a capacitor current waveform, SgtWookie.

#### Distort10n

Joined Dec 25, 2006
429
Just think of a simple RC circuit. If the voltage waveform is taken across the resistor, then you would see the edge response, and then quickly decay..assuming a fast RC constant.

#### niftydog

Joined Jun 13, 2007
95
...assuming a fast RC constant.
There's the rub. We don't have to assume in this case, and it's not fast.

In my quick simulations the decay period is so short that the capacitor waveform hardly looks any different to the square wave feeding it.

#### Distort10n

Joined Dec 25, 2006
429
If you are talking about the OP's ciruit, then you are correct depending on the frequency of the square wave.
If you are talking about Sgt. Wookies post, then again it depends on the RC time constant and frequency. The point is that it is a voltage waveform.

#### niftydog

Joined Jun 13, 2007
95
I understand what Sgt. Wookie and yourself were referring to now. I did get the impression that Sgt. Wookies post was relevant to the OP's circuit though, which does specify frequency, pulse width, capacitance and resistance.

#### bloguetronica

Joined Apr 27, 2007
1,372
That looks to me like a capacitor current waveform, SgtWookie.
That occured to me too. The capacitor cannot give positive voltage peaks if the voltage varies between 0V and -2V. However the current inverts constantly, giving positive and negative peaks. But the graph indicates the scale in volts.

#### JoeJester

Joined Apr 26, 2005
4,259
Nifty,

The OP's circuit has all the information in the schematic diagram.

frequency = 2k
Pulse width = 250 uS
Capacitance 1u

The load isn't present. However, if he is using an oscilloscope with a x10 probe, I used a 1M ohm load in the simulator.

#### nomurphy

Joined Aug 8, 2005
567
Without a load you may get an error, or erroneous results.

Attached is a simulation circuit and the results.

With a 10K load (red), it looks pretty good. As the load becomes smaller, such as with 1K (green), or 1 ohm (blue), the output signal will become less square and more "capacitive" looking as the Fo of C & RL approach the input frequency Fin.

#### Attachments

• 27.7 KB Views: 15
• 32.1 KB Views: 18

#### niftydog

Joined Jun 13, 2007
95
That occured to me too. The capacitor cannot give positive voltage peaks if the voltage varies between 0V and -2V. However the current inverts constantly, giving positive and negative peaks. But the graph indicates the scale in volts.
Ultimately what was shown was the right type of waveform, but it was for a much faster RC time constant than what the circuit shown has. I got that type of result with a cap in the vicinity of 1nF from memory - the OP is using 1µF. This is assuming the D/A input is at least 10k, so I was wrong, maybe we DO have to assume something!

It is possible for the cap to "produce" positive peaks. You have to remember that components don't know that we have arbitrarily assigned some voltage level to "zero volts." They just do what they do without considering the concept of positive or negative.

Nifty,

The OP's circuit has all the information in the schematic diagram.
I know, I said "does" not "doesn't".

But all this theorising isn't helping the OP with his problem with SPICE. I can't replicate his results no matter how much I futz with the values.

#### JoeJester

Joined Apr 26, 2005
4,259
My error nifty.......