User avatar
Mariuspe
Posts: 27
Joined: Thu Mar 14, 2013 5:55 pm

Powering from a car battery + additional temporary power

Thu Jun 13, 2013 3:09 pm

guys,
who could advise how everything should be connected? Idea is to use RPI in a car running on car battery only when ignition is ON. Problem: after turning ignition OFF, RPI should run for enough time e.g. 30-60 secs to shutdown properly. Means it has:
1. to track when power is cut off
2. has to have its autonomous rechargeable power enough for 30-60secs. One idea is using capacitors.

Can it be achieved with capacitors? If so, what components should be used for that? I have no clue on this electric part:)

Many thanks!

6677
Posts: 383
Joined: Wed Mar 14, 2012 9:23 pm

Re: Powering from a car battery + additional temporary power

Thu Jun 13, 2013 10:33 pm

Mariuspe wrote:guys,
who could advise how everything should be connected? Idea is to use RPI in a car running on car battery only when ignition is ON. Problem: after turning ignition OFF, RPI should run for enough time e.g. 30-60 secs to shutdown properly. Means it has:
1. to track when power is cut off
2. has to have its autonomous rechargeable power enough for 30-60secs. One idea is using capacitors.

Can it be achieved with capacitors? If so, what components should be used for that? I have no clue on this electric part:)

Many thanks!
Personally i would tap in at the 12V supply for the cigarette lighter. Go to a shop and buy an in car micro USB adaptor, take it apart. solder it up in parallel with the back of the cigarette lighter socket.

Some modern cars turn off the lighter socket when there is no ignition (my car), some dont (my parents cars). If your car is one which does not turn off the socket, usually there is a cable into the back of the radio which indicates the ignition state, you may be able to read this from the pi GPIO. As the cigarette socket is still on the pi will still be running, it can then read the ignition state from the radio harness, see that it has turned off and shut itself down.

fuffkin
Posts: 92
Joined: Thu Mar 07, 2013 10:50 pm
Location: United Kingdom
Contact: Website

Re: Powering from a car battery + additional temporary power

Fri Jun 14, 2013 7:20 am

Hi Mariuspe,

If you've still got the 12V present after the ignition is switched off (like via the cigarette lighter), then I have an add-on board for Pi that I think may help you out here.

It is essentially a sleep mode / power management controller and I/O board for the PI. It'll take the 12V power directly into the board and you can take the inition switch monitor (as suggested by the last poster) into one of the I/O pins (with any suitable level shifting if required). You can then set the system up to do a controlled shutdown of the Raspberry Pi when the inition is switched off and boot it up again when on. It's called the "Sleepy Pi" and you can head on over to http://www.spellfoundry.com for more details and updates. It's not shipping just yet, but hopefully sometime in July.

Jon
Sleepy Pi - Extend RPi battery life with a plugin Power Management & Arduino I/O board
http://www.spellfoundry.com


User avatar
Mariuspe
Posts: 27
Joined: Thu Mar 14, 2013 5:55 pm

Re: Powering from a car battery + additional temporary power

Fri Jun 14, 2013 8:11 am

Thanks for your replies! Thing is that when ignition is OFF, power is not supplied to the cigarette lighter. I am connecting RPI to the cigarette lighter, thus I still need some solution, how to keep RPI running for several seconds so it could trigger 'shutdown' command and shutdown properly.

Volvo Xc90

User avatar
Mariuspe
Posts: 27
Joined: Thu Mar 14, 2013 5:55 pm

Re: Powering from a car battery + additional temporary power

Fri Jun 14, 2013 8:19 am

PiGraham wrote:This might be interesting:

http://www.simbits.nl/portfolio/raspber ... er-shield/
interesting, but not sure if I understood specification correctly: will it run on battery if USB camera is connected to RPI?

User avatar
Mariuspe
Posts: 27
Joined: Thu Mar 14, 2013 5:55 pm

Re: Powering from a car battery + additional temporary power

Fri Jun 14, 2013 10:14 am

There is a topic on pretty similar issue and one solution, which has to be slightly adjusted: charger input should be 12V instead of 5V and battery with lower capacity. As I have no clue which batteries are good and more reliable (not to catch on fire), could you recommend something? Same for the charger, what could be done to make it work on 12V instead of 5V? Many thanks! Cheers

http://www.raspberrypi.org/phpBB3/viewt ... y&start=25

