How to calculate capacitor discharge time

wayneh

Joined Sep 9, 2010
17,498
Resistor : 600Ω
Voltage : 12Vdc
Current : 0.02A
Wattage : 0.24W

Understood.
Close, but that's not quite right. The LED has a voltage drop of ~3V all by itself. So instead of 12V = 0.02A • 600Ω, you have (12V-3V) = 0.02 • 450Ω. Be sure also to calculate the charge on the capacitor. It's at 12V. Remember that the stated capacity in Farads is coulombs stored per volt. If we stick to the 1F capacitor and charge it to 12V, it's holding 12 coulombs.
It draws 0.02A per second multiplied by 100 seconds = 2A are drawn, or 2Ah of capacity are taken after 100 seconds.
You're not being careful with your units. You can't multiply 0.02A by 100 seconds and get amps, or Ah (amp-hours). You get amp-seconds, which are coulombs.
The remaining charge after 2Ah are taken, the new voltage on the capacitor is...? I'm drawing a blank. It's 9Ah total right..? On the capacitor?
Once you get the units right, you'll see there are less coulombs of charge left on the capacitor than when you started. You started with 12 and some were consumed in the first 100 seconds. How many are left, and what's the voltage?
 

Thread Starter

Guest3123

Joined Oct 28, 2014
404
Close, but that's not quite right. The LED has a voltage drop of ~3V all by itself. So instead of 12V = 0.02A • 600Ω, you have (12V-3V) = 0.02 • 450Ω. Be sure also to calculate the charge on the capacitor. It's at 12V. Remember that the stated capacity in Farads is coulombs stored per volt. If we stick to the 1F capacitor and charge it to 12V, it's holding 12 coulombs.
You're not being careful with your units. You can't multiply 0.02A by 100 seconds and get amps, or Ah (amp-hours). You get amp-seconds, which are coulombs.
Once you get the units right, you'll see there are less coulombs of charge left on the capacitor than when you started. You started with 12 and some were consumed in the first 100 seconds. How many are left, and what's the voltage?

Alright. Let's see.

To calculate the resistor value for an LED.
Supply Voltage : 12V (12 Coulombs or 12 Amp Seconds)
LED Forward Voltage : 3Vf
LED Forward current : 0.02A If

1. To find the amount of voltage to drop across the resistor, subtract the supply voltage from the LED's Forward voltage.
12V - 3V = 9V

2. To find the resistor value, using Ohm's law, divide the dropped voltage by the LED's forward current.
9V / 0.02A = 450Ω

Which is actually 12V on the capacitor. Which is also considered 12 Coulombs.

It uses 0.02 Amp Seconds Per second.
The Capacitor has a remaining 9 Amp Seconds, 9 Coulombs, 9 Volts left.

After 50 Seconds : 0.02 Amp Seconds x 50 seconds = 1 Amp Second Used, 1 Coulomb Used, 1 Volt Used.
The Capacitor is now at 8 Coulombs, 8 Volts, ... Omg.. I think I see what your talking about now..

8V / 450Ω = 0.01777 Amps.

After another 50 seconds : 0.01777 Amp Seconds x 50 = 0.88888 Amp Seconds Used, 0.88888 Coulombs used, 0.88888 Volts used.
The capacitor is now at 0.88888 - 8 = (7.1111 Volts, 7.1111 Coulombs, 7.1111 Amps Seconds.)

7.1111 / 450Ω = 0.0158024 Amps.


Idk, I think I might have gotten the voltage wrong. But here's my chart. Even if I did get it wrong, which I think I did, I'll still do it again, and try again. :)
Hunted001091.jpg
 

Thread Starter

Guest3123

Joined Oct 28, 2014
404
Hello again,

You are definitely on the right track now. Just one small detail we have to clear up.

In the line:
"10v * (1-e^(-1/10Ω * 2F)) = 1.81269246922 volts..?"

it is clear that when you or your calculator calculated the part "-1/10Ω * 2F" you or it multiplied -1/10 by 2, which gave you or it -2/10, which is correct for that writing, but is not correct for the formula that has -t/RC in it because the implication is that R*C is to be performed first. That is partly my fault for writing it that way as the better way is:
-t/(R*C)

where it is more clear that we have to multiply R*C first.

So looking at the entire formula again:
Vc=Vs*(1-e^(-t/(R*C)))

and since R*C has to be done first we can do that right away, and with R=10 and C=2 this turns into:
Vc=Vs*(1-e^(-t/20))

