Want to get your Raspberry Pi out of the house and involved in some mobile projects (like, for instance, a budget space program)? You’ll need a battery, and there are several choices available, including a DIY option.
Portable Power Requirements for the Raspberry Pi
Just like static Raspberry Projects (things like a media centre or retro gaming station), portable uses for the Raspberry Pi need to be powered by a good quality 5V micro USB mains adaptor with a 1.2A (1200mA) current (although 1000mA should suffice for most projects on the first generation Pis). However, the four USB ports of the Raspberry Pi B+ benefits from a supply of 2.5A (2500mA) if you plan to connect devices without a powered hub.
Which power supply you need depends on the final application of your Pi. The GPIO pins have a total requirement of 50mA, the HDMI port 250mA and keyboards as little as 100mA (dependent on model, of course). The Raspberry Pi camera requires 250mA.
Checking the power rating of devices you plan to connect will give you an idea of the likely minimum requirements. It should also help you determine the best portable power option.
The Powered-Up Option
Any portable battery designed to charge a smartphone over USB can be used with the Raspberry Pi.
One such option is the Intocircuit Power Castle, for less than $100 on Amazon. With a huge 26,000mAh charge, this device supplies a maximum 2.1A over USB, which makes it ideal for a Raspberry Pi with USB devices connected. The Power Castle impressed in our review, and can also higher voltages required for a laptop – so you can be sure that the device can keep your Pi running. Note that it weighs around 1.47 lbs, which is roughly the same as half a bag of flour, but contains enough juice to charge a smartphone 12 times over!
Also worth considering is the Zilo Smart Power Basic. Again intended for smartphones, it can push a maximum 2A through the USB cable, which makes it ideal for powering portable Raspberry Pi projects. Crucially, this charger weighs just 2.88 oz, so while the Power Castle might be an absolute power house, it is this little fella that is more suited to travelling into near-Earth orbit. And of course, it will also charge your smartphone pretty quickly.
MoPi: Mobile Pi Power
Looking for a solution that’s a bit more home-spun? The MoPi: Mobile Pi is a good solution, and has its roots in a successful Kickstarter campaign. Designed to connect to the GPIO pins, it comes in two flavors, one low profile and another with its own GPIO for stacking other boards onto your Pi.
The MoPi is a power regulator, offering multiple inputs – anything from standard batteries and car power sockets to solar cells can be connected – and it has a hot-swap facility, meaning you can add and remove power supplies without interrupting work. This means that the MoPi can be used as the key component of a UPS system, and when power begins to run out, the MoPi can instruct the Raspberry Pi to shutdown cleanly, preventing data loss to the SD card.
Although the MoPi doesn’t provide power itself, it provides the means for you to add various supplies, and given its wide functionality the $40 price seems more than reasonable.
Go Totally DIY: Build Your Own Portable Raspberry Pi Power Supply
In keeping with the nature of the Raspberry Pi, you might opt to build your own portable power supply. You can do this relatively cheaply, employing a battery box suitable for six or more AA batteries (four is enough to boot the Pi on, but you won’t be able to do much) and a Universal Battery Elimination Circuit. This UBEC is a power regulator which prevents the batteries from damaging the Pi, so should be considered a vital component.
Both of these components can be purchased for a total price of less than $15 including postage, and once you have them the construction of your DIY portable battery pack is reasonably simple. Begin by connecting the red wire on the battery box to the red wire on the UBEC, and repeat this for the black wire. You might do this using a terminal strip, or simply by twisting and soldering the wires together.
Depending on which type of UBEC you purchase, you may need to perform some customization here. Many ship with a micro USB connector for your Raspberry Pi, but if you receive the three pin GPIO connector, then you will need to move the red wire to the outermost pin slot. Do this by releasing the catch on the connector; you can then pull the red wire from the middle slot and insert it in the outermost slot. This wire can then be connected to the GPIO on pins 2 (the +5V red wire) and 6.
To power up your Raspberry Pi, insert all but one of the batteries into the box and connect everything. When you’re ready, add the final battery and watch the status lights as the Pi boots. Success!
How Long Will Batteries Last?
Your chosen power cell’s duration will depend on use. If you built a handheld gaming system then it is likely the charge will be depleted more quickly than with a simpler use such as monitoring your garden.
To get an idea of the maximum duration, connect your Wi-Fi dongle to the Pi and SSH to the device after it boots. Here, enter the command
watch -n 60 uptime
This will keep the Wi-Fi connection alive, enabling you to get an idea of how long the Pi is running. On the lower powered 256 MB Model A you can expect as much as 16 hours of charge from six AA batteries, and this is a good point of reference for all portable power solutions.
Which portable Raspberry Pi power solution suits you? Have you tried an alternative, or do you have any questions? Let us know in the comments.
Image Credits: nuclear energy Via Shutterstock