# Calculating the Charge of a Capacitor

I'm trying to form an equation for the charge of a capacitor when it's charged through a resistor from a voltage source

The standard equation for a charge is:

$$Q = V \cdot C \cdot (1 - e^{-t / RC})$$

But this equation is valid only when V is a constant DC voltage.

How do you go about calculating the charge when V is some function of time, $V(t)$?

• That's not the equation for constant V.... – Trevor_G Mar 12 '17 at 2:14
• That equation assumes that the voltage applied to the capacitor remains constant, is what I mean. – tay10r Mar 12 '17 at 2:15
• If the voltage is constant it's simply C x V .. there is no time component. – Trevor_G Mar 12 '17 at 2:20
• That's the formula for charge on a capacitor loaded through a resistor in response to a step in voltage across the resistor capacitor combination. – Trevor_G Mar 12 '17 at 2:27
• I remember struggling with this stuff in university... I think I have had to calculate the charge on a cap about twice in 40 years... and never for a product. – Trevor_G Mar 12 '17 at 2:41

The general solution for all possible input voltage functions v(t):

q(t)= the convolution integral of C⋅(1−exp(-t/RC)) and your v(t). C and the series resistor are assumed to be constant.

The full understanding of the solution and how to derive it unfortunately needs differential and integral calculus worth about one year university math studies

If you write out the convolution integral, you easily see, that it's an infinite sum (exactly the limit) of a series of small incremental responses that are all individually calculated by using your formula for the DC input. The input voltage is considered to be the sum of small inividual increments which all can be considered to be independent constant voltages. This thinking is acceptable for linear circuits and this is one.

Note that each increment has its own starting time.

It's a fundamental equation governing capacitors.

$$q(t) = C \cdot v(t)$$

You just have to understand what exactly $q$ and $v$ represent. $v(t)$ here is the voltage across the plates of the capacitor. When there is a resistor involved, you have to solve the circuit for V. If you haven't got any calculus under your belt that is not trivial, as capacitors have complex (frequency-dependent) impedance.

• @vicatu I understand that the charge in the capacitor and the voltage drop across the capacitor (or in your words, across the plates) are related in the equation you wrote. But I don't have the voltage drop across the plates, all I know is the voltage applied to the capacitor, v(t), and the resistance. – tay10r Mar 12 '17 at 4:10