made my own canbus gauge - Miata Turbo Forum - Boost cars, acquire cats.

Welcome to Miataturbo.net   Members
 


MEGAsquirt A place to collectively sort out this megasquirt gizmo

Reply
 
 
 
LinkBack Thread Tools
Old 12-10-2013, 11:57 AM   #1
Junior Member
Thread Starter
 
Join Date: May 2007
Location: Atlanta
Posts: 384
Total Cats: 39
Default made my own canbus gauge


If I had to do it over again, I probably would have done it differently.

But here's the (close to) end result of my gauge build- it uses an arduino mega, mcp2515 spi -> canbus transceiver, adafruit oled screen and neopixel ring. I've got a few more touches to put on it - like creating a 3rd and 4th menu (in the video you can see I scroll through my placeholders). I originally wanted an "at a glance" gauge to see if my oil was up to temp before I started flogging it, or something more visually distracting if I was beginning to overheat. I added the scrolling histogram for ***** and giggles (I have this feature in my PLX Gauge - but I don't use it much).

I've still got a list of todo's - some easy, some difficult
-- vital warnings - if, say, oil pressure is < 20psi at > 2000rpm, or coolant temp is ever > 230 degrees, automatically change gauge to display that value.
-- outer ring shift light - if TPS > 90% and RPM > 7000, turn the entire ring into a shift light
-- wire PLX sensors to megasquirt (they have a 0-5v reference that I can datalog), assign LED's to EGT, Oil pressure, Oil Temp
-- have a go at reading the LC-1 serial stream and writing that to megasquirt; no more ground offset worries (basically doing what JB has done with his canbus IO extender). If this goes together reasonably smooth, I might have a go with trying to capture the PLX gauges stream as well. I'm waiting on some parts right now, will probably try and get this working around christmas.

I'm also (attempting) to document this, afaik I'm the first to get a non-native canbus speaking microcontroller (I looked at https://code.google.com/p/ms-can-dis...AN128.pde?r=56 a lot) to talk with a megasquirt. But I keep adding features and that keeps pushing the documentation back...

At the risk of begging for scope creep - what other functions you think would be cool to add to something like this?
gooflophaze is offline   Reply With Quote
Old 12-10-2013, 07:39 PM   #2
Senior Member
iTrader: (3)
 
Join Date: Feb 2006
Location: Centennial, CO
Posts: 672
Total Cats: 20
Default

I like it!

Can you issue commands to megasquirt through the can? Like enable logging? Would be cool to change the launch control RPM on the fly.
karter74 is offline   Reply With Quote
Old 12-10-2013, 09:13 PM   #3
Junior Member
Thread Starter
 
Join Date: May 2007
Location: Atlanta
Posts: 384
Total Cats: 39
Default

I'd have to look at the MS3 code closer - I can write to variables - so on the fly I could change the spark/fuel/boost table (well.. I'd have to figure out tables first...). But it's sort of like cracking open your tachometer and pushing the needle to 6000RPM and expecting the engine to respond.
gooflophaze is offline   Reply With Quote
Old 12-10-2013, 09:22 PM   #4
Hittin' Boost & Cones
iTrader: (2)
 
240_to_miata's Avatar
 
Join Date: May 2007
Location: Cromwell, Connecticut
Posts: 2,572
Total Cats: 11
Default

I made a simple OLED gauge with my MS1 using serial (obviously) but gave up after realizing how insanely slow the update was, and how labor intensive it was considering MS1 is so outdated.

Awesome project.
240_to_miata is offline   Reply With Quote
Old 12-11-2013, 03:08 AM   #5
Senior Member
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,497
Total Cats: 81
Default

I also do like that quite a lot...

I was always looking for a affordable Megasquirt CAN gauge for the gauge cluster... Keep up the good work!
Zaphod is offline   Reply With Quote
Old 12-11-2013, 04:57 AM   #6
Elite Member
iTrader: (1)
 
Join Date: Jun 2006
Location: Warrington/Birmingham
Posts: 2,658
Total Cats: 39
Default

X2 on the good work.

I really want an intuitive gauge over CANBus for my own car.

EDIT: As for functions, if you were to integrate this into an OEM NA dash cluster. a small 4DGL display would fit nicely where the seatbelt light/Handbrake light EML etc are.

So gut that area and fit the display there, but add 4 inputs into the Adurano to know when the handbrake is on etc.

When they're on the gauge interrupts whatever is showing and displays the appropriate light fuill screen, then after a delay (2-3 seconds), minimizes it to a small icon in one of the corners of the display.

Last edited by richyvrlimited; 12-11-2013 at 08:36 AM.
richyvrlimited is offline   Reply With Quote
Old 12-11-2013, 06:23 PM   #7
Junior Member
Thread Starter
 
Join Date: May 2007
Location: Atlanta
Posts: 384
Total Cats: 39
Default

Ah - but I have a KG works... not a bad idea though.



Total(ish) cost for these bits...

$59 for the mega arduino https://www.sparkfun.com/products/11061
$45 for the canbus shield https://www.sparkfun.com/products/10039
$25 oled 1.3 128x64 screen Monochrome 1.3 128x64 OLED graphic display ID: 938 - $24.50 : Adafruit Industries, Unique & fun DIY electronics and kits
$15 for a buck converter to 5v Mini DC/DC Step-Down (Buck) Converter - 5V @ 1A output [TSR12450] ID: 1065 - $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits
$10 neopixel ring NeoPixel Ring - 16 x WS2812 5050 RGB LED with Integrated Drivers ID: 1463 - $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits
$8 for cheap ebay gauge
$3 rotary encoder
-----
165ish

So - a bit pricey, but not too much more than an autometer. I should be receiving the max232 and a nifty i2c uart ($20) which'll let me poll the LC-1 next week.

It could definitely be done for cheaper if you didn't limit yourself to arduino - I did because I wanted to document how it was done.
Attached Thumbnails
made my own canbus gauge-inside.jpg  
gooflophaze is offline   Reply With Quote
Old 12-12-2013, 02:18 AM   #8
Senior Member
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,497
Total Cats: 81
Default

Do so much want...

Attached Thumbnails
made my own canbus gauge-670.gif  
Zaphod is offline   Reply With Quote
Old 12-12-2013, 10:23 AM   #9
Elite Member
iTrader: (2)
 
Join Date: Aug 2012
Location: Indianapolis
Posts: 3,325
Total Cats: 235
Default

Quote:
Originally Posted by Zaphod View Post
Do so much want...
I'll build you one, and trade you for your cluster with the maxigauge.
thenuge26 is offline   Reply With Quote
Old 12-12-2013, 11:05 AM   #10
Senior Member
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,497
Total Cats: 81
Default

I hate to say that I relocated the Maxigauge to the DIN cutout in the center console... (but I will re-relocate it into the dash, or will make a new dash with such a nice Canbus gauge...)
Zaphod is offline   Reply With Quote
Old 12-13-2013, 11:32 AM   #11
Elite Member
 
Join Date: Jul 2005
Posts: 6,454
Total Cats: 80
Default

Good stuff!

What is the rotary encoder for?

And what is the purpose of using CANbus, compatibility with CANbus cars/ECUs?
JasonC SBB is offline   Reply With Quote
Old 12-13-2013, 02:14 PM   #12
Junior Member
Thread Starter
 
Join Date: May 2007
Location: Atlanta
Posts: 384
Total Cats: 39
Default

So after pricing out my BOM and realizing how much I spent making it, I went back through and decided to see how much a CAN-native MCU would run - this would eliminate the $45 can shield and $59 Mega. After browsing digikey for awhile, I found that the at90can64/128 have 4k of SRAM and costs $12 a pop. This is clearly the "right" way to do it.

That's a hell of a difference. Almost makes me want to try and design my first PCB. I did, after all, just order an atmel jtagice3 last night to update my CNC machine...

So - CAN - I started on this while I was still using Serial to tune on my MS2, and didn't want to inhibit tunerstudio in any way. I originally was going to mount a permanent slot in a DIN space, with buttons to set stuff like launch control and table switching (before I really understood how a good tune doesn't need the power/economy settings). MSCan isn't compatible with any other CANbus standard though (except the broadcast functions, I think).

