MEVD17.2 emulation in development

doublespaces

Administrator
Oct 18, 2016
9,303
4,331
0
AZ
Ride
2009 E93 335i
The realtime tuning/emulation technique is aimed at tuners to allow a better tune more quickly, but I would like to make it accessible to interested enthusiasts too. A tuner could remote tune a car and both the tuner and user can save time. A user could make adjustments at an event.

Presently I have integrated flex fuel and realtime into one build as they overlap from the programming and testing point of view.

I need to sort out the marketing still with MHD but he has been so busy with F series and moving, and me with getting the technicalities solved. I am also looking to the VAG market too, and have a few contacts there.

Which engines?
 

doublespaces

Administrator
Oct 18, 2016
9,303
4,331
0
AZ
Ride
2009 E93 335i
I've got an mk7 group I've been working on. I need to take some time away from here and learn those cars.
 

LamboLover

Corporal
Apr 6, 2017
238
242
0
Ride
Everything
I have nothing to sell, am not vending here or anywhere and have no release date. It is a tech fest thread to celebrate geekery. I think there is a chat bubble under my name if that doesn't answer your question or you don't want to post in public.
 

S2evo1

New Member
Feb 22, 2018
2
1
0
Ride
BMW M3 F80
I have nothing to sell, am not vending here or anywhere and have no release date. It is a tech fest thread to celebrate geekery. I think there is a chat bubble under my name if that doesn't answer your question or you don't want to post in public.

I could not write to you personal, Only wanted to talk to you. But ok thanks...
 

doublespaces

Administrator
Oct 18, 2016
9,303
4,331
0
AZ
Ride
2009 E93 335i
I could not write to you personal, Only wanted to talk to you. But ok thanks...

As a general lesson for anyone reading this thread, there are a few ways to send someone a private message. They aren't called private messages, because you aren't literally sending a local email which you can't delete or get back. Its just a private thread, where you can edit and use all the same features as a thread and even invite more people to the conversation. Click their name and click 'Start a Conversation'
ZNrgw8U.png


Or you may visit their profile first, then click start a conversation:
4q8MwW4.png


Its also under the information tab of their profile:
s3yTTFm.png
 

doublespaces

Administrator
Oct 18, 2016
9,303
4,331
0
AZ
Ride
2009 E93 335i
After considering this, I've changed the phrase to "Start Private Chat" so hopefully this will reduce the confusion.
 
  • Like
Reactions: mfractal

cookiesowns

Private
Nov 13, 2017
26
7
0
Ride
2010 535i ZHP6 + 2017 M2 6MT
The realtime tuning/emulation technique is aimed at tuners to allow a better tune more quickly, but I would like to make it accessible to interested enthusiasts too. A tuner could remote tune a car and both the tuner and user can save time. A user could make adjustments at an event.

Presently I have integrated flex fuel and realtime into one build as they overlap from the programming and testing point of view.

I need to sort out the marketing still with MHD but he has been so busy with F series and moving, and me with getting the technicalities solved. I am also looking to the VAG market too, and have a few contacts there.

It would be amazing to make this available to us "mere" mortals without access to a dyno to get started on tuning these MEVD based BMW's. The compressor maps still throw me in for a loop but I'm starting to understand it now with a few maps for comparisons.
 
  • Like
Reactions: LamboLover

LamboLover

Corporal
Apr 6, 2017
238
242
0
Ride
Everything
Variable resistor into the intended flex fuel input did not work on my F series bench test DME - the input is pulled low and the PID to read it is disabled or reports 0. Some research showed considerable equipment/configuration/software build differences and reuse of pins between various models, and a distinct lack of available IO on the MEVD17.2.G late N55/S55 DME for example.

The only feasible way I could come up with is to put the input through CAN. One quick and dirty option is to take over an existing comms channel like UDS, but that would block other devices datalogging at the same time, and is really the wrong way to read/write engine control data: it is a diagnostic protocol. I hate the idea of blocking diagnostic testers from accessing what they need unless the device is disabled. So that would mean you couldn't datalog with another device whilst running flex fuel.

So I did it the hard way and added a new custom protocol to the CAN bus handlers and have been working with an ARM automotive qualified microcontroller to get the packets into the DME and have included in the work the ability for the DME to transmit new data, much faster than you can through any diagnostic protocol. I'm testing it presently sending a packet to the DME every time the CAN bus is free, and getting the DME to reply immediately. This runs at just over 4000 packets per second and I'm leaving it soaking on the bench for millions of frames to check robustness. I'll probably send flex fuel packets 10 times a second, but I want it to be robust.

upload_2018-2-27_12-7-42.png


Perhaps the observant can see the potential for DME controlled sequential port injection here, but I'm concentrating on the job at hand.
 

LamboLover

Corporal
Apr 6, 2017
238
242
0
Ride
Everything
upload_2018-3-13_11-59-51.png

>5 million CAN frame soak test whilst pinging over WiFi. Initially this controller could only manage CAN frames at about 200 frames per second, which is fast enough to send flex fuel info, but I like to tune things to the max and test the extremes. I had to tweak the drivers to get it to run at 4400 frames per second and fully load the CAN bus.

Next is to use hardware edge capture to read flex fuel sensor rather than the quick and dirty test I have now.

Beyond that work out how to get the device manufactured, more testing to make sure the device and DME handle errors properly, making sure that buffer contents are not overwritten whilst they are being read if asynchronous.
 

Attachments

  • upload_2018-3-12_12-32-38.png
    upload_2018-3-12_12-32-38.png
    46.3 KB · Views: 204
Last edited:
  • Like
  • Love
Reactions: AJL and hardparker

LamboLover

Corporal
Apr 6, 2017
238
242
0
Ride
Everything
After having to tweak the CAN driver on the hardware I'm using, I've also spent two days getting hardware edge capture working after more dodgy examples and drivers.

Next week hopefully finalise the pins I'm using, get the schematics finalised and start on board layout, then back to the software.
 

LamboLover

Corporal
Apr 6, 2017
238
242
0
Ride
Everything
Added disconnection/reconnection handling, noise filter, range and consistency checks to the ethanol content input on the analyser. Works smoothly so you can abuse it with bad connections, noise, power cycles or brownouts and it should only report good quality data. I've got it all running in a 10ms task with a watchdog, but the timer itself for input capture is microsecond resolution. Sounds overkill until you think about the duration you want these things to last and operate for, dodgy wiring, user error, accident damage, poor grounding, melting/badly routed wires etc.

Need to do similar with the CAN bus but also the data handling in the DME because it needs to handle situations where the analyser is powered but the DME is not (including sleep and wake), and vice versa. Will add a configurable timer to the DME and get it to (optionally) limp and use last known good value if it hasn't heard from the ethanol content analyser, including survival of key off.