I have a circuit in which I have a Li-Ion 3.6V battery, then a voltage regulator that outputs 3.3V and then the circuit. Also it contains a couple of tiny 1uF decoupling capacitors in front of and in the back of the regulator.
Sometimes the battery due to extremely high vibrations it loses contact with the battery holder and as such the microprocessor of the circuit brownouts. I haven't checked it but I guess that the battery loses contact for something like 10 msec.
I thought of adding a capacitor on the battery side to compensate for such kind of loss and as such I started calculating some things. My circuit is using on average around 20mA. If I want to be able to feed from the capacitor for 50 miliseconds after the battery loses contact, how many Farads should be my capacitor?
Following is my thoughts. Could someone please verify if they are correct?
3.3V at 20mA -> 3.3x0.02=0.066 Watts power consumption and 0.066 Whours per hour. In 50 milliseconds, we have needed power consumption of
(0.066 / 3600 seconds) / 20 = 9.167e-7 Whours (equation 1).
Supposing that my microprocessor will brownout when the battery voltage falls at around 2.7V, I thought of the following:
Energy E (in Joules) of capacitor is E=C*(V^2)/2
as such the energy in Joules that the circuit will consume from the capacitor in order to fall from 3.6V to 2.7V will be: C*(3.6^2)/2 - C*(2.7^2)/2 (equation 2)
in watt-hours we divide that equation by 3600.
So, we have (C*(3.6^2)/2 - C*(2.7^2)/2)/3600 = 9.167e-7 (from equation 1)
Solving for C we have C = 0.001164 Farads
That means that we need at least 1164 uFarads capacitor in order to be able to cope for 50 milliseconds.
Do I think of it correctly?