You could try that again and see what you get, as well as the second example you gave.

I can assure you that this will become much much easier once you do a few more examples, and i see that you have this formula almost mastered already after only a few replies which is a good sign :)

Just a couple more small notes...
1. We are calculating the charge time of a capacitor. We can do the discharge time next if you wish.
2. In the formula with -t, it's not really negative time, it's just time entered into a formula that happens to have a minus sign in it which makes the whole exponent negative. So it's not really -t alone, it's -(t/(R*C)). This is just a small point though. The main thing is to be able to get the calculation right every time.

Alright, let me try again.

Vc = Capacitor voltage.
Vs = 10Vdc
R = 10Ω
C = 2 Farads ?
t = = -1 second

Q. How much voltage does a 2 Farad Capacitor have after 1 second of charging?

The Formula : Vc=Vs*(1-e^(-t/(RC)))

Solve R * C first : 10Ω * 2F = 20
Solve -t / 20 = -1 / 20 = -0.05
Solve 1-e^ -0.05 = 0.04877057549
Solve 10vdc * 0.04877057549 = 0.4877057549 Vdc.

0.4877057549v = 10v * (1-e^(-1 / (10Ω * 2F)))
1 SEC.png
1S.jpg

Q. How much voltage does a 2 Farad Capacitor have after 2 seconds of charging?
The Formula : Vc=Vs*(1-e^(-t/(RC)))

Solve R * C first : 10Ω * 2F = 20
Solve -t / 20 = -2 / 20 = -0.1
Solve 1-e^ -0.1 = 0.09516258196
Solve 10vdc * 0.09516258196 = 0.9516258196 Vdc.
2 SEC.png
2S.jpg

I think I got it right, I'm not sure though.. Seems like the capacitor is taking a very long time to charge.
 
Last edited:

Thread Starter

Guest3123

Joined Oct 28, 2014
404
Vc = Capacitor voltage.
Vs = 10Vdc
R = 10Ω
C = 2 Farads ?
t = = -1 second

The new formula : Vc = Vs(1 – e(-t/τ))
The new formula : Vc = Vs * (1 - e * (-t / (RC)))
Vc = 10v * (1-e*(-1 / (10Ω * 2F)))

Solving RC First : 10Ω * 2F = 20
Solving -t / (RC) : -1 / 20 = -0.05
Solving 1-e*(-0.05) = 1.13591409142295
Solving Vs * (1.13591409142295) : 10v * 1.13591409142295 = 11.359140

Crap I think I messed up. Hopefully, in my last reply, I hope I got the charging part down pat..
As for this discharging formula (above), I think I messed up. Even my new calculator I got, got the same exact answer.
 

MrAl

Joined Jun 17, 2014
11,496
Alright, let me try again.

Vc = Capacitor voltage.
Vs = 10Vdc
R = 10Ω
C = 2 Farads ?
t = = -1 second

Q. How much voltage does a 2 Farad Capacitor have after 1 second of charging?

The Formula : Vc=Vs*(1-e^(-t/(RC)))

Solve R * C first : 10Ω * 2F = 20
Solve -t / 20 = -1 / 20 = -0.05
Solve 1-e^ -0.05 = 0.04877057549
Solve 10vdc * 0.04877057549 = 0.4877057549 Vdc.

0.4877057549v = 10v * (1-e^(-1 / (10Ω * 2F)))
View attachment 112480
View attachment 112482

Q. How much voltage does a 2 Farad Capacitor have after 2 seconds of charging?
The Formula : Vc=Vs*(1-e^(-t/(RC)))

Solve R * C first : 10Ω * 2F = 20
Solve -t / 20 = -2 / 20 = -0.1
Solve 1-e^ -0.1 = 0.09516258196
Solve 10vdc * 0.09516258196 = 0.9516258196 Vdc.
View attachment 112481
View attachment 112483

I think I got it right, I'm not sure though.. Seems like the capacitor is taking a very long time to charge.
Hi,

Yes that looks very good. It's not that hard to do right? We always use a calculator.
 

MrAl

Joined Jun 17, 2014
11,496
Vc = Capacitor voltage.
Vs = 10Vdc
R = 10Ω
C = 2 Farads ?
t = = -1 second

The new formula : Vc = Vs(1 – e(-t/τ))
The new formula : Vc = Vs * (1 - e * (-t / (RC)))
Vc = 10v * (1-e*(-1 / (10Ω * 2F)))