User avatar
Tage
Posts: 287
Joined: Fri May 24, 2013 2:29 am
Location: St Thomas, Ontario Canada

Re: Powering from a car battery + additional temporary power

Fri Jun 14, 2013 2:38 pm

it can be done with capacitors, if you have enough space available. you would use 16V rated electrolytic caps, any number of them in parallel until you get the holdup time you need. a few seconds is easy, a minute is too much.
you probably want to add a power resistor in series with the 12V plug so you do not blow the lighter fuse when you plug in or turn on the ignition. for example a 0.5ohm 2W wire wound resistor could handle the charge current. hook up your power converter directly across the capacitor. if you have a power converter that can handle higher voltage you can greatly reduce the size of the caps by charging them to a higher voltage, say 30V. But hat of course complicates the circuit.

An example: spend $10 on a 100.000uF 16V electrolytic cap. The size is D=35mm, H=50mm. when charged to 12V it will provide 5V at 0.5A through a switching converter to the Pi for 2 seconds.
But if the converter can handle the voltage you could instead buy a same size 47.000uF 35V cap and charge it to 30V and it will provide 7.5s of run-time. And a 18.000uF 63V cap charged to 54V will give 9.6s of run-time. You need of course to add a boost regulator to charge the cap to the higher voltage level.

User avatar
Mariuspe
Posts: 27
Joined: Thu Mar 14, 2013 5:55 pm

Re: Powering from a car battery + additional temporary power

Mon Jun 17, 2013 8:35 am

Great, thanks Tage. This makes it a lot clearer, will keep it for my records. As for now space is an issue, looks like I have to go for the solution with batteries.

User avatar
Tage
Posts: 287
Joined: Fri May 24, 2013 2:29 am
Location: St Thomas, Ontario Canada

Re: Powering from a car battery + additional temporary power

Thu Jun 20, 2013 1:24 am

just for your information, and everybody else that is interested in this subject of creating a few seconds holdup after turning off the main 12V power supply, today I met with some people from Murata and got samples of a 1 Farad capacitor that can be used up to 4.2V continuous voltage. That is, you can charge this huge capacitor to 4.2V, then use the energy for holdup when the normal supply is disconnected.

For example, if you use three of these supercaps in series and charge the pack to 12.6V you then have about 8 seconds of power for a Pi running at 500mA current draw, if you use a cheap switching converter to get 5V from the capacitor while the voltage is dropping from 12.6V to 6V.
The interesting thing is that the size of the capacitor is EXTREMELY small compared to the standard 0.1F 16V aluminum electrolytic (diameter 35mm, height 50mm) I was talking about. and the price is not that much higher for the Murata super cap. the size is only slightly larger than the version shown in the old news release
http://www.murata.com/new/news_release/2012/0924/
I see that Mouser is selling the 0.47F version DMF3Z5R5H474M3DTA0. it is an interesting development in component technology going on..

mausberry
Posts: 13
Joined: Mon Feb 04, 2013 11:30 pm

Re: Powering from a car battery + additional temporary power

Thu Jul 18, 2013 12:10 am

I currently have a car power supply for the Pi that connects to the ignition, +bat and -bat and safely shuts down the Pi when it senses that the ignition has been off (then cuts power to the Pi).
www.mausberrycircuits.com

User avatar
Mariuspe
Posts: 27
Joined: Thu Mar 14, 2013 5:55 pm

Re: Powering from a car battery + additional temporary power

Mon Jul 22, 2013 4:57 pm

mausberry wrote:I currently have a car power supply for the Pi that connects to the ignition, +bat and -bat and safely shuts down the Pi when it senses that the ignition has been off (then cuts power to the Pi).
http://www.mausberrycircuits.com
Your site gets blocked by antivirus:

Image

soundcatcher
Posts: 1
Joined: Tue Dec 17, 2013 10:45 pm

Re: Powering from a car battery + additional temporary power

Tue Dec 17, 2013 11:33 pm

I know this is a bit of an old thread... But if you've got an always live on the car you can just knock up a very quick and simple circuit that senses when the power is removed and delays switching off the power for say 30 seconds... I have this hooked up for the interior lights in my car... Only a handful of components and is much better than a large capacitor (never good having large capacitors as batteries with sensitive kit!) and much better than having to carry a battery besides the one in your car!

Here's a link to a couple of working examples... One of which as I said I'm using...

duudah
Posts: 1
Joined: Tue Sep 02, 2014 10:40 am

Re: Powering from a car battery + additional temporary power

