MS1-Extra Software manual

Only for use with the MS1 Extra code (MS1 - 68H908 based microprocessors)

By Philip Ringwood (daxtojeiro), James Murray (jsmcortina) and Ken Culver (muythaibxr)


Before you start any hardware mods please read this entire manual and the Software Manual, available HERE.

For other MS1 Extra Manuals please see HERE

Warning for
E-Bay buyers!!
Please see the Official Suppliers list before buying through E-Bay.
This is there for your protection.

Please Note:

All of these instructions / diagrams are to be used at your own risk, like most things there is more than one way to do the same thing, what we have tried to do is to offer a method that we have tested or that others have tested for us. No warranty expressed or implied.

Use at your own risk.

Note if your TunerStudio dialogs do not match the examples in this document then you need to updated your setup file.
Please use this link to take you to the page with instructions on how to update your setup file.
 


Fuel and General Settings

What is the MS1-Extra Code? -- How to load the MS1-Extra code to the MS ECU -- Setting  for More than One MegaSquirt ECU

High Resolution Code Variant (HR)

Ignition Options / Wheel Decoder and Output Pin Options -- Pulsing Fuel Pump -- Resets -- Exhaust Gas Settings -- No Lambda Sensor

Lambda AFR Settings -- Supported Wideband Lambda Sensors -- Wideband Lambda Target AFR Tables -- Overrun Settings

Staged Injection -- Coolant Related Air Density -- Rev Limiter -- Advanced Settings (Hybrid Alpha-N and MAF) -- 300 and 400KPa Sensors

Map Sensor Settings -- Idle Control valves -- Layout of the Settings Pages in  -- MegaView


Fuel Only Setup, No Ignition

Ignition Setup Menu


What is MSnS-Extra and how do I Upgrade to the Extra code

The MSnS-Extra code is a version of firmware that was developed by Philip Ringwood and James Murray between 2003 and 2007. This code can be run on any version of B+G Megasquirt PCB (V1.0, 2.2 or 3.0) using the MS1 (68HC908) microprocessor. It is based on the B+G original V3.0 code and Eric Fahlgren's Dual Table (DT). It also amalgamates lots of other code versions and mods that many people have created, as well as lots of ideas and needs from people on the MSExtra forum.

The standard MS ECU from a B+G recommended supplier will most probably come with the standard B+G V3.0 code unless you have specifically asked for an Extra code so if you want to run this code you will need to upgrade your ECU using the following steps:

Please also note: If you are using non-standard temperature sensors (those not used by MS) or the original equipment sensors you will need to configure your ECU for these at this stage.

How to upgrade to the MS1-Extra code:

Download the latest version of firmware (029y4.zip) fromMS1/Extra Downloads Unzip the file and open the first directory now double click on the "download-firmware.bat" file.

Next Stage

It is VERY important to remember to have any coil packs unplugged from the MS ECU during the download. Keep them unplugged until you have set up your ECU with the relevant Spark settings in . See HERE for more details of the settings.

Select your Comm. port (e.g. 1) then select "N" if you have an Extra code already running and are upgrading to a later version or "Y" if you have a standard ECU with the B+G code.

If using the standard B+G 8x8 code you will need to have the lid removed from the MS ECU so you can short the 2 holes marked 'Boot loader' out when instructed.

It is VERY important to remember to have any coil packs unplugged from the MS ECU during the download. Keep them unplugged until you have set up your ECU with the relevant Spark settings in . See HERE for more details of the settings.

After the counter has reached somewhere around 1400 - 1750 (depending on the code version) the display will show you the version you have burnt to the ECU and the battery voltage. This means the download is complete, so now the lights on the stim will start flashing again or the ECU will sit there waiting if its on the car.
You have now finished re-programming the ECU. You now need to setup your configuration in TunerStudio before attempting to start the engine. Having a file ready to burn is very helpful, there are some basic files HERE, but these are to be used at your own risk, they are only to be used as a base configuration and should be checked that they are setup for your Spark configuration, number of cylinders, etc.

When the ECU is upgraded/changed to another or the latest code the entire configuration file (**.msq) is deleted from the memory of the microprocessor inside the MS ECU. A default configuration is written into the memory, but this most certainly will NOT be setup for your engine, so do NOT try to start your engine without ensuring youve been through the settings and checked they are ok for your setup. See this manual and the MS1 Extra Base Configuration Manual for more details.

In order to transfer the data from older msq's to a new one it is best to write the values down or to print the pages out and write them into the new file in  by hand. If you are working OFFLINE (MS ECU not connected) use a default file to start you off with (default msq), if your working ONLINE then it will have a default file in it afetr being uploaded with new firmware.

If you have a working 12x12 fuel or spark table these can be saved by "exporting" them in  (open the VE or Spark Table and select - file - table export) then simply "import" the table back in once the new code has been uploaded and the new version of  (new msns-extra.ini file) is running. For information on loading a new code to your MS ECU please see HERE

If you have no idea what base map you have inside your ECU or if you need to start again for any reason then here is a default msq you can use, but you must then set it up for your vehicle before attempting to start the engine!!!!!

If you are using temperature sensors other than standard MegaSquirt (GM) sensors see these instructions HERE
There are some sensor files from various vehicles HERE, again these are used at your own risk.


More Than One MegaSquirt ECU, how to set up 

If you have more then one ECU that you wish to connect to it is as simple as creating a new project for each ECU. TunerStudio uses individual project folders for each ECU so that all the settings, data log files, tune files, dashboards, and other information are all contained in one organized location. This system allows you to connect to as many ECUs as you like and the files for each ECU will be saved to
the specific project folder that you created for that ECU the first time you connected. 


High Resolution Code (HR)

The MS1 uP's code, be it MS-Extra or standard B+G code, is capable of controlling the injector's pulse width down to 0.1mS (1000th of a Second). In some setups there is a need for more resolution, for example a high reving engine running very large boost levels and with very large injectors. This setup may have trouble idleing smoothly with the very large injectors and a slow idle speed. The HR code has a resolution of around 0.035mS, this will allow for more control over the PW which should give you a better idle.


Lets say the injector PW at idle is 1.6mS on the above engine. Then the actual fuel being injected in is:

1.6mS - opening time = 1.6mS - 1.0mS = 0.6mS of fuel.

If the resolution is 0.1mS then that is a change of 16% of the total fuel being added.

With the HR code then the resolution is 0.035mS which is a 5.8% change of fuel.

IMPORTANT NOTE for HR Code:
There is no Flyback control using the PWM for the injectors when using the HR code, this means you can NOT use low impedance injectors without adding in-line resistors to the injectors when using the HR code!! See HERE for more on lo-impedance injectors and PWM.

However, there is now a board that can be purchased from HERE that will allow control over your lo-impedance injectors when using the HR code.


Setting the Constants

Before attempting to start your MegaSquirt equipped engine, you will need to set a number of parameters that determine how MegaSquirt injects fuel. These include the injector open time, Req_Fuel, injector control criteria, PWM criteria, EGO characteristics, etc. These constants are either calculated, or based on the configuration of your system.

Note that for a Wankel rotary engine (Mazda 13B, etc.); see the MS1-Extra Basic Configuration Manual

(V8 setting shown here)

On the Settings/Constants page:

If you are running high-impedance injectors (greater than 10 Ohms), then set the:

If you have low impedance injectors (less than 4 Ohms), set the:

You will tune these after getting the engine running. See “Setting the PWM Criteria” in this section. Failure to perform these steps can result in damage to your injectors. If you have high-impedance injectors, set these values to 25.5 ms and 100%, and you do not need to tune them further.

