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?

  • \$\begingroup\$ If you are operating in high vibration/shock environment, you should use soldered batteries, or batteries with a good connector. There is a reason why newer smartphones abandoned removable batteries and started to use batteries with soldered leads and good special connectors. \$\endgroup\$ Commented Sep 3, 2018 at 2:15
  • \$\begingroup\$ You could make things a bit easier on yourself by using Joules instead of Wh for energy. \$\endgroup\$
    – user57037
    Commented Sep 3, 2018 at 23:36

2 Answers 2


It is easier to do this by calculating charge than to attack it via energy.

The easy way to remember the equation that relates current, voltage change, time, and capacitance is: The voltage change is proportional to the current and time, and inversely proportional to the capacitance. In common units:

    dV = A s / F

where dV is the change in volts, A the current in amps, s the time in seconds, and F the capacitance in Farads.

Rearranging this, you can solve for exactly what you want:

    F = A s / dV

Now plug in the numbers: Let's say you want the voltage to drop by no more than 100 mV. (20 mA)(50 ms)/(100 mV) = 10 mF.

  • 1
    \$\begingroup\$ Whoever downvoted this, what exactly do you think is wrong? \$\endgroup\$ Commented Sep 3, 2018 at 22:26
  • \$\begingroup\$ I think you may have a downvote stalker. Is it possible for anyone to check if that is the case ? \$\endgroup\$
    – user57037
    Commented Sep 3, 2018 at 22:55
  • 1
    \$\begingroup\$ @mkeith: Unfortunately downvotes are anonymous, even mods can't find who did them. Anonymity gives cover to vandals, which I agree is likely what's going on here. Unfortunately, SE refuses to address this problem, despite repeated requests. \$\endgroup\$ Commented Sep 3, 2018 at 23:03

The equation you need is the capacitor equation.

I = C * dV/dt

  • I is the current (in Amperes)
  • dV is the change in voltage (in Volts) you are willing to tolerate.
  • dt is the disconnect duration (in seconds).
  • C is the capacitance (in Farads).

We can re-arrange to solve for C.

C= I * dt / dV C = 0.02A * 0.05s / 0.9V = 1100 uF

Obviously this is not going to work unless you use an aluminum electrolytic capacitor.

By the way, this is basically the same as Olin's answer. It is just that for me, it is easier to remember it this way (I = C * dV/dt).

Olin got an even bigger capacitor because he only allowed 0.1V drop, whereas I allowed 0.9V drop to match your question.

It is possible to design contacts so that the battery does not disconnect, even with very hard shock.

  • \$\begingroup\$ Please fix your equation by using units properly. "0.02 * 0.05 / 0.9" is dimensionless, so it can't possibly equal anything with units of uF. \$\endgroup\$ Commented Sep 3, 2018 at 13:39
  • \$\begingroup\$ This dt/dt slightly annoys me. Shouldn't this actually be an integration? Based on my results I get 1164uF. Based on yours I get 1100. Really close but not exact. Do I miss something? \$\endgroup\$ Commented Sep 3, 2018 at 23:03
  • \$\begingroup\$ Using dV and dt as variables departs from strict mathematical practice. But the only assumption I am making is that the current drained from the capacitor during interruption is constant. If so, then my math is valid. You are assuming that the power delivery rate from the capacitor is constant. Different assumption, and hence different result. Which one is more accurate depends on the actual nature of the load. Some loads are more like constant current and some are more like constant power. Many are in between. \$\endgroup\$
    – user57037
    Commented Sep 3, 2018 at 23:22
  • \$\begingroup\$ By the way, how a lower voltage drop requires a bigger capacitor? Shouldn't these two things be analogous? Meaning that more voltage drop creates more delay and as such requires more capacitance to hold it? I am really confused at that point. \$\endgroup\$ Commented Sep 3, 2018 at 23:23
  • \$\begingroup\$ OK. Consider a capacitor connected to a current source. When the current source is on, the voltage of the capacitor rises linearly (or, if the current source is in the other direction, then it falls linearly). The slope of the line is dV/dt. The formula which describes this situation is I = C * dV/dt. As soon as the battery disconnects, your capacitor is discharged according to I = C * dV/dt. You can only change the slope by changing the current or the capacitor. Note: dV is the allowable voltage drop. The less tolerant of voltage drop you are, the bigger capacitor you need. \$\endgroup\$
    – user57037
    Commented Sep 3, 2018 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.