Solving RC First : 10Ω * 2F = 20
Solving -t / (RC) : -1 / 20 = -0.05
Solving 1-e*(-0.05) = 1.13591409142295
Solving Vs * (1.13591409142295) : 10v * 1.13591409142295 = 11.359140

Crap I think I messed up. Hopefully, in my last reply, I hope I got the charging part down pat..
As for this discharging formula (above), I think I messed up. Even my new calculator I got, got the same exact answer.
Hi,

Well you got the right answer previously so why would it be different this time? Maybe you where not sure.
In this try, the 1-e^(-1/20) did not come out right.

For charging we had:
Vc=Vs*(1-e^(-t/(R*C)))

and for discharging it's even easier:
Vc1=Vc0*(e^(-t/(R*C)))

Note there is no '1' in the formula. Also, Vc0 is the starting voltage of the cap before it starts to discharge. Vc1 is the ending voltage after the time t.

An example would be where we have a cap that is charged up to 5v and we want to know what it discharges to in 1 second. For that we would have so far:
Vc1=5*(e^(-1/(R*C)))

and then just plug in R and C and compute the whole thing.

Yes it will be slow when the cap value and/or resistor value is large. In fact, when the product R*C is large it will be a slow response. Keep in mind that the values of C that we often encounter is maybe 0.1uf or 1uf. We are working with large caps when we say the values of C is 1 Farad. That's good enough for the practice examples however.
 

Thread Starter

Guest3123

Joined Oct 28, 2014
404
Hi,

Well you got the right answer previously so why would it be different this time? Maybe you where not sure.
In this try, the 1-e^(-1/20) did not come out right.

For charging we had:
Vc=Vs*(1-e^(-t/(R*C)))

and for discharging it's even easier:
Vc1=Vc0*(e^(-t/(R*C)))

Note there is no '1' in the formula. Also, Vc0 is the starting voltage of the cap before it starts to discharge. Vc1 is the ending voltage after the time t.

An example would be where we have a cap that is charged up to 5v and we want to know what it discharges to in 1 second. For that we would have so far:
Vc1=5*(e^(-1/(R*C)))

and then just plug in R and C and compute the whole thing.

Yes it will be slow when the cap value and/or resistor value is large. In fact, when the product R*C is large it will be a slow response. Keep in mind that the values of C that we often encounter is maybe 0.1uf or 1uf. We are working with large caps when we say the values of C is 1 Farad. That's good enough for the practice examples however.
Alright, let me give it a shot.

Capacitor Discharging Formula : . : Vc1=Vc0*(e^(-t/(R*C)))

Capacitor voltage : 12v
Seconds : 2
Resistance : 1.3Ω
Capacitance : 0.0001 Farads (100 uF)

Solving RC : 1.3Ω * 0.0001F = 0.00013
Solving -t / RC : -2s / 0.00013 = -15.384615384
Solving e^(-15.384615384) = 2.08231502369629 x 10^-007 ? wtf..?
Solving 12v * 2.08231502369629 x 10^-007 = 2.49877802843555 x 10^ -006

Idk.. I think I screwed it up again.

Capacitor voltage : 12v
Seconds : 2
Resistance : 1.3Ω
Capacitance : 0.0001 Farads (100 uF)

Vc1=12*(e^(-2/(1.3*0.0001))) = 0

It's zero.
ZeroDischarge.jpg

Let me give it another try..
Capacitor Charged Voltage : 5Vdc
Resistance : 1.3Ω
Capacitance : 100uF (0.0001F)
Time : 1 Second.

Vc1=5*(e^(-1/(R*C)))

So now it becomes, Vc1 = 5v * (e^(-1 / ( 1.3Ω * 0.0001F)))

Solving RC first : 1.3Ω * 0.0001F = 0.00013
Vc1 = 5v * (e^(-1 / 0.00013))
-1 / 0.00013 = -7692.307692
e^-7692.307692 = 0

I must be doing something wrong.. 0.0001F is exactly 100uF.. The equation doesn't expect me to use 100 as the capacitance does it? The equation isn't psychic. So using 0.0001F which means 100uF should work.. I don't understand what I'm doing wrong.
 
Last edited:

MrAl

Joined Jun 17, 2014
11,496
Alright, let me give it a shot.

Capacitor Discharging Formula : . : Vc1=Vc0*(e^(-t/(R*C)))

Capacitor voltage : 12v
Seconds : 2
Resistance : 1.3Ω
Capacitance : 0.0001 Farads (100 uF)