Control Algorithm” lets you choose between Speed Density and Alpha-N. In almost all cases, you should choose speed density unless you have a good reason to do otherwise, and understand how this will change your tuning efforts. Alpha-N uses the throttle position (alpha) and RPM (N) to calculate the amount of fuel to inject as opposed to using the manifold absolute pressure (MAP) and RPM to calculate the amount of fuel to inject. Alpha-N is useful for long duration cams where the resolution of manifold air pressure (map) would be small. It is also useful to get a smoother idle on engines that have erratic map values. MegaSquirt can be converted from its default speed-density calculations to Alpha-N, which uses RPM, temperature and TPS only. Start up the tuning software, go to the Constants dialog and change speed density to Alpha-N. Re-map your VE table. You will no longer use the MAP sensor for estimating the load on the engine -- the throttle position and rpm are used instead. This can help with cams with long duration and/or a lot of overlap, as they have low and unstable vacuum at idle, making tuning very difficult.

 Selecting what Control Algorithm you are using is do when you are first creating a project however if you need to change your Control Algorithm this can be done by going to your project properties dialog. If you are changing the Control Algorithm from the default you need to make sure that you also change the Control Algorithm setting in the "Standard Constants - Page 1" dialog to match EXCEPT when you select the option "Air Flow Meter" in the project propirties dialog. To get to the project properties dialog go to the "File" drop down menu > "Project" and you will see the menu option "Project Proprties" or you can use Ctrl + p.

                  

To change the Control Algorithm select a option from the Fueling Algorithms drop down menu (highlighted RED), then click ok to save your changes and exit the project properties dialog. Upon exiting your project will reload automaticly with the changes you have made. Notice the Control Algorithm setting in the "Standard Constants - Page 1" dialog (highlighted RED) this most match the setting in your project properties EXCEPT when you select the option "Air Flow Meter" in the project propirties dialog.

Required Fuel – (Req_Fuel) this is top field of the Constants window. It has a calculation dialog to help you find an appropriate value. It should contain the injector pulse width, in milliseconds, required to supply the fuel for a single injection event at stoichiometric combustion and 100% volumetric efficiency.

Ensure that the NUMBER of CYLINDERS has been set before using the wizard!

In order to come up with this value,  provides a calculator that will suffice for 99% of applications (those for which it will not work generally require changes to the MegaSquirt controller code itself, and that is beyond the scope of this manual). To use the wizard, click on the Required Fuel button, and fill in the fields (Engine Displacement, Number of cylinders, Injector flow, and Air:Fuel ratio(14.7), then click 'Okay').

For a 4-stroke, a complete stroke cycle is 720 degrees of crankshaft rotation (i.e. two revolutions); for a 2-stroke, it is 360 degrees (this is also factored in the REQ_FUEL value down loaded to MegaSquirt).

In the tuning software, the upper REQ_FUEL box is the amount per cylinder, as noted above. The lower REQ_FUEL box is the value down loaded to MegaSquirt. It is the REQ_FUEL number on top, but scaled by your selected injection mode (number of squirts and alternate/simultaneous), this can be ignored as it is the upper number thats the important value.

For example, if you inject simultaneous and one injection, and have the same number of injectors as cylinders [i.e. port injection], then REQ_FUEL on the bottom is the same as REQ_FUEL on top. Same with alternate and two squirts. If you put in simultaneous and two squirts, then REQ_FUEL is divided in half - because you squirt twice, you need to inject 1/2 the fuel on each shot.

Note: if you choose alternating for port injection, make sure your number of squirts is an even number (2,4,...) and evenly divisible into the number of cylinders. For example, with an eight cylinder engine, you could use alternating and 2, 4, or 8 squirts/cycle. With a six cylinder, if you choose alternating, you MUST use 2 or 6 squirts/cycle. Also, the only possible combinations for an odd-cylinder count engine are either 1 squirt/simultaneous or N squirt/simultaneous combination, where N is the number of cylinders."

Permissable Combinations:

Number of Cylinders

 

 

1

2

3

4

5

6

8

10

12

 

1

OK

Simultaneous only

Simultaneous only

Simultaneous only

simultaneous only

simultaneous only

simultaneous only

simultaneous only

simultaneous only

 

2

no

OK

no

OK

no

OK

OK

OK

OK

 

3

no

no

simultaneous only

no

no

simultaneous only

no

no

simultaneous only

 

4

no

no

no

OK

no

no

OK

no

OK

 

5

no

no

no

no

simultaneous only

no

no

simultaneous only

no

Number

6

no

no

no

no

no

OK

no

no

OK

of

7

no

no

no

no

no

no

no

no

no

squirts

8

no

no

no

no

no

no

OK

no

no

 

9

no

no

no

no

no

no

no

no

no

 

10

no

no

no

no

no

no

no

OK

no

 

11

no

no

no

no

no

no

no

no

no

 

12

no

no

no

no

no

no

no

no

OK

