RC formula: seconds needed to charge to a certain Voltage

Thread Starter

markmain

Joined Dec 28, 2008
29
For an RC circuit, I wanted a simple formula to calculate how many seconds it will take to charge a capacitor starting from an initial Low Voltage mark (L) to a target High Voltage mark (H); and then to do the reverse by discharging from H to L.

I was not able to find something that laid this out easily and so I came up with this:

**Note: "LN" in the formula represents the Excel Function "LN", which returns the Natural Logarithm of a number; it's the inverse of the EXP function that is used for calculating e raised to an exponent--which is used in the Universal Time Constant Formula that we often see

V=Source Voltage
L=Low Voltage Level (initial value on charge and target value on discharge)
H=High Voltage Level (target value on charge and initial value on discharge)
R=Resistor Ohms
C=Total Capacitor Farads if Fully Charged
S=Seconds To Charge from Zero to Reach the Target Voltage (the Charge Time)
D=Seconds to Discharge from Target Voltage to Zero (the Discharge Time)


S=R*C*LN(1/(1-((H-L)/(L-V))))
D=R*C*LN(1/((H-L)/(L-V)))

If the Low Voltage Level (L) is going to be Zero, then the formula can be simplified to:

S=R*C*LN(1/(1-(H/V)))
D=R*C*LN(1/(H/V))


Using the source voltage (V), charging from Zero volts for (S) seconds, the voltage level of the capacitor will be (X) volts; here is the formula that I used to determine what the X volts would be (and I used it to confirm my formulas above:

X=V*(1-EXP(-S/(C*R)))

For discharging, starting from full capacity (C), and discharging for (S) seconds, I used this formula to determine what the (X) volts would be after the discharge:

X=V*EXP(-S/(C*R))

If anyone spots an error in my formulas let me know, but I believe these look good. I just wasn't finding something written down in a format that I could easily transfer to Microsoft Excel.

This link was a big help to me.
http://www.allaboutcircuits.com/vol_1/chpt_16/4.html

I've enjoyed this forum and just wanted to contribute. :)
 

duffy

Joined Dec 29, 2008
44
Nah, those last two should be Vx = Vf-(Vf-Vi)*EXP(-t/(R*C)).

Pardon me for using "t" instead of your S, but the point is if you have 0V in either of those last two equations it will zero out the whole term. You need to need to do the subtraction in the coefficient of that exponent BEFORE you multiply it out. Vi = initial volts, Vf = final volts, Vx is the voltage on the capacitor.
 
Top