# Capacitor Discharge via Power Supply

#### Like To Learn

Joined Jul 11, 2015
9
In the theoretical circuit configuration shown in the attachment, I have been looking at the directions of the capacitor charge and discharge currents.

The circuit undergoes an instant change of input voltage from 0 volts to +1volt, achieved for illustration purposes by a perfect changeover switch. The voltage sources are assumed to be perfect with zero internal impedance.

When the input goes to +1volt the capacitor discharge current appears to flow in the reverse direction through the positive power supply which seems counter intuitive and I will be grateful for a more experienced opinion to confirm if my understanding is correct.

I understand about the CR time constant and exponential aspects of the charge/discharge of the capacitor, but at the instant the input transits from 0 to 1volt, its the direction of the capacitor discharge current into the positive terminal of the power supply that somehow seems counter intuitive. So I'm not sure my understanding is correct.

Diagram A

Assume the input has been at 0 volts for long enough for the capacitor to be charged to the supply voltage of 10 volts. The current to charge the capacitor has flown out from the positive terminal of the supply. In this fully charged state there is now 10 volts at each end of the resistor so there is no current flowing through it, and hence no further current flowing out from the supply.

Diagram B

Now the switch is thrown and the input goes to +1volt. At that instant, this input voltage is in series with the 10 volts across the capacitor and the voltage at point P thus goes up to +11volts. There is now 1 volt across the resistor so a current equal to 1/20 amps must be flowing in the direction towards, i.e. through the supply.

Diagram C

This current will decrease exponentially to zero as the capacitor discharges to 9 volts i.e. to the state where point P is again at +10volts.

So, is this analysis correct?. Does the discharge current flow into the positive terminal of the power supply?

Thanks for any comment you can offer.

#### Attachments

• 181.8 KB Views: 4
• 54.5 KB Views: 14
Last edited by a moderator:

#### Jony130

Joined Feb 17, 2009
5,253
So, is this analysis correct?. Does the discharge current flow into the positive terminal of the power supply?
Your analysis is correct. But most real-world power supplies don't like work in this kind of situation when the load tries to "charge it" ("source" current to the load is OK but they don't "sink" current).

#### Like To Learn

Joined Jul 11, 2015
9
Your analysis is correct. But most real-world power supplies don't like work in this kind of situation when the load tries to "charge it" ("source" current to the load is OK but they don't "sink" current).
Thanks Jony130 for your reply. I understand your comment about real world power supplies and the "charge it" comment. So for the power supply to sink the discharge current it would need to be for example a rechargeable battery (but still with perfect zero internal resistance), then the capacitor discharge current would definitely flow into it ?

#### Jony130

Joined Feb 17, 2009
5,253
So for the power supply to sink the discharge current it would need to be for example a rechargeable battery (but still with perfect zero internal resistance), then the capacitor discharge current would definitely flow into it ?
Yes, but the internal resistance does not need to be 0Ω. The internal resistance will simply "add" to 20 Ohm's resistance thus, increases the discharge time.
Also if the PSU output capacitor will be much large than the capacitor used in the circuit the PSU will manage to "sink" this small current.

Last edited:

#### WBahn

Joined Mar 31, 2012
26,398
In the theoretical circuit configuration shown in the attachment, I have been looking at the directions of the capacitor charge and discharge currents.

The circuit undergoes an instant change of input voltage from 0 volts to +1volt, achieved for illustration purposes by a perfect changeover switch. The voltage sources are assumed to be perfect with zero internal impedance.

<SNIP>

So, is this analysis correct?. Does the discharge current flow into the positive terminal of the power supply?

Thanks for any comment you can offer.
Your reasoning is correct. While it might seem counter-intuitive that current is flowing into the positive terminal of the 10 V supply, that is only because you are thinking of it as being a device that is only capable of delivering power. But an ideal voltage source will do whatever is necessary, either deliver or absorb power, in order to maintain it's terminal voltage at the set value.

This very action is the basis for voltage multiplier circuits in which diodes are inserted to prevent this kind of reverse flow and thus pump up the voltage on a particular node to a higher (or even lower to a negative) voltage on an output node.

Note that if your 10 V source was something like a non-rechargeable battery, then you might have some issues as these power sources are NOT designed to absorb much energy. It WILL absorb it, but bad things can happen such as heating, venting potentially dangerous gasses, or exploding depending on how much energy it has to absorb and the power at which it has to do so.

#### MrAl

Joined Jun 17, 2014
8,562
Hello there,

Some power supplies do both source and sink current. That is when they have to deal with a non passive load and still need to regulate the output. They may have to deal with a storage type load which may also require the power supply to sink current for some short times.
In fact, some power supplies sink current simply because the design happened to be one that coincidentally can also sink current even though the main design points dont really care about that.
An example is a power supply with a transistor bridge. If there is any back power flow it can go through the parallel diodes that act as a full wave rectifier. The energy ends up changing the input capacitors to a somewhat higher voltage. In some microcontroller circuits this can be a problem if the load powers an i/o pin then the internal diode could conduct back into the power supply. If there isnt enough passive load on the power supply the voltage could rise and blow out the chip.

#### Like To Learn

Joined Jul 11, 2015
9
Thank you Jony130, WBahn and Mr Al for your replies.