"OK" means the combination will work with either simultaneous or alternating. "no" means it will not work with either, i.e., not at all. Virtually all installs will use 2 (4 is ok for lower RPM engines like V8's) Values of 7 and above would most certainly not be used.

Injector Opening Time (ms) is the amount of time required for the injector to go from a fully closed state to a fully opened state when a 13.2 volt signal is applied. Since fuel injectors are electro-mechanical devices with mass, they have latency between the time a signal is applied and the time they are in steady-state spraying mode. Typically, this value is very close to 1.0 milliseconds.

The MegaSquirt code assumes that NO fuel is injected during the opening (and closing) phases. However, it is very likely that a small amount actually is injected. Thus making this value larger will enrich the mix and will have a much greater effect at low pulse widths. MegaSquirt also uses this value as an additive constant in pulse width calculation, thus making this the lower limit for pulse width.

Injections per Engine Cycle is set the number of squirts you want per engine cycle. You want this to be set so that your idle pulse width is no less than 2.0 ms, if possible, and your Req_Fuel is less than 12-15 milliseconds, but more than 8 milliseconds. These values allow proper tuning of the idle mixture while maintaining the ability to apply enrichments (acceleration, warm-up, etc.) under full throttle. This is the total injector events that you wish to occur for every engine cycle (360 degrees for two stroke engines and 720° for four strokes).

Injector Staging values for injector staging are simultaneous or alternating. If you want all your injectors to fire at once, select simultaneous. If you want half your injectors to fire at each injection event, and the other half on the next event, select alternating.

Note that with port injection, you must choose at least 2 squirts per cycle with alternating injection, otherwise every other cycle for each cylinder will get NO fuel! The engine will run very badly.

There is some benefit to choosing 2 squirts/alternating for port injection, since only half of the injectors fire at once, the pressure drop in the fuel rails is reduced and the fuelling is more consistent.

With throttle body injection, the number of injection/cycle you can will depend on your number of cylinders, plenum size, Req_Fuel, etc. You have to experiment to see what works best for your combination.

Engine Stroke values for engine stroke type are two-stroke or four-stroke. MegaSquirt uses engine stroke to determine how many degrees are in an engine cycle.

Number of Cylinders is the count of the cylinders on your engine. If you are unsure how many cylinders your engine has, you should not be installing MegaSquirt on it.

Injector Port Type This is not used in MSnS_Extra, so no settings needed for this, it should be greyed out.

Number of Injectors is the total number of injectors MegaSquirt is controlling, whether port or throttle body injection. (this is used in the Required Fuel calculation)

MAP Type this should be set to 250KPa type even if you have a 300 or 400Kpa sensor, unless you have an older V1 pcb that could have a 110KPa sensor

Barometric Correction On start-up MegaSquirt can record the ambient barometric pressure if set to ON in the Constants page. The barometer correction multiplier to VE increases as pressure decreases. If the ambient baro pressure is low (high altitude) the algorithm adds fuel. This is mostly because at a given MAP, the engine will flow more air with less exhaust back pressure and therefore needs more fuel at higher altitudes. Once running the MAP sensor determines fuel based on you VE table entries which are then scaled by the baro correction recorded at start-up. The correction values used by MegaSquirt came from a code disassembly of a 1990 Corvette ECU. As the barometric correction is determined when the ECU powers up if it resets during running the current MAP value is taken in, the chances are the engine will be creating a vacuum so the value would be incorrect. You can set up limits so the correction is not so far out if the ECU resets. See "Baro Corrections" If you are unsure set the minimum to 90 and the max to 100 KPa and it will have no real effects during a reset. See the table if you drive at high altitudes.

If using Alpha-n mode (NOT HYBRID ALPHA_N) then you can use the MAP sensor that's on the MS board as a constant barometric correction sensor, but don't connect it to the manifold, simply leave it vented to atmosphere.
A way to gain Constant Baro Correction when in normal speed density mode is by fitting an extra MAP sensor to input X7 (JS5 V3.0) The MAP sensor MUST be the same type as fitted to your MS. This is only needed for mountain driving. See HERE for more details.

Engine Type has the options of Odd fire or even fire. Odd-fire or even fire does not refer to the firing order, but rather the interval between successive firings.

So if you have a 4 cylinder, and a spark every 180 degrees, you have an even fire. Almost all 4 cylinder engines are even fire. However some 90 degree V6s, some V4s, and most V-Twins (usually motorcycle engines), as well as a few others, have 'odd-fire' arrangements.

For example, from 1978 to 1984, the GM V6 (200 and 229 cid) had a semi-even fire sequence, with firing intervals of 132°/108°. It is "semi" because the rod journals are offset, but not quite enough to make for even firing intervals. In MegaSquirt terms, this is an 'odd-fire' engine, because the interval between firing can be either 132° OR 108° degrees.

Ignition Options / Wheel Decoder and Output Pin Options

When running ignition you must choose ONLY ONE code type and select as many spark outputs as you have coils
A distributor based setup must have SparkA ONLY;

A 4cyl wasted spark setup must have SparkA, SparkB ONLY, so LED18 MUST be set to anything other than a Spark output, e.g. Warmup. Output3/SparkD MUST be set to output3, pin10 shift / Spark E MUST be set to Shift light and Knocking / Spark F MUST be set to Knock input even if they are not going to be used for those functions.

A 8cy wasted spark would be like this example, ABCD spark outputs set ONLY, so pin10 shift / Spark E MUST be set to Shift light and Knocking / Spark F MUST be set to Knock input even if they are not going to be used for those functions.

For a FUEL ONLY setup with a simple tach input signal (i.e. not a 60-2 wheel) turn OFF all ignition types and spark outputs (Ensure Spark A,B,C,D,E or F are NOT selected)


If you are running a multi-toothed wheel like 36-1, 60-2, 24/2 etc. you have to configure the wheel decoder as if you were running spark and set a minimum of SparkA
Choose I/O pin usage.
FIdle = usually idle control, see Idle valve control, previously it has been used as sparkA output but we use LED17/D14 now.

LED17/D14 is prefferred SparkA output for ignition setups.
Spark outputs must be used in sequence, i.e. for two outputs (4cy wasted) you must use A,B
X2 (JS0) output = Water Inj or Cooling Fan Control, if your not using either of these then it makes no difference what you select.
X4 (JS2) output = Output1 or Boost Control, if your not using either of these then it makes no difference what you select.

Please see the Ignition selection section for more info on these settings.

Pulsing Fuel Pump

The Extra code shows that there is a setting conflict by pulsing the fuel pump on and off constantly, this is used to protect the ECU and your setup from incorrectly set outputs, etc. The conflict can be found by using  TunerStudio's "Mini Terminal", this can be found in the "Communications" sub heading. Simply re-start the MS with the mini terminal running and connected to the MS and it will tell you the error that must be rectified.

 

Resets - A reset can be seen in  in the bottom right hand corner. Some resets can be the USB adaptor (if being used) simply overflowing. If the engine runs smoothly but you are seeing resets and your using a USB adaptor try setting the Received and Transmitted buffers as low as they will go. If the engine is stumbling and there are resets on the  screen (bottom right corner) then these are probably real resets, but to confirm this unplug the laptop if using a USB adaptor and see it if cures it. In datalogs you can see them as massive spikes in all of the logged variables.

NOTE: First, be sure that all the grounds from your engine, alternator, and frame are in good shape and tight.

If you have coil packs driven directly from the MS ECU then you should try fitting resistive spark plugs and new resistive plug leads. Even cleaning the plugs if the engine has been going through a tuning stage, can cure reset problems. If this still doesn't fix it fit a 20-25uF capacitor between the +12V feed that's on the coil pack and a good chassis ground. Get the capacitor as close to the coil pack as possible. These are fitted to Ford coil packs in the engine bay and should be easy to get from a scrap yard. They are also fitted to Pug engines, bolted to the coil pack in a small black package, I would think virtually all coil packs will have them fitted somewhere near by if you can't find a Ford or a Peugeot.

Another suggestion is to swap over the VR sensor cables. I have had an engine that simply reset all the time during cranking, swapping the VR sensor cables cured it.

It should be noted that your wiring for the VR sensor should be a screened cable back to the ECU to sheild it from any noise, earthed only at the ECU end to an earthing pin on the 37 pin plug (e.g. pin8). The main ground wire from the ECU should really connect to 2 or 3 pins of the 37 pin plug (e.g. pins 9 and 10) and be around 3-4mm thick if possible, especially when using direct drive coils! Something like this cable HERE.

 

 

 

Exhaust Gas Settings Page

Note: If you do NOT have an oxygen sensor, be sure to set the 'Controller Step Size (%)' on the Exhaust Gas settings page to zero.

Set the EGO switch point to 0.45 - 0.5V for a stoichiometric mixture (14.7:1 AFR) with a narrow band O2 sensor.
With a wide-band sensor, set it at the voltage your sensor gives for a stoichiometric mixture (14.7:1 AFR) 2.5V DIY-WB, others may differ. This is the voltage that the ECU tries to adjust the mixture to acheive when under closed loop operation. Note that MegaSquirt will convert these values to binary numbers, so when you "fetch" the values back from MegaSquirt, they may round up or down slightly. If you are using a WideBand Lambda then the AFR Target Table is another option (an 8x8 table), if using the table then the EGO switch point is ignored.

Ignition Events per Step: set this to a value that would switch about 4x a second at your average cruising speed.

4 cylinder assume 3500rpm cruise set Ignition Events per Step to : 29

6 cylinder assume 2500rpm cruise set Ignition Events per Step to : 31

8 cylinder assume 2000rpm cruise set Ignition Events per Step to : 33

You can calculate your:

O2 adjustments per second = ((rpm/120) * cylinders) / ignition events per step

In order for the TunerStudio software to be able to distinguse between what wideband sensor you are using, and therefore tell what the output voltage means,  selecting what wideband sensor you are using is do when you are first  creating a project however if you did not select your wideband sensor when your project was being created you can still change sensor types by going to your project properties dialog. To get to the project properties dialog go to the "File" drop down menu > "Project" and you will see the menu option "Project Proprties" or you can use Ctrl + p. There is currently 17 different sensor options available to select from.

Now select your WideBand / Lambda sensor from the list highlighted in RED. Then click ok to save your changes and exit the project properties dialog. Upon exiting your project will reload automaticly with the changes you have made.

Lambda AFR Settings

You can now change the Ego Limit depending on the MAP KPa so the ECU can have a larger authority during cruising and a smaller authority when accelerating hard. If you don't want it to change simply put 255 in the KPa setpoint.

Wideband Lambda Target AFR Tables

If you are using a Wideband lambda sensor you can set the AFR targets that the ECU will correct for in a 8x8 table. See "Lambda AFR Settings" There are 2 AFR target tables, these do away with your EGO Switch point in Exhaust Gas Settings, but it is strongly recommended that this is only used when you have a Wideband Lambda sensor setup.
Table 1 contains the target AFR's for VE Table 1.
Table 2 contains the target AFR's for VE Table 3.
NOTE: These are just targets, they don’t replace your VE table and should be thought of as a fine tune for the VE table.
If you don’t want to use them simply select them off. The target will then be as set in the enrichments page. See the Lambda AFR Settings section for how to turn this option on.


Overrun Settings

This is used to cut fuel off during deceleration to aid engine braking and reduce fuel use. The RPM setpoint will need to be a bit higher than your tickover speed, I would suggest it was around 800rpm higher than the tickover RPM so as the fuel and engine has time to settle down again once fuel is switched back in.
The KPa should be set to slightly above the vacuum value pulled when decelerating, e.g. 20KPa.
A typical delay time of 1-2S is best to ensure it doesn't hunt.
To find your TPS setting value, go to Tools, Calibrate TPS, and with your foot completely OFF the throttle hit Get Current. Remember this value and hit CANCEL on the Calibrate TPS dialog. Add 2-3 to this value and enter it, so if you had a value of 20 enter 22 in the setting.

Staged Injection

Staged Injection System is Not for use in Dual Table (DT) mode!
This runs Bank 1 injectors only until the setpoint is satisfied, then Bank 1 and 2 will fire at a reduced amount depending on the scale factor. So by wiring a small set of injectors to Ch1 and a larger set to Ch2 you can have a good idle control with the first bank firing and then under load switch the second bank on to get enough fuel for the power the engine produces.

This is worked out by calculating Primary Injector Flow/Total Inj Flow. When the engine runs below the setpoint-delta the injectors change back to CH1 on normally and CH2 off. In this example the 2nd bank will turn on at 3000RPM and off at 2800RPM.

This is mainly used in rotary engines where the stock Mazda throttle body wants to be used, as it is progressive in nature. The injection must be progressive too if the stock EFI hardware is to be used without modification. This requires the MegaSquirt to fire the primaries only until the secondary throttle plates have opened adequately.

If you want to have 2 conditions to turn the second bank on and off you can select this and then use the "More Staged Injection" settings to select when that condition will apply.

There is also an "injector staging delay" in "more staged settings" where you can specify a number of ignition events to bring on the secondaries and scale down the primaries. It will gradually do the switch over on that many ignition events, if you specify 0, it just does it instantly. This helps people who have secondaries up the intake tract from primaries so the engine doesn't get a lean spot waiting for the fuel from the secondaries to get to the engine.

The most critical setting is:
Scale factor = primary flow/(primary+secondary flow)*512.
Max value is 255, so it is assumed that secondary injectors are always same size or larger than primaries.

Coolant Related Air Density

This is for experienced users to alter their air density correction with coolant temperature rather than with air temperature. Some people have found that their engines lean out due to the air temp sensor becoming saturated by the engine's heat, this gives the ECU the impression the incoming air is really hot when in fact it is simply the sensor that’s been heated up by the mass of the engine.

To help TUNE this we have added Coolant Correction percentage.
With this function enabled the correction percentage is interpolated from the table, depending on the coolant temperature. So Air Density would now be :
Air Density = (MAT Related Air Density) * Coolant related correction %
E.G. Air Density = 120 * 110 % = 132
This correction can then be reduced by the engines RPM. The Reduction Start value is where the coolant correction is started to be removed, and the correction End position is where there will no longer be any coolant correction. The coolant correction is interpolated between these 2 points. At engine speeds lower then the start point the correction will be as the Coolant Correction Table. Between the Start and End values the Coolant Correction is reduced at a linear rate. At the End value the Coolant Correction rate is removed totally.
The idea is that as rpm increases as does air flow, so the MAT sensor will be a more realistic measurement of density.
So if start is 3000rpm and end is 6000, and correction is 150%, then at 3000rpm correction will be 150%, at 4500rpm correction will be 125% and at 6000rpm correction will be 100% (i.e. no correction).
We have allowed the temperatures to be user defined, suggested temps would be :
Temp 1 = -40 F
Temp 2 = -20 F
Temp 3 = 0 F
Temp 4 = 20 F
Temp 5 = 50 F
Temp 6 = 80 F
Temp 7 = 120 F

To ensure this selection is OFF go into "Coolant Related Air Density" then select "Settings" and ensure the selection is "NORMAL CORRECTION"

Rev Limiter

The rev limiter can cut fuel and or sparks depending on what system you are running, sparks cannot be cut in Edis mode or if you are using a catalytic converter.

The Base Number is the number of sparks that can be cut from (yy). This value will depend on the number of cylinders you have but generally 10 is the best value to use.
Then select how many sparks to cut in each mode(xx).
So you will get xx cuts in every yy sparks e.g. Cut 3 out of Base 10 = - - - * * * * * * * , - - - * * * * * * * , - - - * * * * * * * this allows all the cylinders to fire as the cut cylinder will roll round to the next cylinder next time around. The RPM that this cuts in at can be altered in the "Rev Limits" under Hard Rev Limit, the soft rev limit simply retards the ignition so reduce power produced, e.g. 8 DBTDC

Advanced Settings (Hybrid Alpha-N and Mass Air Flow meters)

Hybrid Alpha N system adds KPa to an Alpha_N setup. See the Aplha-N settings section for more details on Alpha-N. This means that the KPa value becomes part of the fueling calculations, the same as in Speed density, so when you go into boost the fueling will increase even when you have the same VE value. The addition of fuel for boost comes through the MAP term in the fuel equation:
PW = REQ_FUEL * VE * MAP * E + accel + Injector_open_time

Thus increasing the VE at higher boosts makes the mixture richer, but it would not have run leaner simply because of the higher boost. This is very important for turbo applications where Alpha_n is used.  All settings should be set for Alpha_N (Constants - Control Algorithm) Please see the Tuning in Alpha-N section for more info.

We have added the facility for a Mass Air Flow Meter to run the fuel calculations rather than a MAP sensor. Connect the MAF 0-5V output up to pin X7 (JS5) via a filter circuit as described on the Extra website. In  ensure the Mass_Air_Flow Mode is set (SEE HERE for more) or that you selected that option when you installed the MS1/Extra software. This is some what experimental, expect the VE table to look very linear with lots of rows of numbers the same value in the horizontal axis. Andy Whittle has had some success with this system and it is him I would try to contact if you are thinking of going over to this setup, Whittlebeast on the MSEFI forum. Air Density Correction is most likely built into the MAF you are using, so set to BUILT INTO MAF.

False trigger protection should always be set to Enabled, unless you are using the trigger logging feature. Whilst logging triggers it can be handy to disable the protection so that all triggers (including noise) gets logged

300 and 400KPa Sensors / Map Sensor Settings

In some installations the standard 250KPa (21psi of boost) sensor simply isn't enough. So it is possible to fit a 300 or even a 400KPa sensor in place of the original 250Kpa one. There are 2 types we recommend, the MPXH6300A ( DATA SHEET ) or the MPXH6400A ( DATA SHEET ) these are difficult to fit but www.DiyAutoTune.com does a small board with the 400KPa sensor fitted to it which fits where the 250Kpa sensor would have gone. Once the sensor has been fitted the settings in  MUST be changed so your ECU knows what the signal from the sensor relates to. This can be done by selecting the 400KPa option when you are first creating your project  however if you need to change the map sensor because of a upgrade you can do this in the "Project Properties" dialog. To get to the project properties dialog go to the "File" drop down menu > "Project" and you will see the menu option "Project Proprties" or you can use Ctrl + p. 

Change the selected sensor in the MAP Sensor drop down menu to your sensor (highlighted RED), then save and close the program. Then click ok to save your changes and exit the project properties dialog. Upon exiting your project will reload automaticly with the changes you have made.

In TunerStudio go to the Engine Constants Page and select the sensor you are using, note that the standard sensors supplied with the MS kits, etc are 250KPa (capable of 21PSI of boost):

Idle Control valves

As long as the MS ECU has been upgraded internally (see the main MSnS Extra Hardware Manual) with a high powered transistor in place of the standard idle transistor it can control most idle valves as long as they are NOT stepper motors (these have 4 wires/connectors) Most 2 or 3 wire valves (e.g. Bosch 0280 140 505)

Idle control can be used in B&G on/off, Warm up, or Closed-Loop Modes.

B&G on/off simply opens or closes a valve to provide additional air below a temperature threshold

Warm up mode linearly varies the duty cycle of a 2 or 3 wire solenoid actuated valve to provide additional air during cold startup, while gradually scaling down the duty cycle until the engine is warm.

Closed-loop mode attempts to keep the engine idling at a set rpm by using PWM with a 2 wire solenoid actuated valve, and actively varying the duty cycle to maintain rpm.


Warmup Settings:
Lower temp idle frequency is the higher duty cycle required to start and run a cold engine. (115 is a good starting point)
Upper temp idle frequency is the duty cycle the idle valve will be scaled down to as the engine warms up. ( try zero here)

These two values are linearly interpolated from one to the other starting from the lower engine temp to the higher engine temp (fast idle temp, and slow idle temp.)
Idle valve frequency This is generally something most people will not need to mess with, however, different idle valves are designed to work best at specific operational frequencies. Note that the Frequency of actuation is 1000 / this value (255 is a good starting point)

Please Note: true DUTY CYCLE% = Lower or Upper dc * 100 / Idle Valve Frequency value example Freq value - 200 = 50 Hz operation, a DC value of 80 = 80*100/200 = 40% true duty cycle

While most valves operate at 100 hertz, some older style 2-wire valves will work better at frequencies as low as 39 hertz. There is an inverse relationship between frequency of operation and control precision because of the algorithm Used to control the PWM output. Lower frequencies have more steps between dc values. 100hz operation has 100 steps and therefore has 1% control steps. 50hz operation has 200 steps and has 0.5% duty cycle steps and that is why the duty cycle values put into MT need to be double the true DC% value.
Some valves may emit a buzzing sound which can be eliminated by increasing the frequency above 100 hertz.

There is a formula for modifying the idle valve frequency. The formula is '10000/desired frequency = x where x is the variable you input in TunerStudio. For example '100' would be 100 hertz, and '50' would be 200 hertz
Closed Loop Settings:

This is fairly experimental code, but with careful manipulation of variables it should be possible to produce a stable idle.

Cranking (dc) is the duty cycle required at cranking. This setting really needs to be above the cold idle value. I would start at 50-60.
Minimum (dc) is the duty cycle slightly lower than a warm idle dc when regulated.
Closed (dc) is the duty cycle where the valve closes.
The values here follow the rule above and are related to the frequency selected and are not true DC except when the idlefreq values is 100.
Some valves are normally closed (use 0 here) others require a certain DC to close and will regulate above this value. Bosch 2 wire valves are normally open, close at 25% and regulate at about 40%.
Fast Idle RPM is the idle target for the engine at, or below the fast idle temperature.
Slow Idle RPM is the idle target for the engine at, or above the slow idle temperature (fully warmed up).

The two RPM set points are linearly interpolated between the two temperatures to provide a smooth transition during warmup

TPS Threshold is the point above which the idle valve closes in ADC (as it is no longer needed).
Idle Activation (rpm) is 'how many rpm' above idle that the idle valve returns to operation after the throttle has been opened and closed again. This follows the idle speed as it is interpolated from Fast Idle RPM to Slow Idle RPM
Dashpot Settle is the wait time required after a dashpot event for the rpms to settle below the idle activation point. After a dashpot it is possible that rpms will overshoot the activation point and this is the time required to settle below activation point.
Dashpot Adder (dc) is the dashpot duty cycle added to the last controlled idle duty cycle which allows it to recover to a nice idle with minimal overshoot. These values should be low: 1-5 DC
Deadband range This is a range of rpm that you do not want it to bother changing duty cycle to regulate idle.
30 to 50 rpm seems to be good here try smaller values until it seems stable.

Adaptive idle control This controls the time between idle control events. The goal is to have a Slow Recovery which is tuned to the engine's time constant at idle. You do not want it to hunt nor have falling idle speed. The Fast Recovery is how fast you want it to recover to a decent idle when the idle speed is higher or lower than the target this can be tuned for startup and to see what is needed to recover if idle speed drops significantly below target for example when the A/C or electric fans kick on and the idle drops below target.
The rpm values determine the curve. The lower value should be close to the dead band value and the upper one should be a bit further away, maybe 100 or 200 rpm the next 2 values are time constants needed for startup and idle valve closure

Closure speed controls the speed at which the idle valve closes. It is the time step delay between each as it steps to a closed dc value

Startup delay is a wait time right after the engine is started that the system stabilizes before it attempts to find an idle speed

 

More PWM Control Settings

Deadband Range (+/- RPM) - This is the range above and below the Slow Idle Speed where no PWM correction is used.

Upper Limit (hi RPM) - This is the RPM above or below the Slow Idle Speed where PWM uses Fast recovery.

Lower Limit (lo RPM) - This is the RPM below which Slow recovery is used.

Fast recovery - This is the time multiplied by 0.1 sec that PWM waits before making another adjustment. A smaller value causes the valve to move faster.

Slow recovery - This is the time PWM waits before making another adjustment.

Note: A linear curve is setup between Upper and Lower Limits and Fast and Slow Recovery.

Closure Speed - This controls how fast the valve closes after the TPS threshold is exceeded. It is how long PWM waits before making another adjustment in 0.1 sec.

Startup Delay - This is how long the code hold the cranking value before going into controlled operation.

PWM idle Tuning

1) The first thing is to have a good AFR and Spark calibration. PWM idle is not a fix all for a bad tune. If your AFR varies the power your engine makes will vary and the idle will go up and down. The same is true for spark timing. Although some find it helpful to increase the spark advance 2-3 degrees 100-200RPM below the Slow Idle Speed to help PWM "catch" stumbles.
2) Add a PWMidleGauge to you front screen in TunerStudio. Right click on any of the gauges when on the front screen of TunerStudio and select 'swap to' and find the gauge: PWMidleGauge

