Jack1384
Posts: 1
Joined: Sat Oct 06, 2012 4:40 am

How to battery power?

Sat Oct 06, 2012 4:49 am

I want to do a portable project with my Pi, but don't want to fry the circuits with too much power. 3 batteries make 4.5 volts, and 4 make 6 volts. Will 6 volts (4 AA batteries) damage the Pi, or does it not matter?

Genius23008
Posts: 54
Joined: Sun Jun 03, 2012 6:50 am

Re: How to battery power?

Sat Oct 06, 2012 8:59 am

5.3 volts didn't damage my Pi, I dunno about 6V...


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

Re: How to battery power?

Sat Oct 06, 2012 11:09 am

The PI itself is reasonably insensitive to undervolting, but If you are using USB devices on the PI, or connect to a HDMI then these devices might not be happy with too low power voltages, and USB devices may trigger crashes which prevent booting the PI. If you have the older revision one board (without mounting holes) the USB fuses (F1, F2) make that problem worse.

If you are overvolting (applying too much voltage, say more than 6.4V), then an overvoltage protection device on the PI (SMAJ5V) may short the power supply in an attempt to protect the PI, and this will blow the power input fuse on board the PI, which may take forever to recover.

The PI isn't designed to be powered directly from batteries, (an alpha version of the board, never released to the public was) so the FAQ is actually wrong on the subject!

If you want to battery power the PI, you need a converter that converts whatever the battery delivers into 5V stabilized and regulated to 5%, (0.25V) and able to deliver at least 750mA.

The cheapest and simplest solution to do that would be to use a 9 to 12V (car/moped) battery and a car's "cigar plug" converter with an USB type-A connector. These are sold for a few euro/$ so you can power your MP3 player in the car.

Also the PI uses about 2W, so if you would use say six AA batteries (1500mA/H 1.5V) to create 9V for the regulator, it could only power the PI for something like two hours, probably less.

Wisar
Posts: 60
Joined: Tue Sep 25, 2012 6:33 am
Location: Temple near Marlow, England
Contact: Website

Re: How to battery power?

Mon Oct 08, 2012 10:07 am

This hardware stuff confuses me :o The wimpiest of AA batteries, a nicad, should produce between 600 and 1000mAh of power. So a nine battery stack should provide between 4.5 and 7.5 watt hours (volts times amps or .6 amps * 6 batteries * 1.25v). If the RPi uses 2 watts then should it not run for 2.25 to 3.75 hours...and even more on alkaline batteries? Granted this is not what is happening for me in reality but I want the math to match reality and I know I am screwing something up!

poing
Posts: 1132
Joined: Thu Mar 08, 2012 3:32 pm

Re: How to battery power?

Mon Oct 08, 2012 11:51 am

I use this device: http://ianker.com/Anker-Astro-10000mAh- ... ine_id=114

It has 10,000 mAh capacity, but uses 30% for internal resistance and voltage conversion. With a Pi, USB hub, 64GB USB stick, card reader with 16GB CF card and a WiFi USB stick connected it runs for 7+ hours without problems. Assuming a 1A load that seems to pan out, although my setup should draw less. But these kind of batteries always need a few load cycles to gain full capacity so I'm confident I will be able to power the set for at least 8 hours in the near future.

drgeoff
Posts: 10674
Joined: Wed Jan 25, 2012 6:39 pm

Re: How to battery power?

Mon Oct 08, 2012 12:12 pm

Wisar wrote:This hardware stuff confuses me :o The wimpiest of AA batteries, a nicad, should produce between 600 and 1000mAh of power. So a nine battery stack should provide between 4.5 and 7.5 watt hours (volts times amps or .6 amps * 6 batteries * 1.25v). If the RPi uses 2 watts then should it not run for 2.25 to 3.75 hours...and even more on alkaline batteries? Granted this is not what is happening for me in reality but I want the math to match reality and I know I am screwing something up!
Your maths answer is in the right ball-park (even though you seem to be confusing power with Ampere-hours) but are you really putting 6 cells in series (I assume '9 battery stack' was a typo) and connecting that directly to your RPi's 5 volt supply input?

Wisar
Posts: 60
Joined: Tue Sep 25, 2012 6:33 am
Location: Temple near Marlow, England
Contact: Website

Re: How to battery power?

Mon Oct 08, 2012 4:11 pm

I think I meant watt hours...just typed less. I also meant six battery stack (delivering nine or so volts). Will do a better job of proofing before pressing submit!

No, I think 8 or 9v would well and truly fry the RPi! I have a voltage regulator in between the battery pack and the RPi to step it down to the 5v needed there. It is a cheap china import and I think I am losing a lot going through it to be truthful. I had a better on that seemed more efficient but it did get fried when someone crossed polarities...............

