# What is meant by "capacitors try to try to maintain voltage at a constant level"

I'm trying to self learn electronics and to that end have been studying capacitors and I came across the following

A capacitor’s ability to store energy as a function of voltage (potential difference between the two leads) results in a tendency to try to maintain voltage at a constant level. In other words, capacitors tend to resist changes in voltage drop. When voltage across a capacitor is increased or decreased, the capacitor ”resists” the change by drawing current from or supplying current to the source of the voltage change, in opposition to the change

I can't understand the wording here, so if anyone can answer the following questions I'll be really grateful.

1. Does this resisting to the voltage happen while charging or only after capacitor been fully charged?
2. What exactly happens if the voltage drops in the source
3. What exactly happens if the voltage increased in the source.

EDIT Let me see if i got this correct. Lets say a capacitor is connected to a 5v source in series where the capacitor and the voltage source are ideal

1. the capacitor starts charging up and the voltage across it increases
2. the current through the capacitor increases as the voltage across it increases
3. when voltage across the capacitor reaches 5v the current stop flowing through the capacitor
4. if the voltage of the source drops to 4V, then capacitor will discharge some current opposite the current flow from the source
5. this will reduce the net current flowing through the capacitor and thus reducing the voltage across it to 4V.
6. after the voltage across the capacitor reaches 4v current again will stop flowing through the capacitor
7. now if the voltage of the source increases to 7V the capacitor will start to charge again and current flowing through the circuit will increase.
8. when the voltage across the capacitor reached 7V then current will again stop flowing

is my understanding correct? if so does that mean that a ideal capacitor can charge it self upto infinity or is there a max limit

capacitors are kind of like rechargable batteries. if you increase the voltage feeding them they charge up some, they absorb some of the difference between their voltage and the voltage source, if the voltage source drops they give some back to the circuit, esp if the voltage source goes away all together.

it goes like C dv/dt using calculus the capacitance times the change in voltage over time. doesnt matter if that change in voltage is from 10 to 100 or 3 to 7 or 27 to 13 volts.

When the source has a step change, the capacitor does not instantly step, that is what C dv/dt tells you, there is some period of time for that capacitor and that step change for the capacitor to store up (or release) enough charge to match the source, if it can. if your step changes are far enough apart then you can forget about step changes before, but if you change it fast enough it may not have caught up before it has to change again a fast enough square wave on the source and the capacitor makes it look like a sawtooth or like sharks fins...

the "resistance" is this capacitance times the change in voltage over time. be it an increase or decrease.

Here's an example of how a capacitor tries to "maintain a constant voltage" (although that's not really the most important way to think of them):

Say you have two of the same capacitors (caps). Assume cap1 is initially charged to 10V and cap2 to 5V, and they are no longer connected to the circuit that charged them up. If you connect the two caps in parallel with each other, cap1 will "try to maintain" 10 volts in the circuit by attempting to bring the voltage of cap2 up to 10V, i.e. by dumping current into cap2.

