kalvin126
Senior Member
- Joined
- Dec 12, 2016
- Threads
- 7
- Messages
- 177
- Reaction score
- 76
- Location
- San Jose
- Vehicle(s)
- 2017 WOP Civic Hatchback Sport Touring
- Thread starter
- #1
I have always liked trying to drive efficiently as possible (i.e. maintaining momentum/speed, decreasing fuel consumption etc.). The one gripe I have with cars nowadays do not display some gauges/information and are slow to update information. I did a research paper in college on fuel consumption and studies showed that if drivers had an indicator that show how they are doing with fuel consumption, they are likely to be more conscious about their driving habits and decrease fuel consumption.
My previous car, a 2011 Honda Civic, did not have an instantaneous miles per gallon(MPG) gauge, so I used a ScanGauge to show me said gauge. The ScanGuage I had only showed me two guages at a time though. There was other information I could use to help me tune my driving habits. So I, being the iOS developer I was, thought to create an iOS app to run on my phone to connect to my car, read information, and display it. It worked well for awhile but was very in-efficient because of the way iOS works with bluetooth and the repeated information polling. It got to the point where my iPhone would reach CPU temperatures where iOS would shut off.
My current car, a 2017 Honda Civic Hatchback, does have a MPG gauge and a smarter trip computer, but the MPG gauge is not instantaneous and it updates every minutes. I have tuned this car to get more out of the turbo and would also like to get more info out of the car as well.
I have always wanted to start some sort of project with RaspberryPi and this is the perfect opportunity to. The plan is to have the Pi connect to my car and use a small display to display live information as fast as possible. The Pi 3 B+ has USB ports so I will be using a OBD to USB adapter for more efficient data polling. This should be a relatively low power consumption application so I should be able to just power it off of a 2.1 volt usb adaptor via the 12v port in the car.
For the software stack, I have always considered Ruby as my secondary/scripting language of choice as I have used it for fastlane iOS automation and other small scripting tasks. For GUI, I went with Fox/FXRuby as it seems relatively easy to use. I did not exactly want to use a beginner marketed framework either. For data polling over ELM327/OBD, I will be implementing my own library using my existing knowledge of OBD.
10th generation Honda Civic Instrument Cluster
For placement in my car, I plan to overlay a display over the left quadrant of my car’s instrument cluster. I like where Honda is going with the instrumentation cluster design with LCD screen and analog gauges. The side quadrants don’t have much information; mainly showing engine coolant temperature and gas level.
Integration in the dash
The left side does not have much information and I can just have the CarPi display the engine coolant level. I will have to figure out a way mount the display on the left side so that I can glance down to view the CarPi.
To the left and the top image is an basic initial UI for CarPi. I have gotten the mark 1 prototype working on my Mac and now the RaspberryPi so now I plan to desigining possible UI concepts. Indicators, icons, colors, and layouts need to be incorporated to integrate well with the car’s existing dashboard.
What I love about this first prototype is that it is really fast. CPU usage is at a constant 25% on this RaspberryPi and definately is more efficient than my iOS implementation. Below is a video of it in action.
Feature/tech wise I am looking forward to doing CAN bus sniffing to get more information about the car not available thorough OBD. Decrease power consumption; maybe not used a HDMI display. Maybe I could control the car in some ways as well.
To close out, with all things car modification safety must be the first concern. Open source and more to come in the future!
Let me know of any ideas or suggestions you have.
Medium write up: https://medium.com/@kalvinloc/raspberrypi-and-the-car-2feac917bb8e
My previous car, a 2011 Honda Civic, did not have an instantaneous miles per gallon(MPG) gauge, so I used a ScanGauge to show me said gauge. The ScanGuage I had only showed me two guages at a time though. There was other information I could use to help me tune my driving habits. So I, being the iOS developer I was, thought to create an iOS app to run on my phone to connect to my car, read information, and display it. It worked well for awhile but was very in-efficient because of the way iOS works with bluetooth and the repeated information polling. It got to the point where my iPhone would reach CPU temperatures where iOS would shut off.
My current car, a 2017 Honda Civic Hatchback, does have a MPG gauge and a smarter trip computer, but the MPG gauge is not instantaneous and it updates every minutes. I have tuned this car to get more out of the turbo and would also like to get more info out of the car as well.
I have always wanted to start some sort of project with RaspberryPi and this is the perfect opportunity to. The plan is to have the Pi connect to my car and use a small display to display live information as fast as possible. The Pi 3 B+ has USB ports so I will be using a OBD to USB adapter for more efficient data polling. This should be a relatively low power consumption application so I should be able to just power it off of a 2.1 volt usb adaptor via the 12v port in the car.
For the software stack, I have always considered Ruby as my secondary/scripting language of choice as I have used it for fastlane iOS automation and other small scripting tasks. For GUI, I went with Fox/FXRuby as it seems relatively easy to use. I did not exactly want to use a beginner marketed framework either. For data polling over ELM327/OBD, I will be implementing my own library using my existing knowledge of OBD.
10th generation Honda Civic Instrument Cluster
For placement in my car, I plan to overlay a display over the left quadrant of my car’s instrument cluster. I like where Honda is going with the instrumentation cluster design with LCD screen and analog gauges. The side quadrants don’t have much information; mainly showing engine coolant temperature and gas level.
Integration in the dash
The left side does not have much information and I can just have the CarPi display the engine coolant level. I will have to figure out a way mount the display on the left side so that I can glance down to view the CarPi.
To the left and the top image is an basic initial UI for CarPi. I have gotten the mark 1 prototype working on my Mac and now the RaspberryPi so now I plan to desigining possible UI concepts. Indicators, icons, colors, and layouts need to be incorporated to integrate well with the car’s existing dashboard.
What I love about this first prototype is that it is really fast. CPU usage is at a constant 25% on this RaspberryPi and definately is more efficient than my iOS implementation. Below is a video of it in action.
Feature/tech wise I am looking forward to doing CAN bus sniffing to get more information about the car not available thorough OBD. Decrease power consumption; maybe not used a HDMI display. Maybe I could control the car in some ways as well.
To close out, with all things car modification safety must be the first concern. Open source and more to come in the future!
Let me know of any ideas or suggestions you have.
Medium write up: https://medium.com/@kalvinloc/raspberrypi-and-the-car-2feac917bb8e