User avatar
Bigcat123
Posts: 230
Joined: Thu Aug 23, 2012 2:41 pm

Power over GPIO???

Sun Sep 16, 2012 7:46 pm

I know this has probably been posted before but I couldn't find the answers I wanted!

I am making a mobile robot and I am very interested in powering my Pi with some batteries... I know it is possible to power the Pi with an emergency phone charger.... But I was thinking 4 AA batteries? Is it possible? I remember Liz saying something about the Pi being able to run of of AA batteries.... Do you have to use a voltage regulator? What ever that is? Can you power it through the GPIO pins?

Thanks so so much! :) :) :)

Bigcat123
Just a beginner sharing his experiences on his way to geek nirvana...

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Power over GPIO???

Sun Sep 16, 2012 8:07 pm

There was definately a thread about this a few months ago but I can't seem to search it out because "gpio" and "power" are too common apparently. :shock:
Anyway, yes you can do it, i think it is as simple as supplying 5v to the relevant pins of the gpio but its risky as you by-pass the inbuilt solid state 'fuse' . Also 6v (ie 4 batteries) is too high and needs rectifying.
Also don't just take my word for this I might be remembering wrong. Get another opinion.

User avatar
PeterO
Posts: 4582
Joined: Sun Jul 22, 2012 4:14 pm

Re: Power over GPIO???

Sun Sep 16, 2012 8:10 pm

morphy_richards wrote: Also 6v (ie 4 batteries) is too high and needs rectifying.
s/rectifying/regulating/
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Power over GPIO???

Mon Sep 17, 2012 12:34 pm

PeterO wrote:
morphy_richards wrote: Also 6v (ie 4 batteries) is too high and needs rectifying.
s/rectifying/regulating/
PeterO
I stand corrected. Rectifying is converting an alternating current to direct. (told you you need another opinion ;) )
Not wanting to spoil any surprises but I have a sneaky feeling there could be something useful on how to do what you are asking in the next edition of the magpi.

cTn
Posts: 49
Joined: Sat Aug 11, 2012 4:11 pm
Contact: Website

Re: Power over GPIO???

Mon Sep 17, 2012 1:21 pm

Yes you can power it from a battery pack as long you can serve it voltage in 4.75-5v range, ill suggest using a step down "power supply" for example
http://www.ebay.com/itm/LM2596-DC-DC-4- ... 4abc0b3a88

And yes you can power it via the headers (pin 02 for 5v+, pin 06 for ground), you can find detailed documentation about gpio here,http://elinux.org/RPi_Low-level_peripherals

Just an important warning, headers aren't protected against reversed polarity, so be sure to connect them properly otherwise you will end up with damaged/broken pi.

User avatar
morphy_richards
Posts: 1603
Joined: Mon Mar 05, 2012 3:26 pm
Location: Epping Forest
Contact: Website

Re: Power over GPIO???

Mon Sep 17, 2012 2:56 pm

Just remembered something - you can get car adapters for mobile phone chargers really cheaply. They would step down 12v to what you need and there are a wide range of different types of 12v battery out there some of which are also really cheap. (maybe even cheaper than AA batteries) (or you could even use 8 AA batteries). That might be an easier solution of you don't feel ready to have a go at making a regulator yourself.

User avatar
rew
Posts: 416
Joined: Fri Aug 26, 2011 3:25 pm

Re: Power over GPIO???

Tue Oct 02, 2012 9:01 am

Those car-power-adapters would be nice. However, those you can get are probably rated for 500mA, and might not even be able to provide that (at a stable 5V).

That said, they are built for 12V input. They must tolerate 10-14V, but below or above that, nu guarantees.

The ebay DCDC converters are much better. They can easily provide 1A, and will do 2A, or 3A provided it doesn't have to be very long at a time.

For input they require anything more than 0.5V above the output voltage (5.5V in this case) and anything up to 30V. So you can build an 8 cell AA battery, providing about 12V but varying between 13V when completely charged (depending on the battery) and 8V when depleted.

Either cut a microUSB cable and solder the wires to the output of the DCDC converter, or hook it up to the GPIO connector, but be very careful as a mistake will blow up the 'pi in no time.

(If you hook up a component with reversed power connections, many will act as a diode. Possibly two diodes in series. If the current that flows in that case is powerful enough to damage the device, it will blow up. If the current is limited enough then the device might survive. I hooked up one of those DCDC converters the wrong way around, and it survived. The current was limited to 1A and as that's a normal current for those devices, it handles 1A the "wrong way" just fine. However for a 'pi there are lots of "delicate" components that might just blow at a low current, and it is very likely that your powersupply isn't currentlimited as my professional lab powersupply is....)
Check out our raspberry pi addons: https://www.bitwizard.nl/shop/

Return to “Automation, sensing and robotics”