3) Read threads and success stories on MSEFI to figure what Frequency to use with your valve. You can experiment with different values later.
4) The next thing to try and figure out is what values you need for cranking and minimum.
a. Cranking - Set your Startup delay to 250. Turn the engine off, then turn the ignition to on so that MS has power. Your valve will go to whatever you have set in the Cranking dc box. Start the car the RPM should go up briefly. If your engine is warm all this will do is give you an idea of whether your cranking dc might be large enough to achieve fast idle. If your RPM only went up a little you will need a larger cranking value.
b. Minimum - Start with a relatively high value something a few counts below the Cranking value. Now adjust the value down until you reach your Slow Idle RPM. Then set Minimum to a few counts below this.
Note: You want the smallest range between Cranking and Minimum that you can get away with. This gives a narrower control range and simplifies tuning.
5) Fast and Slow RPM and temperature these are pretty self explanatory. To make tuning easier use the lowest Fast RPM that you can. Again a narrower control range makes tuning easier.
6) TPS Threshold - You can find your closed TPA adc count in the Realtime display. Pick a reasonable addition above this for PWM to diengauge.
7) Dashpot Settings
a. Idle Activation Adder - Set to Zero to start PWM tuning
b. Dashpot Settle Time - Set to 255 to start 90% of applications will never use anything but 255.
c. Dashpot Adder - Set to Zero to start PWM tuning.
8) Deadband - Set the deadband to a reasonably large value to start like 100 or more RPM. This will help prevent RPM dithering
9) Upper Limit - This should be close to the difference between your Fast RPM and Slow RPM
10) Lower Limit - In most cases this should be close to your deadband value but to start with try a value slightly smaller than the deadband of 100.
11) Fast recovery - This is used when you are far from the Slow Idle RPM so a smaller value can be used here. Generally larger values cause slower response. It is easiest to start with large values and reduce them to speed up the response.
12) Slow recovery - This is used when you are close to the Slow Idle RPM so a larger value should be used here. Again starting with a large value and reducing it is generally the easier way to tune this parameter.
13) Closure Speed - This is the rate at which the valve closes once you cross the PWM threshold. Set this value small so that the valve closes quickly
14) Startup Delay - Set this to any reasonable value you like.

