Gauge Design
#22
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.
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.
#23
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.
#25
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.
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.
#26
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.
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.
#29
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.
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
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.
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
#31
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
#32
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
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
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.
Thread
Thread Starter
Forum
Replies
Last Post
Zaphod
MEGAsquirt
47
10-26-2018 11:00 PM
stoves
Suspension, Brakes, Drivetrain
5
04-21-2016 03:00 PM