ledzeppeman
Posts: 4
Joined: Mon Jul 02, 2018 5:19 am

Putting A Pi in My Car

Mon Jul 02, 2018 7:29 am

Hey, brand new here. New to Pis. I'm fairly experienced with programming (including python), but all I've done is that basic GPIO project everyone does with the LEDs, resistors, and buttons. I've never worked with a breadboard or anything before, but it all makes sense to me for the most part. The reason that I'm writing this is because I have a pretty good idea of what I'd like to do, and if anyone would like to chip in and give me some input about how I could do some things better, about things I just don't get yet, or if I'm just approaching things wrong, I'd really appreciate it.

THINGS I'D LIKE TO ACCOMPLISH:

So I'm dead-set on putting a Pi 3 B+ in my 2006 Prius with the intent of using Open Auto, and I want to use a touchscreen larger than the little 7 inch one for the Pi. I'm still shopping around for exactly what I want, but I thought that a rather stiff monitor arm with a 12-17 inch monitor would be a cool way to put a display in the car, so my passenger could use it if they want to do something. If I'm driving alone, I could pull the display over to me so I could see my map or skip songs. Should I disable my passenger side airbags maybe? I was thinking about mounting it on the passenger's side top glovebox, and removing the glovebox cover. This resembles my car a lot so you can see what I mean.

http://autowpaper.com/2006-toyota-prius ... ior-3.jpg

I'll be tapping into the microphone built into my car for phone calls and google queries. It shouldn't be hard, just cut the two wires, splice them to a 2.5mm jack cable, run it under the upholstery. I'll plug that into a little usb DAC. Like this one.

https://www.amazon.com/Sabrent-External ... hone+input

Would it be better to use this, or the on-board sound for 3.5mm output to my car speakers?

I know that cars have 3 modes for power supply, so I want to tap into the car's always-on power to run the pi. Not 100% sure how to that, but I think there's a 12v always on power behind my MFD or stereo. Input here would be great, but I haven't thoroughly researched this yet, so nbd. I figured that I'd use the ACC power to send power-on and power-off messages to the Pi through the GPIO pins. ONE THING I DON'T KNOW is, can I use the 12v positive line straight from the cigarette lighter for GPIO, or would that fry the Pi? Should I step down to 5v with something like this? Remember, I'm a noob.
download.png
download.png (21.25 KiB) Viewed 737 times
And just to be totally clear, instead of using the 5v or 3.3v positive line on the Pi, could I use the 12v from the cigarette lighter to send the message to the Pi that the car has been started and that it should boot? Would it be like this diagram above minus the LED and R1, but with the positive coming from the car? What resistors should I use? Are the one's shown in the diagram good enough for what I want to do? Sorry, that image is all I could find that looked like what I'm thinking. I might have this all wrong.

Another reason I want the Pi is surveillance. You guys think it could record 3 fairly low res camera feeds and play music while navigating using Open Auto, or is that too much for even the new Pi? I want one on my dash, one inside, pointing at me, and I already have a backup camera, although I'm not sure what interface it uses to send data. Also, I'm worried I'll lose the ability to have my backup camera activate when I put the car in reverse if I connect it to the Pi. I have no clue how to tap into that reverse signal (R. lights?), but if I did, I could totally program a feed to pop up when that pin is tripped. This is another place I'd love input. I'll probably leave that alone if no one knows how that works, and I'll just put an additional camera pointing out my back windshield.

So I'll be needing an SSD. I was thinking 512GB would do it, because I'd also like to have a bunch of old emulators, games, and movies for road trips. That raises the issue to me that the pi only outputs 1.2 amps through USB, so I'll probably be needing to power the drive separately. Also, I think I'd like my phone to charge faster than the 1.2 supplies. I've been looking for powered USB hubs that carry data, with little luck outside the massive 15 port hubs. I was thinking that a powered hub might solve my power limit issues. I'd have that hub draw from my ACC power stepped down to whatever voltage the hub needs in a similar method to powering the Pi itself. In fact, I'd probably like to power the monitor in the same way. Speaking of the monitor....

I'd like to have the monitor power on with the Pi, or seconds after. I used to be a tech for phones, computers, and displays, so I've torn them apart a lot. I'm not really sure how I'd go about getting that "on" button to fire correctly though. If anyone has some material to point me in the right direction, that'd be awesome, because this is something I've actually tried to figure out already. Maybe I could get one of those monitors that turn on when they receive display input, huh? That's usually not listed under features though.

