What happens when the current changes with time? If the current is changing with time, the voltages are also changing with time. An electric circuit where a capacitor and a resistor are connected in series is called RC circuit (the circuit name itself suggests). While simply charging or discharging a capacitor, we encounter a situation of changing current with time.

There are many practical applications of charging and discharging a capacitor such as flash units, automobile turn signals, automobile wipers, stereo amplifiers etc, so learning how these circuits work is essential.

Charging a Capacitor in RC circuit

Our initial assumptions on charging a capacitor are the wires do not have resistance and the source of emf does not have internal resistance. Even if those assumptions are ideal and not applicable for real scenario we consider them here.

Figure 1 An RC circuit where the switch is open.

Initially there is no charge in the capacitor, that is the circuit is open as shown in Figure 1 above . As the switch is closed to point \(a\) the charges start to flow and current continuously decreases (see Figure 2 ). The potential difference across the resistance \(R\) continuously decreases and the potential difference across the capacitor continuously increases until it becomes maximum equal to the emf \(\mathcal{E}\) of the battery. You'll see later that the voltage across the capacitor will never be exactly equal to the emf of the battery but instead approaches it asymptotically.

Figure 2 Charging a capacitor in an RC circuit.

As the the charge starts to flow in the circuit, the charge accumulates in the capacitor plates resulting a potential difference which then continuously increases and approaches the emf \(\mathcal{E}\) and the potential difference across the resistance approaches zero. As soon as the circuit is closed at \(t = 0\), the initial current \(I_0\) is maximum which is \(I_0 = \mathcal{E}/R\).

Emf of the battery does not change. We know emf as the voltage between terminals of a battery (source of emf) when there is no current in an electric circuit. If it is the voltage when there is no current in an electric circuit, how it can change when there is current in the circuit?

