# Rearranging capacitor charge/discharge equation

1. May 23, 2014

### Hassss

1. The problem statement, all variables and given/known data

I need to rearrange the equation for exponential growth of voltage across capacitor during charging.

2. Relevant equations

Equation is Vc=Vs(1-e^-t/CR) I need to find out how long it takes for Vc=26v with Vs=40v thus rearranging the equation making t the subject.

3. The attempt at a solution

Ive forgotten what to do with Logs and therefore am stuck on this part.

LnVc=LnVs-t/CR

Im not sure if its correct but sincerely appreciate any help and advice Ive calculated the time in a circuit and found t=10.4977 so need to prove it mathematically!

Thank You

2. May 23, 2014

### SammyS

Staff Emeritus
That's not a correct result.

First solve for $\ e^{-t/(RC)} \,, \$ then take the natural log.

(Use enough parentheses to so that what you write means what you intend it to mean.)

3. May 23, 2014

### Hassss

For exponential decay i managed to rearrange it and got t=-CRlnvc/Vs from equation Vc=Vse^-t/CR (please tell me its correct)

Its just the 1-e^-t/CR that is confusing me

4. May 23, 2014

### Hassss

For exponential decay i managed to rearrange it and got t=-CRlnvc/Vs from equation Vc=Vse^-t/CR (please tell me its correct)

Its just the 1-e^-t/CR that is confusing me

5. May 23, 2014

### SammyS

Staff Emeritus
It's not correct.

Where did the 1 go ?

Vc/Vs = 1 - e-t/(RC) .

6. May 23, 2014

### Hassss

For exponential decay the equation does not have a 1- its Vc=Vse^-t/CR rearranged for t=-CRlnvc/Vs

For exponential growth it contains the 1- Vc=Vs(1-e^-t/CR) I need to make t subject for this equation

Its just the 1-e^-t/CR that is confusing me

Ive managed thus so far 1+Vc/Vs=e^-t/CR in regards to logarithm rule I'm not sure what inverse of e^ is thats where I'm stuck

7. May 23, 2014

### BvU

Dear ssss,

Your problem statement is not the statement of your problem. A clear understanding of the problem might be very helpful for you. Something like:

1. Calculate the time needed to charge an intially uncharged capacitor C over a resistance R to 26 V with a source of 40 V

And the relevant equation might well be
2. Vc=Vs(1-e^-t/CR)

What you call the problem statement only appears in the next phase, usually called:

3. attempt at a solution

I need to rearrange 2 to something that looks like t = blablabla with Vc,Vs, C and R suitably appearing on the righthand side. Then anyone with a slide rule (or, nowadays, an electronic calculator) can do the rest.

Now, having rearranged the post in this - hopefully more meaningful fashion -- what do you think would be the next step to get from 2. to blabla ?

(hint: t=-CRlnVc/Vs is no good blabla, because at t=0 Vc is still 0 and your righthand side blows up! -- or down if that's where minus infinity is).

- - - - - -

Now, you almost admit that you have no affinity with logs, so there is a small chance you have some physics intuition to bring into this quandary and rescue you. If the 26 volt is over the capacitor, how big is the voltage drop over the resistor ? And what is the relevant equation for that Vr if you know the ones for Vs (namely Vs = 40, not much of an equation, but still...) and for Vc ?

8. May 23, 2014

### SammyS

Staff Emeritus
Maybe I should have said, Make e-t/(CR) the subject of the equation, but making something the subject of an equation is not terminology I usually use.

That result, 1+Vc/Vs=e^-t/(CR)) is not quite right.

It should be
$\displaystyle \ 1-\frac{V_c}{V_s}=e^{-t/(CR)} \$​

Now take the natural log (Ln) of both sides of the equation.

By the Way. $\displaystyle \ln\left(1-\frac{V_c}{V_s}\right)$ cannot be simplified.

9. May 23, 2014

### BvU

Well, I propose 14/40 ...

10. May 26, 2014

### Hassss

Ive been plugging at the equation again but I've seemed to end up with this as a final.

from Vc=Vs(1-e^-t/CR)
to Vc/Vs=1-e^-t/CR
to ln(1-Vc/Vs) = ln(e^-t/CR)
to ln(1-Vc/Vs)=(-t/CR)
CRln(1-Vc/Vs)=-t
therefore t=-CRln(1-Vc/Vs)

I have tried implementing your advice into this think I've almost cracked it as the answer I'm getting is 10.49 whereas in multisim its 10.49s too so i assume its correct?

hass

Last edited: May 26, 2014
11. May 26, 2014

### BvU

Kind of depends on the values R and C . OR did I overlook those ?

12. May 26, 2014

### Hassss

Sorry I never mentioned them.

R=100kOhm
C=100uF

By any chance would anyone know the equation for current during capacitor discharge.

I found this equation in my research but does not seem right at all!

i=Vse^-t/CR

Tells me during capacitor discharge i=15A Baring in mind Vs=40V

hass

13. May 26, 2014

### ehild

The correct equation should be i=(Vs/R)e^-t/CR , where Vs is the initial voltage of the capacitor.

ehild

14. May 26, 2014

### Hassss

cheers i just calculated it and got 7.77x10^-4

Also calculating current after discharge. So Vs being voltage after capacitor has discharged or initial voltage before its discharged?

thank you

15. May 26, 2014

### ehild

Vs is the source voltage that charges the capacitor. After infinite long time, the voltage of the charged capacitor is the same as the source voltage.

In general, if the initial voltage of the capacitor is Vo, and it is discharged through a resistor R, the the current is I=(Vo/R)e^-t/(RC).

ehild

16. May 26, 2014

### Hassss

thank you for the clarification

just to ensure is this equation correct for calculating current during capacitor charging i=Vse^-t/RC

regards

17. May 26, 2014

### BvU

Nope. Current has a different dimension, namely Volt/Ohm ! If battery is Vs and capacitor is Vc then voltage over resistor is (Vs - Vc), hence current is (Vs-Vc)/R !
This is the current that charges the capacitor: Current = charge/time and sure enough charge = Capacitance * Voltage.

We are very close to writing down the differential equation that describes the behaviour, the equation for which you stated the solution already in post #1 !