Megasquirting Your M20

From E30 Zone Wiki

Jump to: navigation, search

This Page Is a work in Progress by Gruelius. I am not responsible for any incorrect information (feel free to update it).

I recently completed a Megasquirt fuel + spark conversion on my Jetronic M20B23. I first converted it to motronic and then set it up for wasted spark. This guide will be a general guide, but I will also add specifics for series 1 E30 owners and L-Jetronic E30 owners. While I will list possible options this guide will be tailored for Motronic 1.3 single coil and wasted spark setups.

Troubleshooting an M20 engine installed with Megasquirt
Troubleshooting an M20 engine installed with Megasquirt


Possible Combinations

Fuel Only (Possible on Ljet cars without any modification as dizzy handles ignition, works with ANY MS ecu).

Fuel + Single coil spark (Requires Full Motronic 1.3 conversion for Ljet/Motronic cars).

Fuel + Wasted spark (requires motronic 1.3 harness and triggerwheel on ljet cars).

Motronic 1.3 to Megasquirt

Parts Required

MS II ecu (While MS1 can run ignition with megasquirt Extra this guide is for ms2 extra).

MS2 Extra firmware.

M50 TPS and adapter (while not required, very helpful for tuning).

LC-1 wideband (i would consider essential but a narrowband could be used, would need a external wideband for tuning).

idle driver board.

Wasted Spark

coil driver board (before purchasing another board please read the wasted spark section).

Making the adapter

I wont go into too much detail here as it has been covered many times by many people. It can be installed into the case or outside the case, i prefer to just create a harness adapter and have the ecu seperate as i am not too good with fiddly stuff. If doing wasted spark do not use the SPARKA output of the megasquirt ecu.

This is a photo of how i made my adapter (showing coil boards too) Image:adaptercase.jpg

A goood wiring guide can be found here [1] run by chris325ix.

While that guide is correct, I would and did wire the cps ground to #2, the megamanual hints towards it being a separate ground in future revisions of MS. Also a 10k resistor inline with 3.57 boards is essential for good VR operation


DIYEFI also show how it can be installed very well inside the case. I would recommend chris325ix's wiring table over their pinout

You will also need to trigger the main relay to turn on (the Motronic 1.3 ecu has a constant 12v feed for a battery backup and turns on the main relay when it recieves the ignition signal).

Main Relay Triggering

There are two ways to do it (Both listed here [2]), wire up a transistor based circuit or just modify the relay wiring. I have tried both and had NO luck with the transistor setup. People have gotten it to work but after a week of messing about i tried the modified relay holder method and it worked fine.

Idle Control Valve

In order to use the factory 3 wire idle control valve you need an adapter board. I decided to purchase the glensgarage board as it was well documented and the premade pcb was top quality including all required fasteners. Can be purchased here [3].

Board website is here

Using the board with the settings given to me by a friend my car started and held idle first turn of the key on a cold start.

For the required settings please refer to the Setting section

Wasted Spark

With Wasted spark you will be using non factory coils. There are two types of coils, ones with logic boards inside them and ones that require ignitors. The coilpack i decided to use was a GM V6 coilpack which are quite cheap and readily available at australian yards.

For wasted spark all that is needed is the extra coil drivers and wiring to them. while it is possible to just use the default sparkA output and the 2 spare outputs of the glensgarage idle board, I ended up using a seperate coil driver board. This was because the ECU i got from DIYautotune by default does not have a transistor installed for the sparkA output. Also it is suggested in the MS2E guide that D14 is used for SparkA not JS10.

The wiring is dependant on the MS ecu you are using. A great guide is provided by DIYautotune here [4].

Wiring table for wasted spark
Output V2.2 Input V3 Input V3.57 Input
Spark A Right of R25 Top of R26 U1 pin 7
Spark B Right of R28 Top of R29 U1 pin 8
Spark C Right of R26 Top of R27 U1 pin 9

