# How to calculate capacitor size to mitigate voltage drop caused by current peak

I have a system that is powered by a 3V battery. I want to add a buzzer that will take 30mA for 0.1 seconds, so I'm experimenting with capacitors to prevent voltage drops from the current peaks as they cause a microcontroller to reset.

When calculating capacitor size I'm seeing something in the results that doesn't make sense to me.

Using the following formula, as I increase the Voltage drop size and keep the current and time constant, the capacitor becomes smaller.$$C=\frac{it}{\Delta V}$$

For i = 30mA and t = 0.1s,

Why would a larger voltage drop require a smaller capacitor, or what am I interpreting wrong?

A second question, I've seen people suggest adding a series resistor before the capacitor to "isolate" the drop, wouldn't this just make the voltage even lower at the buzzer, since the 30mA are still being drawn by it and now are being dropped at the resistor. Would a diode work instead?

• you need to use thicker wires between the battery and MCU. Commented Feb 16, 2022 at 22:32

Why would a larger voltage drop require a smaller capacitor, or what am I interpreting wrong?

The calculation is not for what voltage drop you have, it is for what voltage drop you get, with a certain load voltage. Larger capacitor -> Smaller voltage drop.

I've seen people suggest adding a series resistor before the capacitor to "isolate" the drop, wouldn't this just make the voltage even lower at the buzzer, since the 30mA are still being drawn by it and now are being dropped at the resistor. Would a diode work instead?

A series resistor will limit the current drawn from the supply, so other parts of the circuit is not as affected by the voltage drop. When the big load (buzzer in your case) tries to draw a lot of current, the resistor will limit this current and it will be supplied from the capacitor instead. If the capacitor is not large enough though, the buzzer performance will be affected.

Using a diode instead would isolate the rest of the circuit from benefiting from the capacitor as much, as the capacitor will never supply current to the rest of the circuit while the buzzer is still free to draw as much current as it wants. If the concern is the microcontroller and not buzzer performance, then you'd be better of without that diode.

If you want to prevent the microcontroller from reseting you could instead add a series diode and then a capacitor to the supply of the microcontroller, and supply the buzzer directly from the battery.

• I understand, so this formula is better seen as for the given current and duration conditions, if I use a capacitor of xF, the V drop on the capacitor will be the result of the formula. How would I go from this to calculating the effect on the actual voltage rail? Commented Feb 15, 2022 at 10:16

Using the following formula, as I increase the Voltage drop size and keep the current and time constant, the capacitor becomes smaller.

Yes, that's what happens and, that relationship is embodied in these formula: -

$$Q = CV\hspace{1cm}\longrightarrow\hspace{1cm} \dfrac{dQ}{dt} = C\dfrac{dV}{dt}\hspace{1cm}\longrightarrow \hspace{1cm}I = C\dfrac{dV}{dt}$$

And, of course that ties in with your formula.

Rearranged: $$\\hspace{1cm}C = \dfrac{I\cdot dt}{dV}\$$

Why would a larger voltage drop require a smaller capacitor, or what am I interpreting wrong?

Put it another way; a smaller value of capacitance means that for a given load current, the volt drop will be larger. A smaller value of capacitance cannot sustain the voltage is well as a larger value of capacitance. A smaller value capacitor hasn't acquired the energy reserves to do so. Just like a piddling little batter gets discharged more easily that a big thumper of a battery.

I've seen people suggest adding a series resistor before the capacitor to "isolate" the drop

It's unclear what your circuit is - if you want this answering then you should draw a small diagram.