hilyin
Posts: 2
Joined: Tue Feb 19, 2013 10:09 pm

Car RPi power? Safe shutdown?

Tue Feb 19, 2013 10:18 pm

Hi,

I am trying to build a dash cam, and I am trying wrap my head around getting my rpi powered by my car and it knowing when to shutdown safely and start up?

My current scenario is, I put key in my car, and turn a little bit, electronics turn on (stereo etc), then I go to start ignition, electronics turn off briefly then come back on after the car is running.

I am thinking maybe I can use a battery pack for a cell phone, for that pause of power... but if its connected to a battery pack, when the system is "shutdown" (sudo halt), does it pull power from the pack? Will it know to turn on in the first place if the pack is connected to the car's cigar plug through a 5v adapter?

Second problem, safe shutdown. I turn off my car, now the battery pack is powering my rpi, how does my rpi know to begin safe shutdown once the car is off?

I've been looking around for tutorials for this, as there must be tons of car rpi owners.. but I can't find anything tackling these issues.

Thanks.

hilyin
Posts: 2
Joined: Tue Feb 19, 2013 10:09 pm

Re: Car RPi power? Safe shutdown?

Thu Feb 21, 2013 12:20 am

Anyone? I really do need to figure this out, and I just don't know enough to do it on my own.

User avatar
tonyhughes
Posts: 951
Joined: Wed Dec 26, 2012 3:46 am

Re: Car RPi power? Safe shutdown?

Thu Feb 21, 2013 12:24 am

Here's some info to start you.... http://www.raspberrypi.org/phpBB3/viewt ... ar#p276095

Should be easy enough to do something to detect current from ACC or IGN wires to trigger shutdown if there is no current.

For turning on, search the forum for on/off switches, someone makes them and is selling them (an on switch for a Pi is harder to make than an off switch.

Small cellphone USB battery power supply should do the trick to allow graceful shutdown, and protection for that blip between ACC and IGN.

I am going to build and code this once the Pi camera is out.

Massimo75
Posts: 2
Joined: Mon Mar 24, 2014 9:18 pm

Re: Car RPi power? Safe shutdown?

Mon Mar 24, 2014 9:57 pm

Hi hilyin,
To properly poweron and poweroff Raspberry Pi, you need to know ignition status, but maybe this information it's not accessible, especially in can bus equipped cars.
Look at this project http://www.raspberrypi.org/phpBB3/viewt ... 10#p524910 seems to be interesting.

Bye,
Massimo.

Return to “Beginners”