Having previously run my Raspberry Pi from a set of AA batteries I decided to test all the different types I had available to see which ones lasted the longest.
This wasn’t going to be a scientific test but I wanted a general feeling for how the batteries performed given their different capabilities and price.
- Sanyo eneloop (2000mAh)
- Sanyo eneloop XX (2550mAh)
- 7DayShop Rechargeables (2900mAh)
- 7DayShop “Good to Go” Rechargeables (2150mAh)
- Maxell Alkaline Non-Rechargeables
Due to the time required to run the tests and re-charge the batteries I opted for running the tests with a Raspberry Pi Model B (rev 2) rather than a Model A. Where possible I performed two tests with each set and took the average runtime.
The equipment I used was :
- 6 cell AA battery holder
- HobbyKing UBEC voltage regulator
- Maplin 4 cell battery charger
- Raspberry Pi Model B (256mb, rev2)
- BerryClip addon board
- Kingston 2GB SD card with latest Raspbian image
I used a BerryClip so a Python script could provide some visual indication using it’s LEDs. This proved the Pi was processing data throughout the test. I soldered a few pins to the PCB to allow me to attach the wires from the regulator.
With a fresh set of batteries I loaded up the battery holder, connected it to the UBEC and connected that directly to the GPIO Pin 2 (+5V) and Pin 6 (Ground) via the BerryClip PCB. For each test I measured the voltage of the battery pack and the voltage provided by the voltage regulator.
I then used Putty to connect to the Pi via SSH and grabbed the Python test script from my site using :
Then ran it using :
sudo python battery_uptime_test.py
The Python script turned the 6 LEDs on and off in sequence while the uptime was displayed in the Putty terminal window on the PC. I simply waited for the batteries to run out of power at which point the terminal window would stop updating. The total runtime could then be noted for that set of batteries.
Here are results :
|Sanyo eneloop XX||2550||8:50|
|7DayShop “Good To Go”||2150||8:00|
The results clearly showed the dominance of high capacity rechargeables over standard Alkaline batteries. Given the huge cost per hour I can’t see any real point using Alkalines in Raspberry Pi projects.
When choosing between the others you’ve got a choice. The 7DayShop 2900mAh batteries last longer and are good value for money. For experimenting you should probably consider using these. The Sanyo eneloop and Sanyo eneloop XX are almost there in terms of runtime but are more expensive. They do however have one huge advantage which may justify the extra cost. They are “hybrids” using a more advanced technology and hold their charge over a much longer period of time (85%+ over 1 year). More information can be found on the eneloop Wikipedia page.
The 7DayShop “Good to Go” batteries sit in the middle. They are hybrids and hold their charge but have a modest capacity compared to the eneloops which is reflected in their lower price.
If you plan to charge and then use immediately go for the 7DayShop 2900mAh cells. I use these for kids toys and torches on camping trips etc. They are cheap and I don’t have to worry about the self-discharge.
If you want to charge and not lose much capacity over time then go for one of the Sanyo eneloop variants. The eneloop XX cells are great for digital cameras and long service items as you can depend on them working months or even years after you charged them up. For this reason I use them in my automatic cat feeder which spends a lot of time waiting to be used.
Here are some photos of the batteries I used in the tests :