ShakataGaNai
Posts: 7
Joined: Tue May 01, 2012 8:10 pm
Contact: Website

Re: Powering RPi off a car battery?

Tue May 01, 2012 9:16 pm

I have an idea for a "mobile" (IE in a vehicle) application and would like to power the RPi off car power (So LOTS of amps @ 12V+).  Has anyone looked into this or had any ideas? I've tried searching the forum but I'm not finding a lot of info.

I know I need to down-convert the voltage and limit the amps, but I don't know _that much_ about power.

User avatar
gordon@drogon.net
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Powering RPi off a car battery?

Tue May 01, 2012 9:35 pm

ShakataGaNai said:


I have an idea for a "mobile" (IE in a vehicle) application and would like to power the RPi off car power (So LOTS of amps @ 12V+).  Has anyone looked into this or had any ideas? I've tried searching the forum but I'm not finding a lot of info.

I know I need to down-convert the voltage and limit the amps, but I don't know _that much_ about power.



IF the Pi took one amp at 5 volts then it will be consuming: 5 * 1 Watts - ie. 5W. It takes less than that, but it's a handy number to work with. If feeding it with 12 volts, then there will be a little bit of loss in the DC-DC convertor (or simple 7805 regulator), however you're still looking at about one amp.

Handy formulae: P = I * V ... Power (watts) = current (amps) times voltage (volts)

Ohms law says V = I * R ... Volts = Amps times Resistance (Ohms)

