The Raspberry Pi requires 5v of power through a 5v micro USB cable. Like any other computer, you can’t just pull the plug on power without potentially damaging the storage as well as the hardware. In this case, repeated unplugging of the cable can corrupt the SD card and over time, damage the components as well. In our application of using the Pi in a car, it will be powered on and off according to the ignition switch. This presents a major problem for anyone using the Pi with their car. When you shut off your car, power to the Pi via your car’s 12v cigarette lighter will cease. There are some exceptions and some cars’ ports continue to provide power. Even if that’s your case, you still will want the system to shut down once your car’s not running.
Raspberry Pi Battery Backup
The solution to using a Pi in a vehicle application is the Pi UPS. It’s a $30 component out of Germany that acts like any other UPS (Uninterruptible Power Supply) does for your computer.
It’s similar in functionality to what you might already have in your home or office:
What the Pi UPS does is allow for the Pi to shut down safely each time you turn off your car. When you hit the ignition switch, power is suddenly lost to the Pi and the Pi UPS senses that. It switches seamlessly to battery backup with the Pi noticing. It then sends a signal to the Pi to shutdown. The whole process takes 20 seconds by default and can be shortened.
Mine only took about 5 minutes to setup. It’s really easy to do and requires no tools at all. Their guide is pretty straightforward. After setup, you plug the USB cable into the Pi UPS instead of the Pi. That’s all there is to it.
Raspberry Pi with backup power supply and UPS
Raspberry Pi power supply attached to the Pi UPS