RC formula: seconds needed to charge to a certain Voltage

Discussion in 'General Electronics Chat' started by markmain, Jan 1, 2009.

  1. markmain

    Thread Starter Member

    Dec 28, 2008
    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)


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


    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:


    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:


    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.

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

    Active Member

    Dec 29, 2008
    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.
  3. jpanhalt

    AAC Fanatic!

    Jan 18, 2008