Lastly, out of the monitor arms I've been looking at, one option that appeals to me is the ability to rotate the display 90 degrees if I want. Cool. I thought it'd be neat to rig it up to close a circuit when I turn the display (I know how to do this one on the Pi!) and have it run a simple script rotating the screen orientation based on that.

It'd be kind of a pipe dream to use the pi as a remote start through SSH or something, but I don't know cars well enough to mess with my ignition, but I'm willing to learn. I'm just writing this paragraph to dream about what's possible. The rest though, I 100% intend to do.

I'm not writing this begging for help, although any would be appreciated, especially on the bit about taking the 12v input on GPIO. I'm just trying to share my plans for the near future and take my first step into the raspberry pi community. I'll update this as I progress with my project. Or is that what the Blog section is for? Either way, I'm excited about this project, and I look forward to any feedback you folks might have for me. Is any of this just not feasible or ridiculous? Do you think it's a cool idea?

User avatar
thagrol
Posts: 3078
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Putting A Pi in My Car

Mon Jul 02, 2018 12:00 pm

ledzeppeman wrote:
Mon Jul 02, 2018 7:29 am
Hey, brand new here. New to Pis. I'm fairly experienced with programming (including python), but all I've done is that basic GPIO project everyone does with the LEDs, resistors, and buttons. I've never worked with a breadboard or anything before, but it all makes sense to me for the most part. The reason that I'm writing this is because I have a pretty good idea of what I'd like to do, and if anyone would like to chip in and give me some input about how I could do some things better, about things I just don't get yet, or if I'm just approaching things wrong, I'd really appreciate it.

THINGS I'D LIKE TO ACCOMPLISH:

So I'm dead-set on putting a Pi 3 B+ in my 2006 Prius with the intent of using Open Auto, and I want to use a touchscreen larger than the little 7 inch one for the Pi. I'm still shopping around for exactly what I want, but I thought that a rather stiff monitor arm with a 12-17 inch monitor would be a cool way to put a display in the car, so my passenger could use it if they want to do something. If I'm driving alone, I could pull the display over to me so I could see my map or skip songs. Should I disable my passenger side airbags maybe? I was thinking about mounting it on the passenger's side top glovebox, and removing the glovebox cover. This resembles my car a lot so you can see what I mean.

http://autowpaper.com/2006-toyota-prius ... ior-3.jpg
If the screen will be positiond (or could be positioned) between the passenger and the air bag then I'd say yes you should disable it. Othewise you run the risk of the airbag throwing the monitor at the passenger.
I'll be tapping into the microphone built into my car for phone calls and google queries. It shouldn't be hard, just cut the two wires, splice them to a 2.5mm jack cable, run it under the upholstery. I'll plug that into a little usb DAC. Like this one.

https://www.amazon.com/Sabrent-External ... hone+input

Would it be better to use this, or the on-board sound for 3.5mm output to my car speakers?
Check that device works with linux. The output from it or the Pi's internal audio probably isn't going to be able to drive the car's speakers directly.
I know that cars have 3 modes for power supply, so I want to tap into the car's always-on power to run the pi. Not 100% sure how to that, but I think there's a 12v always on power behind my MFD or stereo. Input here would be great, but I haven't thoroughly researched this yet, so nbd. I figured that I'd use the ACC power to send power-on and power-off messages to the Pi through the GPIO pins. ONE THING I DON'T KNOW is, can I use the 12v positive line straight from the cigarette lighter for GPIO, or would that fry the Pi? Should I step down to 5v with something like this? Remember, I'm a noob.

download.png
That looks like an output circuit to drive a 5v LED not an input circuit.

Do not feed anything oter than 3.3v into the Pi's gpio pins or anything other than 5v into the power feed or you will damage your Pi.
And just to be totally clear, instead of using the 5v or 3.3v positive line on the Pi, could I use the 12v from the cigarette lighter to send the message to the Pi that the car has been started and that it should boot? Would it be like this diagram above minus the LED and R1, but with the positive coming from the car? What resistors should I use? Are the one's shown in the diagram good enough for what I want to do? Sorry, that image is all I could find that looked like what I'm thinking. I might have this all wrong.
Not directly. You'll some sort of level shifting.

