Electronic – the formula for how long a capacitor can power a circuit

capacitor

I was thinking of implementing a feature for my circuit that protects it from loosing power after a 1 – 2 seconds power outage. Although a battery would do the trick, i would like to go with the capacitor route as its easy to implement to circuit, i will just add it to +/- of the circuit.

further question, how does a capacitor work in storing a charge is it like a battery? Where is starts at 0v then gradually goes up to 5v when full (assuming the circuit is 5v). and upon discharging does it gradually looses voltage too until it reaches 0? If so, how is current affected? Or is it like you power bank stays a constant 5v when charged and can dish out a constant current until its "drained"

based on observations of how a capacitor is affecting the leds i would say voltage goes slowly down, but i am not definitive.

Best Answer

The formula is

$$ t = C \frac{\Delta V}{I}$$

where \$t\$ is the time, \$C\$ is the capacitance in farads, \$\Delta V\$ is the maximum change in capacitor voltage that you can allow, and \$I\$ is the amount of current drawn from the capacitor.

Yes, the capacitor voltage will fall as current is drawn from it, so you must initially charge the capacitor to a higher voltage than you need and then draw current from it until it reaches the lowest voltage you can still use.