Miata Turbo Forum - Boost cars, acquire cats.

Miata Turbo Forum - Boost cars, acquire cats. (https://www.miataturbo.net/)
-   ECUs and Tuning (https://www.miataturbo.net/ecus-tuning-54/)
-   -   Gauge Design (https://www.miataturbo.net/ecus-tuning-54/gauge-design-76171/)

Braineack 11-26-2013 12:04 PM

:)

gooflophaze 11-26-2013 03:26 PM

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.

gooflophaze 12-03-2013 09:33 AM

1 Attachment(s)
https://www.miataturbo.net/attachmen...ine=1386081189

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.

richyvrlimited 12-03-2013 10:13 AM

Way too much info on a tiny screen, but still, "do want"

thenuge26 12-03-2013 10:24 AM

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.

gooflophaze 12-03-2013 11:18 PM

1 Attachment(s)
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.

https://www.miataturbo.net/attachmen...ine=1386130698

richyvrlimited 12-04-2013 04:03 AM

perfect :)

Reverant 12-04-2013 06:57 AM

Could have said "Timing" or "Ign Timing" instead of "Spark Adva". :)

gooflophaze 12-05-2013 03:21 PM


Originally Posted by Reverant (Post 1079416)
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 (Post 1078971)
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

Braineack 12-05-2013 03:23 PM


Originally Posted by Reverant (Post 1079416)
Could have said "Timing" or "Ign Timing" instead of "Spark Adva". :)

the speedo on the new 2015 Mustang reads: Ground Speed MPH.

thenuge26 12-05-2013 03:34 PM

1 Attachment(s)

Originally Posted by bittetech (Post 1079385)
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:
https://www.miataturbo.net/attachmen...ine=1386275676

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 :party:

gooflophaze 12-05-2013 04:02 PM


Originally Posted by thenuge26 (Post 1079957)
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:
https://www.miataturbo.net/attachmen...ine=1386275676

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 :party:

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.


All times are GMT -4. The time now is 07:29 PM.


© 2024 MH Sub I, LLC dba Internet Brands