ECUs and Tuning Discuss Engine Management, Tuning, & Programming

Gauge Design

Thread Tools
 
Search this Thread
 
Old 11-26-2013, 12:04 PM
  #21  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

Braineack is offline  
Old 11-26-2013, 03:26 PM
  #22  
Senior Member
 
gooflophaze's Avatar
 
Join Date: May 2007
Location: Atlanta
Posts: 997
Total Cats: 156
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 05:47 PM.
gooflophaze is offline  
Old 12-03-2013, 09:33 AM
  #23  
Senior Member
 
gooflophaze's Avatar
 
Join Date: May 2007
Location: Atlanta
Posts: 997
Total Cats: 156
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  
Old 12-03-2013, 10:13 AM
  #24  
Elite Member
iTrader: (1)
 
richyvrlimited's Avatar
 
Join Date: Jun 2006
Location: Warrington/Birmingham
Posts: 2,642
Total Cats: 42
Default

Way too much info on a tiny screen, but still, "do want"
richyvrlimited is offline  
Old 12-03-2013, 10:24 AM
  #25  
Elite Member
iTrader: (2)
 
thenuge26's Avatar
 
Join Date: Aug 2012
Location: Indianapolis
Posts: 3,267
Total Cats: 239
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  
Old 12-03-2013, 11:18 PM
  #26  
Senior Member
 
gooflophaze's Avatar
 
Join Date: May 2007
Location: Atlanta
Posts: 997
Total Cats: 156
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  
Old 12-04-2013, 04:03 AM
  #27  
Elite Member
iTrader: (1)
 
richyvrlimited's Avatar
 
Join Date: Jun 2006
Location: Warrington/Birmingham
Posts: 2,642
Total Cats: 42
Default

perfect
richyvrlimited is offline  
Old 12-04-2013, 06:57 AM
  #28  
Elite Member
iTrader: (10)
 
Reverant's Avatar
 
Join Date: Jun 2006
Location: Athens, Greece
Posts: 5,977
Total Cats: 355
Default

Could have said "Timing" or "Ign Timing" instead of "Spark Adva".
Reverant is online now  
Old 12-05-2013, 03:21 PM
  #29  
Senior Member
 
gooflophaze's Avatar
 
Join Date: May 2007
Location: Atlanta
Posts: 997
Total Cats: 156
Default

Originally Posted by Reverant
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.

Originally Posted by thenuge26
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  
Old 12-05-2013, 03:23 PM
  #30  
Boost Czar
iTrader: (62)
 
Braineack's Avatar
 
Join Date: May 2005
Location: Chantilly, VA
Posts: 79,493
Total Cats: 4,080
Default

Originally Posted by Reverant
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  
Old 12-05-2013, 03:34 PM
  #31  
Elite Member
iTrader: (2)
 
thenuge26's Avatar
 
Join Date: Aug 2012
Location: Indianapolis
Posts: 3,267
Total Cats: 239
Default

Originally Posted by bittetech
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  
Old 12-05-2013, 04:02 PM
  #32  
Senior Member
 
gooflophaze's Avatar
 
Join Date: May 2007
Location: Atlanta
Posts: 997
Total Cats: 156
Default

Originally Posted by thenuge26
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  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
stoves
Suspension, Brakes, Drivetrain
5
04-21-2016 03:00 PM
slomiata
MEGAsquirt
5
10-07-2015 01:11 PM
FrankB
Race Prep
10
10-02-2015 09:00 PM



Quick Reply: Gauge Design



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