Once you have all those values tuned and have a nice steady idle. You can now set your dashpot settings.
1) Idle Activation adder - This is the number of RPM above your Slow Idle RPM when the dashpot adder is added. You will need to adjust this so that it is added soon enough to just catch the RPM and bump it just above the Slow Idle RPM.
2) Dashpot Adder - adjust this value so that the RPM ticks up just above the Slow Idle RPM after passing the Slow Idle RPM on the way down.
These 2 values need to be tuned to work together but there effect can easily be seen on the tach for tuning.

Layout of settings pages in TunerStudio

As of 029xx codes this is the general layout of where to find the relevant settings in TunerStudio.

 

MegaView

The MegaView display/digital dashboard can be used to view the core data from MS1_Extra. It cannot be used for tuning.

 

 

 

Ignition Section

Fuel Only No Ignition -- Ignition selection -- Spark Settings -- Idle Advance Settings -- Knock Settings -- IAT/CLT_Related Ignition -- Dwell Settings

Stim for Wheel -- Rotary Trailing Settings -- Odd Fire Wheel Settings

Fuel Only, No Ignition

The MS Software can be used to simply control the fueling of an engine without it controlling the ignition timing. The way to set this up depends on your engine, it is best to set the Codebase and Output Fuctions page as you would for your ignition setup, e.g. if your running a wheel decoder setup (Ford 36-1) then your trigger signal will come from the VR sensor, so set the option to Wheel Decoder - Generic Wheel and follow the normal setup procedure for that engine see HERE