The real issue for you is going to be battery life when the car isn't running. If you have a typical 40AH car battery - that's a 40 amp-hour battery, then in theory that battery can push out 40 amps for one hour. Or 1 amp for 40 hours or anything in-between. (There are usually ratings for the max. current vs time though, however at the bottom end of the scale, it's not important)

So, leave your car powering a 1A Raspberry Pi for a weekend (48 hours) and you have a flat battery, and that is important!

If it's powered down when not in-use then it's going to be OK. You just need a good DC to DC convertor - or an old 7805 votlage regulator and a heatsink and make sure you wire it to aux. power, or the power rail thats active when the engine is running. You don't need to limit the amps, but you do need to limit the voltage.

Gordon
--
Gordons projects: https://projects.drogon.net/

ShakataGaNai
Posts: 7
Joined: Tue May 01, 2012 8:10 pm
Contact: Website

Re: Powering RPi off a car battery?

Tue May 01, 2012 9:49 pm


You don't need to limit the amps, but you do need to limit the voltage.


Good to know.


The real issue for you is going to be battery life when the car isn't running.


I planned to wire it to something that was only powered when the vehicle was on.  None of the numerous applications I thought of would be aided by the RPi running when the vehicle was off (No telemetry, no movement, etc).  Actually I was going to hook this up to a motorcycle, so even less than the standard 40AH

I guess it's fairly simple if I find a good DC-to-DC converter. I'll check out the 7805's you mentioned, in the mean time I found a premade module which might work.

User avatar
jbeale
Posts: 3649
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Powering RPi off a car battery?

Tue May 01, 2012 9:54 pm

You can get a 12V adaptor to charge USB phones (provides 5V at 1A) for under $5, for example:

http://www.amazon.com/Belkin-M.....B002F0200Q

just add a good-quality microUSB power cable and you're done.

User avatar
gordon@drogon.net
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Powering RPi off a car battery?

Tue May 01, 2012 9:58 pm

jbeale said:


You can get a 12V adaptor to charge USB phones (provides 5V at 1A) for under $5, for example:

http://www.amazon.com/Belkin-M.....B002F0200Q

just add a good-quality microUSB power cable and you're done.



Of-course. Funny how you don't think about the obvious! (And I presume modern bikes have power outlets now...)

Gordon
--
Gordons projects: https://projects.drogon.net/

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

Re: Powering RPi off a car battery?

Tue May 01, 2012 10:10 pm

You know, people are powering 5V USB stuff from a 12V Car battery all the time right now, and they do not have to build anything to do it. Only thing is the car battery is actually still in a car, and they just use the "electric socket" all cars have, which is the "sigar plug".

You pull out the cigar lighter and plug in a tiny adapter that converts the 12V to 5V, most often these can deliver 1A, and have a model A USB port, so you can plug in your Ipod, or your GSM charger cable.

So tiny 12V to 5V ( @ 1Ampere ) converters are readily available and are made in such big numbers that they are very low cost. The fact that you can plug in your USB to micro USB cable makes them ideal to power a R-PI.  Also they use a switching converter, which makes them very efficient, (unlike the 7805, which needs a big heat sink to dissipate the 5.25 Watt you burn up when you draw 750mA from them. Instead these small things do not get hot at all.

So why build an inefficient, large and hot, drop down regulator when for a few dollar you can buy a ready made solution? If you thing the plug is a bothersome thing to deal with, most often you can simply unscrew a nut on the top (the tip of the plug) which holds the two plastic halves together, do that and you will find a tiny PCB inside, all you have to know is that the tip is the +12V input, and the two half-moon shaped metal sleeves connect to the chassis (GND) of the car. Just solder the plus-12V-wire to the tip and the minus-wire to the point of the PCB connecting to the half-moon shaped metal sleeves.

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

Re: Powering RPi off a car battery?

Tue May 01, 2012 10:12 pm

jbeale said:


You can get a 12V adaptor to charge USB phones (provides 5V at 1A) for under $5, for example:

http://www.amazon.com/Belkin-M.....B002F0200Q

just add a good-quality microUSB power cable and you"re done.


Ah, you are too fast for me!

That is what I get for writing such a long story.

This Belkin is by the way, the exact model I'm using myself.

It isn't expensive, but there are even cheaper ones too, but be ware for larger boxes with multiple cigar outlets next to the USB port, these often have very bad build quality, and an 7805 inside!

P.S. be wary of USB outputs on bikes, these might be unregulated, good for charging your phone, not so good for powering the R-PI. I know, I designed one myself. Standard bike dynamo's only deliver about 3W, from a very unsteady input source.

secretreeve
Posts: 330
Joined: Mon Feb 20, 2012 8:39 am

Re: Powering RPi off a car battery?

Tue May 01, 2012 11:11 pm

your biggest challenge will be locating somewhere to put the pi with a waterproof enclosure on a motorcycle.

i've been fitting stuff to my bike and it can be a real squeeze sometimes

ShakataGaNai
Posts: 7
Joined: Tue May 01, 2012 8:10 pm
Contact: Website

Re: Powering RPi off a car battery?

Tue May 01, 2012 11:13 pm

GordonH said:


(And I presume modern bikes have power outlets now...)


Actually many don't, and those that do have their own standards (BMW Example).  That being said, I could take one apart and wire it in directly.

I worry about the quality of the power running a computer.  A cell phone is charging a battery, and running from said battery... where as the RPi is running directly from said power source... and variations in power tend to end poorly for computers.

ShakataGaNai
Posts: 7
Joined: Tue May 01, 2012 8:10 pm
Contact: Website

Re: Powering RPi off a car battery?

Tue May 01, 2012 11:16 pm

Oh, I also found two DC/DC units from SparkFun that look like they'd work.


DC/DC Converter Breakout
Simple Switcher Power Module -- This looks the most promising. Takes 8-42V and will deliver 5v at the flick of a switch (Also supports up to 3AH which is 4x more than needed)

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

Re: Powering RPi off a car battery?

Tue May 01, 2012 11:24 pm

ShakataGaNai said:


I worry about the quality of the power running a computer.  A cell phone is charging a battery, and running from said battery... where as the RPi is running directly from said power source... and variations in power tend to end poorly for computers.


And right you are to have such doubts, a standard bicycle dynamo delivers just about 6V at full speed, with many drops every time you hit a bump in the road. Also it generates just 3Watt only, which translates to 500mA, which is too little current for an R-PI.

hzrnbgy
Posts: 106
Joined: Mon Dec 26, 2011 10:55 pm

Re: Powering RPi off a car battery?

Wed May 02, 2012 3:33 am

Here's a low cost 12V>5V switched mode converter (it can work up to 36V input, 7V minimum)

http://www.mouser.com/ProductD.....%2f5ymI%3d

I use these in my projects and they work extremely well

User avatar
ledow
Posts: 40
Joined: Thu Feb 02, 2012 12:55 pm

Re: Powering RPi off a car battery?

Wed May 02, 2012 11:33 am

I posted this a while ago and it was just ignored:

http://www.raspberrypi.org/for.....38;ret=all

I think that's probably the best way to run a system in a car if you want to run it all the time.  Uses car battery when ignition is on, and charges it's own "backup" battery.  When ignition is off, it can run off the backup battery with a seamless change.

Of course, you still need to change the voltage down but for the application I had in mind (some kind of car alarm / GPS reporting device), it would last so long as you used the car normally and could even report back its alarms and position for long enough to find even if someone was to leave it parked up somewhere.

User avatar
gordon@drogon.net
Posts: 2020
Joined: Tue Feb 07, 2012 2:14 pm
Location: Devon, UK
Contact: Website

Re: Powering RPi off a car battery?

Wed May 02, 2012 11:46 am

ledow said:


I posted this a while ago and it was just ignored:

http://www.raspberrypi.org/for.....38;ret=all


I doubt it's really that - don't get disheartened... It's just not that easy to scan this forum with the volume of traffic it gets and the search tool is (I suspect) not used to its best!

Gordon
--
Gordons projects: https://projects.drogon.net/

yell
Posts: 19
Joined: Sat Mar 10, 2012 10:56 pm

Re: Powering RPi off a car battery?

Wed May 02, 2012 7:12 pm

brought a 5v 1 A usb car charger for my phone.

*waiting for charger/Pi delivery*

http://www.ebay.com/itm/ws/eBa.....OC:DE:3160

User avatar
Tass
Posts: 535
Joined: Sat Jan 21, 2012 11:15 am

Re: Powering RPi off a car battery?

Wed May 02, 2012 9:29 pm

ledow said:


I posted this a while ago and it was just ignored:


You did post 2 days before the Raspberry Pi went "on sale" - I think a lot of posts around that time didn't get much focus

ShakataGaNai
Posts: 7
Joined: Tue May 01, 2012 8:10 pm
Contact: Website

Re: Powering RPi off a car battery?

Wed May 02, 2012 11:29 pm

ledow said:


I posted this a while ago and it was just ignored:

http://www.raspberrypi.org/for.....38;ret=all

I think that's probably the best way to run a system in a car if you want to run it all the time.  Uses car battery when ignition is on, and charges it's own "backup" battery.  When ignition is off, it can run off the backup battery with a seamless change.

Of course, you still need to change the voltage down but for the application I had in mind (some kind of car alarm / GPS reporting device), it would last so long as you used the car normally and could even report back its alarms and position for long enough to find even if someone was to leave it parked up somewhere.


I've actually seen these exact picoUPS's before. A long while back I was planning on building an Arduino RFID reader that would unlock my front door. Of course I wouldn't want a power outage to lock me out of the house, so a tiny UPS was in order.

My current RPi project is for an automated data collector, so I don't need it to shutdown properly or stay on after the vehicle was off... but if I ever build a carputer - this PicoUPS is by far the best idea out there.  If you forget and the UPS battery dies - oh well! At least your car still starts.

rjcollingridge
Posts: 10
Joined: Wed May 23, 2012 8:15 am

Re: Powering RPi off a car battery?

Wed May 23, 2012 8:29 am

ShakataGaNai wrote:I have an idea for a "mobile" (IE in a vehicle) application and would like to power the RPi off car power (So LOTS of amps @ 12V+).  Has anyone looked into this or had any ideas? I've tried searching the forum but I'm not finding a lot of info.

I know I need to down-convert the voltage and limit the amps, but I don't know _that much_ about power.
I'm looking at this. Got a few projects under way here:
http://www.dreamgreenhouse.com/projects ... /index.php

I'm using a device like this off of eBay:
http://www.ebay.co.uk/itm/Car-Led-Displ ... 0899565715
I have no connection with this seller but it's an example. I'm evaluating this device and a few others dc-dc convertors.

Rob

rjcollingridge
Posts: 10
Joined: Wed May 23, 2012 8:15 am

Re: Powering RPi off a car battery?

Wed May 23, 2012 8:34 am

mahjongg wrote:ShakataGaNai said:


I worry about the quality of the power running a computer.  A cell phone is charging a battery, and running from said battery... where as the RPi is running directly from said power source... and variations in power tend to end poorly for computers.


And right you are to have such doubts, a standard bicycle dynamo delivers just about 6V at full speed, with many drops every time you hit a bump in the road. Also it generates just 3Watt only, which translates to 500mA, which is too little current for an R-PI.
You could power one using a battery or similar device as well though. I power various devices on my bicycle but I'm using a quality dynamo:
http://www.dreamgreenhouse.com/projects ... /index.php
The trick is to use a good quality LDO regulator but less of an issue if you only want 5V out.

If you used one of these USB battery bank devices to power the Pi and and the dynamo to charge it, you should be fine:
http://www.dreamgreenhouse.com/reviews/ ... /index.php

Rob

Alfadaz
Posts: 51
Joined: Tue May 22, 2012 10:18 am
Location: Cwmbran, S.Wales

Re: Powering RPi off a car battery?

Wed May 23, 2012 12:00 pm

I bought this for my powering my iPhone a few months back, but would be ideal for the Ras-Pi.

http://www.amazon.co.uk/gp/product/B004 ... 03_s00_i00

Works very well. The bonus is that it has 2 USB connectors, 1A & 2.1A and was very cheap...

Some people are saying it doesnt work in XY car, but thats do to it having a short center pin, which doesnt make contact in all cig sockets (maybe fixed in current model). I was aware of this when i ordered it but a simple 2-3mm thick bit of solder on the end fixed that for me ;)

Daz

Acme_Intergalactic
Posts: 1
Joined: Fri May 25, 2012 8:28 am

Re: Powering RPi off a car battery?

Fri May 25, 2012 8:35 am

If you have a 40 amp/hour car battery, remember that's 40 hours at 12volts. At 5volts your going to get twice the amp hours out of it.

godFather89
Posts: 150
Joined: Fri May 18, 2012 9:40 am
Location: Timisoara, RO

Re: Powering RPi off a car battery?

Fri May 25, 2012 9:22 am

Acme_Intergalactic wrote:If you have a 40 amp/hour car battery, remember that's 40 hours at 12volts. At 5volts your going to get twice the amp hours out of it.
Only if you use a comutation DC-DC converter. With a linear converter (7805), it will draw the same amp from 12V as the Pi draws from 5V (the rest of the power is lost as heat).

Return to “Other projects”