Wisar

aaa801
Posts: 428
Joined: Mon Jun 04, 2012 9:06 pm
Location: Berkshire

Re: How to battery power?

Mon Oct 08, 2012 4:53 pm

I just got one of these, the chinese one is going to take FOREVER to get here =/

http://www.ebay.co.uk/itm/280963026967? ... 1497.l2649

Wisar
Posts: 60
Joined: Tue Sep 25, 2012 6:33 am
Location: Temple near Marlow, England
Contact: Website

Re: How to battery power?

Mon Oct 08, 2012 6:50 pm

aaa801: I have one of those chinese imports you pointed to in an earlier post on the way along with a Li-ion battery! My current solution can wait until then though it will take a while.......

Wisar

aaa801
Posts: 428
Joined: Mon Jun 04, 2012 9:06 pm
Location: Berkshire

Re: How to battery power?

Mon Oct 08, 2012 9:50 pm

Wisar wrote:aaa801: I have one of those chinese imports you pointed to in an earlier post on the way along with a Li-ion battery! My current solution can wait until then though it will take a while.......

Wisar
What lion battery are you using,
i just ordered this thing, gona get a small jack and hook it up to the regulator, SHOULD work ok ;)
http://www.ebay.co.uk/itm/250919245956? ... 1497.l2649

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

Re: How to battery power?

Tue Oct 09, 2012 12:13 am

Wisar wrote:This hardware stuff confuses me :o The wimpiest of AA batteries, a nicad, should produce between 600 and 1000mAh of power. So a nine battery stack should provide between 4.5 and 7.5 watt hours (volts times amps or .6 amps * 6 batteries * 1.25v). If the RPi uses 2 watts then should it not run for 2.25 to 3.75 hours...and even more on alkaline batteries? Granted this is not what is happening for me in reality but I want the math to match reality and I know I am screwing something up!
Actually I think my guestimate was actually way off, and I also was thinking that maybe more modern NiMH rechargeables, would be better, they routinely do at least 2000mA/H at about 1.2 Volt.

Lets calculate this a bit better:
To get at least 9V for a "cigar plug converter", (which is designed for 12V, but most often uses a chip that can also work with about 9V) you need 9/1.2 = 7.5 = 8 batteries.
Together these eight 2000mA/H 1.2V batteries have about 2(A) x 1.2(V) x 8 = 19,2 Watt hours, or 2.4 Watt hour per battery. The conversion rendement of the converter is probably something like 80%, so 19.2 * 0.8 = only about 15 Watt/H that reaches the PI. The current consumption of a PI depends heavily on what its doing, but typically it draws maybe 450mA @ 5V, but including a mouse and keyboard that will be closer to 500mA, which means 2.5 Watt. So if the batteries do not drop prematurely you can run an estimated 15 Watt/hour / 2.5 Watt = 6 Hours, but as ever your mileage may vary.

Wisar
Posts: 60
Joined: Tue Sep 25, 2012 6:33 am
Location: Temple near Marlow, England
Contact: Website

Re: How to battery power?

Tue Oct 09, 2012 5:56 am

mahjongg:

My numbers agree with yours...now on to the pursuit of what reality actually delivers! My total power requirement includes my chassis, sensors carried by the chassis, an Arduino, a USB hub as I need more than the two on the RPi, and of course, the RPi (and a wireless adapter and a webcam). To power all this I will have a couple of battery packs. Yes, when my RPI grows up it is going to be in charge of a little tracked robot kinda thing that will run autonomously and do nothing useful as my wife has pointed out 100 times.

If anyone is interested in these calculations here is a spreadsheet that can be used to model your own requirement:

https://docs.google.com/open?id=0BxF8Io ... Xk3eTVBNVU

Wisar

Wisar
Posts: 60
Joined: Tue Sep 25, 2012 6:33 am
Location: Temple near Marlow, England
Contact: Website

Re: How to battery power?

Tue Oct 09, 2012 9:33 am

Am now trying to assess what is actually happening on the reality side of the above equations and have another issue. My power for the RPi and for the USB hub both come through a power regulator. I have that regulator connected to a wall dongle so it can get regular steady power. Everything is bread boarded so it is easy to stick a meter into the mix.

When I try to measure the current draw I get what looks like an average draw of 200mAh or so...the problem being that the RPi does not seem to boot (network does not start and logs show no entries). Unfortunately I have killed the serial port on the RPi so I can not connect a console but when I connect it to a TV it shows that it is just looping on trying to boot. Shows colored screen, flashes some console messages, back to colored screen. In this test the RPi is connected to the powered USB hub but has nothing else attached that is drawing power.

