Gogo:Tronics - Parts and Supplies For Electronic Enthusiasts
Your Cart

Gogo:Tronics

Simple Energy Storage Capacitor Formulae

You have a capacitor, or need to choose one, you want to calculate some stuff about it in terms of using it for energy storage/delivery (as opposed to filtering), you would like to know just a little bit more than an online calculator, but not too much more because maths makes your brain hurt. This page is for you.

ln() (Natural Log) appears frequently in the equations, the natural log is the inverse of taking e to the power of something (that is, ln(ex) = x ) , in spreadsheets it's the function "ln()", in code (eg C/C++ [Arduino!]) it's usually function "log()".
The formulae all assume an "ideal" capacitor, no account is made for ESR or other non-ideal characteristics. It's good enough to get you in the ball-park.
You can change the fields in each section to do your own calculation.

Remember your supply voltage to charge a capacitor must not exceed your capacitors maximum voltage rating (speaking in general terms).

Measuring Capacitance

I have an unknown capacitor, a known resistor, and a stopwatch, calculate the capacitance.

C = (0 - Seconds) / R / ln(1-(VCharged/VSupply))

Where Seconds is the number of seconds charged for; R is the resistor in Ohms; VCharged is the Capacitor voltage at Seconds; VSupply is the supply voltage.

You don't need to charge the capacitor fully to measure it as long as you start from discharged, time the charging period, and record the voltage you achieved in that period you can perform the calculation - but the longer (slower) you charge over the more accurate your result will be because your errors and and so forth will be less of a factor. When the smallest digit on your meter measuring the capacitor voltage is changing once per second, that would be a reasonable time to stop. Bear in mind also that capacitors have a notoriously large tolerance (+/- 30% is quite normal for some types of capacitors).

You can use the fields in the example to perform your own calculation, change the numbers to see how things behave.

Example

The capacitor starts discharged, after 60 seconds, the capacitor measures 4.5v.

(0 - 60) / 5 / ln(1-(4.5/5)) = 5.2F

How many Amp-Hours (Ah) are in this capacitor?

Ah = ( C * ( VCharged - VDepleted ) ) / 3600

Where VCharged is the Charged voltage of the capacitor, VDepleted is the emptied voltage, and C is the capacitance.

You can see here that if you are using a capacitor to replace a battery, you really need to be running it into a DC/DC converter with a suitable input voltage range so you can discharge your capacitor down to very low volts, taking our example above, if instead of a 3.3v cut off voltage, we had a 0.5v cut off voltage, we would get 10 mAh instead of the paltry 2.5 mAh.

You can use the fields in the example to perform your own calculation, change the numbers to see how things behave.

Example

A 10F capacitor which was charged to 4.2v is discharged to 3.3v, how many mAh are there?

( 10 * ( 4.2 - 3.3 ) ) / 3600 = 0.0025 Ah = 2.5 mAh

How many Watt-Hours (Wh) are in this capacitor?

Wh = ( VCharged2 - VDepleted2 ) / (7200 / C)

You can see here that if you are using a capacitor to replace a battery, you really need to be running it into a boost converter with a suitable input voltage range so you can discharge your capacitor down to very low volts, taking our example above, if instead of a 3.3v cut off voltage, we had a 0.5v cut off voltage, we would get 0.024Wh instead of the paltry 0.009 Wh

You can use the fields in the example to perform your own calculation, change the numbers to see how things behave.

Example

A 10F capacitor which was charged to 4.2v is discharged to 3.3v, how many Wh are there?

((4.22) – (3.32)) / (7200 / 10) = 0.009375 Wh

Calculating Charge/Discharge Times

How long will it take to charge this capacitor through a constant resistance?

Seconds = 0 - (R * C * ln(1 - (VCharged/VSupply)))

Where VCharged is the voltage measured across the capacitor, and VSupply is the voltage of the supply, C is the capacitance in Farads, and R is the resistor in Ohms.

VCharged must be lower than VSupply - remember as a capacitor gets more charged it's resistance to charging increases, it can never get to the same as the supply voltage, even if it's some unmeasurable amount less, it's always less.

You can use the fields in the example to perform your own calculation, change the numbers to see how things behave.

Example

I have a 10F capacitor in series with a 5 Ohm Resistor across a 5v supply how long will it take for the capacitor to charge up to 4.999v?