Jony130, I understand your point about the supply internal resistance, which if not zero, would add to the 20 ohms and increase the charge and discharge times of the capacitor.

But your point that the output capacitor of the power supply unit would sink the discharge current has got me scratching my head.

So I've redrawn the circuit (which I should emphasize is completely theoretical only to test my understanding) to include that output capacitor.

Diagram A now shows the start status when both capacitors C1 and C2 are charged to 10 volts and no current is flowing.

Diagram B shows the instant the input goes to +1volt and at that instant there is 1 volt across the resistor so 1/20 amps flows towards the power supply but into the output capacitor C2. I have assumed that the design of the power supply will not permit current flow into it.

Diagram C. Because the discharge current from C1 is flowing into C2, the voltage across C2 will increase (it is being further charged) and the current will reduce to zero when the voltage is the same at each end of the resistor. That voltage will be a bit (x volts) in excess of 10 volts. That is, by however much the 10 volt start voltage on C2 is increased and I assume the value of (x) will depend on how much C2 is greater than C1.

Have I understood this correctly?

WBahn, is this something like the voltage pump up you have described.?

Thanks again

#### Attachments

• 227.3 KB Views: 5

#### Like To Learn

Joined Jul 11, 2015
9
Yes, but the internal resistance does not need to be 0Ω. The internal resistance will simply "add" to 20 Ohm's resistance thus, increases the discharge time.
Also if the PSU output capacitor will be much large than the capacitor used in the circuit the PSU will manage to "sink" this small current.
Thanks, Please see my earlier post today

Your reasoning is correct. While it might seem counter-intuitive that current is flowing into the positive terminal of the 10 V supply, that is only because you are thinking of it as being a device that is only capable of delivering power. But an ideal voltage source will do whatever is necessary, either deliver or absorb power, in order to maintain it's terminal voltage at the set value.

This very action is the basis for voltage multiplier circuits in which diodes are inserted to prevent this kind of reverse flow and thus pump up the voltage on a particular node to a higher (or even lower to a negative) voltage on an output node.

Note that if your 10 V source was something like a non-rechargeable battery, then you might have some issues as these power sources are NOT designed to absorb much energy. It WILL absorb it, but bad things can happen such as heating, venting potentially dangerous gasses, or exploding depending on how much energy it has to absorb and the power at which it has to do so.
Thanks, please see my earlier post today

Hello there,

Some power supplies do both source and sink current. That is when they have to deal with a non passive load and still need to regulate the output. They may have to deal with a storage type load which may also require the power supply to sink current for some short times.
In fact, some power supplies sink current simply because the design happened to be one that coincidentally can also sink current even though the main design points dont really care about that.
An example is a power supply with a transistor bridge. If there is any back power flow it can go through the parallel diodes that act as a full wave rectifier. The energy ends up changing the input capacitors to a somewhat higher voltage. In some microcontroller circuits this can be a problem if the load powers an i/o pin then the internal diode could conduct back into the power supply. If there isnt enough passive load on the power supply the voltage could rise and blow out the chip.
Thanks, please see my earlier post today

#### MrAl

Joined Jun 17, 2014
8,562
Thanks, Please see my earlier post today

Thanks, please see my earlier post today

Thanks, please see my earlier post today
So you are wondering what happens when you flip the switch maybe several times?

It depends highly on the values of C1 and C2.
if C1 is large it will cause the voltage across C2 to rise more than if C1 was small.
If C1 is small it will only cause the voltage to rise on C2 slightly as long as C2 is large.

In order to get a handle on this, we can specify that the output cap C2 is 'a' times larger than C1 the series cap, and also RL the load resistor is 'a' times larger than Rs the series resistor. We can then say that the output voltage deviation is related to:
vx(t)=Vin*(1-e^(-t/(a*Rs*C1)))/(a+1)

and here we can see that the factor 'a' is in the denominator of the exponential factor and 'a+1' is in the very denominator. This means that the larger this factor is the less the voltage deviation is and the slower the voltage climb is over time when a is greater than 1.

This gives us some idea what the effect of the two caps have on each other with typical values.

If on the other hand we make the factor 'a' less than 1 (much less typical but still possible) then we see the response relative output change more.

For the initial voltage on C2 the output cap equal to zero and the factor a=10 we get:
dvC2=Vin*(1-e^(-t/(10*Rs*C1)))/(11)

and for the same initial conditions and a=1/10 we get:
dvC2=Vin*(10/11-(10*%e^(-(10*t)/(Rs*C1)))/11)

and so in the first case we have an amplitude factor of 1/11 and in the second case 10/11 so in the second case the change was much larger.
The first case is more typical though except with a charge pump for example.

Lastly, if we had RL=10*Rs and C2=C1 then we end up with:
vdC2=Vin*(1/2-%e^(-(2*t)/(11*Rs*C1))/2)

so we see more change than case 1 but less than case 2.
This would probably be more typical with a charge pump.

What you should do is analyze this circuit in the time domain and see if you can get a feel for what is happening. If you can use a simulator you can see what is happening by doing a few experiments with the resistors and capacitors.
What i have not done in the above is include the effects of an initial voltage across the capacitor. You should include that also to be complete.

Last edited: