Core Electronics Forum

Add Capacitors to Raspberry Pi?

Good day, all
I want to add capacitors to the Raspberry Pi power-supply.
Currently I have my raspberry Pi plugged straight into a portable 5v battery, this works fine. However, I want to be able to swap from one battery to another battery (via a switch) without the Raspberry Pi turning off. I figured the easiest way to do this is with supercapacitors (after I do some researches and get the ideas from Complete Supercapacitor Applications Guide.
I’ve added two 25F 2.5v supercapacitors in series as shown in the picture. However, when I do this, the raspberry pi powers on for about 10 seconds (both red and green lights come on) but then it shuts down.
Is there anyone have ideas of it? Thank you in advance.


From that link, section IV


1) Discharging

The resistance of the supercapacitor blocks its rapid discharge. The time constant τ of the supercapacitor is 1 ~2s, and the complete discharge of the resistance-capacitance circuit requires about 5τ. That is, if the short-circuit discharge takes about 5 ~10s (because of the special structure of the electrode, they actually take several hours to remove the remaining charge completely).

Further reading about capacitors in series:

So basically the capacitance in the circuit is 1/(1/25 + 1/25) = 1/(0.04 + 0.04) = 1/(0.08) = 25 F

Edited (Thanks Robert)

Easiest way to remember this is: Resistor(s) in series sum up (and resistors in parallel are sum of inverse)

Capacitor doesn’t have an “S”, so they do not add up in series.


Hi G
Capacitors in series behave the same as resistors in parallel.

Not quite correct. The first bit is OK up to .08.

Then .08 inverted = 25F which is the correct result.
resistors in parallel = sum of the inverse then revert back to right way up.

Capacitors are exactly the opposite. They add when in parallel.

The problem with powering anything is the capacitor voltage will drop pretty rapidly then drop at an exponential rate until fully discharged. It will lose about 63% of its voltage in the first time constant. Any equipment being powered by one of these devices has to be designed to operate over a very wide voltage range.

The Pis don’t do this. I think what has happened here is the cap voltage has dropped to where the Pi gives up in about 10 sec which, without going into the math is probably about right as I think the Pi devices quit at about 4.8V and it wouldn’t take long for the cap to get down to there.

Maybe your best solution if you want to change batteries without interruption would be have 2 battery connectors. Connect in a wired OR configuration via schottky diodes to the Pi input. When you want to change batteries simply connect the second one then remove the first one.

Dual 10A schottky diodes are readily available and have a low foreword voltage drop which you woull have to live with. You need common cathode type. Connect anodes to battery connectors and cathode to Pi input.
Cheers Bob


Thanks Robert, added a minor edit.