Close

Results 1 to 11 of 11
  1. #1
    Join Date
    Feb 2014
    Posts
    33
    Rep Points
    111.2
    Mentioned
    0 Post(s)
    Rep Power
    2


    1 out of 1 members liked this post. Yes Reputation No

    Open Source OBD-II Meth Controller

    Hello,

    I am working on an open source project and I figured it would be best to collaborate with as many people as possible. This project is for my N55 car, but I bet this will apply to other BMWs too (probably any BMW after 2008).

    The goal:

    Make my own progressive methanol injection controller.

    Purpose:

    Current meth controllers use different approaches for determining engine load. Some use straight boost (AEM), while others use a much more advanced approach of interpreting sensor values (Aquamist). However, all of these approaches are somewhat "inexact" in my opinion when you consider the goal, which is to inject a certain percentage of the total fuel amount at any given time. The Aquamist is probably the best (and likely more than precise enough for its purpose), but all of these kits still have the issue of installation complexity; I want to avoid tapping a bunch of wires under the hood. The purpose of this project is to create a meth controller that is both very precise and very simple to install. This is also partly driven by my curiosity.

    Approach:

    In short, I will obtain realtime engine fuel mass delivery rate data from the OBD interface and use this to drive an Aquamist fast acting valve (FAV).

    The 2011 E92 335i uses CANbus (500kbps) for OBD-II communications, and the car supports the UDS protocol. The fuel mass delivery rate will be requested using a standard UDS "get ID" (0x22) request.

    Then, once I have the fuel mass rate, I will convert it in to cc/min (taking in to account the specific gravity of gasoline). The result will be the TOTAL cc/min flow rate for the engine (which can sort of be converted to horsepower if you make some BSFC assumptions).

    I've created lookup tables (12 entries deep) for various fuel volume flow rates, which will allow for the mapping of the desired meth flow percentage (see MethService.h).

    The desired meth flow percentage (percentage of total fuel flow rate) will then be mapped to the required PWM duty cycle that the meth injector must be presented with to achieve said flow rate.

    There's more to it, but this is the general idea. I may update this post later with more details. Until then, see the code for details...

    Possible Issues:

    Conflicts with Cobb datalogger. Since there will essentially be two OBD devices on the port, this could cause conflicts. However, since this car uses CAN, it shouldn't be a problem. That's part of the beauty of CANbus.

    I do make use of the HW filters in the MCP2515 to try to reduce processing overhead for messages I don't care about, but those filters don't inspect deep enough into the message to select only fuel mass responses, so if the Cobb is using the same CAN ID, there could be issues.

    It all depends on how the Cobb obtains its data.

    Failure Modes. Special care must be taken to make sure that all possible failure modes result in NO INJECTION of meth.

    The Code:

    This project is open source and licenced under the LGPL.

    The LGPL was chosen because I don't want someone to simply take this code and incorporate it into their closed sorce project without giving proper recognition and support to the community.

    The LGPL essentially forces any changes to this code to be published openly and forces any closed source programs that make use of this code to provide a means to obtain the LGPL'd portions of the code and re-link to them. In other words, your closed source program CAN use my code, but it should be dynamically linked and you need to provide a copy of my code along with any changes you made to it.

    That being said, since this is the LGPL and not the GPL, feel free to incorporate this code in to your closed source project, but with restrictions. See the LGPL for more details.

    The Hardware:

    I am using a ruggedized version of the Arduino UNO for this project. It's basically the same as the regular Arduino but with a better power supply which can handle 3V-30V and is rated for extended temperatures.

    I am using the MCP2515 CAN controller with the corresponding transciever, both of which are part of the Jaycon CAN shield for Arduino.

    I am using the Arduino (OEM) 4 relay board to drive the meth pump and failsafe outputs.

    I am using the Arduino tinkerkit MOSFET board to drive the Aquamist FAV. This includes a flyback diode, which is nice.

    Progress

    I am able to query the fuel mass delivery rate from the ECU and can successfully interpret the values. This was done using some quick test code that I threw together just to prove the concept. Since then, I've been developing this "offline", so I don't know if the current code in the reposity works or not.

    The full code is basically complete, but I haven't tested it yet. I plan to drive around and log the PWM duty cycle and make sure things are sensible. Then, I will install the actual meth kit and tape the nozzle to the windshield to make sure things work as expected.


    Please review my code and let me know what you think. Feel free to contribute! Sorry if this post is "incomplete".


    The project can be found at:

    https://github.com/jakemoroni/BMW-CA...eth-Controller

  2. #2
    Join Date
    Aug 2012
    Location
    Hayward, CA
    Posts
    8,912
    Rep Points
    3,814.4
    Mentioned
    341 Post(s)
    Rep Power
    39


    Yes Reputation No
    Very cool project, but you will most likely be on your own with this one. Everyone is going away from meth for PI, and I cannot imagine a lot of time is willing to be invested on a meth controller at this stage in the game. Still a cool project though
    Vargas Turbocharger Technologies
    N54 1/2 Mile U.S. Record: 173.68MPH
    N55 World Record: 11.7ET / 122.7MPH (MT)
    N54 Stock Frame (100% E85) World Record: 699WHP / 714WTQ
    N54 Twin Turbo World Record: 908WHP/ 761WTQ
    N54 (ACN 91 octane only) World Record: 585WHP / 537WTQ
    Click here to enlargeClick here to enlarge Website - Email
    #VTTDOMINATION #VTT #VARGASTURBO #VTTFAMILY #VTTINNOVATION

  3. #3
    Join Date
    Feb 2014
    Posts
    33
    Rep Points
    111.2
    Mentioned
    0 Post(s)
    Rep Power
    2



    Yes Reputation No
    Thanks! Yeah, my car isn't making big power, and it doesn't even really need meth. I'm just adding it on for some headroom on hot days to get rid of the small timing corrections that I get. For the big power guys, PI is certainly better than spraying meth to supplement the weak DI system.

    How do the PI controllers determine the duty cycle? Do they hook up to the crank sensor and measure injector pulse width + fuel pressure? Maybe the people who make those PI controllers can incorporate CAN messaging to query the realtime fuel load from the engine. There may even be a "requested fuel load" parameter which may allow for seamless integration between the two. Obviously, if it ain't broke, dont fix it, but it never hurts to investigate.

    This project can be used for many different things since I made it a "modular" architecture.

    I have the ability to read about 497 different parameters from the DME, so you can make all kinds of cool things with this.

    One additional thing I wanted to add was a seperate "module" which will query the coolant temperature and set off an alarm if it gets too hot. Ever since my water pump went bad, I've always been worried about that.

  4. #4
    Join Date
    Nov 2012
    Posts
    2,490
    Rep Points
    1,935.0
    Mentioned
    199 Post(s)
    Rep Power
    0


    Yes Reputation No
    using the standard OBD PIDs isn't going to get you much useful data with this car.

  5. #5
    Join Date
    Feb 2014
    Posts
    33
    Rep Points
    111.2
    Mentioned
    0 Post(s)
    Rep Power
    2



    Yes Reputation No
    I'm not using the standard OBD PID's. I'm using the extended BMW DID's via UDS by sending the "read data by identifier" request.

  6. #6
    Join Date
    Nov 2012
    Posts
    2,490
    Rep Points
    1,935.0
    Mentioned
    199 Post(s)
    Rep Power
    0


    Yes Reputation No
    Click here to enlarge Originally Posted by Unklejoe Click here to enlarge
    I'm not using the standard OBD PID's. I'm using the extended BMW DID's via UDS by sending the "read data by identifier" request.
    Click here to enlarge

  7. #7
    Join Date
    Oct 2012
    Location
    AZ
    Posts
    671
    Rep Points
    1,838.0
    Mentioned
    18 Post(s)
    Rep Power
    19


    Yes Reputation No
    I like it. I'd suggest looking into fuel valve operational characteristics from turbine engines for some hints on how to make the damned thing work better.
    2007 E90, 6MT, VTT 2+ (19t/unclipped), VRSF 7" FMIC, RR DP's, Corsa Exhaust, CP-e Charge Pipe/Tial BOV, BMS DCI, Fuel-it! Stg 2 LPFP, Fuel-it Magic TBI, E66, 126k+ miles Brentuned

  8. #8
    Join Date
    Jan 2010
    Location
    SoCal
    Posts
    140,523
    Rep Points
    42,517.4
    Mentioned
    2455 Post(s)
    Rep Power
    426


    Yes Reputation No
    Any progress?

  9. #9
    Join Date
    Feb 2014
    Posts
    33
    Rep Points
    111.2
    Mentioned
    0 Post(s)
    Rep Power
    2



    1 out of 1 members liked this post. Yes Reputation No
    Click here to enlarge Originally Posted by Sticky Click here to enlarge
    Any progress?
    Yeah, I've made some progress. Just waiting for parts at this point.

    The code is complete and seems to work. I've done some testing in the car and everything seems reasonable. I still need to mount the hardware in a box and think of where I want to put it.

    I also had the idea to manipulate the gauge cluster to show certain events like meth spraying or empty tank, but I'm not sure how I'm going to do it yet.

    I believe there's a regular OBD command to turn the CEL on for testing purposes, but IDK if I'll be able to manipulate the actual gauges. I might be able to turn the CEL on for an empty tank, but I really want a way to show that meth is currently spraying. I have to see what capabilities the BT Tool has. If the BT Tool allows me to change the gauges, then I can do it.

    I know I could do it if I had access to the PTCAN bus, but I'm going through the OBD port's gateway which would probably filter out any messages that could directly influence the gauges.

    I also have a few code changes I have yet to commit, but they're mostly speed improvements.

  10. #10
    Join Date
    Feb 2014
    Posts
    33
    Rep Points
    111.2
    Mentioned
    0 Post(s)
    Rep Power
    2



    Yes Reputation No
    Also, once the meth parts get here, I'll have to measure the actual flow rates at different duty cycles. Apparently, it's not very linear. Probably due to dead times in the solenoid.

    There's a table in MethService.h which defines the flow rates for various duty cycles, so it will just be a matter of adjusting those values.

  11. #11
    Join Date
    Mar 2016
    Location
    UK
    Posts
    2
    Rep Points
    0.2
    Mentioned
    0 Post(s)
    Rep Power
    0


    0 out of 1 members liked this post. Yes Reputation No

    Open Source OBD II Meth Controller

    Hi I would like to know vs both these motors bone stock with supertech springs retainers and arp head studs which would be a better motor turbod with 100 meth at 600hp? Thanks

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •