When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
I figured it was worth breaking this project out into it's own thread instead of burying it in my build thread.
Overview
A quick overview of what we're looking at here. A small ESP32 dev board with a built in display that is pulling ECU data via CANBUS. It's currently setup to use OBDII from one of the CAN headers on the Link G4x in my car. I drew and 3d printed a housing to mount it on the steering column.
Why
The CAN/OBDII data was already able to be picked up by my phone using a bluetooth dongle, but I don't always want to have my phone out to view temps. If I'm on track I like to be able to monitor temps without worrying about my suction cup mount flying off mid corner or my phone's battery dying. Further, this allows me to tweak what sensors I want to use and any parameters related to those.
Cost
Cost is probably the biggest pro for this setup for now. The electronics side is an ESP32 ( $23) board drawing power through a buck converter (5 for $10). The CAN signaling is run through a transceiver ($4 + shipping). So, not including the cost of the 3d printer, protoboards, wiring, etc... You're looking at around $30. With a basic electronics kit from Amazon and a couple bucks to find someone to print a housing I'd expect most people could get this done for ~$50.
What CAN It Do?
So far, I've only got it set up to read 4 different values, Coolant temp, Intake temp, Oil Temp and RPM. I've set the code up in a way that makes adding a sensor pretty easy, it's about 5 lines of code or so. Being OBDII, you are limited to the sensors defined in that standard as far as I'm aware. Link's CAN support is pretty extensive, but I wanted to get things up and running so using a predefined standard like OBDII seemed like the quickest path forward. The code is also set up to record the peak values for the sensor, which happens for each sensor, not just the currently displayed one.
The ESP32 board also has a lot of I/O. I've got this set up to drive green, yellow and red LEDs depending on the state of the currently selected sensor and some Good, Warning and Error values in the code. I didn't end up getting those LEDs installed in the current prototype, but I should be able to wire those in and be good to go.
Further, the ESP32 has Wifi and Bluetooth. I haven't ever used this board, so I'm not sure exactly how this would go, but I believe a small Android app could be created reasonably easily using something like MIT App Inventor to allow a phone to visualize all sensor data at once. I did something similar in college with an android phone and a temperature sensor on an Arduino, so I don't imagine this would be significantly different.
What Now
The housing will likely be redesigned a couple times. I've got a new faceplate on the printer next to me as I type this. After a test drive yesterday I realized that the current setup blocks more of the speedo and warning light cluster than I care for. I also would like to figure out some way to package the circuitry in the housing, as right now it's mostly just flopping around. Also, if LED's are added, I'd like to add a hole/slot for those, but that's a ways away.
I believe there's a bug in the code right now that causes some sort of segmentation fault and resets the board, which resets the peak values. I'll need to look into that. I also haven't fully explored the capabilities of the display or how quickly I can read from the ECU. I'm mostly looking for temps that change relatively slowly, but this is more important for something like RPM that changes quickly.
I don't have a huge desire to move on from OBDII, but I wouldn't mind being able to monitor some Link specific parameters. I don't believe OBDII has a Current Gear PID (there's something, but I think it's gear ratio, not Gear 1-6), which would be neat to hook up to a 7 segment display. This could happen in the future, but for now I think I'll focus on refining what I have.
Finally got the housing redesigned and fitting decently. Not perfect, but it's slimmer and doesn't block as much of the speedo and warning lights. It also is more streamlined between the lid and the main housing.
For code updates, I allowed a default sensor to be set up, where it previously booted to a pseudo random sensor. I also found the bug that was causing the values to reset and added TPS and Ethanol %.
I received a big box of Deutsch connectors that were on sale, so I plan on swapping the ECU CAN wiring and the gauge CAN wiring over to that at some point, but the current Dupont style connectors held up at autocross last weekend, so they're doing alright.
Right now the protoboard that is housing some of the components is just floating around in the steering column shroud. It doesn't seem like it's going anywhere or going to get caught up in anything, but I don't really like it. I might try to design a PCB to get a smaller footprint, but if I go that route I'd also like to get the board into the housing and try to get the LEDs integrated somehow. Another redesign of the housing is not something I think I can handle mentally after wrestling with Fusion so much already this week.
Using OBDII means that I'm pretty sure this could be integrated into any car with CAN wiring on their OBDII port, you'd just need to wire the gauge power, ground and CAN H/L signals into an OBDII connector. One downside is that as far as I can tell the G4x will only do OBDII on one of the CAN headers, which means I can either use the gauge or the bluetooth dongle I've wired into the other CAN header. Not a huge deal, but it would be nice to have both available. I will also probably start looking into the other CAN protocols supported by the G4x, because while I can get most data I want over OBDII, it'd be nice to have access to any of the G4x parameters regardless of OBDII support.
Aside from that I'm really stoked on how this is working. I had it on the car for autocross last weekend and it was great to be able to glance down and see what my coolant or oil temp was. I also think it'll be useful for tuning, as I can see exactly what IATs or CLT is if I have a rough cold start, idle, etc...
I've had the gauge in the car for the past couple weeks now and it's been working great. No issues to report. I am curious to see how things will hold up in the summer, especially if the car is left parked in the sun. The housing has been a bit warm to the touch when I have checked, but I'm not sure if that's just ambient temps or the board getting hot.
Regardless, I may add some vent holes to the backside in the future to allow some heat to escape.
Initially when I started working on this project I wanted to put 3 LEDs on the board to act as warning lights. Those got scrapped in the first prototype mainly because they were full sized LEDs that all needed resistors and an IO pin to drive them. The packaging wasn't looking good and I didn't want to deal with the hassle, figuring I'd revisit it once things were working in their basic form. I recently realized that you can get Neopixel strips on Amazon at around $8 for 5 boards.
These are a massive upgrade from old static LEDs for a project like this. The strip has 8 RGB LEDs and a controller which only require power, ground and a single wire for control. Each LED is addressable and RBG, so any LED on the board can be turned on/off individually and set to any color and brightness. This opens up a whole range of effects and functionality as far as shift and/or warning lights. I've only been playing with these for a couple hours, so they might have more functionality I'm not aware of. I mean, at the end of the day they're LEDs, but still really neat tech.
Packaging on this isn't ideal, as the gauge is already encroaching upon the Odometer and warning lights, but I might try to add a chin at an angle to try to sneak them in at the bottom. I'm also going to need to splice a ground signal as the ESP32 only has 2 ground pins and I'm already using both, but that's not a huge deal. If/when I'm feeling a bit over the top, I should be able to add a photoresistor to add an autodimming feature, which would be nice, as these LEDs can get pretty bright. For now I'll likely add something like double pressing the button to turn them on/off so I'm not blinded by them at night.