WillCK
Posts: 14
Joined: Mon Mar 18, 2013 7:59 pm

Inexpensive Battery Power for Pi

Thu Mar 21, 2013 5:34 pm

Ok, so there has been some discussion about running Pi off of a 4AA alkaline battery pack. That would work for a short while until the voltage drops out and your Pi gets unstable/shuts down.

Obviously in robotics we need a stable fairly light weight mobile power source to mount the Pi on a robot base and do cool things with it.

I looked around the web and found that cell phone charging battery packs/battery extenders were either expensive or didn't have the proper specs to run a Pi for any length of time.(not enough amperage)

So I took it upon myself to see what I could build inexpensively (pronounced "cheap") that would run the Pi for a decent amount of time....and here is what I came up with.

Here is what you need to do it:

A rechargeable battery of at least 6V. I used the tenergy 2000mAH 5AA 6V Nimh found here: http://www.all-battery.com/6v2000mahnim ... 11106.aspx
If weight isn't an issue they also have pretty inexpensive 6V Nimh packs in Sub C cells and D Cells.

A + 5V Voltage regulator. I used this one: http://www.radioshack.com/product/index ... Id=2062599

A short Micro B USB Cable

The total cost of components is around $15 (plus shipping). I had all this stuff laying around.

Simply wire up your battery to the positive and ground of the voltage regulator. Cut the Micro USB cable and strip back the outer casing and shielding and connect the positive (red) lead to the output of the voltage regulator, then tie the ground (black) leads from the voltage regulator, battery and USB Cable together.

Charge up your battery...plug in the USB cable to the Pi and Voila! ...battery powered Pi.

Side Note: I used servo wiring that I had laying around for this whole rig....which allows me to easily disconnect the battery for charging and also allows me to put an RC receiver pack switch inline to completely power down the Pi without disconnecting anything after proper shutdown. You can use a mini breadboard or servo wires or whatever small gauge wires you have laying around for this.

Cautions:
1. Capacitors are recommended in this circuit. I didn't use them as I like to live on the edge :)
2. Keep an eye on the temperature of the heat sink on your voltage regulator. Even with a 6v Source mine gets fairly warm. The higher voltage source you use...the more heat will be dissipated from the VR heat sink. If you need to...attach a larger heat sink to the VR.
3. I don't recommend Lipo batteries or Nicad batteries for this. Lipos are high output and volatile. You just need a steady 5V at something over 700mAH for this project. Nicads are really sensitive to depletion and charge levels. I find that Nimh is the best option for this particular project...but use your own judgement.

User avatar
rpdom
Posts: 17029
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Inexpensive Battery Power for Pi

Thu Mar 21, 2013 6:42 pm

Congratulations on getting that running :)

Just a few things though. The 7805 isn't a good choice of regulator. For one thing it is supposed to be run from a minimum of 7V supply, otherwise it will tend to provide under 5V output, or drop out completely. There are some low dropout regulators that will run from 6V without problems.

Also, it is a linear regulator and pretty inefficient. Going from 6V to 5V at 0.7A will mean it dissapates 1V at 0.7A (0.7W) of power as wasted heat. A switching regulator, while costing a little more (not much on ebay) will be much better at handling that, get more usable power out of your batteries and possibly even provide 5V when the battery voltage drops below 5V.

I run one of my RPis from a single LiPo cell (from an old Laptop battery pack) via a 3-4.5V to 5V switched supply that is about the same size as the 7805. I haven't timed it because I only run it for a few minutes at a time, but it seems to have lasted for over an hour on one charge so far :)

User avatar
exartemarte
Posts: 376
Joined: Sat Mar 03, 2012 3:51 pm
Location: Middle England
Contact: Website

Re: Inexpensive Battery Power for Pi

Thu Mar 21, 2013 8:03 pm

rpdom wrote:I run one of my RPis from a single LiPo cell (from an old Laptop battery pack) via a 3-4.5V to 5V switched supply that is about the same size as the 7805. I haven't timed it because I only run it for a few minutes at a time, but it seems to have lasted for over an hour on one charge so far :)
Snap! One of my current projects is a small 4WD robot built on a recycled R/C toy chassis, running on a 1800mAh Li-Po (which fits neatly into the original 3xAA battery compartment) via a tiny Hong Kong step-up regulator bought through eBay. I haven't run it on battery for any great length of time yet - I'm still working on the Pi-Arduino interface - but it's looking okay.

