Gauge Design - Page 2 - Miata Turbo Forum - Boost cars, acquire cats.

Welcome to Miataturbo.net   Members
 


ECUs and Tuning Discuss Engine Management, Tuning, & Programming

Reply
 
 
 
LinkBack Thread Tools Search this Thread
Old 11-26-2013, 01:04 PM   #21
Boost Czar
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,900
Total Cats: 1,792
Default

Braineack is offline   Reply With Quote
Old 11-26-2013, 04:26 PM   #22
Junior Member
 
Join Date: May 2007
Location: Atlanta
Posts: 384
Total Cats: 39
Default

My code is as messy as my desk. Bits are just laying around everywhere...

Whats the rule of thumb - documentation of code takes twice as long as writing the actual code? Interfacing Megasquirt with Arduino | kckr isn't complete by a longshot, but I'm actively working on it when I'm not wrenching or drinking (which is pretty often..)

Just spent the last couple of hours on pairing down some example code - https://github.com/kckr/MSCan_Reques...st_Display.ino

Also: string manipulation in C makes baby jesus cry. I long for regex.

Last edited by gooflophaze; 11-26-2013 at 06:47 PM.
gooflophaze is offline   Reply With Quote
Old 12-03-2013, 10:33 AM   #23
Junior Member
 
Join Date: May 2007
Location: Atlanta
Posts: 384
Total Cats: 39
Default



Bought a cheap ebay gauge and gutted it, finally stuffed it with my bits. This is the "default" screen. The bottom-right is contextual - if CL idle loop enabled, it shows my IAC pwm%; else MAT. A rotary encoder allows me to flip through different data - a second screen will show a single variable in large print, a 3rd screen shows "Warning!!! Danger to Manifold". The leds outside represent things I want to see at a glance.. RPM in 4 LED's, AFR in another 4 LED's, and a delta AFR.. Coolant, EGT, oil temp, pressure - if anything is in the red I should be able to catch it at a glance. I've got some "ohshit" setpoints that'll start flashing - with some more coding, I should have it display on the gauge as well.. Need to start thinking of other contextual gauge functions.. like if TPS > 90% && RPM > 7000, turn the outer LED's into a shift lights.

I'm pretty happy with it right now. And yes, I need to clean my desk.
Attached Thumbnails
Gauge Design-img_20131203_092315.jpg  
gooflophaze is offline   Reply With Quote
Old 12-03-2013, 11:13 AM   #24
Elite Member
iTrader: (1)
 
Join Date: Jun 2006
Location: Warrington/Birmingham
Posts: 2,658
Total Cats: 39
Default

Way too much info on a tiny screen, but still, "do want"
richyvrlimited is offline   Reply With Quote
Old 12-03-2013, 11:24 AM   #25
Elite Member
iTrader: (2)
 
Join Date: Aug 2012
Location: Indianapolis
Posts: 3,325
Total Cats: 235
Default

From what others have said (and I agree) the most useful function on the PLX devices is the histogram. If you can make that thing do a rolling graph of a function you want, that would be the way to go.


That's still pretty damn cool. Some day I'll stop being lazy and try to build something like this. Maybe just a MSCan->OBD-II interface so I can use the OTS PLX gauges.
thenuge26 is offline   Reply With Quote
Old 12-04-2013, 12:18 AM   #26
Junior Member
 
Join Date: May 2007
Location: Atlanta
Posts: 384
Total Cats: 39
Default

I've got a PLX monitoring oil temp, pressure, coolant and EGT - can't say I've ever found the histogram useful for those variables. What would be useful? AFR?

The SSD1306 does have a pixel shift built in(?).. I think I'd just have to convert a value to a scale, then draw a line (63 to 0 tall), and it'll automatically make a histograph through that once I figured out what the sampling rate should be.. not impossible, I've just not found a use for it.

Anyway - I should go ahead and probably stop threadjacking/start my own. But for high visibility - one rotary button click, then I can scroll through individual values.

Attached Thumbnails
Gauge Design-img_20131203_231053.jpg  
gooflophaze is offline   Reply With Quote
Old 12-04-2013, 05:03 AM   #27
Elite Member
iTrader: (1)
 
Join Date: Jun 2006
Location: Warrington/Birmingham
Posts: 2,658
Total Cats: 39
Default

perfect
richyvrlimited is offline   Reply With Quote
Old 12-04-2013, 07:57 AM   #28
Supporting Vendor
iTrader: (10)
 
Reverant's Avatar
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,441
Total Cats: 198
Default

