Raspberry Pi Car PC Project

UPDATE 11/2/12: All future updates will be on Page 2

I've recently put in an order for a Raspberry Pi, which should arrive in about 2 months (hopefully!). The RPi is a credit card sized computer, about as powerful as a smartphone (slighly slower CPU, much more powerful GPU) with HDMI, USB, General Purpose Input/Output pins (GPIO), and an ethernet port, all for $35 (+tax and shipping). It's really amazing.

The RPi runs Linux natively, although it looks like Android is very nearly going to get released on it as well so that's pretty cool.

The project I have in mind is pretty big, and I don't expect to get it done any time soon. However, I'd like to use this page to track current progress.

First off, I should list what my ultimate/dream goals are with this.

1. Playback media - music and movies
2. Have touchscreen GPS/navigation
3. Connect to OBDII port and readout to an small LCD screen
4. Misc entertainment (emulate NES, SNES, etc)

I'm a bit uncertain about the touchscreen idea. There's a pretty good one available that would work well on ebay (http://www.ebay.com/itm/ws/eBayISAPI.dll?ViewItem&item=110659968637) which would be great in dash, but the problem is it means removing my current Pioneer deck and therefore I will require a 6 channel USB sound card (front L/R, rear L/R, Sub L/R) and a 4 channel amp to run my speakers. This means spending probably $300 right there, which is already getting a little pricey. Alternatively, I could get a smaller screen and mount it on top of the dash, or even run the Pi "headless" which means without a screen at all. In that case I would control music selection with my smartphone, I could still have the OBDII LCD, and I could use GPS on my smartphone as well. GPS is probably the most minor portion of this idea, as I barely use it as is.

There's still 2 massive issues with this project. First off, I'm not a programmer, and secondly, I'm not an electronics guy either. Yes, I like PC hardware a lot, but I've never built a circuit board.

Fortunately I've found a lot of stuff to help, at least in the hardware/electronics department.

First off, the OBDII plug. I just bought one from http://www.carplugs.com/index.html - a simple male plug with wire pins for $8 shipped. Excellent. As for interfacing with the ECU, I got this one covered too! I found the STN1110 (http://www.obdsol.com/stn1110/) and, lo and behold, they will ship you a free sample!! Amazing. It actually just showed up today, I have it in my hand...

The STN1110 datasheet has diagrams for wiring it up. It runs on 5V though, as does the RPi, and I will probably need 3V as well. I'll get to that in a bit. As far as wiring into the OBDII port, my 2002 Acura RSX Type S uses the ISO standard which makes it fairly simple. One thing I'm kind of debating is wiring this up to be used on any OBD II car, by incorporating CAN and J1850 as well, though that definitely complicates the circuitry and might be beyond my capabilities. I think I'll start with just an ISO breadboard and go from there.

Also on this subject, there's a bunch of people already doing similar OBD II interfaces with Arduinos. Some examples are as follows:
http://code.google.com/p/opengauge/wiki/OBDuino
http://code.google.com/p/opengauge/wiki/OBDuinoInterface#Interface_for_ISO
http://obduino.ca/hw.html
http://www.arduinodev.com/hardware/obd-kit/

The STN1110 datasheet also lists protection circuits, optional LED status lights, voltage sense and protection circuits. The key for me right now is decifering what hardware to buy. I'll be purchasing as much as I can from digikey.ca which has great prices.

As far as getting 5V and 3V goes, following the aforementioned protection circuit I will incorporate probably the MCP16323 which comes in both flavours of output. It's a switching regulator so it's got over 90% efficiency. This one supplies up to 3A which should be plenty, but again it's something I'll have to specifically figure out just how much amperage the whole unit will use.

As far as display output for the OBDII, I'm thinking something like this: http://www.digikey.ca/product-detail/en/NHD-0216K1Z-NSR-FBW-L/NHD-0216K1Z-NSR-FBW-L-ND/1701190
It's a red 16x2 char LCD (my car has red dash lights). Not sure if I want to go bigger, but it's only $10 so not a big deal.

Right now my next step is to write out the full BoM for getting the OBDII thing going. I have access to an Arduino, so first and foremost I want to proof that in my car. Hopefully once my RPi arrives it won't be too hard to connect it to the GPIO pins. If that isn't quite feasible, I may just pick up an Arduino of my own or even get the Gertboard that is in the works for the RPi (although it looks to be severe overkill).

I'll update once I have a proper BoM. As far as the software goes for GPS and Media playback goes I'm not too concerned at this point. I'm keeping an eye on things, but I feel the OBD II interface is the most pressing (and to me, important) concern at the moment.

Stay tuned for updates.

UPDATE 1 - 8/14/2012

Just a small status update. Making progress on the BoM and circuit design stuff, also just received my ECU plug. Ran into a snag though regarding switched power circuits and how the STN1110 controls them, as well as picking the right MOSFET. I'm thinking for the first prototype I'm going to skip this part of the circuit and do it slightly differently. Possibly a physical switch on the RPi that will cause it to enter sleep mode, which will in turn cause a GPIO pin to go "low" and put the MCP16323's and the STN1110 into sleep modes as well. This will certainly be the easiest option to start with, as I'd like to not have to tap into an ignition/accessories 12V line at all. This will keep the Carputer as plug-and-play as possible. Also I'm looking at maybe trying to design it in a way that will fit nicely into a dash DIN slot with the LCD, switch, and some buttons to navigate screens, check engine codes, etc.

UPDATE 2 - 10/3/2012

Time for an update! Unfortunately, nothing exciting like having my Pi already - but a few things worth mentioning. Firstly, I contacted Allied Electronics where I purchased my Pi, and was told it was a 14 week lead time, meaning I should get my Pi sometime around or just after Halloween. In the meantime I've been reading through an electronics book. I'm having some trepidation with designing my own board. It's still something I want to do, but it's quite daunting. While reading the book I've let the BoM sit on the wayside although I do have most of it priced out. I got stuck with a resonance crystal thing, and wondering how hard it will be to manually solder surface mounted resistors that are very small. Not sure what to make of that. It's probably worth mentioning that for $50 you can buy an OBD II UART that should be plug and play here: https://www.sparkfun.com/products/9555. I'll still build my own power supply, but this might be the way to go for getting OBDII interface.

On another note, I just got a media center PC (HTPC) up and running at home. It was basically a free HP Compaq with an AMD Athelon X2 5400B CPU and an MSI G210 GPU. I had to buy RAM (2GB) and a HDD to get it running, plus an HDMI and a power cable. $135 or so got me up and running. The reason I mention this is that I decided to go with Linux Ubuntu as the OS, which means I'm finally getting my toes wet in the Linux world. Considering the Pi uses Linux, it's definitely a good thing and I'm learning a lot. Hopefully when I get my Pi it will be somewhat painless to get it up and running.

UPDATE 3 - 10/18/2012

Received my Raspberry Pi! It was definitely a surprise. I ordered from Allied Electronics and while I like that it has been delivered early, they didn't give me any warning whatsoever. A bit odd to me. Regardless, because I was caught unaware I still need to go buy an SD card for it so no testing tonight. I should have it up and running over the weekend, however. Can't wait!

Look How Small It Is!

UPDATE 3 - 10/21/2012

Well, I've got the Pi up and running. Basically just figuring out what exactly I should purchase. I was originally thinking of buying the STN1100 UART board from Sparkfun, plus a USB adapter and cable, but that total comes up to $77 plus shipping. At Scantool.net there's an STN1100 based device (OBDLink SX Scan Tool) that goes from the OBD II port directly to USB for only $50 (regular $75). As far as I can tell it will do everything I need, and it's in a rather convenient package. Additionally I'm going to order a 20x2 LCD from Digikey ($15) and 12V USB car charger (5V 2A output, $12.45). This should take care of the basics in getting the Pi setup - besides programming it! I've got a 750 page C++ programming book beside me here, so I think I'm just going to try and have some fun learning. My goal right now is get these parts assembled and able to display stuff, then eventually communicate with the car and have some push buttons to switch screens (let's say an MPG screen, another with temps and pressures, whatever else). As far as media and GPS goes, that's something that I can do after all this is done. Don't want to bite off more than I can chew.


UPDATE 4 - 11/1/2012

Just a quick update. I've now received the LCD and OBD to USB cable and have been spending quite a bit of time trying to get the LCD to work and to do some coding. This weekend I'm pretty busy, but my goal is to borrow a laptop and testdrive the OBD reader which comes with some software, and also to get the LCD display working. I'll also have some pics and stuff so stay tuned!

UPDATE 11/2/12: All future updates will be on Page 2

47 comments:

  1. Wow, keep up the good work. I was looking for a similar project for my RPi (due in October) and look forward to your continued postings!

    ReplyDelete
  2. very interesting read. keep it up with the updates etc

    ReplyDelete
  3. also starting such a project. just got my 7 inch display today and bluetooth gps.

    ReplyDelete
  4. look into XBMC for the raspberry pi... best for media playback and content. Use an extern harddrive to store your media on. Then you can easily move the harddrive from your car to your home so you can put your content on it. I'm doing a similar project with my raspberry pi. I want to put it in my car with a 7" touch screen monitor 500Gb harddrive, USB bluetooth streaming / data tethering.

    As far as the power from your car to your raspberry pi I'd like to recommend getting one of those portable spare chargers for android phones that allow you to hook up by USB - mUSB for 5v power. This will include a battery the Pi could run off of and say "Idle" when your car turns off which I've been told that the Pi idle takes a whole 3miliWatts to power. This way when your car is on it charges the backup battery and when the car is off the pi will Idle and run off of the backup battery. This could help you move along with your project until you can figure out how to turn on and off the raspberry pi by the ignition switch.

    ReplyDelete
  5. Looking good, i have a couple of Rpi's at home for general media playback using XBMC and Home Automation, also planning using one in the car, have been using car computers for the past 12 yrs, let me recommend the 512MB Model B board over the 256MB, you will struggle with performance issues with media playback
    keep up the good work

    Good luck

    ReplyDelete
  6. Thanks for the comments.

    CaseyPeters: I've thought about getting one of those although I'd have to break it open and figure out a way to attach it internally. The main reason I'm not doing it, though, is that those are generally only good for up to 1A. However I expect to require more power than that if I attach a HDD, iPod, LCD, etc. The battery idea is neat though.

    Andrew: As I understand it, all model B's are going to have 512MB from now on so hopefully that's what they ship me.

    ReplyDelete
  7. Hello Wolfram23, I'm trying to do the same as you are. I've a toyota and it should be all fine.
    Have you made any progress into getting it to read your car so far ?

    ReplyDelete
  8. Looking to do this to my car also. Any updates?

    ReplyDelete
  9. I am working on something similar. Since I have room to build a console, I was going to embed a 7 inch touch screen. This is about the best I have found yet.
    http://www.mini-box.com/VM7000-7-touchscreen

    For a power supply, I was thinking of using something like this:http://www.mini-box.com/M2-ATX-160w-Intelligent-Automotive-DC-DC-Power-Supply?sc=8&category=1544

    It can send signals for start up or shutdown to the Pi, and can handle the power surge from cranking/starting. Alternately, I was thinking of using a rechargeable battery pack to power the Pi and connecting the pack to switched power in the car. This would avoid any power up issues when starting the car.

    I'm still struggling with the OS and front end. I'm going linux, but I might have to write something in Python. I already have a great touch screen radio/DVD player. I just want this to control other systems with a relay board. Like turning off extra lights, controlling the amp, maybe reading car diagnostics, that kind of stuff.

    ReplyDelete
    Replies
    1. Hey Photozz, I hope you see this. For the same price as that unit you mentioned you can get one of these for the PI. http://www.chalk-elec.com/?page_id=1280#!/~/product/category=3094861&id=14647630 - Bonus is it is a touchscreen also.

      Delete
  10. Why dont you use a simple elm327 usb cable. Gets recognised as serial so no driver needed and you can use something like openObd

    ReplyDelete
  11. That is in fact what I'm using, except it's STN1100 based which is basically a new, much faster, elm327.

    Current GUI based software isn't going to help me, though, as I need to output to the LCD through GPIO pins. My current issue is learning how to communicate over serial.

    ReplyDelete
  12. What are you doing for the sound portion of the project? I tried USB sounds cards but currently XBMC runs too slow when using mplayer (usb sound support player). I have everything else you are doing, finished just my sound portion is left.

    ReplyDelete
  13. Hey! I just wanted to let you know thanks for the documentation and keep up the good work.

    ReplyDelete
  14. Awesome to see someone doing this - every since the Raspberry Pi was announced I was hoping for Android support, and this is exactly the kind of thing I want to do with one. I wondered if finding a way to power a multi-port USB hub is the way to go because you can power the Pi that way, plus have room for a powered USB hard drive (powered by USB via a separate USB cable, for example) and then find a way to split off the audio (via amp or something) to the speakers. I have a 6-channel Infinity speaker system in my van, 2 in the dash, 1 each in the front doors and 2 further back. The head unit is nice with the CD player, but my music collection is so massive at this point I'd love to do an XBMC kind of thing to carry it all with me. I'm with CasyPeters as well - large HDD, 7" touchscreen, possibly Bluetooth USB adapter (assuming driver availability) to transfer tracks to/from the system, or maybe even USB-based WiFi to connect to my home network so when the van is in the driveway I can jump out to my home PC and grab new tracks, etc. or do other app installs

    ReplyDelete
  15. It's so cool to see someone so curious. Keep it up and have fun!

    ReplyDelete
  16. This is awesome. I'm wanting to do pretty much exactly this project and stumbled onto this post while searching. It's good to see someone trying the same thing. I'll keep following your blog. Very cool.

    ReplyDelete
  17. Just hook up the on/off to the window fuse. It will get power when the car is on and turn off when the car is off.

    ReplyDelete
  18. Looking at all the touchscreens , I think wolfram may have already picked the best choice for auto use.. Backup trigger, auto dim trigger, nice,, if it was in a pretty package like the vm7000 it would be perfect,,, hope you keep up the blog ,, would love to know how you progress..

    ReplyDelete
  19. Just like quite a few people here I've been working on the same thing, here's a video of what I have done so far. https://www.youtube.com/watch?v=ZDEAV0M9MSk

    Good luck with your project I'm hoping to integrate some GPS into mine eventually.

    ReplyDelete
  20. This comment has been removed by the author.

    ReplyDelete
  21. Great project. Looking Good.
    I'm curious to see the outcome of this Car PC System.
    I'm also planning to start working on my Raspberry Pi to make a Car PC as well.
    Since the Raspberry Pi works on Linux, are you able to run a GPS/navigation system on this operating system?

    Good luck. Keep posting your progress.

    PS: It looks like there is many people interested to work in this type of project; maybe it would be interesting to create an open source/open hardware project joining the effort/contribution of more people to have a greater outcome.

    ReplyDelete
  22. Interesting project! I'm looking forward to follow your progress. I'm doing something a bit more lightweight, just setting the Pi up to be a WLAN AP and be an AirPlay host initially. I'm playing around with optimizing the Pi's boot time. Next step will be to provide power. I'm thinking a fixed installation as I want to leave the cigarette charge socket available. Do you have any hints on what I would need? I'm thinking a relay circuit of some sort that would power up the pi when the car starts and shuts it down cleanly when the car gets turned off. Voltage regulator and some sort of timer I guess...

    ReplyDelete
  23. Very interested to see this finised. Please update. Thanks for posting.

    ReplyDelete
  24. Really Cool!


    Just an idea which could help...
    Several years ago, Sony made GPS systems for PSPs.
    Requirements were a mini USB connector
    and (proprietary) GO!Explore software.
    This would mean PSPs were capable of
    GPS, Media playback, Internet Browsing, and (ofc) games.

    You could use the PSP OS for it, which has been modded
    to accept disk image files of the disks it uses and
    mod it for a touchscreen. Trust me, there's a huge community
    for PSP hacking (m_33, Dark_Alex, etc) and the PSP is actually
    quite similar to the PI in size and specs.
    Parts are cheap by the way.

    It's just an idea.

    Amazing what you're doing with the PI!
    Good luck!

    ReplyDelete
  25. Drivers who detect an exhaust smell while driving may have a leak in their vehicle’s exhaust system. A faulty exhaust can be a health risk so in this instance, drivers should take their car to a garage without delay.

    ReplyDelete
  26. For car power check out http://www.carnetix.com/ I used this when I put a Windows XP and 7" setup in my old SUV.

    This site may be of use too: http://www.mp3car.com/

    ReplyDelete
  27. So how did you make out with this?

    ReplyDelete
    Replies
    1. Still working on it. Had some set backs both with hardware (SD card corruption) and just personal life, can't seem to find the time. However, you can see the updates on Page 2.

      Delete
  28. This comment has been removed by a blog administrator.

    ReplyDelete
  29. Really cool invention uhuh, keep it up and dare to make a difference you can do some more in the future, thumbs up for you! I know this dvd car radio is very simple to you when you customize this kind of car gadgets. Looking forward seeing more of your craft mate. Cheers!

    ReplyDelete
  30. Awesome! My organization is to be dependent on Reversing Cameras for Cars, From time to time anytime Now I am moving past because of a destination by means of magnifying camera I won't refrain from that will view it and then determine me and additionally owning this specific replicate products is tremendous! Because of this , My organization is likely to get a Car Entertainment System but I won't pick which type I'll get, wanting on which I am able to at long last developing a judgement which means that Possible possess one.

    ReplyDelete
  31. I am impress with your goal cause i have a car for 3 years and i never been upgrade it in fact it is always broken and i mostly used to change the gear and hoping the this year the gear will last for 2 or 3 years.

    ReplyDelete
  32. Quality information, keeps the ball rolling with updates so on…pc maintenance London

    ReplyDelete
  33. Hi, having read this awesome written piece I’m also pleased to fairly share my familiarity here with colleagues.where can i get some good insurance rates for my car

    ReplyDelete
  34. Amiable articles and the blogs really helped me a lot, thanks for the valuable information.payday cash loans online

    ReplyDelete
  35. I really enjoy reading and also appreciate your work.gettysburg insurance

    ReplyDelete
  36. The information you have given in the blog really marvelous and more interesting. car paint shops

    ReplyDelete
  37. I would never crave to lose out any chance to look throughout your contents.rim repair

    ReplyDelete
  38. This is an informative post review. I am so pleased to get this post article. I was looking forward to get such a post which is very helpful to us. Keep it up. . I know something information, to know you can click here best car gps systems

    ReplyDelete
  39. Fastidious blog you’ve got here. I’ve ever been seeing you just about many blogs recently.
    auto body shop

    ReplyDelete
  40. This is a cool post about modding your computer. I have had so many problems with my auto computers in the past. I once took my Audi A4 into the shop and got an oxygen sensor, and air intake hose repaired, and my check engine light was still on. How did the wiring go? I've put in aftermarket stereos into cars before and wiring can be a real nightmare. http://affordableautoservicecenter.com/auto-repair/1406260

    ReplyDelete