I need a capacitor to charge using 5V in 1 seconds and discharge at 30 mA 3 Volts for 10 seconds. How do I calculate the capacitor needed.
I am sorry I don't have electrical background.
Actually in my Arduino, I am not using interrupts, it becomes unstable and I am sleeping for 8 seconds, but I want to know whether any interrupt/ high voltage occurred at analog pins.
Any help would be appreciated.
EDIT:
Ok let me explain, a little bit more about my Arduino program. Using Interrupts, you can find out if the PIR motion sensor sends a pulse, when someone crosses in front of the sensor. Now consider my problem, I am not using Interrupts, as my program is already very large and interrupts make my program unstable due to less free RAM. I am anyway reading the sensors after each 8 seconds using watchdog timer. Now the problem is that the microcontroller is in sleep mode for 8 seconds, and won't poll the pins, so I was thinking of putting a correct capacitor, that can be charged by the PIR sensor and then the capacitor can keep the input pins of the microcontroller high for 8 seconds. Sorry, I don't know much about electronics, so may be this is stupid, but if this can be doable, please share your opinion.
Best Answer
Capacitance in Farads
F = Current I x time t / voltage dV
If the load current is limited by resistors and not a constant current load, the current will drop as voltage reduces, so the above calculation needs to be changed to a
I x dT / dV
calculus form where dT tends to zero. This becomes a bit more messy. So, let's keep things simple:For the output case with a 3 Volt drop over 10 seconds, assuming constant current load, capacitance works out to:
F = 0.03 x 10 / 3 = 0.1 F = 100,000 microFarads
.Such "super capacitors" or "ultra capacitors" are available online fairly inexpensively these days, if the purpose is for a DIY project. For instance, on eBay, 3 pieces would cost $4.50 from this seller (plus shipping), or a single piece for $1 from a Canadian seller, if that saves you some shipping cost:
That is the capacitor needed.
The charging period and supply voltage have no effect on the capacitance calculation, assuming your supply can provide the required current (300mA), so ignore those.