Tue Sep 02, 2014 11:07 am

Hello,

I am new to the forum and future RPi enthusiast.

I am investigating the same problem and I have an idea.
I am wondering if it is possible to use 1 relay board, 1 car relay and 1 voltage sensor to solve this.
When there is +12V on ignition a standard car relay is making a connection between +12V on the battery to the DC 12V-DC5V converter and into the RPi.
When the RPi is fully started using a GPIO it sends a high level on a relay board control circuit. The relay load circuit is normally open and with high level goes to closed. The load circuit is connected to the same +12V on the battery. (Idea is to always have the same voltage on the RPi)
Voltage sensor is attached to the ACC on the ignition. When there is no voltage the system initiates shutdown. The GPIO pins is connected to the control circuit on the relay board and when the RPi is shut down the voltage will go to 0 making the relay board disconnect the load circuit.

If this can work it is very cheap, not to mention that you can keep the RPi running for some time on battery and decide when exactly to shut it down.

Best regards,

vijayg78
Posts: 1
Joined: Wed Nov 18, 2015 5:18 pm

Re: Powering from a car battery + additional temporary power

Wed Nov 18, 2015 5:23 pm

One option that I am trying is this.

1. Get a battery pack with "pass through charging" capability. Using this the battery pack can be charged at the same time discharged (or used to power pi / charge phone)

2. Power on using a switch / plugging in the adapter. If the ignition is off, still pi will get power from battery for some more time.

3. Sense the power off at the input of the battery pack and connect it to GPIO for a graceful shut down.

gummibear
Posts: 3
Joined: Thu Feb 26, 2015 10:12 pm

Re: Powering from a car battery + additional temporary power

Sat Oct 29, 2016 11:40 pm

I know I'm necro-ing this, but i say this in case someone else stumbles accross this thread. As someone who has installed many radios and aftermarket guages in cars, the radio wiring harness gives you both an always on wire and a ignition switched wire. (admittedly, I haven't bought a new car or radio in ten years.) At any rate, if there's no always-on for some reason, its easy to run a wire to the battery, but make SURE to put a fuse in it. probably a pretty low amp one. i cant imagine there not being an ignition switch on wire somewhere.

TL;DR: look up radio install guides for your car. they are extremely easy to find. they will give you the wires you need. then add a circuit with relay, and delay.

edit: in fact, maybe all you need is a voltage stepdown on the "ignition on" wire to a pin on gpio. when a background program senses zero volts it shuts down the pi after sometime. however, that would not solve current draw in the "shutdown" state.

soulife83
Posts: 1
Joined: Wed Dec 26, 2018 6:13 pm

Re: Powering from a car battery + additional temporary power

Wed Dec 26, 2018 6:32 pm

gummibear wrote:
Sat Oct 29, 2016 11:40 pm
I know I'm necro-ing this, but I say this in case someone else stumbles across this thread. As someone who has installed many radios and aftermarket gauges in cars, the radio wiring harness gives you both an always-on wire, and an ignition switched wire. (admittedly, I haven't bought a new car or radio in ten years.) At any rate, if there's no always-on for some reason, it's easy to run a wire to the battery, but make SURE to put a fuse in it. probably a pretty low amp one. I can't imagine there not being an ignition switch on the wire somewhere.

TL;DR: look up radio install guides for your car. they are extremely easy to find. they will give you the wires you need. then add a circuit with relay, and delay.

edit: in fact, maybe all you need is a voltage stepdown on the "ignition on" wire to a pin on gpio. when a background program senses zero volts it shuts down the pi after some time. however, that would not solve current draw in the "shutdown" state.
Current draw for a powered down pi can range from 100ma to 250ma. Just a rough estimate, but at 100ma it would take about 200-something hours to kill a car battery.. But yes, I'm pretty sure you can find 12v always on, acc (ignition 12v), and a negative right behind the stereo of most if not all cars.. Just check the wiring diagram.

But if it is genuinely a concern, I think the sleepy-pi hat has already been mentioned in this thread.. I'm only mentioning it (again?) just in case I saw it in another thread. In this case, you could just power the pi using acc (12v on ignition only) and the hat will power it down once the power is switched off. Problem solved..

Glad I googled "Raspberry pi power management" after googling "powering raspberry pi in a car"..
Now hopefully whoever searches the same thing first can see the solution from the second.

Return to “Interfacing (DSI, CSI, I2C, etc.)”