WillCK
Posts: 14
Joined: Mon Mar 18, 2013 7:59 pm

Re: Inexpensive Battery Power for Pi

Thu Mar 21, 2013 8:41 pm

I agree about the linear regulator....a switching regulator is definitely a better way to go...minimal heat build up and minimal wasted energy. The reason I mentioned the $2 regulator is ...that's what I had readily available...and ...they are $2. I see now Digi-Key has 5 terminal adjustable switching regulators fairly cheap. May have to pick some up.

I personally wouldn't use Lipos for this and I certainly wouldn't recommend them for kids getting into robotics on the Pi....but I realize Lipos are the latest battery tech and they provide alot of power in a lightweight package. I would just rather give up a little weight and output and use a battery that:

A. has very little risk of blowing up in my face
B. Is easy to charge, hard to damage and is fairly durable.

KevinO
Posts: 10
Joined: Thu Feb 21, 2013 12:12 am
Location: Pasadena, CA

Re: Inexpensive Battery Power for Pi

Thu Mar 21, 2013 11:01 pm

I am currently using one of these for my robot. I need a 3 cell lipo to power my servos so this has worked rather well. It isn't shown in the pictures but it has a capacitor to help regulate the voltage. So far it has worked flawlessly.

http://www.castlecreations.com/products/ccbec.html

For connection to the pi I use a micro usb breakout board.

https://www.sparkfun.com/products/10031

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13009
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Inexpensive Battery Power for Pi

Thu Mar 21, 2013 11:18 pm

WillCK wrote:The reason I mentioned the $2 regulator is ...that's what I had readily available...and ...they are $2. I see now Digi-Key has 5 terminal adjustable switching regulators fairly cheap. May have to pick some up.
For converting 6V to 5V at 1A I wouldn't advice using a switcher, as they too, just like the 7805 need at least 7 to 8 Volt input, and the very few ones that do not, and can convert 6V to 5V at say 1A do not have great efficiency.

I would propose to use a modern alternative for the old 7805, in the form of the L4940V5, same form factor as the 7805, and you can use it just like an 7805, but it can work with just a 5.5V input and can do 1.5A!

The "V5" means its a 5.0 Volt regulator there are others too, also needing just 0.5V input voltage above the output. Thats extremely low drop!

At 6V input and 750mA output its just dissipating 1V x 0.75A = 0.75 Watt. Thats little enough that you don't need a big heatsink, in fact you probably don't need a heatsink at all!

The L4940V5.... recommended!

Oh, and did I mention they are usually cheaper than the old 7805's, they often go for as little a €1,50! :D

User avatar
exartemarte
Posts: 376
Joined: Sat Mar 03, 2012 3:51 pm
Location: Middle England
Contact: Website

Re: Inexpensive Battery Power for Pi

Thu Mar 21, 2013 11:35 pm

WillCK wrote:I personally wouldn't use Lipos for this and I certainly wouldn't recommend them for kids getting into robotics on the Pi....but I realize Lipos are the latest battery tech and they provide alot of power in a lightweight package. I would just rather give up a little weight and output and use a battery that:

A. has very little risk of blowing up in my face
B. Is easy to charge, hard to damage and is fairly durable.
I think that's fair comment - I wouldn't recommend Li-Po's for kids getting into robotics either. I think the risks are sometimes overstated, but they are certainly potentially dangerous and need to be handled by people who understand the risks and know how to handle them. I build battery driven circuits carefully in any case - even NiCd or NiMh batteries are a fire hazard if they are shorted - and my Li-Po project has been held up by the need to understand the technology and construct a safe charging system.

I actually have two Pi-based robotics projects on the go, as well as one or two other things. One is based on a small recycled toy chassis and uses a Li-Po cell for size/weight reasons; the other is based on a larger, heavier VEX chassis and uses a 7.2v NiMh pack which will drive the motors directly and the electronics via a step-down switching regulator.

The regulator modules currently available from Hong Kong represent remarkable value. I considered building a 2596-based switch mode regulator, until I realised I could buy ready-made modules on eBay for less than it would cost me to buy the components.

kingwellenergy
Posts: 1
Joined: Wed May 21, 2014 8:02 am

Re: Inexpensive Battery Power for Pi

Wed May 21, 2014 8:05 am

Dave, can you provide a lsusb description of your wifi dongle – Im having great trouble getting one to work at 3.3v…

CR2032 battery ?

Return to “Automation, sensing and robotics”