0 - ( 5 * 10 * ln(1-(4.999/5)) = 426 Seconds.

How long will it take to discharge this capacitor through a constant resistance?

Seconds = 0 - (R * C * ln(VDepleted/VCharged))

Where VCharged is the initial voltage of the capacitor, VDepleted is the end voltage you will determine to be empty, R is the resistance, C is the capacitance.

VDepleted must be greater than zero - remember that your real world circuit probably can't do much with anything even remotely close to zero.

You can use the fields in the example to perform your own calculation, change the numbers to see how things behave.

Example

A 10F capacitor is discharged from 5v to 0.8v through a 5 Ohm resistor, how long does it take?

0 - ( 5 * 10 * ln( 0.8/5) ) = 91.6 Seconds

How long will it take to charge/discharge this capacitor with a constant current?

Seconds = ( C * (VCharged - VDepleted) ) / Amps

Where C is in Farads, VCharged is the starting voltage on the capacitor, VDepleted is the termination voltage of the discharge, and Amps is the current in Amps. For a constant current the formula is the same regardless if you are discharging or charging it is the voltage difference that matters, how much voltage has to climb or fall.

You can use the fields in the example to perform your own calculation, change the numbers to see how things behave.

Example

A 10F capacitor is discharged from 5v to 4v at a constant current of 500mA, how long does it take?

(10 * (5 - 4)) / 0.5 = 20 Seconds (calculator)

How long will it take to charge/discharge this capacitor with a constant power (W)?

Seconds = 0.5 * C * ( (VCharged2 - VDepleted2) / Watts )

Where C is in Farads, VS is the starting voltage on the capacitor, VC is the termination voltage of the discharge, and P is the discharge power in Watts

You can use the fields in the example to perform your own calculation, change the numbers to see how things behave.

Example

A 10F capacitor is discharged from 5v to 4v at a constant power of 2W, how long does it take?

0.5 * 10 * ( (52 - 42) / 2 ) = 22.5 Seconds

Calculating Capacitance Required To Achieve Your Goal

I have a battery/cell of some Amp-Hours, how much capacitance do I need to replace it directly?

C = (Ah * 3600) / (VCharged - VDepleted)

Naively we can assume that VCharged is the same as your battery's nominal voltage, and VDepleted is zero, or more practically VCharged is the top-of-charge for your battery and VDepleted is the minimum voltage your circuit can utilise.

You can use the fields in the example to perform your own calculation, change the numbers to see how things behave.

Example

A 1250 mAh Alkaline Cell with a full voltage of 1.5v and an empty voltage of 0.8v is to be replaced by a capacitor, how large does it need to be?

(1.25 * 3600) / (1.5 - 0.8) = 6428 F

Clearly this isn't practical, so see the next section...

If I have a battery/cell of some Amp-Hours, how much capacitance do I need to replace it if I use a DC-DC converter?

C = 7200 / ((VCharged2 - VDepleted2) / ( (Ah * VBattery) / 0.75 ))

Where Ah is the Ah of the battery, VBattery is the battery nominal voltage, 0.75 is the (worst case) DC/DC converter efficiency, VCharged is the charged voltage of the capacitor, VDepleted is the lowest voltage of the capacitor your DC/DC converter can handle.

You can use the fields in the example to perform your own calculation, change the numbers to see how things behave.

Example

A 1250 mAh Alkaline Cell with a nominal voltage of 1.5v is to be replaced by a capacitor (bank) which will be charged to 10.8v and driven by a buck converter which accepts input down to 1.6v.

7200/((10.82-1.62)/((1.25*1.5)/0.75)) = 157F

I want to draw x Amps for t Seconds, how much capacitance do I need?

C = (Amps * Seconds) / (VCharged - VDepleted)

Where C is the capacitance required, Amps is the current required, VCharged is the initial voltage you charged the capacitor to, and VDepleted is the minimum voltage you will entertain. Remember, as soon as you draw any current from a capacitor, it's voltage drops, that's how it works, so you can't just say " I want 1 Amp at X Volts ", you have to say I'll draw an amp and can do so between this and that voltage.

You can use the fields in the example to perform your own calculation, change the numbers to see how things behave.

Example

You want to draw 500 mA from a Capacitor charged to 12v for a period of 5 seconds and the capacitor will measure 9v afterwards, how large must the capacitor be?

(0.5 * 5) / (12 - 9) = 0.83F

I want to draw x Watts for t Seconds, how much capacitance do I need?

C = (Seconds * 2) / ( (VCharged2 - VDepleted2) / Watts )

Where C is the capacitance, Watts is the power in watts, VCharged is the initial voltage you charged the capacitor to, and VDepleted is the minimum voltage you will entertain. Remember, as soon as you draw any current from a capacitor, it's voltage drops, that's how it works, so you can't just say " I want 1 Watt at X Volts ", you have to say I'll draw a Watt and can do so between this and that voltage.

You can use the fields in the example to perform your own calculation, change the numbers to see how things behave.

Example

You want to supply 10W for 5 Seconds, from a capacitor initially charged to 12v and measuring 9v afterwards, how large must the capacitor be?

(5 * 2) / ( (122 - 92) / 10 ) = 1.6F

Derivation and References

How did you come up with these formula?

There is nothing particularly special in the formula presented, one good reference to make things simple is this document from ELNA, manufacturers of supercapacitors, this covers the basic equations for constant current, power and resistance discharge.

Electronics-Tutorials.ws provided the constant resistance discharge, and constant resistance charge is also given there by way of Vc = Vs(1-e-t/RC) which can be manipulated to solve for t (see video below).

This video from Paul Wesley Lewis helped kickstart my math-deprived brain into being able to manage the manipulations.

The following online calculators were useful in confirming my work Must Calculate, Circuits.dk, bitluni.net (CAUTION the Wh calculation on bitluni site is not correct if you have a min voltage >0)

From those equations and resources the following are derived.

Derivation for Amp-Hours

Start with the given formula for constant current discharge, set t = 3600 seconds, and solve for I being whatever Amps are required to deplete capacitor over that time and therefore the Amp-Hours

Seconds = ( C * (VCharged - VDepleted) ) / I

3600 = ( C * (VCharged - VDepleted) ) / I

I * 3600 = ( C * (VCharged - VDepleted) ) 

I  = ( C * (VCharged - VDepleted) )  / 3600

(I  = Ah) 

Derivation for Watt-Hours 

This derives from the formula for constant power discharging where t = 3600 Seconds solved for P being whatever Watts are required to deplete the capacitor over that time and therefore the Watt-Hours. 

Seconds = 0.5 * C * ( (VCharged2 - VDepleted2) / P )

3600 = ( (VCharged2 - VDepleted2) / P ) * C * 0.5

3600/0.5 = ( (VCharged2 - VDepleted2) / P ) * C

7200 = ( (VCharged2 - VDepleted2) / P ) * C

7200 / C = (VCharged2 - VDepleted2) / P

P*(7200 / C)= (VCharged2 - VDepleted2)

P = (VCharged2 - VDepleted2) / (7200/C)

(P = Wh) 

Derivation for Amp-Hours Battery Equivalence 

This is just solving the Amp-Hours equation for Capacitance

Ah  = ( C * (VCharged - VDepleted) )  / 3600

Ah* 3600 = C *  (VCharged - VDepleted)

(Ah * 3600) / (VCharged - VDepleted) = C

Derivation for Amp-Hours Battery Equivalence With DC-DC Converter

We use the Watt-Hours equation derived above, substituting Watt-Hours with the given Ah and Battery Equivalence Voltage adjusted by an efficiency of 75% for the boost converter.

Wh = (VCharged2 - VDepleted2) / (7200/C)

( (Ah * VBattery) / 0.75 ) = (VCharged2 - VDepleted2) / (7200/C)

7200/C  = (VCharged2 - VDepleted2) / ( Ah * VBattery )

7200  = C *  ((VCharged2 - VDepleted2) / ( Ah * VBattery ))

7200 /  ((VCharged2 - VDepleted2) / ( Ah * VBattery )) = C

Derivation for drawing X amps for T Seconds

A simple solving of the constant current equation given, solving for C 

Seconds = ( C * (VCharged - VDepleted) ) / I

Seconds * I =  C * (VCharged - VDepleted) 

(Seconds * I)  / (VCharged - VDepleted)  = C

Derivation for drawing X Watts for T Seconds 

A simple solving of the constant power equation given, solving for C

Seconds = 0.5 * C * ( (VCharged2 - VDepleted2) / P )

Seconds = C * ( (VCharged2 - VDepleted2) / P ) * 0.5

Seconds * 2 = C * ( (VCharged2 - VDepleted2) / P )

(Seconds * 2) / ( (VCharged2 - VDepleted2) / P ) = C