Results 1 to 7 of 7

Thread: Building, seting up and tuning a budget OpenSource DIY EFI.

  1. #1
    Join Date
    Oct 2014
    Prescott, Az
    My Cars
    '95 540i/6

    Red face Building, setting up and tuning a budget OpenSource DIY EFI.

    Hey guys, I wanted to make an in-depth thread for your enjoyment following a step-by-step pictorial of the building of, installing of, setting up of and tuning of an OpenSource DIY standalone fuel injection controller that uses the universal hobbyist I/O board Arduino. The system is called Speeduino.

    Disclaimer: I am by no stretch of the imagination an authoritative on the subject of EFI, tuning, electronics or coding. I am just an automotive enthusiast, a gearhead that enjoys modifying vehicles in unconventional ways.

    The test subject: My 1995 540i/6 with the original M60B40 V8 and Getrag420g manual with 260k+ miles on the clock. Originally had the 484 DME, swapped to 404DME to bypass EWSII.

    The original Bosch Motronic M3.3 operating system is a powerful system for it's era and generation. In my time learning how to tune the Motronic code, I've found over 130 different control maps written into the system. Redundancies, Fail Safes, Limp Mode maps. It's a well thought out system designed to operate under a broad range of operating conditions and malfunctions. Due to it's age it's a bit technology limited and the available tuning resources out in the ether are more so limited. I applied what I learned while delving into the rabbit hole and made a 404DME V8 .xdf for TunerPro and have posted it around different tuning resources in hopes it can help someone else out there looking to do the same as I was. There is a small group of enthusiasts who are dedicated to reverse engineering the operating system in the name of unlocking the early Motronics full tuning capabilities. But at this time there is still a big amount of unknown variables in the Motronic M3.3 engineering. Unknown variables means an unreliable outcome with a large amount of guessing & testing.

    The other large hurdle with tuning early Motronic systems is the lack of datalogging and live data monitoring. Yes, you could virtual machine your desktop to run an old version of windows, install a TinyADS serial converter to the RxD & TxD outs of the Motronic ECU, install GT1 or similar 30 year old diagnostics software and you will get some basic essential sensor feedback information as the vehicle is running. To call it "live" data is not quite accurate, it's more like that's the RPM, Engine Load and Ignition timing your engine was running with 12 seconds ago.

    Enter the Standalone EFI controller: For all intents and purposes we are essentially just stripping down and dumbing down the EFI process. Removing the unknown variables and making things less complicated. Still complicated, but less so. Aftermarket standalone EFI also gives us an opportunity to add features not available in the OE such as launch control, boost control or nitrous arming. The Standalone EFI is purely dependent on the user inputs for desired results.

    In the world of Standalone EFI you get what you pay for. You get R&D, quality materials, more software features and tuneability. That being said; for my personal project I decided to go with an inexpensive, do it yourself, introductory level of standalone that uses an I/O board used in childrens electronics learning kits for basic code writing and circuit boards to make an LED blink. Why? I like the unconventional, I like the underdog, I like the simplicity. More so, I like the tuning community within this specific platform.

    Not to undersell the Arduino. It's an impressive controller that can be used; yes to make an LED blink. But it is also used in Robotics, Home Automation, High end photography...I've even seen it used to send a text message to your phone when your laundry machine is done. Now we're using it to run and drive our cars, and run well I might add.

    This project uses an Arduino Mega 2560 board

    Download and unzip the latest available Speeduino firmware -

    Download the latest Arduino IDE -

    In the Speeduino firmware file, open the Speeduino.ino in the Arduino IDE. In tools select your Arduino Board type and with the Arduino plugged in via USB cable to your computer select the com port assigned to the USB connected to the board.

    Compile and upload the "sketch" to the Arduino Mega 2560 board.

    Download TunerStudioMS software -

    Open TunerStudio, start a new project. Manually search for your firmware. Select the Speeduino.ini file in the downloaded firmware folder. Finish the setup and com port options and you will have your new tuning platform:

    You can keep your Arduino board plugged in via USB and TunerStudio will be communicating with the Arduino. Even though it's not hooked up to a car it will still deliver what it's interrpeting as sensor data.

    I would highly encourage paid registration of the software. You will get some handy features that greatly aid in tuning, as well as being able to make your own dash and gauges.

    My own dash:

    We've got the software set up, let's move on to the hardware:

    You can order Speeduino as a bare unpopulated board and componant kit that the user would solder all connections, or can purchase a pre-populated board. I opt'd for option B as to reduce possibility of user/installation error.

    The Speeduino is capable of driving injectors directly, but it can not drive ignition coils directly. The BMW coils are "dumb" coils in the sense that they do not have built in ignitors and do need an external control module that converts a low current 5v signal to a high current 12v to drive the coils.

    The Arduino/Speeduino is capable of 4 injector outs and 4 ignition outs. Whichs means the V8 will be wired up in waste spark and semi-batch fire injection, higher end standalone EFI's are capable of fully sequential 8 cylinder operation.

    Taking a look at the M62B44 V8 I'm currently building you can see that a pair of pistons are at top dead center at the same time. Those cylinders are just on different strokes in the 4 stroke cycle from each other. While one is on compression stroke the other is on it's exhaust stroke.

    The two cylinders that are at TDC together are the cylinders paired for waste spark.

    One could simply maintain the BMW coil on plug ignition, wire in ignition control modules for each coil, wire the inputs of the modules paired for waste spark for the correct cylinders. Remember I like the unconventional, I decided to do a full MSD ignition using a DIS-4 capacitive discharge multispark controller, two MSD waste spark 4 cylinder coils and a set of MSD 8.5mm ignition wires.

    The Speeduino fires it's four channels consecutively, it's up to the user to wire the channels in the firing order for the engine.

    The M60B40's firing order is 1-5-4-8-6-3-7-2 with cylinders 1-2-3-4 on the right bank and 5-6-7-8 on the left bank (as if we are sitting in the drivers seat facing the same direction as the vehicle). Coincidentally the only other production V8 ever made that uses the same firing order is Ford's new Coyote motor. But give it time 'cause knowing ford they'll change the firing order on a mid-year production run for no reason.

    I've wired the ignition coils up in order so that each channel fires the appropriate pair of cylinders in the correct order.

    You wire the injectors paired up the same way, to the same cylinders in the same order.

    Wiring the Speeduino board to the vehicle:

    Using this online resource for wiring schematics and DME pinout I was able to isolate the wires needed for the conversion -

    I needed to convert the main relay to be switched on with +12v ignition switch instead of a controlled ground from the DME:

    After about an hour of wire hunting, cutting, crimping, soldering, electrical tape and heat shrink I had my Speeduino board hardwired to the car.

    Next it's time to focus on the tuning that will be running the vehicle:

    Plug the Arduino into the computer via USB. Open up TunerStudio. Open your already made project. Load a tune, in the Speeduino Firmware folder there is a Speeduino Base Tune, open it.

    Settings> Engine Constants:

    Settings> Trigger setup.

    The M60B40 uses a Bosch 60-2 trigger wheel. Meaning it's a 60 teeth spread out evenly over 360 degrees with 2 teeth missing. The 2 missing teeth also have an offset of 60 degrees advanced from TDC of cyl #1.

    The Speeduino trigger offset is set up for missing tooth offset After top dead center and it didn't seem to like -60 as a value. Instead I input 300 degrees after TDC and the system liked it and is currently running this way.

    Crank trigger signal as seen by the Speeduino in TunerStudio software:

    Base Volumetric Efficiency table tuning:

    The registered version of TunerStudio has an automatic base VE map generator by simply inputing your specific engines specs:

    There is an online base ignition timing map calculator that also uses the engines specific parameters -

    Set up desired AFR's in the AFR table:

    Next: Tools> Calibrate TPS

    With your foot off the gas, click on Closed throttle "Get Current" then plant foot to floor for WOT and click full throttle "Get Current".

    Tools> Calibrate Temp Sensors

    Input both coolant and intake air temp sensor values:

    Tools> Calibrate AFR sensor. Enter the 0v-5v output vs AFR range for your specific flavor of AFR gauge.

    The final step before the test fire up is to lock out the ignition timing to a fixed value. I use 10 degrees, you can use any value you know your car will fire up and run with.

    ....Time to fire it up, using a timing light on the cylinder #1

    The engine will fre up with the base map VE, and should run well enough (perhaps with some throttle input) to verify the ignition timing at the crank with the timing light compared to the entered value in the software above.

    I ended up needing to change my crank trigger settings from 300 to 301 to get the timing light to match perfectly the locked out ignition in the software. Once that's dialed in, set the fixed ignition angle to 0 so it will use the timing map created previously.

    Let the engine come up to temperature and we can begin the Tune Analyze Live section of the paid version of TunerStudio. This is a self tuning VE map modifier that will make adjustments to the running VE map to get things dialed in to the exact Air/Fuel ratio that is commanded in the AFR table shown previously.

    Let the VE tuner do it's thing for a while on a few drives to and from work, store, school...whatever have you. Once the VE map is good and AFR's are exactly where you want them you can add or take away igntion timing as we see fit to dial in the tune to the engine.

    There we have it, my '95 540i/6 running a full capacitive discharge MSD ignition on waste spark and an Arduino based DIY standalone EFI:

    Thanks for checking out my most recent project! Cheers

    p.s... All of this was performed in anticipation of the next heart transplant.

    Last edited by Mykk; 04-01-2018 at 11:55 PM.

  2. #2
    Join Date
    Jan 2002
    York, PA / NYC Manhattan
    My Cars
    72 2002tii, 87 300 SDL, 91 M5, 95 M3 LTW
    Pretty impressive! Great work, thanks for sharing!
    WANTED: 18" BBS RCj's

  3. #3
    Join Date
    Dec 2014
    Indianapolis, IN
    My Cars
    1995 M3 LTW 2001 325i
    Fantastic! A wealth of info here. Much appreciated.

  4. #4
    Join Date
    Sep 2013
    My Cars
    02 bmw 540
    Thanks for sharing. You are a beast my friend.

    Love what you’ve done with this 540! How you added the MSD.

    Which MSD system are you using?

  5. #5
    Join Date
    Nov 2016
    My Cars
    e39 520ia (year:1997)
    Wow that's real knowledge.

  6. #6
    Join Date
    Oct 2014
    Prescott, Az
    My Cars
    '95 540i/6
    Moving along on the project: I've picked up a second Speeduino and wiring for the next project car and I've got my tuning strategy down for good results on the existing system. But now I wanted to tackle a project I've had on my mind since moving over to standalone. Digital Dash using RaspberryPi3 and 7" touchscreen. Parts are on order, I'll update as progress is made. From my understanding it's simply running the TunerStudio software on RaspberryPi with some auto start commands so it automatically runs at boot up/power on. I hear I can run a GPS sensor for a digital speedometer in my gauges too.

    This is my testing platform to get up and running as I'm building the next project car in my head.

  7. #7
    Join Date
    Oct 2014
    Prescott, Az
    My Cars
    '95 540i/6
    Digital dash hardware is in. Currently setting things up:

Similar Threads

  1. New here, quick build write up and a hello - m50 525i drift
    By newE34guy in forum 1988 - 1996 (E34)
    Replies: 27
    Last Post: 04-21-2014, 04:49 PM
  2. Jacking up and oil filter housing gasket DIY
    By dandoe in forum 1999 - 2006 (E46)
    Replies: 7
    Last Post: 07-16-2010, 02:54 PM
  3. CO$T? Need 100K tune up and the 1st gear sync sticks CO$T??
    By viceproductions in forum 1991 - 1999 (E36)
    Replies: 1
    Last Post: 05-30-2004, 11:03 AM
  4. for inspec and tune up...
    By acuratsx in forum General BMW sponsored by Intercity Lines
    Replies: 4
    Last Post: 01-17-2003, 05:30 PM
  5. Time to change air filter and tune up?
    By KingKongMMM in forum General BMW Mechanical Help sponsored by RM European Auto Parts
    Replies: 3
    Last Post: 10-17-2002, 09:30 PM


Posting Permissions

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