MEGAsquirt A place to collectively sort out this megasquirt gizmo

made my own canbus gauge

Thread Tools
 
Search this Thread
 
Old 12-10-2013, 10:57 AM
  #1  
Senior Member
Thread Starter
 
gooflophaze's Avatar
 
Join Date: May 2007
Location: Atlanta
Posts: 997
Total Cats: 156
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  
Old 12-10-2013, 06:39 PM
  #2  
Senior Member
iTrader: (4)
 
karter74's Avatar
 
Join Date: Feb 2006
Location: Centennial, CO
Posts: 684
Total Cats: 23
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  
Old 12-10-2013, 08:13 PM
  #3  
Senior Member
Thread Starter
 
gooflophaze's Avatar
 
Join Date: May 2007
Location: Atlanta
Posts: 997
Total Cats: 156
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  
Old 12-10-2013, 08:22 PM
  #4  
Elite Member
iTrader: (2)
 
240_to_miata's Avatar
 
Join Date: May 2007
Location: Cromwell, Connecticut
Posts: 2,604
Total Cats: 16
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  
Old 12-11-2013, 02:08 AM
  #5  
Elite Member
 
Zaphod's Avatar
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,553
Total Cats: 101
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  
Old 12-11-2013, 03:57 AM
  #6  
Elite Member
iTrader: (1)
 
richyvrlimited's Avatar
 
Join Date: Jun 2006
Location: Warrington/Birmingham
Posts: 2,642
Total Cats: 42
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 07:36 AM.
richyvrlimited is offline  
Old 12-11-2013, 05:23 PM
  #7  
Senior Member
Thread Starter
 
gooflophaze's Avatar
 
Join Date: May 2007
Location: Atlanta
Posts: 997
Total Cats: 156
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  
Old 12-12-2013, 01:18 AM
  #8  
Elite Member
 
Zaphod's Avatar
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,553
Total Cats: 101
Default

Do so much want...

Attached Thumbnails made my own canbus gauge-670.gif  
Zaphod is offline  
Old 12-12-2013, 09:23 AM
  #9  
Elite Member
iTrader: (2)
 
thenuge26's Avatar
 
Join Date: Aug 2012
Location: Indianapolis
Posts: 3,267
Total Cats: 239
Default

Originally Posted by Zaphod
Do so much want...
I'll build you one, and trade you for your cluster with the maxigauge.
thenuge26 is offline  
Old 12-12-2013, 10:05 AM
  #10  
Elite Member
 
Zaphod's Avatar
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,553
Total Cats: 101
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  
Old 12-13-2013, 10:32 AM
  #11  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: 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?
JasonC SBB is offline  
Old 12-13-2013, 01:14 PM
  #12  
Senior Member
Thread Starter
 
gooflophaze's Avatar
 
Join Date: May 2007
Location: Atlanta
Posts: 997
Total Cats: 156
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  
Old 12-13-2013, 03:00 PM
  #13  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

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



Quick Reply: made my own canbus gauge



All times are GMT -4. The time now is 02:56 PM.