Power

Ultimately, the Pi is going to be powered by a car battery. Because we don’t want to drain the battery when the car is off, I searched for a way to switch off the Pi as well. Of course, when you have a switched cigarette lighter socket on your car (as most cars do), it will never drain your battery. But it will also quite rigorously shut down your Pi by just killing the power to it. Not so nice when you’re in the middle of writing data to your database on the SD card…

I’ve searched quite a bit for a good way to power the Pi. I came across a car supply/switch which uses the live and switched +12V wires from your car and connects to the GPIO port so you can detect whether you’re running on battery or not (and decide whether to shutdown or not). Your car radio probably does almost the same thing; when you turn off your engine, the radio goes off, but still uses a little bit of power to keep al your settings. Seems like this little piece of hardware does just the job for us! Too bad it’s sold out…

My searches broadened, and a UPS (Uninterruptible Power Supply) popped up in the search results… This solves the problem! When the car shuts off, power to the lighter socket is killed, battery takes over, and I can perform a regular shutdown of the Pi! The Pi UPS is powered by 6 regular AA batteries, and the last stock is sold for just € 7.99. Too bad the device drains the batteries every week, even without running on battery power, and the Pi UPS doesn’t recharge them. I don’t want to get in my car booth every week just to replace 6 batteries, so this is a no-go. They are selling a PiUPS+ now, which does charge batteries, but also costs € 29.99, and will be available soon. But it’s quite some money for a souped-up battery charger…

But now searching for “Raspberry Pi UPS” specifically, I found more and more devices. The UPiS caught my eye. Check out that feature list. This is more than ‘just’ a UPS! But it comes at a hefty price of € 44.95… Searching on for a cheaper shop, I stumbled upon the creators website. Turns out the UPiS is end-of-life (and also not fully compatible with Raspberry Pi B+, it needs an adapter), and a new product has just been launched: UPS PiCO. If you thought the feature list of the UPiS was long, well… keep scrolling! This device does everything I need, plus more, for the friendly price of just € 23.99!

The PiCO is also HAT compliant. This means that it is specifically designed to fit on top of the Pi, mounting holes aligned, has a 40W GPIO header and supports the special autoconfiguration system that allows automatic GPIO setup and driver setup. And it fits in a ModMyPi Modular Case :).