Page 1 of 5
Making Raspberry Pi Gauges - The Blog
Posted: Fri Jul 03, 2015 8:11 am
by bill25
AJ asked for a blog to follow my venture into making gauges for a car using the OBD port in a car.
So far, I have found the following:
I am going to use python to get the data from the interface.
http://www.cowfishstudios.com/blog/obd- ... -head-unit
This looks like a great start to doing what I am trying to accomplish.
There are options in the above, and I will specify exactly what I am going to try to do.
I am going to use the following:
1. Raspberry Pi Model B or B+
2. LED Display
3. 2A Car Supply switch
4. ELM327 USB Cable
5. HDMI Cable
6. Power supply for display - not determined
This is a little different than the basic build described.
I am then going to have to figure out the look of the gauges because the squares on this video are not going to cut it.
I am thinking of using PyQT. I have never used QT, and have almost no experience with Python so this should be cool.
I downloaded a QT Gauge package from here:
https://lemirep.wordpress.com/2014/03/2 ... d-project/
These look a lot better:
gauges.png
They are supposed to be customizable so that will be cool. Hopefully I can change the range on the speedo, and make it MPH.
Re: Making Raspberry Pi Gauges - The Blog
Posted: Fri Jul 03, 2015 8:20 am
by bill25
Progress so far:
I have managed to do these steps from
http://www.cowfishstudios.com/blog/obd- ... -head-unit
sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo reboot
Install these components using the command:
sudo apt-get install python-serial
sudo apt-get install bluetooth bluez-utils blueman
sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n libwxgtk2.8-dev
sudo apt-get install git-core
sudo reboot
Download the OBD-Pi Software from GitHub using the command:
cd ~
git clone
https://github.com/Pbartek/pyobd-pi.git
That all worked.
Open up Terminal and run:
cd pyobd-pi
sudo su
python obd_gui.py
This worked, but the program stops/locks up because there is no OBD connection to the pi.
I ordered HDE Diagnostics USB Cable:
http://www.amazon.com/gp/product/B004O5 ... ge_o00_s00
OBD_USB.jpg
So hopefully, once that comes in, I can do a full test to see if I get data with that setup.
The next step will be to figure out how to use this as the back end to get the data, but use the QT gauges as the font end.
Re: Making Raspberry Pi Gauges - The Blog
Posted: Fri Jul 03, 2015 8:24 am
by bill25
This is the switch I intend to use to power the Pi in the car:
http://www.mausberrycircuits.com/collec ... ply-switch
It turns the Pi on with the ignition key, and gracefully turns it off based on the ignition key.
2AcarSwitch.jpg
Re: Making Raspberry Pi Gauges - The Blog
Posted: Fri Jul 03, 2015 8:29 am
by bill25
I don't really know anything about how to integrate the Python stuff with the QT gauges. This site describes how to set up eclipse to do a cross platform Qt Python GUI application. Hopefully this helps...
http://popdevelop.com/2010/04/setting-u ... plication/
Hopefully I can get program it on my laptop and move it to the Pi once I am done, otherwise coding on the pi might be less than optimal...
Re: Making Raspberry Pi Gauges - The Blog
Posted: Fri Jul 03, 2015 10:01 am
by kevm14
One time I was gonna make a trip computer (mostly for MPG purposes) for my 95 Fleetwood that ran off the OBD-I port. Then I didn't. Basically, I would have been making an OBD-I Scangauge from scratch.
Re: Making Raspberry Pi Gauges - The Blog
Posted: Sun Jul 05, 2015 4:26 pm
by bill25
I got the cable, and tested the software. It worked! I can read parameters from the car and display them on a screen.
Next steps:
- Fix time between reads to give a more real time view. Currently it is set to have an update periodicity of 1 second - Way to slow. This should be easy to fix. I want to do some research to determine how fast the OBD updates so I am not attempting to update the pi before the OBD has a new value because that will be a waste of resources, and the pi is pretty limited.
- Download the IDE and set it up to start integrating the back-end with some cool gauges.
Re: Making Raspberry Pi Gauges - The Blog
Posted: Sun Jul 05, 2015 7:24 pm
by kevm14
I would recommend 10 frames/sec.
Re: Making Raspberry Pi Gauges - The Blog
Posted: Wed Jul 08, 2015 1:25 pm
by Fast_Ed
Not to be too simplistic or annoying.. but wouldn't it be easier to just use this:
http://www.amazon.com/BAFX-Products-Blu ... +bluetooth
And make or buy a program for an old android phone? The hardware work is then done, and you move on to designing the display.
Maybe you can pair it with multiple android phones, so you can have a tach, speedo, etc.
I still think the raspberry PI is a cooler approach, and allows a larger screen.
Re: Making Raspberry Pi Gauges - The Blog
Posted: Wed Jul 08, 2015 1:38 pm
by bill25
So,
Not annoying, good questions. The hardware that you posted is the Bluetooth version of what I got. I just got the usb version instead because I didn't want Bluetooth out of paranoid security reasons.
I am currently running open source pyobd, which would also work with this Bluetooth implementation that you are suggesting so we aren't that far off.
The difference between pyobd and an android app is that the python gui is totally customizable along with the back end, data pulled in etc., and I wanted to use the pyobd back end that gets the data, and somehow send that to QT gauges because I have never used QT and I heard it is cool for user interfaces. There is no real reason to do it this way as opposed to what you said except my personal interest in learning a little python and QT.
You make a good point about the displays. It will be interesting to see if the pi can drive more than one display since most dashboards are much wider than tall and a normal rectangle will likely not be big enough width wise and still fit height wise. 2 7 inch displays side by side, on their side would probably work for the IROC, there is also a 10 inch single display that might work in the Monte.
Interestingly enough, this application will not work in either car without an LS engine swap because this is for OBD 2.
Re: Making Raspberry Pi Gauges - The Blog
Posted: Wed Jul 08, 2015 4:09 pm
by kevm14
http://blogs.windows.com/buildingapps/2 ... mp&&
I heard something about you will be able to use your Windows Phone as the display for embedded devices running Win 10 for IoT. Interesting concept.