On the peripherals front...the USB hub, with a wireless dongle, webcam, and Arduino connected, routinely draws between 200 and 230 mAh depending on how active the network connection is and whether a picture is being taken.

What I don't understand is why have a digital multimeter in the circuit to measure current draw from the RPi would have such a profound impact on it? Could it be dropping the voltage, or impacting the current available, just enough to cause a boot problem? I think the bottom line is that my cheap power regulator is just that.

Wisar

poing
Posts: 1132
Joined: Thu Mar 08, 2012 3:32 pm

Re: How to battery power?

Tue Oct 09, 2012 11:16 am

My cheap multimeters have a max of 200mA for measuring Amperage. One of them has a 200mA fused input and a 10A unfused one. My guess is yours works likewise and the current is capped.

drgeoff
Posts: 10674
Joined: Wed Jan 25, 2012 6:39 pm

Re: How to battery power?

Tue Oct 09, 2012 1:09 pm

poing wrote:My cheap multimeters have a max of 200mA for measuring Amperage. One of them has a 200mA fused input and a 10A unfused one. My guess is yours works likewise and the current is capped.
Your guess would be wrong! A meter cannot 'cap' the current through it. Excessive current could blow a fuse if present or burn out PCB tracks or damage precision resistors.

drgeoff
Posts: 10674
Joined: Wed Jan 25, 2012 6:39 pm

Re: How to battery power?

Tue Oct 09, 2012 1:27 pm

Wisar wrote:Am now trying to assess what is actually happening on the reality side of the above equations and have another issue. My power for the RPi and for the USB hub both come through a power regulator. I have that regulator connected to a wall dongle so it can get regular steady power. Everything is bread boarded so it is easy to stick a meter into the mix.

When I try to measure the current draw I get what looks like an average draw of 200mAh or so...the problem being that the RPi does not seem to boot (network does not start and logs show no entries). Unfortunately I have killed the serial port on the RPi so I can not connect a console but when I connect it to a TV it shows that it is just looping on trying to boot. Shows colored screen, flashes some console messages, back to colored screen. In this test the RPi is connected to the powered USB hub but has nothing else attached that is drawing power.

On the peripherals front...the USB hub, with a wireless dongle, webcam, and Arduino connected, routinely draws between 200 and 230 mAh depending on how active the network connection is and whether a picture is being taken.

What I don't understand is why have a digital multimeter in the circuit to measure current draw from the RPi would have such a profound impact on it? Could it be dropping the voltage, or impacting the current available, just enough to cause a boot problem? I think the bottom line is that my cheap power regulator is just that.

Wisar
Such rebooting frequently signifies lack of power to the RPi. As more bits of it 'come online' as it boots the current demand increases. If that cannot be supplied the voltage drops and and the RPi reboots.

Any meter measuring current will cause a voltage drop. And any meter measuring voltage will take some current from the circuit under test. With analogue meters the two effects are strongly correlated. The current draw can be deduced from the 'Ohms per Volt' which is often written in a corner of the meter scale. A good analogue multimeter is typically 20Kohms/Volt and draws 50 microamps if the needle moves to full scale deflection. The really cheap ones can be 2Kohms/volt.

With a digital meter things are usually not so straightforward but I wouldn't be surprised if it drops 0.2 volts for a full '1999' reading. What meter are you using?

Wisar
Posts: 60
Joined: Tue Sep 25, 2012 6:33 am
Location: Temple near Marlow, England
Contact: Website

Re: How to battery power?

Tue Oct 09, 2012 3:15 pm

Re what multi-meter...

Errr....one that you can get for 6 quid on eBay? A DT830B to be specific. Any drop in power available is a problem given my current under power situation combined with a cheap power regulator. Better batteries and another regulator are on the way.....

http://compare.ebay.co.uk/like/23077834 ... adtype=pla

Thanks for the help,
Wisar

drgeoff
Posts: 10674
Joined: Wed Jan 25, 2012 6:39 pm

Re: How to battery power?

Tue Oct 09, 2012 6:46 pm

Wisar wrote:Re what multi-meter...

Errr....one that you can get for 6 quid on eBay? A DT830B to be specific. Any drop in power available is a problem given my current under power situation combined with a cheap power regulator. Better batteries and another regulator are on the way.....

http://compare.ebay.co.uk/like/23077834 ... adtype=pla

Thanks for the help,
Wisar
I just happen to have a DT830B (and two more that look very similar). I used another DMM to measure the resistance of the DT830B plus leads when switched to 200mA. A touch under 2 ohms.

User avatar
k4gbb
Posts: 52
Joined: Sun Aug 12, 2012 5:33 am
Location: Dunnellon, FL USA - EL88tx

Re: How to battery power?

Tue Oct 09, 2012 7:18 pm