Also, if the Pi is permanently powered it'll be permanently booted unless you explictly tell it to shutdown. Bear in mind that even a shutdown Pi draws current so over time may drain your battery.
Another reason I want the Pi is surveillance. You guys think it could record 3 fairly low res camera feeds and play music while navigating using Open Auto, or is that too much for even the new Pi? I want one on my dash, one inside, pointing at me, and I already have a backup camera, although I'm not sure what interface it uses to send data. Also, I'm worried I'll lose the ability to have my backup camera activate when I put the car in reverse if I connect it to the Pi. I have no clue how to tap into that reverse signal (R. lights?), but if I did, I could totally program a feed to pop up when that pin is tripped. This is another place I'd love input. I'll probably leave that alone if no one knows how that works, and I'll just put an additional camera pointing out my back windshield.
You'll have to bench test that. At least two of your cameras will need to be USB connected as the Pi3 only supports one Pi Camera module.
So I'll be needing an SSD. I was thinking 512GB would do it, because I'd also like to have a bunch of old emulators, games, and movies for road trips. That raises the issue to me that the pi only outputs 1.2 amps through USB, so I'll probably be needing to power the drive separately. Also, I think I'd like my phone to charge faster than the 1.2 supplies. I've been looking for powered USB hubs that carry data, with little luck outside the massive 15 port hubs. I was thinking that a powered hub might solve my power limit issues. I'd have that hub draw from my ACC power stepped down to whatever voltage the hub needs in a similar method to powering the Pi itself. In fact, I'd probably like to power the monitor in the same way. Speaking of the monitor....

I'd like to have the monitor power on with the Pi, or seconds after. I used to be a tech for phones, computers, and displays, so I've torn them apart a lot. I'm not really sure how I'd go about getting that "on" button to fire correctly though. If anyone has some material to point me in the right direction, that'd be awesome, because this is something I've actually tried to figure out already. Maybe I could get one of those monitors that turn on when they receive display input, huh? That's usually not listed under features though.
Don't most monitors do that these days? At least if they're in standby rather than a hard poweroff state.
Lastly, out of the monitor arms I've been looking at, one option that appeals to me is the ability to rotate the display 90 degrees if I want. Cool. I thought it'd be neat to rig it up to close a circuit when I turn the display (I know how to do this one on the Pi!) and have it run a simple script rotating the screen orientation based on that.

It'd be kind of a pipe dream to use the pi as a remote start through SSH or something, but I don't know cars well enough to mess with my ignition, but I'm willing to learn. I'm just writing this paragraph to dream about what's possible. The rest though, I 100% intend to do.
Check the legality on that. Remote start may not be permitted.
I'm not writing this begging for help, although any would be appreciated, especially on the bit about taking the 12v input on GPIO. I'm just trying to share my plans for the near future and take my first step into the raspberry pi community. I'll update this as I progress with my project. Or is that what the Blog section is for? Either way, I'm excited about this project, and I look forward to any feedback you folks might have for me. Is any of this just not feasible or ridiculous? Do you think it's a cool idea?
Other things to consider:
Regarding a monitor, the Pi outputs HDMI so a TV can be used rather than a computer monitor. There are 12v powerded TV available but they've aimed at the caravan/motorhome/RV market so tend to be expensive.

Is a movable monitor arm really a wise choice? IF you can move it about without tools it's likely that the force involved in an accident will send it flying around the car. It's also unlikely you'll find one that doesn't suffer from some degree of vibration.

Your Pi needs to be able to cope with sudden, unexpected shutdowns and power spikes.

Check the laws in your country about what you can and can't do on a monitor mounted in the car. At the very least I'd expect rules regarding driver distraction.
Arguing with strangers on the internet since 1993.

drgeoff
Posts: 10765
Joined: Wed Jan 25, 2012 6:39 pm

Re: Putting A Pi in My Car

Mon Jul 02, 2018 1:32 pm

I'd be wary of disabling airbags. If a passenger was injured when the airbag was disabled you could be in big trouble both legally and financially.

Don't put a screen in a position that creates a hazard.

User avatar
thagrol
Posts: 3078
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Putting A Pi in My Car

Mon Jul 02, 2018 3:50 pm

drgeoff wrote:
Mon Jul 02, 2018 1:32 pm
Don't put a screen in a position that creates a hazard.
Indeed. That's the best option.
Arguing with strangers on the internet since 1993.

Return to “Beginners”