If using a distributor based setup and fuel only with the trigger coming from the coil's -ve (1 trigger pulse per ignition event) then you can simply turn off all of the first 7 options in the Ignition Options / Wheel Decoder, this will ensure all of the spark setting screens are greyed out.

Ignition Selection

The first section here (top 7 boxes) are where the code decides what it is going to do with the trigger input/s. This is very important to get setup correctly. Please see the Ignition Options / Wheel Decoder section earlier in the manual for setting the outputs including the Spark outputs. After setting this section you will need to set the "Spark Settings" and the "Dwell Settings"

 

Distributor (MSnS) -- Neon/420A -- Wheel Decoder Settings -- Ford EDIS System -- Ford TFI -- GM 7pin HEI mode -- GM DIS -- Buick C3I

 

Distributor (MSnS)
This is designed for distributor based ignition systems. It requires a "locked" dizzy (distributor) or a crank trigger that triggers at the same rate as a distributor would (twice per crank rev on a 4cy. Three times per crank rev on a 6cy, etc). Engines with even numbers of cylinders benefit from using a crank trigger as it gives a more stable spark. Odd number (e.g. 3,5) must trigger from the dizzy.
Odd fire engines are not currently supported (i.e. some Olds V6s or 90 deg V twins) if the plug leads on you distributor are evenly spaced, as most are, you will be ok.
The trigger is usually a hall sensor or a VR sensor either in the distributor or on the crank.
The coil is fired using either the ECU's on-board high-current ignition driver (SparkA) or with an external ignition module, this would be fired by the MS ECU.
Many installations triggering from the dizzy will require modifications to get correct rotor arm to trigger phasing. See the Hardware Manual more info on this setup.

Neon/420A mode
This mode is to decode the pattern machined into the crank on a pre-2003 Dodge Neon engine, this also theoretically supports the following vehicles when equipped with a 2.0 or 2.4 4cylinder Chrysler engine.
"NS" body models:
1996-2000 Chrysler Town and Country
1996-2000 Dodge Caravan/Grand Caravan
1996-2000 Plymouth Voyager/Grand Voyager
"JA" body models:
1995-02 Chrysler Cirrus
1995-02 Dodge Stratus
1996-2000 Plymouth Breeze
"JX" body models:
1996-02 Chrysler Sebring Convertible
"PL" body models:
1995-02 Dodge Neon
1995-2001 Plymouth Neon
"PT" body models:
01-02 Chrysler PT Cruiser
"FJ" body models:
1995-02 Chrysler Sebring Coupe
1995-2000 Dodge Avenger

In Ignition Options / Wheel Decoder and Output Pin Options ensure that NEON/420A is the only ignition option selected and that LED17 and LED19 are the ONLY 2 Spark outputs!! In Spark menu, choose Spark Settings. Set Trigger Angle as 69 degrees and Trigger Return.

See the Hardware manual for more details of this setup.

Wheel Decoder
When this code option is selected in Ignition Selection of "Ignition Options / Wheel Decoder and Output Pin Options" the ECU will decode a missing tooth crank wheel (e.g. 12-1, 36-1, 60-2) or if the timing wheel has all of its teeth, a second input every crankshaft revolution can provide the same timing capability as a missing or filled in tooth. The 36-1 wheels are found as standard on Fords (36-1 this has space for 36 equally spaced apart teeth with one missing so it has 35 teeth and a single tooth gap) and many vehicles that use a Bosch ECU (60-2)

The Nippondenso dual wheel / 2nd trigger
Many Mazda and Toyota engines utilise Nippondenso ignition which uses a dual wheel crank angle sensor (CAS) which has one 24 tooth wheel and a 2 or single tooth second wheel.
This option can also be used inventively to give 4 cyl COP or could be used with the dual pickup crank trigger from SDS for 4cyl wasted spark. See the Ignition Hardware Manual for more info on this type of setup under Wheel Decoder and Second trigger input.

Simple crank triggers such as 4-1 or 6-1 can also be used but the easiest way to get a wasted spark ignition setup from a distributor single coil setup is to fit a Ford 36-1 wheel onto the crank and use this code setting and directly drive a set of Ford coil packs. With this option you need to set up the "Wheel Decoder Settings", this means you need to know where the first missing tooth passes the sensor with respects to the timing, or what tooth the sensor is detecting when the timing is at TDC. We have designed this excel file to help you figure out the required settings, click on the image to download the file.

Please note the teeth are counted when the ECU detects the first gap, (this gap is tooth Zero) the first tooth on a -1 setup (or second gap on a 60-2 wheel) is tooth 1, etc. The last tooth would therefore be 35 on a 36-1 or 59 on a 60-2. When using a wheel with no missing teeth and a second trigger input the next tooth on the main toothed wheel after the second trigger is defined as tooth 1. The MS ECU can NOT trigger on a missing tooth, so you must ensure that all of the used Trigger Position Teeth as set in "Wheel Decoder Settings" are NOT set to ZERO, if they are then you may have to alter the Trigger Angle a little to select another tooth. However all of the UNUSED Trigger Position Teeth MUST be set to ZERO!
Please also note that you can only use one tooth per trigger position, so you CANNOT have the same number in the Wheel Decoder Settings twice!!

The Trigger Return positions and the Cranking Angle work together and it is VERY important to understand how this works. It is usually set up for the cranking angle when there are enough teeth. So if you have a 36-1 or 60-2, etc, set the Trig Return tooth thats at 12deg BTDC (thats as close to 10 as you can get on a 60-2), this is usually the firing angle at cranking. So in the example below tooth 18 and 48 would be aligned with the sensor at 12deg BTDC (6deg / tooth on a 60-2). Next enter 12deg into the Cranking Angle, this is VERY important as it is used to work out the Dwell! If your fitted the wheel your self then ensure this angle is correct, if not alter it so it is, it may be 2-5deg out if you fitted the wheel, so alter the value. This should be easy enough to see or to work out using a timing light and crank the engine, if its sparking at 8deg then enter 8, etc!
If you decide to not use Trigger Return (Timing Based) then set ALL Trig Return pos to ZERO, equally if you dont have enough teeth to do this (e.g. 4-1, 12-1, etc) set ALL the Trig Return Pos to ZERO and set Timing Based in Cranking Timing

 

 

 

****************************************************************************************************

It is VERY IMPORTANT that when driving coils directly (as virtually all wasted spark setups using the wheel decoder will) that you set the INVERTED SPARK to YES and the DWELL settings!! See the Spark Settings and Dwell settings section.

***************************************************************************************************

EDIS mode
Controls Ford EDIS ignition module for wasted spark distributor less ignition, this can be installed on most even fire 4,6,8 cylinder 4 stroke automotive engines.
This setup requires a 36-1 trigger disc mounted on the crank, many Fords from 1990 onwards already have the trigger disc or teeth cut into the flywheel. Suitable discs are available new and used.
EDIS has a quoted upper limit of 9000rpm, but in practice some have seen 9300 or 10500rpm. EDIS8 appears to limit just above 6000rpm.
The EDIS install offers another DIY ignition solution on engines that are distributor less from the factory, unlike the Wheel Decoder version it uses the Edis module to fire the coil packs rather than directly from the ECU.

Ensure that the ONLY ignition option in Ignition Options / Wheel Decoder and Output Pin Options is EDIS and that LED17 is set as SparkA, NO other outputs must be set as a Spark Output.

Set the Trigger Angle to ZERO and Spark Inverted Output = YES in the Spark Settings menu.

See the MSnS-Extra Hardware Manual for more info on this setup.

