# Why does a capacitor charge and discharge?

I know that a capacitor would resist a change in the voltage across its two ends. Assume that the capacitor in the diagram is a fully discharged capacitor( 0v across its ends). Now if I connect this capacitor to a DC source, and if it has to maintain the same voltage as before, shouldn't the capacitor act like a short circuit throughout(so that the voltage =0v)? Why should it build up its voltage to be equal to the source/battery voltage?

Similarly, why should a capacitor discharge when disconnected from the power supply? If it has to maintain the same voltage (say V) across its ends, it shouldn't discharge right? Shouldn't it just hold the potential within it so as to avoid a voltage change across its terminals?

• The capacitor is just two pieces of conductors separated from each other via some insulator. So how can capacitor act as a short circuit in the long term when in the end we have an open circuit? And because of the fact that the mother nature needs some time to "create" the electric field (voltage) across the capacitor plates. Some time is needed to charge the capacitor to the voltage level we connect the capacitor. electronics.stackexchange.com/questions/287394/… and here ibiblio.org/kuphaldt/socratic/model/mod_cl.pdf (page 12) – G36 Aug 4 '19 at 15:29
• it has to maintain the same voltage as before is incorrect ... think of the capacitor as a bucket with a 1cm hole in the bottom ... if you set the bucket in a lake, without submerging the bucket fully, the water will flow into the bucket through the hole until the water in the bucket and the water outside of the bucket are at same level .... when you raise the bucket, the water flows out ... the charge in the capacitor behaves in a similar manner as the water in the bucket – jsotola Aug 4 '19 at 16:09
• allaboutcircuits.com/textbook/direct-current/chpt-13/… – G36 Aug 4 '19 at 17:01

I think there's a small misconception about the properties of a capacitor.

You probably heard, that capacitors tend to stabilise or keep a voltage within a circuit:

would resist a change in the voltage across its two ends

Think about the meaning of "resist" here. It does not mean, it can hold a fixed voltage against any external force. In fact a capacitor does in no way keep a voltage. The voltage of a capacitor reflects its current charge! And it reflects it linearily: $$\ U=q/C \$$

How does charge change? A current flows through the terminals of a capacitor, and the charge changes. Hence the voltage changes.

The conception of a capacitor keeping a voltage inside a circuit comes from that property. Voltage cannot change without modifying the charge. And for changing the charge a current has to flow leading to a voltage change. This is basically an energy transfer which takes time to happen in most realistic scenarios. This gives us the impression, a capacitor might resist a voltage change, but it is basically the speed of voltage change which is defined by the capacitor and its surrounding circuitry.

In your example (given all elements are ideal ones) the voltage change will take an infinitesimal time when the switch is put into position 1. This is, because there are no limiting resistors in the circuit. The current flowing through the capacitor will also be infinite for an infinitesimal time until the full voltage of the battery is reached.

On the other hand, if switched over to 2, it will take eternally for the voltage of the capacitor reach 0 again, because of the current decreasing to an infinitesimal value extending the discharge process infinite.

If the time constant $$\\tau\$$ of the capacitance times the resistance (the internal resistance of the voltage source in the first place, and the load resistance in the second case) was large in comparison to the time interval under consideration, then that is exactly what would happen. For example, with a 1F ideal capacitor and a 1 ohm resistance in the first microsecond after the capacitor is connected very little voltage change occurs.

As it turns out, the rate of voltage change across the capacitor is proportional to the current flowing through the terminals (and inversely proportional to the capacitance). To get the voltage across an ideal capacitor (even a tiny one) to change instantaneously would thus require infinite current. But to get it to change slowly only requires that there be some current flowing.

It tries to resist changes in voltage, and initially it does look like a short circuit when connected to battery. Battery will push current into capacitor so capacitor accumulates charge and voltage rises until it matches the battery voltage when no current flows any more. When disconnected from battery, as there is no current flowing in or out, capacitor keeps voltage. When connected to a load, current flows out from capacitor and as it discharges the voltage will drop.

You seem to be stuck on the idea of a capacitor resisting a change in potential and wanting to maintain it.

A capacitor stores electrical energy as an electric field across it's plates.

I like to think of capacitors as an underground parking place;

It can store cars/charges (in literature the symbol for a charge is Q)

So let's say you start of with a fully discharged capacitor, so it doesn't contain any charges.

When you connect a source to it across it's terminals, it starts storing charges and the voltage across the plates is ramping up, until it is equal to the source voltage.

