Super Cap Circuit

I am looking to provide power to my Raspberry Pi upon power loss from the 5 V power supply. It just needs to provide power long enough for the Pi to safely shut down (with the setup I have, I estimate around 5 seconds to cleanly shut down, but if it takes longer than that I can always add more caps to cover the time).

The circuit is as follows: The 5 V battery/power supply source powers the Pi and charges the caps through the 5 V to 2.5 V voltage regulator while plugged in. Upon battery being unplugged, the super caps then power the Pi through the boost converter, and a signal is sent to the Pi to shut down immediately by the PNP transistor.

The super caps are 10 F each, which should provide 8 seconds of usable power at 50% efficiency by my math.

2.7 V full
20 F capacity
2.0 V fully frained
2000 mW average draw from Pi

Joules =
20 F * ((2.7V^2)/2) =
72.9 J
Unusable Joules =
20 F * ((2.0V^2)/2) = 
40 J

mW seconds =
(72.9 J - 40 J) * 1000 =
32,900 mW seconds

Supply Time = 
(32,900 mWs / 2,000 mWs) * 50% (efficiency loss) =
~8 seconds

The PNP transistor should kick in when the 5 V power source drops off, thus sending a signal to the Pi on GP21 to shut down immediately.

Assuming I can code this to shut down fast enough, will this circuit work as I expect?

Note: The 3.3 V is not used for anything in the sketch. My understanding is that the Pi is powered via 5 V, not 3.3 V.


3 Answers 3


My understanding is that the Pi is powered via 5V, not 3.3v.

Incorrect, the Latest R'Pi uses 5V and 3V3, the earlier ones used 3V3 and 2V5 and all use 1V8 for the memory.
You need to keep your 5V supply above 4.63V (where the Lightening bolt turns on) as you risk a reset below that, all the other voltages are generated from this supply.
You can find some more information here.

Using a decent DC-DC convertor on your Supercaps you could go in two directions.

  1. Use a single Supercap bank and convert 2.7V to 5V using a DC-DC convertor
  2. Connect two Supercaps in series to give 5V (in fact you could do without a DC-DC at all).

In case #1 you'll have difficulty in finding a DC-DC convertor that works down to much less than 1V, but this allows you to use about 60% of the stored energy.
In Case #2 you can discharge from 5V to 1V (using a DC-DC and recover 80% of the stored energy.

I have found one DC-DC boost that will work down to just less than 1V.

I'd suggest for the simplest solution that you don't use a DC-DC at all. Simply build a supercap series that supports 5V. If you are not actually using 'USB' to provide power, you can even raise the R'Pi supply to 5.2V allowing the supercaps to be connected using a Schottcky diode to the DC input. You'd need to provide a means to charge the supercap to above 5V of course.

The R'Pi current depends on the model and what peripherals you have connected, but it's unlikely to be more than about 1.4A (and that is with a WiFi adapter on USB). enter image description here

The current drawn by your R'Pi from the supercaps will NOT increase (it will in fact decrease slightly) as the voltage drops, since the regulators are all linear. So you can calculate the time to discharge to 4.7V (a margin above the 4.63V) using a constant current.

t = (C * (Vhi - Vlo)) / I ….or C = It/(Vhi - Vlo)

Solving for t = 5 with I = 1.2A and (Vhi - Vlo) = 0.3V gives C = 20F
If your current is only 1A then your time will be extended to 6 seconds.
If you current is only 0.7A then your time will be extended to 8.5 seconds.

Depending on the supercaps you use, you need to allows for the DC ERSR, but this should be no more than 100 mOhms worst case.


The latest Pi 3B+ has no fewer than six different voltage rails:

  • two at 3.3V — one special ‘quiet’ one for audio, and one for everything else; 1.8V;
  • 1.2V for the LPDDR2 memory; and
  • 1.2V nominal for the CPU core with dynamic control
  • then 5V for USB etc.
  • some use the XR77004 chip to create all the voltages.
  • some rPi's use a solid 2.5A supply @ 5V

Verify all your assumptions before you plan a solution by monitoring the worst case current.

Backup and redundancy must be carefully done and tested under all possible situations to be sure it does not create a new problem during the transition or due to high ESR caps.

The voltage dtop from any battery or capacitor in the linear region is **dV=Ic/C * dt + ESR * R **

This means the voltage drops 1st from cap ESR then accumulates with time dt (s) at the rate of Ic/C.

So at 1A / 100 Farads will drop 10mV/s or 100mV/10s per Amp load current.

it is normal for DC-DC input current to rise as the input voltage drops to support a constant power load.

Although CMOS draws less current at some frequency with reduced voltage, but the DCDC converters may need more current to maintain all the outputs when your supply fails.

Good luck.


The concept looks basically okay to me. The schematic shows a polyfuse between the USB power input and the 5V bus you are connecting to. You may wish to duplicate that especially since anything could be plugged into the on-board USB sockets. In fact it might be better to use the internal fuse and supply power via the the USB power input rather than the GPIO connector, and thus prevent backfeeding of supply current.

enter image description here

Not sure about other comments regarding details of the internal supplies, they are irrelevant. The current drawn by things plugged into the on-board USB sockets, however, is very relevant.

The details, and where I would expect any trouble to arise from, relate to the currents and the internal resistance of the supercaps.

The charging current will be limited by the caps and U1 (presumably a switching regulator). You need to make sure that doesn't cause problems for the caps or the regulator.

Secondly, the discharge current will initially be more than double the load current divided by the efficiency of the boost converter. So you will get losses due to the internal resistance of the capacitors. If the load current is, say 1.2A and the converter has 70% efficiency, that's more than 3.4A being drawn from the capacitors and a voltage drop across the ESR of 3.4*ESR. I say "more than" because that current will start higher (because of the ESR of the capacitors) and continue to rise as the capacitors discharge (negative resistance characteristic).

At the point where your boost converter cuts out the current will be much higher and there will be some charge left on the supercap.

You need to sharpen your pencil and calculate those currents (you'll need the maximum load current) and take into account the boost regulator and capacitor characteristics to see if this will work in practice.


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.