Ford TFI mode
This provides native support for the Ford TFI distributors used on millions of vehicles during the eighties. (Currently only Push Start modules tested.) The aim is to make some additions to the MegaSquirt board, connect the loom and go. No changing rotor phasing or second modules.
This mode could likely be used on a retro fitted TFI module in a non original installations. The module provides takes an input from a hall sensor and has a coil driver in one compact unit with a "next cylinder" scheme of operation that gives a "limp home" base timing if the computer is disconnected. Ensure thesettings in Spark Settings are - Trigger Angle is set to 10 deg and the Spark Output Inverted = YES for this setup, also in Codebase and output Functions set the LED17 as SparkA output and ensure the DWELL settings are set to Fixed Duty - 50% Dwell, for more info see the MSnS-Extra Hardware Manual.

GM 7pin HEI mode
This to provides native support for the GM 7pin HEI distributors used on millions of vehicles from the early eighties onwards. The aim is to make a few small modifications on the MegaSquirt board, connect the loom and go. No changing rotor phasing or second modules.
This mode could likely be used on a retro fitted 7pin module in a non original installation. The module provides VR sensor signal conditioning and a coil driver in one compact unit with a "next cylinder" scheme of operation that gives a "limp home" base timing if the computer is disconnected. In Codebase and output Functions set the LED17 as SparkA out and LED19 as Spark B output, in Spark Settings ensure "Trigger Angle" is set to 45 deg and Inverted Spark Output = NO. See the MSnS-Extra Hardware Manual more details on this setup.

GM DIS (set as GM 7pin HEI mode)
This is used on GM vehicles like the Camaro from the mid nineties that use GM's own DIS system. In Spark Settings ensure "Trigger Angle" is set to 45deg and the Trigger Angle Addition to +45 and Inverted Spark Output = YES or the advance will be about 120 degrees from desired. Then in Codebase and Output functions ensure LED17 is SparkA and LED19 is SparkB, set the Dwell to Fixed Duty - 50% Duty - really????. See the Ignition Hardware Manual for a description of the 4cyl, V6 and Northstar V8 variants.

Buick C3I (set as GM 7pin HEI mode)
Some Buicks use a system similar in concept to the GM DIS but requiring a slightly different setup. Ensure the settings in Spark Settings are - Trigger Angle is set to 70 deg and the Spark Output Inverted = YES for this setup, also in Codebase and output Functions set the LED17 as SparkA output, LED19 as SparkB output and ensure the DWELL settings are set to Fixed Duty - 50% Dwell - really???, see the MSnS-Extra Ignition Hardware Manual for more info on this setup.

 

Spark Settings

Trigger Angle (deg) is the angle Before Top Dead Centre (BTDC) when the selected trigger position (Trig Pos) Tooth (if using wheel decoder) or the Vane on the crank or the Points in a locked distributor, etc, passes the sensor. This is used by the ECU to calculate when to fire the coil(s) as it knows that every time it receives a trigger pulse it is at xxdeg BTDC and the entire spark map is worked out when to fire from the Trigger Angle. When the engine is first started this is the angle that needs to be altered to get the spark fired at the correct time, this is done by setting the "Fixed Angle" (this ignores the spark map and holds the sparked angle to the value you enter) to around 10deg and, using a timing light, ensure the ECU is firing the coil at the Fixed Angle. If the timing is not being fired at the fixed angle then alter the "Trigger Angle" until the timing is at the fixed angle. Once the Trigger Angle has been changed so the Fixed Angle is being fired by the ECU then change the Fixed Angle back to -10 so the ECU will follow the spark map.
Typically you should aim for a Trigger Angle of 60-70deg or 0-5deg as this is outside the usual range that the spark is needed. (this can be altered by using a different tooth for triggering on the wheel decoder or by altering the sensor position on MSnS setups)
If using an OEM distributor setup like HEI7 or TFI then 5-15deg is typical, see the relevant section earlier.

IMPORTANT - do NOT set your total Trigger Angle (i.e. Trigger Angle plus additions) in the range 20 to 50 degrees as you will encounter problems and be unable to get your desired advance. If this is the Trigger Angle you calculate then you either need to move your crank sensor/wheel or modify your distributor to obtain a compatible trigger angle. This is due to the way the ECU calculates the spark timing, the calculations need around a 5deg band from the Trigger Angle.
e.g. If you set a Trigger Angle of 23 degrees (no additions) then your maximum advance would be about 18degrees which will almost certainly give you a very lame engine down on power.
If the Trigger Angle setting is less than 15 deg the code will use "Next Cylinder" sparking, which means it will work out the timing for the next spark rather than the current spark, this is perfectly acceptable.

Advanced Topics:
For more info on This/Next Cylinder please see this excellent section below:


Trigger Addition Angle - As angles of over 90degs are not allowed in the Trigger Angle setting, if you need an angle between 90-112.5 then select the '+22.5' and enter the angle needed -22.5
If you need an angle between 112.5 to 125 then select '+45' then enter the angle needed -45
The actual Triggered Angle the code will use is :
Trigger Angle + Trigger Additional Angle (22.5 or 45 if selected)
e.g. 78 + 45 = 123
88 + 22.5 = 110.5
65 + 0 = 65

Crank Timing is the way the ECU decides when to fire the coils during cranking.
Time Based
works out when to fire by calculating the timing from the engine speed (the same as it does during normal running) and fires when it is at the Cranking Advance Angle, this is OK as long as your starter turns the engine at a fairly constant speed. If your starter motor is slugish to start with or you want to allow oil pressure to build before the engine starts, you can use Hold Ignition to delay when the ECU tries to start the engine, so by entering a value of say 2 in Hold Ignition, the ECU would only fire the ignition after 2 engine revolutions.
In Trigger Return mode, when the ECU see's the trigger return tooth (see wheel decoder settings), or the raising edge of the trigger input if using any other mode, it will fire the ignition coil.
Please note: VR sensor users must use "Time Based cranking" when in MSnS mode.

The Trigger Return positions and the Cranking Angle work together and it is VERY important to understand how this works. It is usually set up for the cranking angle when there are enough teeth. So if you have a 36-1 or 60-2, etc, set the Trig Return tooth thats at 12deg BTDC (thats as close to 10 as you can get on a 60-2), this is usually the firing angle at cranking. So in the example below tooth 18 and 48 would be aligned with the sensor at 12deg BTDC (6deg / tooth on a 60-2). Next enter 12deg into the Cranking Angle, this is VERY important as it is used to work out the Dwell! If your fitted the wheel your self then ensure this angle is correct, if not alter it so it is, it may be 2-5deg out if you fitted the wheel, so alter the value. This should be easy enough to see or to work out using a timing light and crank the engine, if its sparking at 8deg then enter 8, etc!
If you decide to not use Trigger Return (Timing Based) then set ALL Trig Return pos to ZERO, equally if you dont have enough teeth to do this (e.g. 4-1, 12-1, etc) set ALL the Trig Return Pos to ZERO and set Timing Based in Cranking Timing

Spark Output Inverted Choosing spark output inverted YES or NO is VERY IMPORTANT. This is determined by the way you drive your coil(s) When the spark coils are directly driven from the ECU (VB921 FETs are used) you will choose Inverted = YES. Get it right or you will risk damaging components as well as getting wildly inaccurate timing.

Trim Angle is simply a method to advance by xx deg or retard up to 9 deg across the entire spark map, so if you are running in an area where the 12x12 map is at 20deg entering 5 in Trim Angle will add 5 to the spark angle, making a 25deg spark angle. (to retard from main map enter -1 to -9), use -10 to follow the map and have no trim.

Idle Advance Settings

This feature holds the timing to a fixed value when the engine is idling to help it run smoothly and it allows you to have a more flexible spark map around the idle area. To find your TPS setting value, go to Tools, Calibrate TPS, and with your foot completely OFF the throttle hit 'Get Current'. Remember this value and hit CANCEL on the Calibrate TPS dialog. Add 2-3 to this value and enter it, so if you had a value of 20 enter 22 in the setting. A delay time of 1-3 Sec has been found to be suitable.

Knock settings

This setting needs some hardware changes and a control circuit, please see the MSnS-Extra Hardware Manual HERE for more details on this function

