Raspberry Pi UPS Using Supercapacitors

What happens when you want to integrate a Raspberry Pi into some kind of project that gets turned on and off with mains voltage? Do you power the Pi separately, or make a UPS for it?

[Lutz Lisseck] decided he wanted to turn his ambient-lamp (Rundbuntplasma) on and off with only the main power switch in his Hackerpsace. He could build a traditional UPS using a battery pack (it’s only 5V after all!) but decided to take it a step further. He picked up a pair of 50F supercapacitors. This way his UPS would last longer than his Pi would! The caps store just enough power that when the main supply is cut, a GPIO notices, tells the Pi, and it begins a shutdown sequence lasting about 30 seconds.

While [Lutz] is using two 2.7V supercapacitors, he mentions it would be a lot cheaper to use a step-up converter instead of putting them in series — but he had the caps on hand so decided to use both.

If you need it to last a bit longer, you could make one with rechargeable batteries…

21 thoughts on “Raspberry Pi UPS Using Supercapacitors

  1. The big advantage of using supercaps is that you can recharge as fast as your components will allow. I made a little night light for my niece and had to put in a series resistance to keep it from overloading the charging wall-wort! It still charges in a few minutes.

  2. I just ordered a “UPiS Advanced” UPS for my raspberry pi for the same reason (making a wall-mounted waterproof media centre that gets switched on/off directly from the mains). A great piece of kit, but expensive. This looks like a cheaper but possibly more bulky option.

    Next time I’ll probably go this route — much more comfortable playing with these than a DIY LiPo charger.

    1. In this particular case, yes. But I think this would be handy in so many other applications. I’m specifically thinking of XBMC. I have a power strip that switches off with my television. I don’t power my Pi from that strip because of power down issues but this could change that.

  3. Step-up converter would also allow to suck all juice from capacitor. As capacitor discharge curve falls quickly it goes below usable voltage of raspi, while capacitor still has charge. This is one thing where batteries are ‘better’.

    1. Instead of a step-up converter, why not use a switching 3.3V regulator and power the Pi with 3.3V through the GPIO port? This way you bypass the Pi’s internal series regulator and consume less power from the caps. You can easily buy a switching regulator with up to a 97% efficiency rating. This one’s minimum input voltage is 4.7V.

      Go to 5 super caps in series and charge with a 12 V power supply and your Pi will run a long time!

      1. Sequences of greater than 3 supercaps require additional balancing circuitry. You could do a series/parallel config of any number of supers and derive substantial run time. There are some hi-density supers just coming to market with capacities of upwards of 300 F. Amazingly dense…

        1. I have done some work with Maxwell Boostcap(TM) Ultracaps a few years back. They are 350F/2.5V and size of a D cell. They can handle a heap of current.

          I was charging it at 50A (max) at one point with the charger I designed, but has to drop that down to 30A (max) because of connector ratings. :)

          Found this on ebay: http://www.ebay.com/itm/Maxwell-BCAP3000-BoostCap-UltraCapacitor-Capacitor-3000-Farads-2-7VDC-New-/180993691330


  4. This could be very useful for CNC situations where cheap drivers are prone to frying if they lose logic power before they lose motor power. Keeping the logic controller powered allows it to switch of the mains to the motors.

    1. Sound like they need to have proper power sequencing circuits than a UPS and the designers at the board level are the ones to be blamed for not having that.

      i.e. something like a MOSFET to cut off the motor supply when the logic rail drops.

  5. For that i use a Powerbank that supports charging while it is being charged.
    My Pi takes some time to shut down. It sends me a Mail, runs a sequence on the GPIO, shuts down the Server(s) running on that thing, and then at last shuts itself down.

    It takes about 30 minutes. And if the Power comes back, everything should go back up, and it won’t need to reboot.

    1. Can you give any hints as to which power bank? I got one that supports that feature, but it momentarily cuts power when the battery charger is attached. (maxoak 50,000 mah), so it’s more of an IPS D:

      It does power a pi for at least a day+ though, so hopefully my clocks will stay accurate even in blackouts :D

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.