(Conversely from cap2's perspective, it will try to keep the voltage at 5V by drawing current from cap1).

(The result in this exercise will be that the combined cap voltage levels off at about 7.5V since they have the same capacitance).

Edit: To answer some of your other questions, an ideal capacitor would charge as high as the voltage applied to it. Of course in real life caps have voltage ratings. Your understanding is correct, but in your bullet #4, I want to make it clear that the cap would be at 5V, so current would flow out of the cap and into the 4V source. The 4V source would sink that current until the cap was down to 4V.

A nuance when talking about cap current for DC circuits: people usually say current flows "into" or "out of" a cap, not current flowing "through" a cap as you said.

Edit2: also to your bullet #1 and 2: you imply the voltage across the cap gradually increases. For non-ideal caps there is a difference between the charge of the cap and the voltage across it. The voltage measured from the negative lead to the positive lead would be 5V the instant 5V is applied (due to internal resistance), but the cap would logarithmically ramp up in charge. So current into the cap would be high at first (inrush current) then gradually ramp down as the charge increased (since the delta-V is decreasing).

Question 1 is kind of a trick question. Resisting voltage change will occur whenever there's a difference between the charge voltage of the cap and the voltage applied to it. If there's a difference, the cap is either charging or discharging.

• thanks for the info.but if i may ask when u say "4v source would sink that current" what does it really mean. and why does the cap falls to 4V is it because algebraic sum of the current flowing in to the cap is reduced?. Apr 15, 2016 at 6:44
• and also when you say "The voltage measured from the negative lead to the positive lead would be 5V the instant 5V is applied (due to internal resistance)" is it correct to assume that the internal resistance is in parallel with the cap. And initially total voltage is dropped across the internal parallel resistor and nearly all of the current pass through this internal parallel resistor? and with charging less and less current pass through the internal resistor? Apr 15, 2016 at 7:50

The resistance of a capacitor to voltage changes happens all the time. The degree of 'resistance to change' is proportional to the difference between the voltage source and the capacitor voltage.

If the voltage in the source is less than the capacitor voltage, the capacitor will provide current to the source. If the voltage of the source is higher than that of the capacitor, the capacitor will sink current from the source.

• thanks for the explanation. So "when you say capacitor will provide current to the source" in which direction does the current flow? Apr 15, 2016 at 4:07
• From the capacitor to the source Apr 15, 2016 at 4:48
• @user119020 The current flows in a loop from the high voltage side of the capacitor, to the high voltage side of the source, to the low voltage side of the source, to the low voltage side of the capacitor, back to the high voltage side of the capacitor. Apr 15, 2016 at 6:50
• @immibis in that case what would happen in if the voltage source is a primary cell? Apr 15, 2016 at 7:46
• @user119020 Current can flow in both directions through a primary cell. It's just that when lots of current flows "backwards" bad things tend to happen, like the cell heating up a lot or producing toxic gasses. Any reasonably sized capacitor stores such a tiny amount of energy you won't notice anything (assuming it's a normal capacitor, not an ultracapacitor). Apr 15, 2016 at 10:16

Basic formula for a capacitor: -

$I = C\dfrac{dv}{dt}$

This tells you everything.

If the rate of change of voltage is rising at 1 volts per second (charging) and the capacitance is 1 farad, 1A will be forced into the capacitor. If the rate of change of voltage is -1V per second (discharging) the capacitor will force out 1 A.

Does this resisting to the voltage happen while charging or only after capacitor been fully charged?

Starting voltage is irrelevant. It happens under all circumstances.

the current through the capacitor increases as the voltage across it increases

No it doesn't - if rate of change of voltage is constant then current is constant.

is there a max limit

Yes - the breakdown voltage of the insulation between the plates of the capacitor.

Most of this is already contained in Andy aka's and dwelch's answers, but let my try to formulate it a bit sharper. An integral version of the basic formula for a capacitor is $$Q = C V,$$ where $Q$ is the charge. In other words, the capacitor stores charge, and the voltage is directly proportional to the charge stored (you can actually take this as a definition of a capacitor: an ideal capacitor is any device that obeys this formula).

Now the key is that charge is conserved. Therefore, the charge in the capacitor can only change if there is a flow of charges away (or through) the capacitor. A flow of charges is current, by definition. So then, you need a current to change the voltage over a capacitor, and the rate of change is proportional to the current. Writing that as an equation, we get the usual form of the equation for a capacitor: $$C \frac{\mathrm{d}v}{\mathrm{d}t} = I.$$

Therefore a more exact version of the claim "capacitors try to maintain voltage at a constant level" is that "a capacitor allows voltage to change only in proportion to the current through it". Since we never have infinite currents available in real circuits, this means that the voltage across a capacitor cannot change instantaneously, and it is in this sense that the capacitor "resists" changes in voltage.

As a matter of fact, this way of thinking is quite helpful at least for me personally to quickly analyze circuits with capacitors: one imagines the capacitor as holding a fixed voltage $V_C = Q_C/C$ at each instant of time, and then analyzes any currents passing through it, which gives the instantaneous rate-of-change of this voltage. This is of course just a way of using the basic formula, but I often find this way of thinking to be faster in understanding a circuit intuitively than thinking directly in terms of the formula.