The rotary encoder is the navigation system - push to cycle through different displays/select, twist for different variables.
gooflophaze is offline   Reply With Quote
Old 12-13-2013, 04:00 PM   #13
Elite Member
 
Join Date: Jul 2005
Posts: 6,454
Total Cats: 80
Default

I didn't understand your answer about CAN bus. Must be my unfamiliarity with MS2.
JasonC SBB is offline   Reply With Quote
Old 12-13-2013, 04:18 PM   #14
mkturbo.com
iTrader: (24)
 
shuiend's Avatar
 
Join Date: May 2006
Location: Charleston SC
Posts: 13,780
Total Cats: 1,106
Default

Just remember that MS does not use the standard CANbus protocol. I don't have all the details but many times at the Mega Meets I have heard them talking about it being slightly different then the standard canbus.
shuiend is offline   Reply With Quote
Old 12-18-2013, 01:26 PM   #15
Junior Member
Thread Starter
 
Join Date: May 2007
Location: Atlanta
Posts: 384
Total Cats: 39
Default

I got my MAX232 yesterday and started reading the LC1 datastream, only to have my (old, busted) O2 sensor take a crap (Error 4, charge pump). Anyone have a quick hack to get this to start reading again? Trying to reset and do a heater calibration doesn't appear to have any effect. I've got another (old, busted) sensor (hoarding) at my parents place but that's 60 miles away and I'm lazy. I guess I could work on the todo's listed above..

Sorry - I had a bit of ADD hit when talking about CANBus. In MS, it's completely incompatible with OEM CANBus schemas; MSCan seems written for ease of implementation rather than conforming to any standard.

And I used CAN because I didn't want to have to unplug my gauge to load up tunerstudio.
gooflophaze is offline   Reply With Quote
 
 
Reply

Related Topics
Thread Thread Starter Forum Replies Last Post
OTS Bilstein to motorsports ASN conversion stoves Suspension, Brakes, Drivetrain 5 04-21-2016 04:00 PM
My solution for Oiltemp and Oilpressure input into Megasuirt (MS3) Zaphod MEGAsquirt 41 01-24-2016 01:25 PM
MSPNPPro-MM0105: Coolant Temperature Output slomiata MEGAsquirt 5 10-07-2015 02:11 PM
Back to Stock Part Out!! Turbo Parts, MS2 Enhanced 01-05, Suspension, and MOAR! StratoBlue1109 Miata parts for sale/trade 16 10-02-2015 10:39 AM


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 10:43 PM.