Cap calculations ?

Thread Starter

curry87

Joined May 30, 2010
101
How do i calculate what capacitance is required to mountain a current at or around said voltage for a period of time ?

For example say if i had a 4700uf electrolytic cap and was fully charged to 9v and a load placed on it at 2ma via a led(1.7vf) attached to a 3.650k ohm resistor how would i calculate the total time it would light the led visibly ?

What formula do i need so that all i have to do is input enter the time i want and the load on the cap and get what capacitance is required ?
 

marshallf3

Joined Jul 26, 2010
2,358
It'll be difficult to predict, as in the beginning the discharge rate will be higher.

This almost becomes one of those problems you start finding the solution with experimentation. Set up a test circuit and record the results with a few different cap values.

We all know that T=R*C, with T representing the time it will take for the capacitor to lose ~63% of its voltage but by then your LED is going to have gone off long ago.
 

mik3

Joined Feb 4, 2008
4,843
To have 1mA you need 3.65V across the resistor. 1.7+3.65=5.35V

v=Vo*(1-exp(-t/(RC))

Thus,

(v/Vo)-1=-exp(-t/(RC))

Thus,

ln[1-v/Vo]*RC=-t

Putting the numbers into the equation gives you 15.482 sec

v=5.35
Vo=9
 

gootee

Joined Apr 24, 2007
447
To have 1mA you need 3.65V across the resistor. 1.7+3.65=5.35V

v=Vo*(1-exp(-t/(RC))

Thus,

(v/Vo)-1=-exp(-t/(RC))

Thus,

ln[1-v/Vo]*RC=-t

Putting the numbers into the equation gives you 15.482 sec

v=5.35
Vo=9
So, for the original poster's question:

There is an equation for capacitive discharge as a function of time.

You can solve the equation for C, instead of for t or V, and then plug in any t you like and get the required value of C that would keep your LED lit for time t.
 

marshallf3

Joined Jul 26, 2010
2,358
The problem being the LED is going to draw 2 mA from the fully charged cap and les as the cap discharges, in efect it introduces a variable resistor into the equation.
 

gootee

Joined Apr 24, 2007
447
The problem being the LED is going to draw 2 mA from the fully charged cap and les as the cap discharges, in efect it introduces a variable resistor into the equation.
You are absolutely correct. The usual RC capacitor discharge equation is for just a capacitor and resistor and, in this case, assumed that the diode was a short circuit, when, actually, the diode was a non-linear resistor. So a differential equation for the circuit would need to be written and solved.

I found a paper where the equation was written and solved for a capacitor discharging through a diode, but, unfortunately, without a resistor:

http://www.uncg.edu/phy/hellen/HellenAJPAug03.pdf

I did try simulating and comparing two circuits, using LTspice, one with a capacitor and resistor and another one with a diode added in series with the resistor. I used the 4700uF and 3.65k Ohms example from the OP. For the diode, I used a model included with LTspice for a Fairchild QTLP690C LED. I set the voltage across the capacitor to 9 Volts as an initial condition and plotted the capacitor voltages and the resistor currents for both circuits in the same plot window. The plot window image is at:

http://www.fullnet.com/~tomg/RC_vs_RCD.jpg

It can be seen that without the diode the initial current is higher. With the LED, the voltage across the LED lowers the voltage across the resistor, lowering the current. The RC-only solution that mik3 gave showed 1 mA being reached at 15.48 seconds. With no LED, my simulation gave 15.53 seconds, which is in close agreement. But with an LED in the circuit, which also made the initial current 2 mA instead of 2.46 mA, it only took about 12 seconds to get down to 1 mA.

Regarding the OP's originally-specified 0.1 mA "vanishing point": The LED's voltage started at 1.74 V and had diminished to 1.6V while its current had gone from 1.99 mA to 0.1 mA, after 53.16 seconds. The LED's effective resistance had changed (exponentially) from about 870 Ohms to about 16.2 kOhms, at the same time.

I tried a third circuit, to see if a good approximation could be had by inserting a 1.74 V voltage source in place of the diode, since that would make the differential equation much simpler and would at least get the initial current right. It turned out to be very close. And then I tried just lowering the initial voltage across the capacitor by 1.74 Volts, and keeping only the resistor in the circuit. And that result was identical (of course).

Here is the plot comparing the original R-C-LED circuit's current and the simple R-C-only circuit's current with the capacitor's initial voltage reduced by the value of the LED's initial voltage in the first circuit:

http://www.fullnet.com/~tomg/Vc0-Vled0.jpg

So it looks like a good approximation would be to use the usual RC discharge equation, but with the initial LED voltage (i.e. what the initial LED voltage would have been) subtracted from the initial capacitor voltage.

Cheers,

Tom
 
Last edited:

marshallf3

Joined Jul 26, 2010
2,358
That sounds like a reasonable solution to an equation that will get him there closely enough.

Nothing's ever going to be precision about this whole thing anyway what with the tolerances of electrolytics and the fact the on voltage of LEDs varies slightly depnding on a number of conditions.

As tedious as it can be I've still used a stopwatch to verify some long duration 555 designs, of course I'm also one of those that (ages ago) built a counter out of an old calculator. If you switched the input on and off for a one second interval it made a frequency counter as well.
 
Top