IAT/CLT Related Ignition


It is recommended that this setting should only be used once your spark map is tuned.
When an engine is cold, advancing the timing a little above the base map, can help the engine run smoother and idle faster, this can also aid warm-up times a little. In the example below the engine will run an additional 1 deg of advance for every 10C the coolant is below 50C.



So at a coolant temp of 20C the timing will be increased by:
50C-20C = 30C difference
30C / 10C = 3degs additional advance.
The Maximum allowable added advance can be limited to stop too much advance being added in extreme temperatures. A value of around 4-6 is suitable.

The inlet air temperature has a massive effect on how much advance you can safely run, if the temperature increases above the norm, due to sitting in traffic, long/hard runs in boost, etc, the amount of advance can be retarded proportionately with the temp increase to help prevent detonation. This works in much the same way as the coolant related ignition but it RETARDS the ignition from the base map. In the example the ignition will be retarded by 1 deg every 5C the air temperature rises above 60C, so at 80C the spark map will be retarded by 4 deg.

As there is no need to retard the ignition when cruising (detonation is highly unlikely) there is a Kpa above set point, so the retard only comes in when the engine is being driven above this setpoint, this should be set so it is slightly higher than your MAP Kpa at cruise and idle.

Dwell Settings

If you are use Direct Coil Control (your coil's are driven from the MS ECU directly) or a non-smart dwell ignition module it is VITAL that you enable dwell control with the correct spark invert/non-invert setting, see Spark Settings. The dwell numbers given are get-you-going numbers but will need adjusting.
If your ignition driver/coil are getting warm or hot then the dwell is too high (these are not normally hot to the touch, warm is OK but not hot). To adjust the dwell the best method is to reduce the Running Dwell mS value untill the engine miss-fires when running in lean conditions (e.g. crusing) and then increase the value by 0.2mSec.
Min discharge is the time the coil is allowed to spark before charging starts again. (0.1mS is a typical starting point and generally works for 99% of installs)

Typical Ford / Vauxhall coil values shown here.

A Running Dwell of 4.0mS is the largest I have seen, if you are any larger then it is likely you have problems and could be risking burning the VB921 FET out in the ECU. Try to stay under 4.0mS Running dwell!


Some Bosch ignition modules are smart-dwell (the module only needs to be given a signal to fire and it controls the dwell) and need a Fixed Dwell with a setting of 75% Duty Cycle, MSD ignition needs a setting of 50% Duty Cycle instead of true dwell and Spark Inverted = YES in the Spark Settings menu. For other setup requirements other than direct driven coils see the MSnS-Extra Ignition Manual

 

Stim for Wheel

The STIM FOR WHEEL settings are purely for use on a Stimulator when a patterned crank wheel is used in the engine setup. It should NEVER be used when the ECU is attached to the engine, it must be set to OFF. The number of steps/outputs needs to be set to the value of spark outputs your setup is using but only if using it on a Stimulator!

 

Rotary Trailing Settings

The rotary engine is obviously fundementally different to a normal 4 stroke engine, but it can still be controlled by the MS ECU as long as a few rules are followed. With a four stroke engine, in 720° of crank rotation, it will draw in the equivalent amount of air as its rated displacement. But with a rotary engine in the same 720° it draws in twice its rated displacement.
Therefore:
If you have a 2 rotor (Mazda 13B) engine (1.3 L) it's really like a 2.6L 4 cyl
If you have a 3 rotor (Mazda 20B) engine (2.0L) , it's really like a 4L 6 cyl

The rotary engine has a leading and a trailing ignition (2 plugs per rotor) the leading fires first then the trailing fires a few degrees later. On a 2 rotor engine the leading can be fired in a wasted spark format, but on a 3 rotor engine the leading must be driven by 3 individual coils e.g. COP. Simply set the system up as a 6 cylinder engine running wasted spark, this will fire the 3 spark outputs (Spark A, B and C) every 360 deg of crank rotation.

The trailing spark on a 2 rotor engine needs to be fired individually, so these can not be controlled in a wasted spark format. The trailing spark on a 3 rotor engine can NOT be controlled at all using the MS ECU as it stands right now, so the holes in the engine for the plugs will need blanking off.

To use the trailing spark settings go into Spark - Rotary Trailing Settings and then select "Rotary Trailing Settings" at the top of the table. Turn the support ON. If you need to test the output then set the Fixed split for testing to 5deg or so and check that its following the leading spark by 5deg. When finished set this back to -10 and the trailing will follow the leading using the 6x6 table.

          

If you enable rotary trailing, the MS automatically uses Spark output A as the leading spark output, this is just like a standard dizzy output... once every 180 deg.

The trailing output can be changed between FC trailing and FD trailing by going into Rotary Trailing Settings - Rotary Trailing Output Type


When FC Trailing is selected, Spark output C controls the Coil-Select input (See HERE for drawings), and Spark output B will send the trailing timing signal, which also looks like a dizzy signal, but will follow the offset of the main spark map from the above 6x6 table.

When FD Trailing is selected this uses Spark output B as rotor 1's trailing spark signal and Spark output C as rotor 2's trailing spark signal rather than using a Coil-Select output.


Odd Fire Wheel Settings

This code is an experimental alpha test oddfire ignition using wheel decoder
This information is provided so you can test the code out and see if it works at all or does anything useful.
The code has NOT been tested on an engine!!
This feature may be dropped without notice or warning. (Although I hope it develops into a fully working one.)

In its current implementation the code requires an evenly spaced missing tooth crank wheel (e.g. 4-1, 6-1, 36-1, 60-2) for wasted spark or an evenly spaced non-missing tooth crank wheel and a single cam trigger for COP (e.g. two teeth on crank and one on cam for 4cyl COP)

The first setup step is to install a suitable wheel or wheels and build the necessary electronics to interface to Megasquirt. Consult the regular wheel decoder or 2nd trigger wheel decoder pages for that.
The trigger point needs to be the requisite 60 deg ahead of the "earlier" cylinder.
e.g. on a 45deg V twin with COP one could use a crank trigger with two teeth and a single cam trigger.
If the sequence is as follows, front cyl fires, wait 315deg, rear cyl fires, wait 405 deg and repeat.
For this one of the crank trigger points needs to be 60deg earlier than the REAR cylinder TDC as it is "earlier". For the front cylinder the code will be made to add a 45deg delay.

Having installed the wheel(s) and built the circuits configure the code and setup the appropriate wheel decoder settings. In the V twin example it could be:
Teeth = 4
2nd trigger
Trig A = 1
Trig B = 3
all others 0

Don't even think about wiring in coils just yet, but do go to the codebase and outputs function menu and turn on as many spark outputs as you will be using e.g. LED17 = spark, LED19 = spark B
Crank the motor and confirm that you are getting an accurate and repeatable rpm reading.
If you have left the original ignition system undisturbed you could try running with Megasquirt controlling the fuel with the new crank trigger setup. This will confirm that the trigger is working correctly. The code is proven and in use on many vehicles already so this is really confirmation of your install.

OK, now for the fun stuff.
On the spark settings menu, turn on oddfire support.
On the code config menu the oddfire menu is now un-greyed so open it up.

For each output you can add a delay. In the example add a 45deg delay to output A and 0 to output B.

On dwell control menu you need to set fixed duty and use a smart dwell module, OR experiment with dwell control. Dwell will probably work up to about 1500rpm (as this is hi-res dwell and delays after the trigger) beyond that limit it will certainly NOT work at present. It is possible to add dwell control, but a little involved so it will not be done until the basics are proven to work (or not.)

Now wire in some ignitors and coils, cross your fingers and see what happens.

Please post results and/or questions to the Megasquirtnspark-Extra subforum of msextra.com.

 


If you have a question, comment, or suggestion for this FAQ, e-mail Phil or James or Ken or post it on the MSnS-Extra forum.

No part of this manual may be reproduced or changed without written permission from Philip Ringwood, James Murray, Ken Culver and Lance.

Many thanks to Lance for giving us permission to edit and adapt his MS Manual for MSnS-Extra use.


©2004, 2005 Bruce Bowling and Al Grippo. All rights reserved.