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…
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.
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.
or use A10-OLinuXino-LIME which have build in LiPo battery charger and UPS management under linux :)
THe OLinuxOs look nice. Is there mainline support though? I thought they were just Android right now.
http://linux-sunxi.org/Mainlining_Effort
there is stabile 3.4 kernel and Debian 7, Ubuntu 13.10 etc distributions
Hm, mount root read-only and just pull the power any time you like? A bit cheaper. Assuming a lamp doesn’t need persistent storage? :)
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.
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’.
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.
http://www.digikey.com/product-detail/en/V7803-1500/102-2170-ND/2352129
Go to 5 super caps in series and charge with a 12 V power supply and your Pi will run a long time!
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…
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
3000F!
I think you’d have to remove the onboard 3.3v regulator from the circuit to do that, as well as feed something (at least the 3.3v) to the 5v rail for the SoC.
Here is a supercapacitor based micro UPS for the Raspberry Pi using a step-up/down converter:
http://www.juice4halt.com
It is intended to cover a short time while the RPi is in Shut-Down process and covers also brown-outs lasting a few seconds.
Does the Pi have a low power sleep mode? If so how long would this run keep it alive? The idea of waiting for a boot to use a lamp seems just a bit much.
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.
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.
Mobile phone battery banks? Should be able to run the Pi for hours after the power is gone.
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.
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
Does anyone have the scheme of the circuit with the step up (or step up and down) converter? Does it solve the problem of the long discharge time after the Pi shutdown?
Hackerpsace :D