Could have said "Timing" or "Ign Timing" instead of "Spark Adva".
Reverant is offline   Reply With Quote
Old 12-05-2013, 04:21 PM   #29
Junior Member
 
Join Date: May 2007
Location: Atlanta
Posts: 384
Total Cats: 39
Default

Quote:
Originally Posted by Reverant View Post
Could have said "Timing" or "Ign Timing" instead of "Spark Adva".
case 5: label="Timing"; divby10(SPKADV); strcpy(data, tempchars); break;

Even better?

So - histogram "the easy way" is a no go. The hard way is to build a 128 byte array and shift on every update, which would take 1k of memory.. or 64 and make each graph 2 pixels wide and 512.. which I might do.. I've been trying to avoid memory usage as the "regular" arduino only has 2k-2.5k of ram, the screen takes up 1.5k, SPI, i2c overhead.. I haven't checked to see how much I have left in awhile. I'll put the histogram in as a stretch goal.

I'm thinking it might be neat to replicate what JB did with his IO extender and see if I could read the LC-1's serial directly. I picked up my old and busted LC-1 (you can see by my desk.. I hoard..) today to try it on the bench.

Quote:
Originally Posted by thenuge26 View Post
That's still pretty damn cool. Some day I'll stop being lazy and try to build something like this. Maybe just a MSCan->OBD-II interface so I can use the OTS PLX gauges.
I was thinking about this today - it'd be a hell of a thing to do. MSCan is really, really simple - you're requesting raw memory (and if you're not careful, you could write directly to raw memory). To do it as a man-in-the-middle translator wouldn't make much sense - you'd need 2 canshields and 2 microcontrollers; or you could possibly translate the serial data into ODBII; but figuring out all the variables the PLX can read.. ugh.. The other "most elegant" solution would be to have megasquirt output a compatible OBDII stream.

Ohya - F1 style? NeoPixel Stick - 8 x WS2812 5050 RGB LED with Integrated Drivers ID: 1426 - $5.95 : Adafruit Industries, Unique & fun DIY electronics and kits
gooflophaze is offline   Reply With Quote
Old 12-05-2013, 04:23 PM   #30
Boost Czar
iTrader: (61)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 72,900
Total Cats: 1,792
Default

Quote:
Originally Posted by Reverant View Post
Could have said "Timing" or "Ign Timing" instead of "Spark Adva".
the speedo on the new 2015 Mustang reads: Ground Speed MPH.
Braineack is offline   Reply With Quote
Old 12-05-2013, 04:34 PM   #31
Elite Member
iTrader: (2)
 
Join Date: Aug 2012
Location: Indianapolis
Posts: 3,325
Total Cats: 235
Default

Quote:
Originally Posted by bittetech View Post
I've got a PLX monitoring oil temp, pressure, coolant and EGT - can't say I've ever found the histogram useful for those variables. What would be useful? AFR?
AFR, boost, spark advance, knock input, basically anything that you would want to watch at or near redline but can't because you're at or near redline. I guess I just like this tunerstudio guage cluster:


One of my friends who knows a LOT more about embedded systems than I was talking about some pretty powerful embedded boards, I think this was the one. That's a bit overboard though, you could probably damn-near make your own ECU with that, 50Hz is the clock speed for my MS3
Attached Thumbnails
Gauge Design-gqxtizv.jpg  
thenuge26 is offline   Reply With Quote
Old 12-05-2013, 05:02 PM   #32
Junior Member
 
Join Date: May 2007
Location: Atlanta
Posts: 384
Total Cats: 39
Default

Quote:
Originally Posted by thenuge26 View Post
AFR, boost, spark advance, knock input, basically anything that you would want to watch at or near redline but can't because you're at or near redline. I guess I just like this tunerstudio guage cluster:


One of my friends who knows a LOT more about embedded systems than I was talking about some pretty powerful embedded boards, I think this was the one. That's a bit overboard though, you could probably damn-near make your own ECU with that, 50Hz is the clock speed for my MS3
229? Integrated FPGA is pretty nice though..

I've been wanting to do this gauge for.. well, basically as long as I've had a megasquirt, but never had the time. Losing my job helped with the time aspect, but shadowdash makes most of this type of work deprecated. I wouldn't have completed this without having the hardware already purchased..

For a cheaper solution, you could probably load up a $35 raspi, grab a cheap screen ( Displays : Adafruit Industries, Unique & fun DIY electronics and kits ) and talk directly through serial.
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
Is my swirl pot design okay? FrankB Race Prep 10 10-02-2015 10:00 PM


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:47 PM.