There is no connection between capacitor plates (otherwise it won't be a capacitor) which represents an open circuit. The charge transfer takes place due to the electric field of the battery. Positive charge is accumulated on the left plate and equal amount of negative charge on the right plate until the capacitor is fully charged.

Let \(i\) be the current at an instant after time \(t=0\) and \(q\) be the charge accumulated in the capacitor at that instant. Note that the current at any particular instant is the same in the entire circuit. Here we are representing varying current, charge and voltage by lowercase letters \(i\), \(q\) and \(v\) respectively. Applying Kirchhoff's rules in the above circuit for charging a capacitor yields,

\[\mathcal{E} - iR - \frac{q}{C} = 0 \tag{1} \label{1}\]

In the above equation we have moved clockwise in the circuit. You are moving in the same direction of current across the resistance, so the voltage is negative (-iR). The positive terminal of the capacitor is the left plate connected to the positive terminal of the battery and another plate is the negative terminal. So if you move across the capacitor, you move from positive terminal to negative terminal, and the voltage across capacitor is negative (-q/C).

We can rewrite Equation \eqref{1} as,

\[i = \frac{\mathcal{E}}{R} - \frac{q}{RC} \tag{2}\label{2}\]

At \(t = 0\), \(q\) is zero and the current is maximum that is \(I_0 = \mathcal{E}/R\). When the charge is maximum in the capacitor, the current is zero and we can get from above equation \(Q_{\text{max}} = \mathcal{E}C\). Note the maximum charge does not depend on the resistance \(R\).

If \(dq\) is the infinitesimally small charge flowing in time \(dt\), the current \(i\) is \(i = dq / dt\), so we can rewrite Equation \eqref{2} as

\[\frac{dq}{dt} = \frac{\mathcal{E}}{R} - \frac{q}{RC} = -\frac{q-\mathcal{E}C}{RC}\]

Now multiplying the above equation by \(dt\) and dividing by \(q-\mathcal{E}C\) or by simply rearranging we get,

\[\frac{dq}{q-\mathcal{E}C} = -\frac{1}{RC} dt\]

We integrate the above equation and we know at \(t=0\), \(q=0\), so

\[\begin{align*} \int_0^q \frac{dq}{q-\mathcal{E}C} &= -\frac{1}{RC}\int_0^tdt \\ \text{or,}\quad \ln(\frac{q-\mathcal{E}C}{-\mathcal{E}C}) &= -\frac{t}{RC} \end{align*}\]

We can rewrite the above expression, that is exponentiating both sides, we get

\[\begin{align*} \frac{q-\mathcal{E}C} {-\mathcal{E}C} &= e^{-t/RC}\\ \text{or,} \quad q &= \mathcal{E}C(1-e^{-t/RC}) = Q_\text{max}(1-e^{-t/RC}) \tag{3} \label{3} \end{align*}\]

The current is \(i = dq/dt\), so differentiating Equation \eqref{3} with respect to time, you get

\[i = \frac{\mathcal{E}}{R}e^{-t/RC} = I_0 e^{-t/RC} \tag{4}\]

where \(I_0 = \mathcal{E}/R\) is the maximum current at \(t=0\) as already noted. The graphs below show the variation of current and charge with time while charging a capacitor in RC circuit. It is obvious that the current is maximum initially and decreases exponentially. The current approaches zero but it never becomes exactly zero. You can see in the graphs below that the current approaches zero asymptotically. The charge was zero initially but it increases exponentially but it will also never equal to the maximum value but approaches that value asymptotically.

The Time Constant

The product RC is called time constant denoted by \(\tau\) (tau). During time \(\tau = RC\), the current decreases to 1/e of the initial value \(I_0\). The application of time constant is we know how quickly a capacitor charges or discharges (see below). If the time constant is smaller( also means the resistance is smaller), the capacitor charges quickly and vice versa.

Figure 4 Charging a capacitor; charge-time curve.
Figure 5 Charging a capacitor; current-time curve.

At \(t = \tau\), that is after the time interval equal to time constant starting at \(t=0\), the current decreases to \(e^{-1}I_0\) and at \(t = 2\tau\), the current decreases to \(e^{-2}I_0\) and so on. Similarly at \(t = \tau\), the charge increases to \(1-e^{-1}\) of its maximum value, that is \(Q_{\text{max}}(1-1/e)\) or \(0.632Q_{\text{max}}\).

Discharging a Capacitor in RC circuit

To discharge a capacitor the switch is closed to point \(b\) now. The capacitor discharges through the external resistance \(R\).

Figure 3 Discharging a capacitor in an RC circuit.

If \(i\) is the current in the circuit and \(q\) is the charge on the capacitor of capacitance \(C\) at some instant after the switch is closed to point \(b\), we apply Kirchhoff's rules in the circuit and it gives

\[\frac{q}{C} + iR = 0 \tag{5} \label{5}\]

It's important to note the positive \(iR\). It is because the we moved in the opposite direction of assumed direction of current. To make it clear and easy, you can consider Equation \eqref{2} and put \(\mathcal{E} = 0\) (the battery is absent when the capacitor discharges). It is nothing complicated but we just wanted negative sign for the current when the capacitor discharges and that's it. So, from Equation \eqref{5}, we get

\[i = \frac{dq}{dt} = -\frac{q}{RC}\]

If \(Q_0\) is the initial charge on the capacitor at initial time when the switch is just closed, that is \(t = 0\) and to determine the current after some time it's obvious that we integrate the above equation from initial values to the final values.

\[\begin{align*} \int_{Q_0}^q \frac{dq}{q} &= - \frac{1}{RC} \int_0^t dt\\ \ln(\frac{q}{Q_0}) &= -\frac{t}{RC}\\ q &= Q_0e^{-t/RC} \tag{6} \label{6} \end{align*}\]

Differentiating above equation with respect to time we get the current at any instant, that is,

\[i = -\frac{Q_0}{RC}e^{-t/RC} = -I_0e^{-t/RC}\]

where \(I_0 = Q_0/RC\) is the initial current at the initial time when the switch is just closed. Again here while the capacitor is discharged, both the current and charge decrease exponentially until they become zero (become zero is on practical sense but they approach zero asymptotically). The time constant \(\tau = RC\) again tells us how quickly or slowly a capacitor discharges.