When the capacitor is fully charged (the parking lot is full of charges), and you connect a load (let's say a resistor), the charges move from one side of the plate to the other through the resistor (a current flows through the resistor and there's a voltage drop across the resistor).

https://en.wikipedia.org/wiki/Capacitor#Energy_stored_in_a_capacitor for additional information and mathematical formulas.

• While this isn't "wrong" it is extremely incomplete compared to the existing answers, and in particular it simply dismisses the "resist change" idea without paying any attention to the degree to which that behavior actually does occur in the short term. – Chris Stratton Aug 4 '19 at 20:53
• I know it's incomplete, but I was taking the baby-steps approach to this since I felt like the detailed explanations weren't helping the one who asked the original question. But you're absolutely right. – Xilef Sep 25 '19 at 7:32

I know that a capacitor would resist a change in the voltage across its two ends.

You've got the right idea. I would say that it tends to maintain the voltage across it in the short term.

Now if I connect this capacitor to a DC source, and if it has to maintain the same voltage as before, shouldn't the capacitor act like a short circuit throughout (so that the voltage = 0 V)?

There's a little problem in the model. It assumes an ideal voltage source. A real one will have some internal resistance. If it didn't an infinite current would flow into the capacitor to bring it up to the voltage of the battery. The next problem is that the capacitor itself will have some internal resistance - the equivalent series resistance (ESR) - which is also missing from the model.

Why should it build up its voltage to be equal to the source/battery voltage?

Because charge will flow in due to the difference in potentials.

Similarly, why should a capacitor discharge when disconnected from the power supply?

Because charge will flow out due to the potential difference across the resistor.

If it has to maintain the same voltage (say V) across its ends, it shouldn't discharge right?

It will maintain the same voltage across its ends while disconnected. Once you connect it to something else charge can and will flow in and out if there is a voltage difference.

Shouldn't it just hold the potential within it so as to avoid a voltage change across its terminals?

Nope. If that were the case they would be useless as it would be impossible to ever charge them.

After the switch is thrown you have a simple C-R discharge. The time constant is given by $$\ \tau = RC \$$ and you should memorise the following for a charge or discharge curve:

• At t = 1τ the capacitor voltage will have reduced by 63%.
• At t = 3τ the capacitor voltage will have reduced by 95%.
• At t = 5τ the capacitor voltage will have reduced by 99%.

Figure 1. RC discharge from 9 V. Source:[http://electronicsclub.info].

Why would the capacitor try to equal the battery voltage? Wouldn't it like to maintain the same voltage across it as earlier? (i.e. 0 V.)

simulate this circuit – Schematic created using CircuitLab

Figure 2. The charging cycle. R1 is the battery source resistance. R2 is the capacitor ESR.

• Look at Figure 2. At the instant the switch is closed there is 9 V on the battery and 0 V on C1. That means that there is 9 V across R1 and R2 so current will flow. This is basic Ohm's Law $$\ V = IR \$$.
• Current is the rate of charge flow. If there is current then there is a movement of charge from the battery to the capacitor.
• The relationship between charge, capacitance and voltage is given by $$\ Q = CV \$$. For a given capacitor value the charge and voltage are proportional.

So why do people say that a capacitor tries to maintain the same voltage across its ends in a circuit?

See my answer to RC differentiator giving a higher output amplitude than input amplitude for an example of where this is a useful concept.

• "to bring it up to the voltage of the battery. " Why would the capacitor try to equal the battery voltage? Wouldn't it like to maintain the same voltage across it as earlier?( i.e. 0v) – noorav Aug 4 '19 at 14:43
• "It will maintain the same voltage across its ends".. so this statement is true only when a charged capacitor is not connected to anything right? But when connected to a circuit, the voltage across it changes as shown in the graph. So why do people say that a capacitor tries to maintain the same voltage across its ends in a circuit? – noorav Aug 4 '19 at 14:45
• See the updates. – Transistor Aug 4 '19 at 14:56
• So practically, there is some resistance in the voltage source and in the capacitor itself. Due to this there is a potential difference between the source and the capacitor causing current to flow to the capacitor. Now the capacitor inherently will try to maintain the voltage it has across itself in the short term. But due to the said resistances, the only way the capacitor will maintain the voltage across it is when it's voltage equals the battery voltage, a point at which no current flows and the capacitor voltage remains constant(fully charged). Am I right in my understanding? – noorav Aug 4 '19 at 15:07
• Also, in the discharging scenario, a capacitor will discharge due to the potential difference between it and the load/resistor, gradually reducing the voltage across its ends. In this case, how does the capacitor try and maintain the voltage across its ends? – noorav Aug 4 '19 at 15:09