Lets power that Pi!

small pic of solar pi

Most people run their Pi from a standard 5v USB socket, but you may be pleased to hear that it will actually run happily off a wider range of voltages, opening up some interesting options.

Officially it should be powered from any supply that puts out between (4.75v- 5.25v at 1amp). The original FAQ confirmed it could be run from 4xAA Batteries (so around 6V) In tests I’ve successfully run various Pi’s down to 4V and up to 6V. As with many manufacturers these parameters include a reasonable margin for variance so there is some leeway from the official conservative numbers. In this article we’ll stick within the recommended range but the brave can experiment a little further. Be aware that the amp rating is a ‘minimum’ rather than a maximum. You can happily offer the Pi from 5 or even 10 amps at 5v and it will just take the current it needs – its high volts that will damage the Pi.

The simplest and one of the most efficient alternate power sources for the Pi is actually just 4x nimh batteries. They are labelled with a ‘Nominal’ value of 1.2v but their voltage will range from around 1.1v when empty to about 1.4v when full –as you can see this fits pretty much perfectly with the voltage requirements when they are connected together in series (4.4v-5.6v) They are quite capable of supplying the 1amp the Pi may call upon under load with a bunch of accessories connected to it. In most cases though a more modest 400ma (less than half an amp) is the likely demand on them. This power option is really efficient as there are no regulators or other power sapping circuits in between the power source and the load.

current use of pi

Typical Power Usage of the Pi

Typical power usage from a Raspberry Pi ‘B’ model. Pi3 is about the same. A models require about half this current.

The quickest way to wire it up is to pick up a 4xnimh box like this one and cut a microusb lead in half wiring the Red positive leads and Black negative leads together (red to red ; black to black) and put some tape over the wires to prevent them touching each other. The remaining USB wires (usually Green and White) are data wires that the Pi does not use so you can happily cut these and leave them unconnected.

A neater solution is to wire up the battery box to a USB socket. battery box with usbi No doubt, like me, you will find many uses for this handy portable USB power supply. A few devices (such as iPhones) query the data lines before they will accept the power so you can’t use it without some further work, but for many devices it does the trick nicely. Depending on model you can run a Pi for between 3 hours (Model B) to over 7 hours (Model A+) which makes for a great portable power option for many users. You can easily move up from the AA batteries to some larger D sized batteries further increasing runtime by as much as a factor of 5 but if you are looking towards a 24 hour solution you may want to consider larger scale options...

Polycrystalline cells are formed from growing multiple silicon crystals into a square silicon ingot (so no chopped corners) and often achieve 14% efficiency. This makes them cheaper to buy. You can spot them as they tend to be blue in colour with a flaked pattern that shimmers in the sun.

Running the Pi from Lead Acid

For extended runtime over 10 hours you should likely look to 6v or 12v lead acid batteries and drop the voltage a little. Both are very viable and can store significantly more energy than smaller retail cells albeit not so portable.

The most accurate way to see how long a battery will power your Pi is to compare their Watt Hour (Wh) ratings. Mathematically this is the Voltage X Ah. As the Pi uses around 2 watts an hour every Wh will give around half an hour of Pi Time. A quicker rule of thumb is to simply look at the weight and size of the battery J. That heavy 12v Car battery will hold significantly more than a small 6v 7ah battery.

