Hilly
Posts: 2
Joined: Sat Jan 02, 2016 10:17 pm

Carputer.. New to the world of Pi

Sat Jan 02, 2016 11:10 pm

Hey All,

So I am new to the Raspberry Pi world. Im called Hilly from the UK and a hello to the forum and community.

A bit of background I work as a Mechanical design/manufacture engineer for a Robotics company. Its a fun job and Id love to start learning programming and electronics. So far I have been able to flash some lights on a Mbed.. control some basic IO and "attempted" trouble shooting on one of my projects...intrigued by electronics and software I decided to buy a raspberry PI.

I have a few projects I am wanting to do however I am starting with a carputer.

The plan is like all other carputer folk to have all the gizmos you'd need...Sat nav, music, diagnostics, engine readouts, cameras etc..... I have a Pi2 at present and it setup running Raspbian in which I have enabled a satnav style GUI for the PI which it auto loads into (or alternatively load into Raspbian when needed). I am slowly working on this project in stages and worrying about one problem at a time for the features I wish to have.

I have had a read around and whilst I wait for for my touch screen and GPS hat to come I have a questions relating to charging the unit from a cigarette lighter in car.

From what I have read a cigarette lighter will provide a 12V output. Although if you use a USB cable to the unit will this step it down to the correct voltage? I plan to power the unit from a battery pack which allows through charging and output simultaneously. The lighter will charge the batterypack whilst this runs the PI.

For the Pi to shutoff automatically when the ignition is off I plan to monitor the cigarette lighter to USB adapter (2 ports). Using the GPIO pins to detect the current/voltage of the spare USB port on the adapter. Once this looses voltage I will have a script which tells the PI to shutdown. Can I just strip a USB cable and mount it to the pins or will this be at a voltage/current too high and damage the unit? I have read some you may need to use resistors to step down the current. However if USB cables only carry a 5V load then I cant see how this would be unsafe?

If you could help that would be great!

If this is a stupid question... excuse mechanic in the corner!! :D

Thanks!

eagleman
Posts: 45
Joined: Fri Jan 01, 2016 7:43 pm

Re: Carputer.. New to the world of Pi

Sun Jan 03, 2016 11:53 pm

from your post, I assume the cigarette lighter car looses 12vdc when the ignition/accessories are turned off. it would be easy to attached another light to a hot 12v connection under the dash, monitor the ignition/accessories power for shut down (thru a voltage divider or logic level changing chip), then in your program just periodically monitor in input pin with something like:
if Batt:
(run the shutdown here)

doing it that way will allow proper shutdown without a time limit. you could also program in a sleep delay for seconds or minutes so a quick stop at the local 7/11(?) would not cause a need to reboot.

also, check the "Ford SBF" thread in the beginners section, I'm doing something similar but for instrumentation. perhaps we could combine your project and my project plus use combined assets for a better result. just saying...
eagleman
Virginia Beach, VA. USA

Hilly
Posts: 2
Joined: Sat Jan 02, 2016 10:17 pm

Re: Carputer.. New to the world of Pi

Thu Jan 07, 2016 12:26 pm

Hey! Sorry for the late reply I didn't get an email notifications! I also tried to reply yesterday but it dosent look like its sent.

I'd be more than happy to colaborate projects. So long as you know it will be more a learning curve for me than me being much use! Haha. Il look at the Ford threads this evening when I get back from work. If its of any use my car is a MK1 VRS Octavia. I will check the cigarette lighter, I actually think the lighter stays on when the ignitions off. I was using a USB charger which had a light on it when it draws power. The LED was still lit when the engines off (Although I had the key in) when I noticed). So I shall re-check this.

So I didn't really want to drill or modify the dash which is why I would be going down the lighter option. This is in case I need to sell the car. However I have noticed a free 'gland' above where the radio sits I'm sure this could easily be used as a USB socket or as acess to the electrics.

So the PI would run directly from the car battery? Or from a feed from one if the lights? Or would it just monitor this and still run from another power source.

I thought you might be able to combine some Capacitors together... Or something and delay the power off for so many seconds. Although that's about limit with electronics. So this would essentially be what's happening? when the system see a drop in current at whatever input its monitoring it would stay on for `x` amount if time. This which is a result of a component before the PI? Or is it running from the battery and shuts down after a period once it sees the drop in voltage at whatever its monitoring?

I like the idea of it waiting for 5-10 minuets while I'm in the shop!

Iv gotta get back to work. Il have a read tonight.. Hope the above makes sense... In a bit if a rush !

Return to “Beginners”