Canbus universal gauge and tuning aid

It's all about the code!
Post Reply
deezums
Posts: 10
Joined: Fri Oct 09, 2020 6:09 pm

Canbus universal gauge and tuning aid

Post by deezums »

I've been working on a project on and off for a while to display operating parameters of an engine in realtime as a tuning aid. I originally set it up to work with megasquirt, but it's really just canbus connected and could be programmed to use whatever protocol you wanted.

Here is a video of a previous version that ran on a teensy 3.6. I've since moved to a ATSAME51G19 for the Mcan peripheral and all it's buffers, plus it's a M4, so it has floating point support for fast screen updates and easier data management. I am still using a 128*128 4bit greyscale display, but only single bit per pixel right now. All in, I think everything can be shrunk down to fit inside a 52mm gauge pod, although mine takes place of the stock oil pressure gauge in the NB2 gauge cluster for now. Not a lot of expensive parts, but I'm unfamiliar with JLPCB assembly and what they stock. I am some kind of masochist and still do stencils and hand placement...



Image

Image

The "stack" Power board, CPU board, display board, and LED board all sandwiched together!

But, I can fit some expensive parts on. I have used ublox's M8N, plan to try one of the new M9N's for the wicked 25Hz speed. A GPS lap timer would be cool, one with splits even better. I think I could set up a system where you'd press a button while moving on track to set a gate, then calculate when you cross that gate, pretty much what racechrono or similar does. A performance timer for testing tuning would be cool, too.

I've tried a few different MPUs and calibration methods and think I've got stuff within usable range with minimal drift, although no idea what to do with the data. I've added light sensing dimming, as well as tied into the low side dimmer circuit in a car so it will follow the dash dimmer and keep from blinding yourself at night. I've got a RTC and an external attiny powered off a battery connected LDO, to keep the GPS ready for hot starts and letting things shut down smoothly with fancy animations. It also currently feeds my megasquirt RTC data before the GPS fully boots, because 80+ bucks for a RTC board is madness and it doesn't properly label SD logs otherwise. Probably much, much better ways to do all this than the ways I've chosen!


What would be really awesome is if we could have some values be adjusted realtime via canbus. Say you were trying to tune a PID loop or warmup, accel enrich, etc. With an encoder to modify values and a live running histogram trying things in trouble areas without fretting with a laptop would be amazing! Tunerstudio allows canbus passthru for configuration, so you could "tune" the gauge for your display preference through the ECU, in theory at least.

If there is any interest I'll clean up the code and hardware files in the next few days and post them up.

Edit: I don't know why I put this in software, sorry!
Abricos
contributor
contributor
Posts: 802
Joined: Mon Aug 18, 2014 12:32 am
Location: Carteret, NJ 07008

Re: Canbus universal gauge and tuning aid

Post by Abricos »

So cool ...
I need one or even 3 of these !!!
mck1117
running engine in first post
running engine in first post
Posts: 870
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Canbus universal gauge and tuning aid

Post by mck1117 »

That's some pretty awesome stuff. It should work with rusEfi (output parameters only, of course for now) without any changes on the rusEfi side. There isn't any documentation on it yet, but our custom CAN protocol is here: https://github.com/rusefi/rusefi/blob/master/firmware/controllers/can/can_verbose.cpp
User avatar
kb1gtt
contributor
contributor
Posts: 3715
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: Canbus universal gauge and tuning aid

Post by kb1gtt »

Very nice. The LCD looks nice and bright. I'd be that can be seen well in daylight. It has a decent refresh rate as well.
Welcome to the friendlier side of internet crazy :)
atntpt
Posts: 98
Joined: Tue Apr 17, 2018 8:21 pm

Re: Canbus universal gauge and tuning aid

Post by atntpt »

I searched everywhere for this I saw your video in youtube once now I understand why I couldn't find it anymore. Love the integration with dash .. looking forward to buy some
mck1117
running engine in first post
running engine in first post
Posts: 870
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Canbus universal gauge and tuning aid

Post by mck1117 »

why not run embedded linux?

There are some shockingly small and cheap Linux-compatible MPUs out there...
Post Reply