I run my Pi from a 12 VDC source.
I mounted this little device http://www.digikey.com/product-detail/e ... ND/2259781 on a piece of perf-board and fed it 13 VDC from my HAM Radio PSU.
The output of the device is a constant 4.99 volts and is rated at 1.5 amps.

The cost was $5 and I have one for the Raspberry and one for my Sheevaplug.
The Grass may be greener on the other side of the fence, but it still has to be mowed.

User avatar
penguintutor
Posts: 386
Joined: Tue May 08, 2012 9:11 am
Location: UK
Contact: Website

Re: How to battery power?

Thu Oct 11, 2012 8:44 pm

I've successfully run a Pi off 4 x AA batteries, but you'll only get a couple of hours or so.

I just used 4 x rechargeable 2100mAh batteries in series. This gives about 5.2v fully charged. Note using normal non-rechargeable batteries will result in a higher voltage - I don't know how the Pi will react to that.

Connected this to the Pi (nothing else connected) and used a crontab to record the uptime every minute. Voltage dropped to about 5v when powered up and slowly dropped. The Pi was still running at less than 4.25V - although I expect it would not have been able to power most USB devices before that point. Unfortunately my 1st multimeter has died (after 20years service) and my third is not accurate enough, so I wasn't able to measure voltage and current at the same time. That ran for about 3 hours 30 minutes.

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.

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, but adding wireless dongle will probably take a little more than the wired Ethernet. The bigger problem with wireless is that I guess the dongle will stop working at a higher voltage than the Pi.

So AA batteries can be used if it's only for a short period of time. I'm guessing some kind of on-board computer for a robot or model aircraft etc. Obviously any additional peripherals will take more power from the batteries. Looking for anything longer and you are going to need bigger or more specialist batteries.

bgirardot
Posts: 517
Joined: Wed Oct 10, 2012 6:20 am
Location: Switzerland

Re: How to battery power?

Thu Oct 11, 2012 8:53 pm

I just read a nice article on building a voltage regulating circuit for a RPi for battery based operation in the latest issue of MagPi (Oct12, #6).

http://www.themagpi.com/

Wisar
Posts: 60
Joined: Tue Sep 25, 2012 6:33 am
Location: Temple near Marlow, England
Contact: Website

Re: How to battery power?

Fri Oct 19, 2012 7:50 am

Stewart:

Your testing mirrors my reality. The first thing the RPi seems to drop when power starts to fade is the wireless network. Since I am building a 'bot (http://raspberrypirobot.blogspot.co.uk/) that wants to call home this is an issue. My platform can support a lot of batteries but I am suffering from having ordered another power regulator from China after frying the first one that I bought locally. I may just build the one suggested above...it is all about the tinkering.

Wisar

LaWFuLEviL
Posts: 6
Joined: Fri Dec 20, 2013 2:32 am

Re: How to battery power?

Mon Jan 20, 2014 3:58 am

penguintutor wrote:I've successfully run a Pi off 4 x AA batteries, but you'll only get a couple of hours or so.

I just used 4 x rechargeable 2100mAh batteries in series. This gives about 5.2v fully charged. Note using normal non-rechargeable batteries will result in a higher voltage - I don't know how the Pi will react to that.

Connected this to the Pi (nothing else connected) and used a crontab to record the uptime every minute. Voltage dropped to about 5v when powered up and slowly dropped. The Pi was still running at less than 4.25V - although I expect it would not have been able to power most USB devices before that point. Unfortunately my 1st multimeter has died (after 20years service) and my third is not accurate enough, so I wasn't able to measure voltage and current at the same time. That ran for about 3 hours 30 minutes.

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.

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, but adding wireless dongle will probably take a little more than the wired Ethernet. The bigger problem with wireless is that I guess the dongle will stop working at a higher voltage than the Pi.

So AA batteries can be used if it's only for a short period of time. I'm guessing some kind of on-board computer for a robot or model aircraft etc. Obviously any additional peripherals will take more power from the batteries. Looking for anything longer and you are going to need bigger or more specialist batteries.
What did you use to connect from the battery pack to the usb input of the Pi ???

simplesi
Posts: 2327
Joined: Fri Feb 24, 2012 6:19 pm
Location: Euxton, Lancashire, UK
Contact: Website

Re: How to battery power?

Mon Jan 20, 2014 7:36 am

I've just been doing some little experiments in this area
http://www.raspberrypi.org/phpBB3/viewt ... 63#p486861

I jsut connected the batteries direct to pins 2 and 6.

But going to go down a £Shop and just buy any sort of USB device that comes with a plug and cut it off and connect that up to the batteries

Simon
Seeking help with Scratch and I/O stuff for Primary age children
http://cymplecy.wordpress.com/ @cymplecy on twitter

Return to “Troubleshooting”