RaspberryPi in the Dash

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
Country flag
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.
Honda Civic 10th gen RaspberryPi in the Dash 1*Iy937MYqS1jPO6D7mLoctQ

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.

Honda Civic 10th gen RaspberryPi in the Dash 1*Mevgcw1w975S7efD0XwVyQ

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

Honda Civic 10th gen RaspberryPi in the Dash image
 

enishi

Senior Member
Joined
Apr 1, 2017
Threads
5
Messages
133
Reaction score
31
Location
hawaii
Vehicle(s)
sedan ext
Country flag
cool. unrelated to your post. I'm planning to hard wire rpi 3b and run a usb cam as a dashcam. Hope it works.
 

bikejog

Senior Member
Joined
Jul 17, 2016
Threads
10
Messages
1,261
Reaction score
488
Location
ny
Vehicle(s)
2020 Civic Si Coupe. 2000 Honda Prelude (donated to charity).
Country flag
eh.... wouldn't it be easier and cheaper to do this with an old android phone or even a cheap new android phone? The RPi3 setup must cost ~$200?
 
OP
OP

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
Country flag
The pi3 is $35, screen $30, and OBD cable 30$; totaling to ~$100 after tax. These are pretty much the bare minimum to get this working. A LCD/HDMI screen could be replaced with a cheaper alternative as well. While a cabled solution is possible with the Android, this is more energy efficient without the overhead of other android components running.
 

SCOPESYS

Senior Member
First Name
Geoff
Joined
Aug 27, 2018
Threads
68
Messages
2,505
Reaction score
1,550
Location
MD
Vehicle(s)
2018 Honda Civic SI Coupe. . . . . . . .1987 Nissan Maxima Wagon. . . . . . . . . . .1987 Nissan Pulsar NX . . . . . . . . . . . . . . . . . .1987 Nissan Maxima Wagon (2nd Donor Wagon for parts)
Country flag
Very Cool ...

I have often thought how nice it would be to replace the left or right hand side of the Instrument Panel with a screen display that could be user Customized.

