I got my ESP32 (wroom 32 dev kit) to act as a wifi-uart bridge, which makes it possible for Tunerstudio to connect to rusEFI over WiFi.
Test setup:
STM32F407 Disco
ESP32 Wroom-32 Dev kit
I'm using general build FW as the MRE specific build won't let me choose Tunerstudio UART connection (I assume it's hardcoded for MRE, but I haven't verified that yet).
Connection diagram:
Make sure the ECU's TunerStudio Port is correctly configured:
ESP32 Firmware can be found here (still a work in progress, but already works as is):
https://github.com/ksmola/Ser2IP32
(you'll need a working esp-idf environment, see https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started)
I've used it for many hours and it hasn't disconnected yet, so it seems to be pretty stable. I set the data rate to '100 Reads Per Second' in Tunerstudio.
Did a quick wireshark of the communication, and it looks to be between 30 and 100 Hz.
Next step is combining this with the 'RE firmware updater'.
Esp32 Tunerstudio Wifi
-
- running engine in first post
- Posts: 1494
- Joined: Mon Jan 30, 2017 2:05 am
- Location: Seattle-ish
Re: Esp32 Tunerstudio Wifi
Awesome! There's an update rate gauge in TS if you want to watch data rate in real time.
Re: Esp32 Tunerstudio Wifi
oh I didn't know, 'Runtime Data Rate' hovers around 15 (I assume Hz). Not great for logging, but plenty for tuning.
-
- contributor
- Posts: 413
- Joined: Tue Jul 24, 2018 8:55 pm
- Github Username: Orchardperformance
- Slack: Orchardperformance
Re: Esp32 Tunerstudio Wifi
Depends if you have the paid version of TS or not, I believe the free version is limited to 15hz logging.
Now keeping MRE in stock in the UK - https://www.FutureProofPerformance.com
Re: Esp32 Tunerstudio Wifi
What do you get with the paid version? TOrchardPerformance wrote: ↑Fri Feb 26, 2021 1:37 pmDepends if you have the paid version of TS or not, I believe the free version is limited to 15hz logging.
his was always one of the MS specs that just made me shake my head thinking it was awesome!.... for 1985
![Laughing :lol:](./images/smilies/icon_lol.gif)
This just seems like a place rusEFI could do much much better than MS but not if TS is the limit I guess? Just thinking highspeed coms are not all that helpful when the data is low speed for whatever reason?
Re: Esp32 Tunerstudio Wifi
What if using ts just for configuring, while analyzing tracks in logic analyzer? Saleae now have several analog channels, plus here are (if i am not mistaken) opn source variants (sigrek?) - but this would require saving logs in those formats..
-
- running engine in first post
- Posts: 1494
- Joined: Mon Jan 30, 2017 2:05 am
- Location: Seattle-ish
Re: Esp32 Tunerstudio Wifi
With the paid version of TS, you can log at ~140hz. TS is still the bottleneck there, as we should have enough bandwidth to read over usb at "a few hundred" or so.mk e wrote: ↑Sat Feb 27, 2021 2:29 pmWhat do you get with the paid version? TOrchardPerformance wrote: ↑Fri Feb 26, 2021 1:37 pmDepends if you have the paid version of TS or not, I believe the free version is limited to 15hz logging.
his was always one of the MS specs that just made me shake my head thinking it was awesome!.... for 1985certainly way better than nothing and plenty for track monitoring but low for troubleshooting
This just seems like a place rusEFI could do much much better than MS but not if TS is the limit I guess? Just thinking highspeed coms are not all that helpful when the data is low speed for whatever reason?
Re: Esp32 Tunerstudio Wifi
Thats respectable. Does it change with the number of channels you log or is there a limit to the number of channels?
Just trying to understand how much data you're pushing. My ecu is limited to 1000hz but will do something over 500 channels at that speed over USB (2.0 I think it is) to the PC and the motecs I guess use ethernet and like 2000 channels at 1000hz. Wifi should be in this range capacity wise yes?
-
- running engine in first post
- Posts: 1494
- Joined: Mon Jan 30, 2017 2:05 am
- Location: Seattle-ish
Re: Esp32 Tunerstudio Wifi
That's logging the full gamut of channels we expose to TS. We'll ultimately be limited bu full speed USB - only 12mbit/s. The current blob of output data is something like 350 bytes, so 12mbit-overhead / 350 bites = something like 2500hz. High speed USB gets you 480mbit/s and less protocol overhead (larger packets are allowed = fewer bits of header per bit of data), but our mcu certainly can't sustain 480mbit/s of real data.mk e wrote: ↑Sat Feb 27, 2021 10:19 pmThats respectable. Does it change with the number of channels you log or is there a limit to the number of channels?
Just trying to understand how much data you're pushing. My ecu is limited to 1000hz but will do something over 500 channels at that speed over USB (2.0 I think it is) to the PC and the motecs I guess use ethernet and like 2000 channels at 1000hz. Wifi should be in this range capacity wise yes?
Ultimately, you just don't need that much update speed. Coolant and intake temperature? 5hz is probably overkill. You're not going to see anything past 10hz on the oil pressure. Very very few channels need more than that, and there's almost no benefit for any past 100. I could forsee a test mode that can provide very high bandwidth (tens of khz?) on a single analog pin, but you certainly wouldn't need that for normal tuning.
Re: Esp32 Tunerstudio Wifi
Absolutely. Faster rates are mostly just for trouble shooting not normal engine data logging/monitoring. Suspension and wheel slip info is nice to get pretty fast if the ECU is also the data acquisition system, crank data can be nice but its usually better to have the ecu just set a flag in the normal slow log if something wrong rather than log it fast all the time...unless you know there is an issue you're hunting for. With something like the enginelab you can log anything in the ECU, just "rightclick, add gauge or text box" to the user screen and its logging so any variable which is kind of nice, but again mostly a help in troubleshooting...I display/log maybe a 100-150 or so items to track cylinder data on a 12 cyl but that clearly not normally.mck1117 wrote: ↑Sun Feb 28, 2021 3:28 am
Ultimately, you just don't need that much update speed. Coolant and intake temperature? 5hz is probably overkill. You're not going to see anything past 10hz on the oil pressure. Very very few channels need more than that, and there's almost no benefit for any past 100. I could forsee a test mode that can provide very high bandwidth (tens of khz?) on a single analog pin, but you certainly wouldn't need that for normal tuning.