User Tools

Site Tools


designs:power:pi:usbbattery
Powering the Raspberry Pi off a standard mobile phone "emergency charger" battery pack.

This is the most straightforward approach and doesn't require any soldering - just plug a USB A to Micro-USB B cable between the battery pack and the Pi and you're done. Many of the higher quality packs will also have a battery meter on them and allow you to charge the pack while it powers the Pi so you can keep the Pi running indefinitely. Just make sure you remember to plug it into a USB charger when it's not being used.

The downside is that you'll have a separate battery that you'll need to put somewhere on the robot, increasing the weight.

The Raspberry Pi under stress doesn't tend to draw more than 500mA so you can compute runtime for a given pack by dividing the capacity (in mAh) by this amount. Note that you do sometimes need to take the claimed rating of a pack with a suitably sized grain of salt (in some cases they're quoting the mAh rating of the underlying 3.7V lithium ion battery so you'll need to approximately halve it to account for the difference in current and loss through the 5V boost converter, in other cases they're outright lying). In general, even the smaller packs should give around 1h of runtime.

We highly recommend testing any given pack before buying a pile of them. Here are things to watch out for.

  • Some of them, such as https://www.adafruit.com/products/1565 , will charge and power. But when you connect and disconnect the charger into the pack, the output will flicker and cause the Pi to reset. Cost is not necessarily a factor here. I have a really cheap “lipstick” style no-name-brand emergency charger that'll happily power the Pi while itself going on and off charge without any issues. I've got another rather more expensive unit that blips the power to the Pi when coming on and off charge, causing it to reset every time.
  • In some cases, the packs will only charge slowly. Some of the ones I've tried will only charge at 300mA. If the Pi is kept busy it may not charge fast enough to keep itself topped up. If the Pi is truly idling it shouldn't draw more than 100mA or so (200mA if there's a PiTFT screen at full brightness) but if something is running in the background it can stay at 500mA for long periods of time. A couple of USB power monitors, one on the input to the battery and one on the output, are probably a good idea when testing these battery packs.
designs/power/pi/usbbattery.txt · Last modified: 2015/04/29 20:24 by raymondsheh