(I"d love to be able to get into the Center display screen, and Mod that as well !!!!! - but not holding my breath on that one -- but a replacement Custom side screen seems a lot more possible))

Are you planning to create actual Gauge displays - Bar Graph etc, or just stick with text.

A full customization side Instrument Panel module would be a great Mod !!! (and probably quite a sell-able item !!!)
 


OP
OP

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
Country flag
Personally, I am not a fan of analog gauges. I have plans for digital gauges and graphs though. Pictures/displays tell a thousand words.

I do need ideas on what information to show though
 

SCOPESYS

Senior Member
First Name
Geoff
Joined
Aug 27, 2018
Threads
68
Messages
2,505
Reaction score
1,550
Location
MD
Vehicle(s)
2018 Honda Civic SI Coupe. . . . . . . .1987 Nissan Maxima Wagon. . . . . . . . . . .1987 Nissan Pulsar NX . . . . . . . . . . . . . . . . . .1987 Nissan Maxima Wagon (2nd Donor Wagon for parts)
Country flag
Personally, I am not a fan of analog gauges. I have plans for digital gauges and graphs though. Pictures/displays tell a thousand words.

I do need ideas on what information to show though
#1 . Those items that have been lost by replacing what was there, with your new "soft" display.
#2 Items that cannot be got from any other Gauges/display on the rest of the Instrument Panel, but can be got by OBD2
#3 items that can only be got via Can-Bus.
$4 Items that require additional sensors (ie Oil Pressure, Oil Temp)

Actually, I would put the two Oil measurements near the TOP of the list, along with Active TPMS.

Small graphs, showing parameters over a given time are also a great addition.
(ie give some history) -- you cannot always be obsessing looking at the Instruments -- you need to spend most of the time looking out the windscreen - (same applies when flying a light aircraft !!)
 
OP
OP

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
Country flag
Yea all great ideas. I wish our computers came with Active TPMS. I am currently experimenting with Can Bus sniffing before I invest in UI design
 

civicdabest-foo

Senior Member
Joined
Jul 29, 2018
Threads
34
Messages
534
Reaction score
165
Location
South central Canada
Vehicle(s)
Civic x 1.5L turbo CVT
Country flag
"but the MPG gauge is not instantaneous and it updates every minutes."

You must be talking about the Trip A/Trip B mpg displayed. Although it does display a live mpg meter which I find is more than handy. In fact I find that if I follow the green eco drive light bar at the top of the dash I meet EPA mpg. With gas as cheap as it is (here in western Canada at least) and the 1.5L being the king of its class in mpg, I've don't find myself needing to track mpg anymore.

Interesting project though. Sniffing the CAN bus, by that I am guessing you're reverse engineering the info that various modules send over that bus.

I'd be interested in engine coolant temperature though, the fake digital temperature gauge is useless in cold weather.

Nice write up.
 
OP
OP

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
Country flag
"but the MPG gauge is not instantaneous and it updates every minutes."

You must be talking about the Trip A/Trip B mpg displayed. Although it does display a live mpg meter which I find is more than handy. In fact I find that if I follow the green eco drive light bar at the top of the dash I meet EPA mpg. With gas as cheap as it is (here in western Canada at least) and the 1.5L being the king of its class in mpg, I've don't find myself needing to track mpg anymore.
.
I actually mean the one in the touch screen when you go to the trip computer's current drive window in the touch screen. The one in the instrument cluster actually is instantaneous but I prefer the straight number.

The eco light and the bar graph will definitely be enough for most people (which is a reason why Honda and a lot of other manufactures go this route). Personally, I think the instantaneous MPG and fast updating average current drive MPG can be used to even further tune driving habits and decrease fuel consumption.

Personally, I use the throttle position to determine if I am pressing on the pedal too hard in certain situations. In a previous car, i was able to calculate the fuel consumed and was able to plot the consumption over time. If the trend was going down, I would re-evaluate how I am driving and try to get back to the high average. The thing is, I don't want to just meet the EPA estimate. I want to surpass it.

In our cars, It is not possible to calculate the fuel consumed and then the MPG through OBD because our cars do not report the mass air flow sensor value. Previous generations did though. So I can only resort to CAN bus sniff for it. I wish our cars have blind spot sensors as well, then I could sniff for that as well :p
 


SCOPESYS

Senior Member
First Name
Geoff
Joined
Aug 27, 2018
Threads
68
Messages
2,505
Reaction score
1,550
Location
MD
Vehicle(s)
2018 Honda Civic SI Coupe. . . . . . . .1987 Nissan Maxima Wagon. . . . . . . . . . .1987 Nissan Pulsar NX . . . . . . . . . . . . . . . . . .1987 Nissan Maxima Wagon (2nd Donor Wagon for parts)
Country flag
. I wish our cars have blind spot sensors as well, then I could sniff for that as well :p
Add to that a Fuel "sniffer" in the Crankcase !!!
 
First Name
SRE
Joined
Aug 19, 2018
Threads
0
Messages
13
Reaction score
1
Location
Vancouver
Vehicle(s)
2017 Honda Civic Hatchback Sport
Vehicle Showcase
1
Is there any way to get instruments on the stock center panel in the car? I know it's Android based, but can you install widgets to show things after using a KTuner without buying gauges, or is it better to get gauges and mount those?
 

civicdabest-foo

Senior Member
Joined
Jul 29, 2018
Threads
34
Messages
534
Reaction score
165
Location
South central Canada
Vehicle(s)
Civic x 1.5L turbo CVT
Country flag
What? Excuse me? Cheap??
I'm sorry I should not have included BC :D. In Regina, SK, gas goes as low as 82 cents a liter for 87 at supermarkets. 95 cents at the brand name pump stations. I should have been more specific with my geographical reference, I understand from looking at GasBuddy that gas in Vancouver is about 50% more than what we pay in SK.
 
First Name
SRE
Joined
Aug 19, 2018
Threads
0
Messages
13
Reaction score
1
Location
Vancouver
Vehicle(s)
2017 Honda Civic Hatchback Sport
Vehicle Showcase
1
I'm sorry I should not have included BC :D. In Regina, SK, gas goes as low as 82 cents a liter for 87 at supermarkets. 95 cents at the brand name pump stations. I should have been more specific with my geographical reference, I understand from looking at GasBuddy that gas in Vancouver is about 50% more than what we pay in SK.
Hahaha all good, just was like "(0.o) whaaa?" I wish it were that cheap out here! Mind shipping some gas over for me though? lol
Sponsored

 


 


Top