How do I calculate how fast a capacitor will discharge?

charge on a cap is a linear product of capacitance and voltage, Q=CV. If you plan to drop from 5V to 3V, the charge you remove is 5V*1F - 3V*1F = 2V*1F = 2 Coulombs of charge. One Amp is one Coulomb per second, so 2C can provide 0.01A for 2C / (0.01 C/sec) or 200 seconds. If you actually withdraw charge from the cap at a constant current, the voltage on the cap will decrease from 5V to 3V linearly with time, given by Vcap(t) = 5 - 2*(t/200).

Of course, this assumes you have a load that draws a constant 10mA even while the voltage supplied to it changes. Common simple loads tend to have relatively constant impedance, which means that the current they draw will decrease as the cap voltage decreases, leading to the usual non-linear, decaying exponential voltage on the cap. That equation has the form of V(t) = V0 * exp(-t/RC).


The general equation for the voltage across the capacitor is

\$ V = V_0+\dfrac{1}{C} \int {i dt}\$

In the special case where \$I\$ is constant this translates to

\$ V = V_0 + \dfrac{I \times t}{C} \$

We want to find \$t\$, so rearranging gives us

\$ t = \dfrac{C (V - V_0)}{I} = \dfrac{1F (3V - 5V)}{-10mA} = 200s\$ = 3 minutes and 20 seconds.

The more general solution is where \$I\$ is a function of time. I'll assume that the 10mA is the initial current, at \$V_0\$ = 5V. Then the discharge resistor \$R = \dfrac{5V}{10mA} = 500\Omega\$. The time constant \$RC\$ is then 500s. Then

\$ V = V_0 \times e^{\left(\dfrac{-t}{RC}\right)} \$

or

\$ t = -RC \times ln{\left(\dfrac{V}{V_0}\right)} = -500s \times ln{\left(\dfrac{3V}{5V}\right)} = 255s \$ = 4 minutes and 15 seconds.

This makes sense. Following an exponential discharge will get us at 3V later than with the linear discharge.