PDA

View Full Version : DIY Boost Gauge



Manuel
02-07-2016, 04:15 PM
FYI - This is a re-post of a thread I started over on fiestast.org (here (http://www.fiestast.org/forum/fiesta-st-electronics/5364-diy-boost-gauge.html)).

This project came about as I was researching boost gauges for the FiST. I had looked into a COBB Accessport, but wasn't ready to drop the $$$ for a tune/risk my warranty. After watching a review for the new WRX, I noticed that Subaru included a digital boost gauge in their software. It got me thinking - "How hard can it be?".

Then I remembered reading about a custom OBD-II/Raspberry Pi project on a blog (check it out here (http://blog.brianhemeryck.me/how-to-interface-with-your-cars-ecu-through-obd2-and-python/)) and thought it would make a great end-of-summer project (I started this back in July). In addition, I'd have access to whatever vehicle data I wanted. The plan was to output this information to a 2x16 character LCD (example (http://cstark27.blogspot.com/)) for simplicity, and also because I managed to find one that matched the FiST's dash LCD pretty darn well.

In summary, the goals for this project are:

Learn how to code in Python
Learn how to output data from Raspberry Pi to LCD
Display diagnostic data from OBD-II (mainly boost pressure)
Don't electrocute myself
Don't start anything on fire


Helpful links (running list):

How to interface with your car?s ECU through OBD2 and Python | Brian Hemeryck (http://blog.brianhemeryck.me/how-to-interface-with-your-cars-ecu-through-obd2-and-python/) - Tutorial on Python/OBD-II
https://pythonfun.wordpress.com/2012...ith-python3-2/ - Installing the pyserial library on Windows
https://pythonspot.com/getting-started/ - Learning Python
https://en.wikipedia.org/wiki/OBD-II_PIDs - OBD-II PID code reference
http://python-obd.readthedocs.org/en/latest/ - Python-OBD library documentation
http://mausberry-circuits.myshopify.com/pages/car-setup - Wiring Mausberry circuit tutorial



FAQ:
"Why not use Torque Pro? (OBD-II Android app) There's already been lots of development on that."
Since originally responding, I've actually utilized Torque Pro a bit and found it to be very useful! However, it was a bit "busy" for my tastes, and I use my phone for calls/music when driving. In addition, I have a 5" Nexus 6P, which I don't really feel like mounting to the windshield. Finally, I'm a software engineer by day, so the opportunity to learn a new programming language is a great opportunity to expand my skill set

"It would be cool if you could interface a pressure transducer to the Raspberry Pi and design a digital display without the need to occupy the OBD-II port!"
There are already quite a few projects I've found where this had been done. Also, I'm interested to see if there's any latency issues with utilizing the OBD-II interface.

Update 8/27/15:
Working Python script to grab the engine RPM:


https://www.youtube.com/watch?v=JbrFzkmqNC4&feature=youtu.be

Update 9/10/15:
Supplies from Amazon arrive:http://i300.photobucket.com/albums/nn37/MjrDisaster/20150909_164211.jpg

Everything wired up (attempt #1):http://i300.photobucket.com/albums/nn37/MjrDisaster/20150910_190813.jpg

Unfortunately, this attempt resulted in a fried OLED display. Some wiring adjustments were necessary.

Update 9/21/15:
New display arrives, testing:http://i300.photobucket.com/albums/nn37/MjrDisaster/ed335ee0-789f-4d54-91b1-c257ae189e9e.jpg

Python code working on Raspberry Pi:


https://www.youtube.com/watch?v=USFfg1GxvGw&feature=youtu.be

Update 2/7/16:
I updated my Python scripts to utilize the python-OBD library due to it's excellent documentation and expansive features/functions (i.e. RPM's, throttle position, boost pressure, etc.).

These scripts are running on the Raspberry Pi, outputting data successfully to the OLED display. I am now looking into wiring the Pi's power into the FiST, and am exploring the Mausberry 2A Car Supply/Switch.

Due to the way the Mausberry switch works, I need to tap three locations in the glovebox:

Fuse with a constant 12V supply (even when car is off)
Fuse with switched 12V supply (relies on ignition/accessory)
Ground

I'd welcome advice from anyone familiar with the 2014 FiST fuses as to which will work. I should note that I've already tapped the rear wiper fuse for my dash cam. It should be fairly easy to test the fuses myself, but I am concerned about a separate ground point. I'm currently using the screw located to the top right of the fusebox for my dash cam ground (seen here (http://i300.photobucket.com/albums/nn37/MjrDisaster/Fiesta%20ST/2015-02-13%2015.52.27.jpg)).

Update 6/29/16
I've got a blog post together here (http://blog.bpwalters.com/raspberry-pi-obd-ii-carputer/) chronicling the entire project!

erdna14
02-13-2016, 01:30 PM
Interesting. I'm gonna keep my eye on this.

LilPartyBox
02-19-2016, 02:19 PM
Sub'd

StuttersC
04-22-2016, 12:28 PM
Cool!

Manuel
06-24-2016, 03:59 PM
Well, almost a year later and I've got something to share!


https://www.youtube.com/watch?v=kVyh6FTyh9E

I've been running a working version of the code in my car for a few weeks now with no major issues. There is still plenty of room for improvement (I've already started a list...), but I'm happy with how it's come together so far.

A publicly available copy of the code is available on my Github (here (https://github.com/bendrick92/obdPi)) along with some documentation (https://bendrick92.github.io/obdPi/) to support the setup/usage of the project files.

I'll be working on a full blog/forum post to highlight the project start to finish, but for now feel free to share your comments/criticisms/suggestions!

Racer83L
06-29-2016, 11:17 AM
very cool.. this is inspiring. and makes me feel useless