Solving RC : 1.3Ω * 0.0001F = 0.00013
Solving -t / RC : -2s / 0.00013 = -15.384615384
Solving e^(-15.384615384) = 2.08231502369629 x 10^-007 ? wtf..?
Solving 12v * 2.08231502369629 x 10^-007 = 2.49877802843555 x 10^ -006

Idk.. I think I screwed it up again.

Capacitor voltage : 12v
Seconds : 2
Resistance : 1.3Ω
Capacitance : 0.0001 Farads (100 uF)

Vc1=12*(e^(-2/(1.3*0.0001))) = 0

It's zero.
View attachment 112487

Let me give it another try..
Capacitor Charged Voltage : 5Vdc
Resistance : 1.3Ω
Capacitance : 100uF (0.0001F)
Time : 1 Second.

Vc1=5*(e^(-1/(R*C)))

So now it becomes, Vc1 = 5v * (e^(-1 / ( 1.3Ω * 0.0001F)))

Solving RC first : 1.3Ω * 0.0001F = 0.00013
Vc1 = 5v * (e^(-1 / 0.00013))
-1 / 0.00013 = -7692.307692
e^-7692.307692 = 0

I must be doing something wrong.. 0.0001F is exactly 100uF.. The equation doesn't expect me to use 100 as the capacitance does it? The equation isn't psychic. So using 0.0001F which means 100uF should work.. I don't understand what I'm doing wrong.
Hi,

It's not really zero but extremely close to zero, and we can still call it zero in most cases, so yes, it is zero.

That is because 1.3 ohms is very small and 0.0001 is somewhat small, so 1.3 times 0.0001 is still small. When it is small like that it discharges very quickly, so in the equation it may show zero or almost zero for a time as long as 1 second. Try shortening the time, like say, 1ms which is 0.001 seconds and see what you get. Then you can try 0.1ms which is 0.0001 seconds.
Sometimes we have short times too so we might see 10us, 1us, etc.
 

wayneh

Joined Sep 9, 2010
17,498
The Capacitor has a remaining 9 Amp Seconds, 9 Coulombs, 9 Volts left.
Not quite. The capacitor starts with 12V. The LED drops 3V and the resistor initially drops 9V.

Otherwise, your table looks OK! Notice how much longer it takes to discharge the capacitor than our first, oversimplified case. This is because the discharge rate slows down as the voltage falls.

Now, we're focusing on the capacitor here, but be aware that discharge process will stop completely when the LED quits conducting. Once the voltage on the capacitor gets near 3V, everything stops.

You can now plot your voltage estimates. Compare them to the results of the formula you are working on with MrAl. Go ahead and add that formula to your table. You'll see they are similar. The shorter your intervals become, the closer they will look.

That formula involving "e", the base of natural logarithms, is the solution that comes from solving the differential equations. If you are comfortable with the math, you can derive that formula. If not, you just have to accept it as true and remember where to look it up in case you forget it.
 

GopherT

Joined Nov 23, 2012
8,009
I have to answer MrChips reply and the assignment he gave me first, then I'll take a closer look at what you gave me to look over. Thanks for the reply, I appreciate the help, thank you.
Ok, a quick and dirty answer to your question is
Capacitance in Farads multiplied by resistance = time constant.

About 5 time constants will be enough to discharge 99% of the voltage.

A 1 M resistor and a 1uF capacitor
1,000,000 X 0.000001 = 1 second "time constant"

It will discharge to 1% of initial voltage in 5 seconds.
 

wayneh

Joined Sep 9, 2010
17,498
There's a very good reason to use the approach @GopherT just noted. Once you know how one exponential curve looks in units of the RC time constants, you know them all. Every RC curve looks identical when the percentage is plotted against time expressed in multiples of RC. Decay curves fall from 100% and approach 0%. Charge curves are just 100% minus a decay, so they start at zero and approach 100%. They're all the same.

Even simpler, you can remember a single number. Each increment of RC leaves 37% (0.37 = 1/e) of whatever you had to start with. So the curve is (0.37)^n where n is the number of time constants that have elapsed. Note the handy result at 3 time constants – 5% remaining. Or the one GopherT used, ~99% decay after 5 time constants.

time, in RC
0 100%
1 37%
2 14%
3 5.0%
4 1.8%
5 0.67%
But I still suggest you get more proficient with your units and concepts before you start using shortcuts.

[add]
 
Last edited:
Top