MEGAsquirt A place to collectively sort out this megasquirt gizmo

made my own canbus gauge

Thread Tools
 
Search this Thread
 
Old 12-10-2013 | 11:57 AM
  #1  
gooflophaze's Avatar
Thread Starter
Senior Member
 
Joined: May 2007
Posts: 997
Total Cats: 156
From: Atlanta
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?
Old 12-10-2013 | 07:39 PM
  #2  
karter74's Avatar
Senior Member
iTrader: (4)
 
Joined: Feb 2006
Posts: 687
Total Cats: 23
From: Centennial, CO
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.
Old 12-10-2013 | 09:13 PM
  #3  
gooflophaze's Avatar
Thread Starter
Senior Member
 
Joined: May 2007
Posts: 997
Total Cats: 156
From: Atlanta
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.
Old 12-10-2013 | 09:22 PM
  #4  
240_to_miata's Avatar
Elite Member
iTrader: (2)
 
Joined: May 2007
Posts: 2,608
Total Cats: 16
From: Cromwell, Connecticut
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.
Old 12-11-2013 | 03:08 AM
  #5  
Zaphod's Avatar
Elite Member
 
Joined: Mar 2006
Posts: 1,559
Total Cats: 105
From: Schwarzenberg, Germany
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!
Old 12-11-2013 | 04:57 AM
  #6  
richyvrlimited's Avatar
Elite Member
iTrader: (1)
 
Joined: Jun 2006
Posts: 2,642
Total Cats: 42
From: Warrington/Birmingham
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.
Old 12-11-2013 | 06:23 PM
  #7  
gooflophaze's Avatar
Thread Starter
Senior Member
 
Joined: May 2007
Posts: 997
Total Cats: 156
From: Atlanta
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  
Old 12-12-2013 | 02:18 AM
  #8  
Zaphod's Avatar
Elite Member
 
Joined: Mar 2006
Posts: 1,559
Total Cats: 105
From: Schwarzenberg, Germany
Default

Do so much want...

Attached Thumbnails made my own canbus gauge-670.gif  
Old 12-12-2013 | 10:23 AM
  #9  
thenuge26's Avatar
Elite Member
iTrader: (2)
 
Joined: Aug 2012
Posts: 3,267
Total Cats: 239
From: Indianapolis
Default

Originally Posted by Zaphod
Do so much want...
I'll build you one, and trade you for your cluster with the maxigauge.
Old 12-12-2013 | 11:05 AM
  #10  
Zaphod's Avatar
Elite Member
 
Joined: Mar 2006
Posts: 1,559
Total Cats: 105
From: Schwarzenberg, Germany
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...)
Old 12-13-2013 | 11:32 AM
  #11  
JasonC SBB's Avatar
Elite Member
 
Joined: Jul 2005
Posts: 6,420
Total Cats: 84
Default

Good stuff!

What is the rotary encoder for?

And what is the purpose of using CANbus, compatibility with CANbus cars/ECUs?
Old 12-13-2013 | 02:14 PM
  #12  
gooflophaze's Avatar
Thread Starter
Senior Member
 
Joined: May 2007
Posts: 997
Total Cats: 156
From: Atlanta
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.
Old 12-13-2013 | 04:00 PM
  #13  
JasonC SBB's Avatar
Elite Member
 
Joined: Jul 2005
Posts: 6,420
Total Cats: 84
Default

I didn't understand your answer about CAN bus. Must be my unfamiliarity with MS2.
Old 12-13-2013 | 04:18 PM
  #14  
shuiend's Avatar
mkturbo.com
iTrader: (24)
 
Joined: May 2006
Posts: 15,194
Total Cats: 1,687
From: Charleston SC
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.
Old 12-18-2013 | 01:26 PM
  #15  
gooflophaze's Avatar
Thread Starter
Senior Member
 
Joined: May 2007
Posts: 997
Total Cats: 156
From: Atlanta
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.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
StratoBlue1109
Miata parts for sale/trade
21
09-30-2018 02:09 PM
stoves
Suspension, Brakes, Drivetrain
5
04-21-2016 04:00 PM
slomiata
MEGAsquirt
5
10-07-2015 02:11 PM




All times are GMT -4. The time now is 03:21 PM.