Third party cookies may be stored when visiting this site. Please see the cookie information.

PenguinTutor YouTube Channel

Battery powered computer - Raspberry Pi using AA or D size batteries

A feature of the Raspberry Pi is that it uses very little power for a computer. Admittedly it takes a lot more power than a micro-controller (such as an Arduino), but it's still low enough to consider running it from batteries.

Raspberry Pi running on D-size batteries

I first did some testing with using a battery powered Raspberry Pi to help users on the Raspberry Pi forum, but I've since been looking at my own battery powered Raspberry Pi project.

The power for the Raspberry Pi needs to be around 5v. The normal supply voltage range for USB is from 4.75 to 5.25 which is the target voltage. It so happens that this is 4 times standard battery voltages for rechargeable batteries which are rated at 1.2v per battery. In the case of normal disposable batteries each battery is 1.5v, which gives a total of 6 volts which is over the allowed voltage. I haven't tried exceeding the voltage, but a small amount should be OK; there is a TVS (transient voltage suppressor) diode at the input so as long as connecting through the micro-USB port then the worst case it should trip the input fuse. If providing power through the GPIO then you should look at adding a 1.3A fuse to provide the same protection. Another reason for only using rechargeable batteries is how quickly the batteries run flat...

I first tried running the Raspberry Pi using 4 x NiMh AA batteries each rated at 2100mAh (high capacity rechargeable batteries). This gives about 5.2v fully charged (note the initial voltage is higher than the rated voltage).

To test the running time the power was connected to the Pi through the GPIO (nothing else connected) and a crontab job running to record the uptime every minute. Voltage dropped to about 5v when powered up and slowly decreased over time. The Pi was still running when the voltage dropped to less than 4.25V - although I expect it would not have been able to power most USB devices before that point was reached. The Raspberry Pi ran on batteries for about 3 hours 30 minutes before it failed.

I then tried with Ethernet connection (still no monitor / keyboard - after all if you can power a monitor you probably have a better power source than AA batteries). I also added a cron job on another machine to probe the Pi at 1 minute intervals (simulate remote monitoring application). I measured the current this time which peaked at about 430mA, ran normally at between 360mA and 400mA.
The network connection remained active for about 2 hours 15 minutes and the Pi continued to work without networking for a further 25 minutes.

For my next test I used D-size batteries. I looked to get high capacity rechargeable batteries to aim for longest uptime. I bought some High capacity 5000mAh D-cell batteries from Maplin. These batteries have a good power to price ratio, but even so cost more than a Model A Raspberry Pi. There are even higher capacity batteries available, but they are considerably more expensive.

It's worth noting that D-size batteries are much bigger and heavier than the other battery types. In this case the 5000mAh provided by the D-size batteries is more than the equivalent smaller C-size batteries, but that is not the case for all brands and types of batteries. So if size and weight are a requirement you may want to consider C-size instead.

I tested these by connecting the supply to the GPIO connector as before. This was done using an Adafruit cobbler (break-out connector) connected to a breadboard.

Whilst I previously stated it's less likely you'd want to have a monitor connected when running on battery that's exactly what I need for this particular project which is intended to work stand-alone, but with the option to connect to a monitor or TV. I therefore had the Raspberry Pi connected to a monitor via a HDMI powered HDMI to VGA convertor and standard wired keyboard and mouse. In this case I achieved an uptime of 5 hours.

If you are in a situation where you need to run off batteries then chances are going to be no Ethernet. With the model A the lack of Ethernet will save some power. I'm still waiting on my model A to arrive, but I will look at a comparison of how long the Model-A can operate.

Standard rechargeable batteries can be used for powering the Raspberry Pi. Obviously any additional peripherals will take more power from the batteries. If size and weight is an issue then AA batteries are available in reasonably high capacity for a relatively short period of time. Larger C or D batteries can be used to provide a longer running time, but with increased weight and size. If a longer run-time is required then it will need bigger or more specialist batteries.

See the guides and blog posts relating to the Raspberry Pi. Also see the Linux Tutorials for more information on using Linux.

--

Update:

My model A Rasberry Pi has now arrived and the uptime running on batteries is much better than the model B.
I've not done a proper scientific comparison as I needed to test it in the project. So for the purpose of this test there was nothing connected to the HDMI port, but there was a USB powered MP3 player speaker connected to the USB port and the 3.5mm audio output. I also rebooted the Pi part way through the test as I needed to make some minor changes and test the startup script. Total uptime on a single charge was 21.5 hours, over 4 times longer than the model B.

As I said this is not a fair comparison, but it should be accurate enough for an approximate guide. I does show that the model A uses considerably less power than the model B.