1. Login to disable the Ads!

MEVD17.2 emulation in development

Discussion in 'N55' started by LamboLover, Oct 31, 2017.

Loading...
  1. doublespaces

    doublespaces Administrator

    Messages:
    6,243
    Location:
    AZ
    Ride:
    2009 E93 335i
    Which engines?
     
  2. LamboLover

    LamboLover Corporal

    Messages:
    209
    Ride:
    Everything
    For realtime tuning, gasoline and diesel engines running Bosch MED17 or EDC17. For VAG gasoline this covers most of the high end engines, but not the Continental SIMOS in the later 2.0-3.0TFSI. It does include Mk6 2.0T, 4.0T in Audi, Bentley. V10 in later Audi and Lamborghini. McLaren, Kia, Ford etc too.
     
  3. doublespaces

    doublespaces Administrator

    Messages:
    6,243
    Location:
    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.
     
  4. S2evo1

    S2evo1 New Member

    Messages:
    2
    Ride:
    BMW M3 F80
    How can I get in Contact with LamboLover?
     
  5. LamboLover

    LamboLover Corporal

    Messages:
    209
    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.
     
  6. S2evo1

    S2evo1 New Member

    Messages:
    2
    Ride:
    BMW M3 F80
    I could not write to you personal, Only wanted to talk to you. But ok thanks...
     
  7. LamboLover

    LamboLover Corporal

    Messages:
    209
    Ride:
    Everything
    Sending you message with email address
     
  8. doublespaces

    doublespaces Administrator

    Messages:
    6,243
    Location:
    AZ
    Ride:
    2009 E93 335i
    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'
    [​IMG]

    Or you may visit their profile first, then click start a conversation:
    [​IMG]

    Its also under the information tab of their profile:
    [​IMG]
     
  9. doublespaces

    doublespaces Administrator

    Messages:
    6,243
    Location:
    AZ
    Ride:
    2009 E93 335i
    After considering this, I've changed the phrase to "Start Private Chat" so hopefully this will reduce the confusion.
     
  10. cookiesowns

    cookiesowns Lurker

    Messages:
    20
    Ride:
    2010 535i ZHP6 + 2017 M2 6MT
    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.
     
  11. Twisted Tuning

    Twisted Tuning Lieutenant Vendor

    Messages:
    679
    i support all of those via cobb, so let me know if you need anything
     
  12. LamboLover

    LamboLover Corporal

    Messages:
    209
    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.
     
    • Like Like x 2
    • Love Love x 2
    • Informative Informative x 1
    • List
  13. doublespaces

    doublespaces Administrator

    Messages:
    6,243
    Location:
    AZ
    Ride:
    2009 E93 335i
    This is really awesome, basically you've created your own communication network which can be interfaced with an external controller? There is a ton of potential here.
     
    • Like Like x 1
    • Agree Agree x 1
    • List
  14. LamboLover

    LamboLover Corporal

    Messages:
    209
    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.
     

    Attached Files:

    Last edited: Mar 13, 2018
    • Like Like x 1
    • Love Love x 1
    • List
  15. Sbrach

    Sbrach Corporal

    Messages:
    167
    Ride:
    N55 DCT E82
    You know what they say, the first 90% of development takes 90% of the time. The last 10% takes the other 90%.
     
    • Like Like x 2
    • Funny Funny x 2
    • List
  16. LamboLover

    LamboLover Corporal

    Messages:
    209
    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.
     
  17. LamboLover

    LamboLover Corporal

    Messages:
    209
    Ride:
    Everything
    upload_2018-3-23_20-32-23.png
    From one microcontroller generating PWM to another receiving, obviously with different crystals. No filtering here, looks good to me.
     
  18. LamboLover

    LamboLover Corporal

    Messages:
    209
    Ride:
    Everything
    upload_2018-3-23_22-4-2.png
     
    • Like Like x 2
    • Love Love x 1
    • List
  19. Mterkait

    Mterkait Lurker

    Messages:
    13
    Location:
    Kuwait
    Ride:
    F30 N55 '13
    Amazing.:eek:
     
  20. LamboLover

    LamboLover Corporal

    Messages:
    209
    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.
     
Loading...
Loading...