Just like AA NiMH you need to be aware of the batteries nominal or ‘sticker’ voltage. In reality a 6V lead acid battery will actually range from around 6V (flat) to around 7.2 (fully charged) As you can see this is outside of the voltage range that the Pi can officially accept. Clearly the 12v is even further wide of the mark! At these voltage levels we need to introduce a voltage Regulator to bring the voltage down to an acceptable level. There’s plenty of options here but my favourite is the LM2940T ( http://uk.rs-online.com/web/p/low-dropout-voltage-regulators/5335632/ ) it’s a nice low voltage drop regulator capable of taking a wide range of voltages and bringing it down reliably to 5V. I like it because it doesn’t waste precious volts which as you’ll see later I value dearly! And it can accept a really wide voltage range (from just over 6V all the way to 25V) I like to use a couple small capacitors to smooth the power supply and a heatsink but you can likely skip these for testing.

current use of pi

If you go this route you might want to put some alligator clips on the end of the wire and a USB port on the other to give you a nice portable socket that can let you run many USB devices from lots of power sources.

Batteries can only hold so much power..

No matter what size battery you use it will run out of power eventually, so you need to consider how to charge it back up again. Of course you could just use a standard wall socket charger but I love to use Solar instead as it makes the Pi very portable and of course much more ecological. It also opens up the world of off-grid independent operation where you can use them for time lapse photography or remote monitoring and control.

“Amazingly over 25% of the worlds electricity is now produced by renewables so its only fitting to take a look at how you can run your Pi in an eco-friendly way and potentially free yourself of the wall charger.”

Running a Pi solely from a solar panel is not really feasible for any length of time. The current produced by a solar panel fluctuates based on the amount of sunlight that hits the panel and won’t be able to consistently offer 1amp continuously. When the sun goes behind a cloud current will drop by as much as 90% which will lead to restarts of the Pi and possible SD card corruption. For this reason, you should look at an intermediate energy store for the suns energy. Balancing the size of the panel and battery is a fun game that will help you optimise the pair for your usage and weight. The quick way to determine what you need is again to look at how many Watts the panel can supply and look at how many Watt Hours the batteries can store. A Pi uses around 2 watts an hour, so if you want to run the pi for 10 hours you need at least 20 watt hours over that period. A large 20Wh battery with no solar is one way to achieve this or a smaller 10Wh battery and a panel large enough to generate the remaining 10Wh over a 10 hour period would meet the same criteria. On a sunny day you could use a 3 watt solar panel and cover that gap quite nicely. The advantage with solar is that you aren’t paying for the power to top it back up. If you are looking for 24 x 7 operation the math is the same, you just need to consider how many days without sun you may need to cater for and how quickly you need to top that battery back up again. There are some nice charts available to predict the amount of sun you can expect wherever you are in the world.

If you want a nice cheap, basic way to utilise solar you can do this really easily – just connect pretty much any small 6v-9v solar panel to your 4xnimh cells –One that can put out between 100ma and 200ma would be would be perfect. Unlike Li-ion and lead acid, rechargeable NiMH batteries are pretty forgiving and can handle being overcharged a little – they will warm up when full just like they do when you charge them from a home charger. I recommend up to 200ma as this is about a tenth of their capacity rating - and is the current many old commercial chargers used to keep cells ‘ready for use’ after finishing their higher charge rate. Solar has a great property that the voltage will ‘meet’ the battery at the voltage it needs so you could even connect a 12v, 100ma solar panel to the batteries without issue.

I always put a diode on the positive wire between panel and battery so that it prevents the batteries losing energy at night through the panel. A 1amp 40v schottky diode http://uk.rs-online.com/web/p/rectifier-schottky-diodes/4864460/ is perfect as Schottkys have low voltage drop (around 0.3v) and those ratings are more than it needs to handle.


If you plan to use a 12v Battery rather than NiMH batteries you should use a commercial 3 or 4 stage charge controller to protect the battery from overcharge.

My Perfect Pi Charger

I’ve combined much of the above learnings and advice in to my Cottonpickers Solar Pi Case. It integrates a small (1.25 watt) Solar panel with a NiMH battery holder in a neat, compact, rugged 3D printed case. I wanted to be able to charge the batteries inside the case either from either a standard USB wall charger or from the built in solar panel. I use an efficient step up voltage converter to achieve this. When charged up and in the sun you can run the Pi for over 7 hours – which for me was the perfect combination of runtime and portability. To really take the pi anywhere you can add one of the many TFT displays, and amazingly it is still quite happy to run off this Solar and NiMH combination for a few hours. current use of pi


Twitter: @cottonpickers

Have an idea, or something to offer and want to work with me? -I'm listening ..