Especially for the 3.57 boards i recommend the wiring from the ecu to the coil drivers not be done through the DB37 connector as it would require further messing about inside the ecu.

Using the GM V6 Coilpack the internal electronics are to be gutted as we will just be using it for its coils and the coil holder Image:gmgutted.jpg Image:gmcoil.jpg

As for leads i just grabbed a bunch of premade lengths from the bosch stand at my local cheap autostore.

Oxygen Sensor

The LC1 can be wired into the stock harness. I did not take pictures but i just cut the connector off a bosch narrowband and used that. The example i had had four wires, 2 whites a grey and a black.

image by goathumper from Image:o2wiring.jpg

Remember to set the multiplier to gasoline in the lm-1 programmer and to perform a free air calibration. If you are only seeing one bank of cylinders (installed o2 without an x pipe like this), it is suggested to set 1/12th of a second resolution.

    • picture here**

Tacho Output

A stock logic output from the MS ecu worked perfectly for me (no transistor/relay involved) i used the JS10 output (the spark output of db37 connector).



I highly recommend purchasing TunerStudio. While it is $50 and most e30 owners are broke tight arses (i am guilty of this), spending $50 to be able to quickly dial in your ecu is well worth it. The VE Analyze Live feature has been quite helpful for me as I am not too mechanically minded. While the free version works perfectly for all intensive purposes, the VE Analyze Live and ignition diagnostic features are fantastic.

ECU Firmware

This guide will assume you are using MS2E 3.1 (Latest release, if it isnt posted on the ms2e website yet go to the support forums to find a download link). 3.1 is now tried and tested and has many benefits over the old 2.1 release.

Before you start

READ READ READ READ! If you dont know what the functions do it is unlikely you will be able to tune them! While I managed to get away with whacking in values with no ill results i did read beforehand anyway.

Links to read before you start!
"MS2 Page, skim over and read sections on functions you are not sure of" [5]
[6] "MS2E Page, Read ALL sections relevant to your install"


Some settings can be copied over but for most of them it is best to enter and calculate them yourselves. I will only list settings that I feel arent self explanatory.

Basic Setup

Control Algorithm = Speed Density

Squirts Per Engine Cycle = highest value so that idle pulse width is no less than 2.0 ms, if possible, and your Req_Fuel is less than 15-18 milliseconds, but more than 6 milliseconds

Injector Staging = Alternating

Engine Stroke = Four Stroke

Engine Type = Even Fire

More Engine Constants (Secondary Load Parameters)

Secondary Fuel Load = Speed density : This is if you are using the two VE maps to get a resolution of 30x16. If you are only using single maps leave this disabled

Secondary Fuel = additive : Again for two VE maps

Primary Ign Load = Speed Density

Secondary Ign Load = Speed Density : This is again only if using 30x16 resolution over 2 maps

Tach Input/Ignition Options

Spark Mode = Toothed Wheel

Ignition Capture = Rising Edge

Spark Output = Going High (Inverted)

Number Of Coils = Wasted Spark (or single coil if single coil)

Spark A output Pin = D14 (again can be sparkA if using the stock transistor).

Trigger Wheel Settings

Teeth = 60 Missing Teeth = 2 Tooth #1 angle = 84 Wheel Speed = Crank Wheel

This is best done by looking at the website [] and other popular tunes. It is quite simple, just make sure when doing wasted spark you have the right outputs selected. For the trigger wheel the settings are 60 teeth 2 missing and use 84 degrees as your tooth #1 angle. The other critical thing is to make sure you have the injectors set for high or low impedance. And after long cranking with no fire up make sure you just crank it for a while with flood clear or with the fuel pump relay removed, otherwise you may damage something.

LJET to Megasquirt

Overview & Warning

I have not attempted this so this is just based on available information. This is extremely simple as the ignition is still done by the dizzy so all you need to do is run the injectors

Wiring guide