|
MS2-Extra Conversion / Software Manual Only for use with the MS2-Extra code (HC9S12C64 based microprocessor - MS2 Daughter Board) |
NOTE: Please ensure you have one of these daughter boards inside your ECU before continuing. If you have a black microprocessor, then you have an MS1 and these manuals are NOT for MS1 see here for MS1-Extra Manuals
|
|
Warning for
E-Bay buyers!! |
|
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. |
This manual is to help people either move from
MS1-Extra
over to MS2-Extra or to simply run their MS2 on the MS2-Extra code.
Obviously you will need an MS2 Daughter Board to run this code.
Basic Required Hardware Mods -- Installing MS2-Extra Firmware and Software -- OEM Temperature Sensors
Base Configuration File (MSQ) -- Engine Constants -- More Engine Settings -- Injector Characteristics -- Tacho input/Ignition Settings
More Ignition Options -- Noise Filters -- Rev Limiter -- Output Ports
WideBand Lambda Sensor Users -- EGO Sensor Type (EgoOption) -- AFR Tables
Start/Idle settings -- Priming Pulse -- Warmup Enrichment -- Cranking Pulse -- After Start Enrichment -- Idle Control -- Barometric correction
Cold Advance -- MAT Based Ignition Retard -- MAT Correction -- Over Run Fuel Cutoff -- Staged Injection
Table Switching Control -- Idle Advance -- Dwell Battery Correction
For Ignition Settings, etc, please
see the
General Ignition
Manual HERE
Basic required Hardware Mods for MS2-Extra
Obviously you will need an MS2 Daughter Board to run the MS2-Extra code.
If you already have a built MS1, (V2.2 or V3.0) then carefully remove the 69HC908 processor from the 40 pin DIP socket and fit the MS2 daughter board in its place. (To remove the 69HC908 processor it is recommended to slightly lift each end a little at a time until it is free.)
If you are building an ECU from scratch then you will find the MS2 official build manual (V2.2 / V3) tells you to install a wire for the ignition output (pad JS10 on a V3.0 and pin 17 on a V2.2 board), this is only required for MS2-Extra code if you are going to use EDIS. The standard wiring for MS2/Extra is to use the LED outputs for spark outputs A,B,C. However, JS10 may optionally be used for Spark A provided you do not need a second trigger (cam sensor) input. If you are going to use JS10 for the cam input then you will need to remove the jumper to IGBTIN and rewire your spark A on the LEDs as described here.
The MS2 daughterboard requires a 12V supply in order to run the Stepper Idle valve output or the programmable outputs IAC1 and IAC2.
The rest of the build is as standard for any other MS2. The ignition options will vary depending on your engine, etc, this will be covered later in the ignition hardware manual.
Note: This 12V Supply must NOT
be present if you ever want to go back to MS1, as it WILL blow the
MS1 microprocessor up!!!
Remove the wire if you ever fit the MS1
microprocessor back in again.
For an MS Version 3.0 board:
For an MS Version 2.2 board:
For an MS Version 3.57 board:
For all Versions of Megasquirt PCB's:
Installing MS2-Extra Firmware and Software
If you want to run the MS2-Extra code you will need to upgrade your MS2 (V2.2 or V3.0) ECU using the following steps:
1) Firstly we need to download the code that's going to run in the MS ECU.
It is recommended that MS2 users use Tuner Studio as the tuning software. You can still use MegaTune if you wish, but some future features and future MS ECUs will use Tuner Studio, available from http://www.ideasandsolutions.biz/tunerstudio/
The release code is available from HERE.
If you just want the latest Beta release see HERE for a list.
If your using Tuner Studio then go to Step 2
If you wish to continue using your current MegaTune software or if you are using a Beta code that you downloaded, then you will need to change MegaTune so it is setup for the relevant MS2-Extra code you are using. If you don't have MegaTune then download it with either the release or a Beta code from one of the links above and you dont have to worry about the rest of this set up instructions.
To set up MegaTune for an MS2-Extra follow the following instructions: (Remember, you only do this if you want a different code to the one your MegaTune was set up for, if you use MegaTune download link above it is ALL done for you, you should move to downloading the Firware section HERE.)
Unzip the code onto your Desktop or somewhere else that you'll remember. Open the directory and find a file called 'copyini.bat'. If you have file-extensions enabled you'll see that there is a *.bat at the end of the file, but most people do not have this enabled in Windows and so you will simply see 'copyini' with 'MS-DOS Batch File' beneath it:
Double-clicking the 'copyini.bat' file shown above will move the appropriate definition *.ini file into your MegaTune directory. Basically this configures MegaTune so it will work with the MS2-Extra code your using rather than the original MS2 code. You must have MegaTune already installed in order to run 'copyini.bat'. If you do not have MegaTune installed already, please do so before running this file. You will know that the file completed successfully as a command prompt will open and show whether or not the file has been copied successfully or not. You can also see that the directory the file was copied to is correct (avoid installing MegaTune to a directory other than the default). The results should look like:
The next step in the process is telling MegaTune that we are now using MS2/Extra as opposed to whatever version of firmware (if any!) you were previously using. This is a very easy step. Simply open MegaTune and select File - Configurator, this will close MegaTune down and open a new window. If you already have an MS1 project that you wish to keep then you can make a new project for the MS2 ECU (or indeed an MS1) by clicking 'Project' at the top of MegaConfigurator and select 'New' - this will prompt you for a new project name, I use 'MS2Extra' since it is very clear and deliberate. Enter the desired name you wish to create a new project as and click OK:

So in the left hand panel there will be either 1 or
2 projects (the original and the one you just created) or a single
project (e.g. Car1)
The next step is to setup the various fields (in the case of this tutorial it is called MS2Extra). Expand the MS2Extra (or whatever you called the new project) by clicking the [+], then expand 'settings.ini' by clicking [+] again, and finally expand 'Settings' by clicking the [+] once more. You are now presented with options such as 'CODE_VARIANT', etc. This is the portion of setup that tells MegaTune that the 'MS2Extra' project, when selected, uses a specific firmware *.ini file (which we copied earlier). In order to setup this project to run as an MS2/Extra installation, we simply navigate to the 'CODE_VARIANT' selection and choose 'MS_II -- Bowling and Grippo MegaSquirt-II' from the drop-down box. Yes, the firmware does not contain the word "extra" like the 'MSNS_EXTRA' firmware does, but don't worry, simply select the 'MS_II...' firmware and everything flows on fine:

The remaining fields such as 'IDLE_CONTROLLER' and
'LAMBDA_SENSOR' are for you to configure based on what hardware you
are using - this guide cannot tell you which option to use, as every
wideband controller is different and the same can be said about idle
control as well. So, simply configure those settings based on what
you know about your setup. If you are unsure about 'IDLE_CONTROLLER'
or know that you are going to not use an idle air valve, simply set
that field to an "on/off" setup.
Finally, open MegaTune. You will be immediately presented with an option regarding which project you want to select, and because this guide is for MS2/Extra, select the project name you created earlier in this tutorial -- ie. "MS2Extra":
Once MegaTune is up, navigate to 'Communications' at the top, and select 'Settings'. You will be presented with a dialog to setup Communication Settings. The red box within this dialog indicates that we are to setup the "serial data rate" for 115,200 bps and that is just what we will do. Select 115,200 and press close - change the COM Port if you know that you need to. Press Close and the setting will be retained whenever you select your MS2Extra project file.

MegaTune is now configured and ready for use with
your MS2-Extra firmware.
2) With MegaTune or Tuner Studio ready to work with your MegaSquirt ECU, you now need to actually flash the code to the ECU. This sounds like a daunting process, but it quite simple.
It is important that your computer hardware be properly setup to interface optimally with the MS2/Extra ECU. Unlike MS1/Extra based setups, the MS2/Extra requires that the COM Port run at 115,200 bps, instead of 9,600 bps. Additionally, we will make a change to the COM Port for reliability in communicating consistently with the MS ECU. To do this, click on your 'Start' button in the bottom left-hand side of the screen and select 'Control Panel':

You may need to click on the link in the left-hand
pane that says "Switch to Classic View" to make your
Control Panel look like the screen shot below, so do that if you are
following this guide.
Double-click on the icon titled "System" which is only viewable once you have clicked "Switch to Classic View" which is located where the red highlighting is in this screen capture:

A dialog will open showing you "System Properties" -- Click on the tab that says "Hardware":

Next, when the view changes, click on the button
that says "Device Manager":

Next, expand the section called 'Ports (COM &
LPT)' by clicking the [+]. Then, highlight 'Communications Port
(COM1)' and right-click on it, and select properties:

When the Communications Port Properties screen
opens, click on the tab labeled "Port Settings" and set
"Bits per second" from 9,600 to 115,200, like:

After setting the port speed to 115,200 bps, click
on "Advanced". This will open a dialog with two sliders
that are probably set to the far right "High" on both
sliders. Move the two of them to the far left, or low, to set the
ports up for better reliability:

Press 'OK' in each dialog box to save the changes
and close the Control Panel - you are now ready to continue.
3) Connect your laptop up to the MS ECU.
(Ensure ALL Directly Driven Coil's are disconnected until the correct configuration has been downloaded! Failure to do so WILL result in damage to the MS ECU!)
Find the file "download-MS2-firmware.bat"
which will be inside the directory of the firmware you downloaded.
If you used the MegaTune installer (see above) for the relavent
MS2 firmware you should use "START" - "Program
Files" - "MegaSquirt" - "Download Firmware"
(This runs the "download-MS2-firmware.bat" thats
been installed during the MegaTune instilation at:
c:/programfiles/megasquirt/MS2_Extra_Firmware/ms2extra_************
Follow the instructions on the screen, if you have the original MS B+G code (a new MS2) then you will need to remove the lid of the ECU and link the boot jumper when instructed. The downloader will ask you if your upgrading from the standard megasquirt2 code, answer "Y" if you have the B+G code or "N" if you have already loaded an MS2-Extra code onto the MS2.
Next you will need to set up the ECU for your engine, this is covered in the next section.
Do NOT connect any directly driven coils to your ECU until you have completely configured it for the setup your using or it WILL damage your ECU.
The MegaSquirt-II code is set up for the standard General Motors temperature sensors. If you are using other sensors, you can use the 'Calibrate Thermistor Tables' dialog under 'Tools'. You enter the bias resistor value and three temperature/resistance points, and the table is created and downloaded to MS2-Extra (or MicroSquirt Running MS2-Extra) for you.
Making a base configuration file (msq) to start you off
Note: It is highly
recommended that you download the default settings from the MS2 once the
MS2-Extra code has been installed and use that as a base to start
from!! To download from the ECU simply run the tuning software and select File
- Save As when connected, or Save the Data file in
MegaTunix.
The
reason for using the default file is that there are many new settings
in MS2 that need to be considered, (e.g. MAP, TPS, RPM Averaging Lag
Factors, etc) so in order to ensure all settings are at a good
starting point it is best to use the default rather than trying to
make a file from scratch.
Always save a combination after you have changed things, and give it a descriptive name. That is, don't save every file as megasquirt.msq, you won't be able to recover if you corrupt a file. Instead, save files with names like msii_june2605.msq, or some other scheme that makes sense to you and lets you identify how recent a file is.
When editing the tables, be sure to 'Burn Table' when you are happy with it, or the changes you make will disappear when you shut off the power to MS2-Extra (or MicroSquirt Running MS2-Extra)
In general, change only those items you need to at first. If you are not sure what a parameter does, or whether it applies to you, leave it at the default value.
If you have already been running MS1-Extra then you can simply Import your VE and Spark tables into the MS2 using MegaTune. Simply Export the tables from the original msq in Fuel VE Table - File - Table Export. This saves the table as a VEX file. Simply Import them the same way using MegaTune. Don't expect the engine to run without tuning it though, as the code will not generate exactly the same Pulse Width as MS1 did.
MS2-Extra will soon have a 16x16 VE and Spark table, in order to use your original 12x12 table or indeed an old 8x8 table simply run MegaTune and Export the table (Inside Fuel VE Table go to File - Table Import and select the VEX file to be used. MegaTune will correctly interpolate it and give you a corresponding 16×16 table.
To use the extra functions that the MS2-Extra code has set the Basic/Advanced User to Advanced in the Basic Setup tab. If your unsure of some of the features then it is best to start at one of the other options. These manuals will explain what all the Advanced features do.

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.
Control Algorithm - Please see HERE for more on this.
Change the selection at the top (highlighted RED) to Alpah_N, then save and close the program. The next time MegaTune is opened it will be in Alpha_N mode.
In order to come up with this value, MegaTune 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. Vertually 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.
Squirts 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 MS-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)
Engine Type: This 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.
More Engine Constants

Secondary Fuel Load: Secondary fuel load allows a second fuel table to be used for those who feel the need for 31x16 or 16x31 tables for example or blended alpha-n and speed-density. So if you decided to use the second fuel map you could do 20KPa to 100KPa (this would be out of boost) then on the second VE table have 100KPa to your boost limit (e.g. 200KPa).
(Dont get this confused with switchable maps, its not the same thing!)
Secondary Fuel: The secondary map values can either be multiplied as percentages to the main map or added to the main map where they cross over. (Multiply is the normal route here)
So when you come to tuning the second table you must remember that the VE will be the top line of the first VE table (100KPa for example using a boosted engine) multiplied by the relevant VE value in the second table. So say you were at 4000RPM and 150KPa (7PSI of boost), your VE would be the 100KPa line at 4000rpm (from the first table) x VE at 4000rpm and 150KPa point of the second table / 100. This doesn't really mean anything apart from the VE value may look odd, and MUST be 100 or above. So if set for Multiply: VE value of 80% in the main and 105% in the secondary you'd get 80% x 105% = 84% or if you had 100% and 120% youd get 120% (i.e. Main x Secondary / 100 = VE%)
Multiply MAP: This changes the way the VE table values function. The usual equation is to multiply the MAP value (along with other corrections, req_fuel, etc) to find the final Pulse Width. For some engines with very jumpy MAP signals it may be necassery to turn this off to get a smoother tune.
Incorporate AFR Targets: This includes the AFR table in the fueling equation. So once the VE has be dialled in to match the AFR table, future changes can be made using the AFR table alone.
Note: If you switch this on your fueling will completly change, so if you want to use this you will need to tune your map either from the start with it on or tune it all again when you turn it on.
Primary Ignition Load: What control algorithm is used for ignition (speed density, alpha-n etc.) See the tuning page HERE
Secondary Ignition Load: This enables a second spark table that allows blending between Speed Density and Alpha_N.
Note: The two tables are added together! Dont get this confused with switchable maps, its not the same thing!

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.
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:
Specific Bank 2 Setting: If all you're injectors are the same, most engines will use the same spec injectors for all cylinders, then keep this set to OFF. If you have staged injection or different injectors connected to each bank then you can specify those for Bnak 2 seperately by setting this ON.
Injector PWM Period: This is the time taken for each pulse to turn On-Off when the injector goes into PWM mode. Keep this around 100 - 40uS (66uS is typical)


Spark Mode: This is where you select the type of trigger pattern or setup you have. Toothed wheel is for Ford, Vauxhall, etc, crank wheels, like a 36-1, 60-2, etc, etc. Basic Trigger and Trigger Return are for distributor based setups, EDIS, RENIX, etc, are selections specific for your setup if you have that style of trigger input.
Trigger Angle Offset: This is used for Distributor based setups. Leave at ZERO for all other setups.
Skip Pulses: This is the amount of trigger inputs the ECU waits for before trying to start, this is to allow the cranking speed to stabilize. 3 is usual here.
Ignition Capture: This will be setup for your setup, basically if you have a VR input (multiteethed wheels) then this should be Rising Edge. If you have an EDIS or hall sensor input then it will be Falling Edge.
Spark Output: If your driving coils directly from the MS ECU then this must be Going High (Inverted) if you have 5V triggers to coils with built in ignitors then its likely to be Going Low (Normal) but please see the ignition manuals before connecting any coils to ensure this is correct or you may burn out your coils or drivers! See HERE
Number of Coils: Single Coil is for distributor based setups with a single coil. Wasted Spark is for coil pack engines which have one coil for two cylinders. COP is for single coils for each cylinder.
Spark A Output Pin: This should be set to the pin you used for Spark A, we recommend D14 and all the Drawings for MS-Extra show D14. EDIS is the only exception, it is JS10 ! See HERE

Fixed Advance: This is used to test your timing is correct using a strobe light. Select Use Table for normal use.
Use Prediction: This is the algorithm that the MS ECU uses to judge what time to fire the spark based on previous timings from the crank sensor. Every time the ignition fires the crank will accelerate a little. First Deriv Prediction is the usual method.
Cranking Dwell: Please see the ignition page for more on this HERE

There is an EDIS based noise filter and a trigger wheel based filter. See HERE for more info on this function.

Dual Table Use: The ECU can run each bank of injectors from a different VE table (2 in total) so you can have different fuels, etc. The idea for this was based on water injection, it is really for speciallist applications so leave it as Single Table unless you know what you'r doing.
Barometric Correction: NONE is no correction, it assumes 100%. Initial MAP Reading is taken when the ECU is first powered up, before the engine starts. This value is then remembered and used for the correction. If you have another sensor wired in then you can select Two Independant Sensors and then select the input pin that is used for the second sensor below, The ECU will constantly read the current baro pressure and correct fueling using that value.
Upper /lower Limit: If the ECU resets during running, the MAP sensor will see a lower (or higher if in boost) reading when it re-starts due to it being connected to the engine manifold. So here we can select the limits it should operate within. Usually 100KPa is upper and 90-95 is the lower, depending on where you live.
Default Baro: This is for use with Boost Control to tell it when you go above atmosphere and into boost. This should be set to your normal barometric reading. To find this value out, turn the ignition on and dont start the engine. Start the tuning software up and go to Extended - BaroMetric Correction. Youll see a gauge in the top corner, make a note of that value. Then go back to this setting and enter the value in here.
Input Smoothing Lag Factors: Decreasing the lags makes the values of the variables change slower than the input is changing. 100% is no lag. Generally 50% is fine in these.
New Variable Value = Previous Value + (New Value - Previous Value) * ( LagFactor/100*)
MAP Sample: This has been designed for ITB's or setups where the MAP fluctuates a lot during the compression stroke. The MAP can be taken from 0 - 100%, where 50% is half way between the fueling pulses. Generally 50% is fine, try altering it a little and see if the MAP decreases, basically you are looking for the lowest map at idle.
Fuel Table Size: Usually a 12x12 fuel table is big enough, but like most things we want it bigger, so now you can select 16x16 :o) ensure you re-tune your VE table if you change this as the fueling will look very odd at the top if you change from 12x12 to 16x16

This system can cut fuel, and or cut sparks in a round robin fashion and or retard the ignition.
Maximum Retard is the angle we back off to when we hit the Soft Limit RPM value. This pulls power out of the engine and helps to slow it down. Different engines react differently to this, some just drive through it, others you can feel slow down.
Hard Limit is the RPM that we either cut fuel or Sarks, or both (Note an EDIS based setup will not cut sparks as it has a limp home feature that will cut in) If you have Spark Cut set in the Algorithm then you can cut every X from Y spark events: e.g. Cut 4 out of 5 = - - - -* , - - - -* , - - - -*
Rev Limiter CLT based: The limit can be altered with coolant temperature, as a cold engine will need a lower limit than a hot engine. Usually the driver would know not to push the car untill it's up to temperature, etc, but you can adjust the rev limit depending on the coolant value.

This has to be set carefully as if you select IAC1 or IAC2 for example, as outputs (Enable them) and you have IAC stepper motor function enabled (these are the same pin on the processor) the code will find a config error and stop working untill the selection is fixed. Items like PM3 (LH LED), PM4 (RH LED) and PM5 (Middle LED) (LED 14, 16 and 15 respectively) are likely to be used as spark outputs.
You can soon tell which outputs are enabled by the green highlight beside the output pins name. Set the Power on value and Trigger Value as above for normal use. Once the threshold is made the output will come on. It will stay on untill the condition drops below the threshold by the hysterisis value, so abobve the output will come on at 86C and off at 81C. You can also select a second condition, for example TPS above 80% and coolant above 70% for a valve in the intake to change over, etc, etc.
Disabled If you don't have an oxygen sensor installed, choose 'Disabled' under EGO Sensor Type in MegaTune, and MS2-Extra (or MicroSquirt Running MS2-Extra) does not use the numbers in the AFR table to adjust the VE table numbers (as shown above) when calculating the pulse widths. There is no feedback.
Narrow Band O2 Sensor If you have enabled a narrow band oxygen sensor, choose 'Narrow Band' under EGO Sensor Type in MegaTune, and MegaSquirt-II will try to adjust the amount fuel injected, up to the limits you specify, to give the oxygen sensor voltage specified in the tuning software. The AFR table is not used, instead a single oxygen sensor voltage target is used.
IMPORTANT NOTE: Do NOT burn tables ('Calibrate AFR Table' or 'Calibrate Thermistor Tables') on a running engine. Even idle is NOT allowed, because these tables ONLY exist in flash, so once a table is erased, there is nothing but garbage in there until it is reprogrammed, one word at a time. Until that reprogramming is complete, operating the engine is unsafe.
Dual Narrow Band: You connect the second sensor to the ADC6 input with appropriate circuitry and it adjusts the PW2 output independently of PW1. You connect the second sensor to the JS5 hole (on a V3 main board) - X7 on a V2.2 main board, duplicating the R10, R11, C10 circuit from the v3.0 PCB in the proto grid area. There is only one calibration because it is assumed you are going to use the same type of sensor on each side. If there is a small difference, you can compensate for it in the separate AFR target tables.
Wide Band If you have a narrow band O2 sensor OR a wide band oxygen sensor & controller, choose the appropriate setting under Settings/EGO Control in MegaTune, and be SURE to go to Tools/Calibrate AFR Table and select your controller type. Make sure to have the MS2-Extra (or MicroSquirt Running MS2-Extra) connected and powered up while you do this - the calibration is saved for both MegaTune (on the PC) and to MegaSquirt-II (to which the calibration table is downloaded). Then MS2-Extra (or MicroSquirt Running MS2-Extra) will adjust the amount of fuel injected based on the AFR table until the sensor reports a voltage corresponding to the air/fuel ratio in the appropriate cell of the AFR table (for wide band) or switch point (for narrow band).
IMPORTANT NOTE: Do NOT burn tables ('Calibrate AFR Table' or 'Calibrate Thermistor Tables') on a running engine. Even idle is NOT allowed, because these tables ONLY exist in flash, so once a table is erased, there is nothing but garbage in there until it is re-programmed, one word at a time. Until that reprogramming is complete, operating the engine is unsafe.
Dual Wide Band: You connect the second sensor to the
ADC6 input with appropriate circuitry and it adjusts the PW2 output
independently of PW1. You connect the second sensor to the JS5 hole
(on a V3 main board) - X7 on a V2.2 main board, duplicating the R10,
R11, C10 circuit from the v3.0 PCB in the proto grid area. There is
only one calibration because it is assumed you are going to use the
same type of sensor on each side. If there is a small difference, you
can compensate for it in the separate AFR target tables.
Ignition Events per Step: (EgoCountCmp) This is the
number of 'sparks' the engine sees before adjusting the fuel amount
based on the EGO sensor feedback. Large numbers make the EGO feedback
respond more slowly, but also tend to make it more stable. Typically
this should be set 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 yours:
O2
adjustments per second = ((rpm/120) * cylinders) / ignition events
per step
Controller Step Size (%): (EgoStep) This is the amount the
EGO will be adjusted after the number of ignition events specified
above. Smaller numbers make the response more stable, but slower.
Typically a value of 1 sould be entered here once the engine is tuned
to a reasonable stage.
Note that the wide band control
algorithm does not use the constant step size controller algorithm
that was previously used in MS1-Extra, it now has a P (just
proportional) control algorithm, since it gives much more reliable
information than the narrow band sensor does. MS2, MS2-Extra (or
MicroSquirt) computes the difference between actual and target AFR,
then uses that to do what it thinks is the exact adjustment to pulse
width needed to attain the target AFR. So, step size and events don't
play a role at all and they are grayed out when the wide band
algorithm is selected.
Controller Authority ± (%): (EgoLimit) This is the maximum the EGO feedback is allowed to adjust the fuel from the VE table, regardless of the state of the O2 sensor feedback. Large numbers (50% to 80%) are better when the set-up is rough, smaller numbers (5% to 15%) are better when the VE table is 'dialed in'.
Active Above Coolant Temp (°): (EgoTemp) This is the lowest coolant temperature at which EGO feedback is allowed to operate. It is necessary to prevent the EGO feedback from working against the warm-up enrichments when the engine needs to be particularly rich while cold.
Active Above RPM: (RPMOXLimit) This is the lowest engine speed at which EGO feedback is allowed to operate. It is necessary for those engines that need to be rich while idling. (1200RPM is a typical value)
Active Below TPS (V): (TPSOXLimit) This prevents EGO feedback with either a narrow-band or wide band sensor from operating at wide-open throttle (WOT), because narrow band sensors are not effective at measuring the rich mixtures required. (70-80% of the throttle opening is a typical value)
Active Below MAP (kPa): (MAPOXLimit)
This prevents EGO feedback with either a narrow-band or wide band
sensor from operating at high loads, because narrow band sensors are
not effective at measuring the rich mixtures required.
WideBand
Lambda Sensor Users
If you are using a wideband lambda sensor then you'll need to set the MS2 ECU up for that sensor. this is easilly done by going into MegaTune and selecting Tools - Calibrate AFR Table. With the MS ECU powered up and on-line select your wideband sensor from the list and click OK
If you are using a Wideband lambda sensor you can set the AFR targets that the ECU will correct for in a table. The table does 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. Generally, you want it to be lean in the areas where it is lightly loaded and you want best economy. You may be able to run as lean as 17:1 in these areas. At WOT, conventional wisdom is that you want 13.0:1 at peak torque, and 12.5:1 at peak horsepower. Then blend the WOT and economy areas so that there is a smooth transition. You will have to do this twice if you have selected the dual table option.
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.
The Start/Idle settings are for setting the point at which the code decides that the engine is running rather than cranking. This should be set above your cranking RPM, typically 300RPM. The Cranking Fuel Pulse rate is how often the fuel is injected into the cylinders during cranking. The MS1 code was "Every Event" as standard, this means that for every ignition firing point the fuel is squirted in on both banks. It can be changed to Alternate Events if needed, this setting will double the cranking PW to compensate.
The Priming Pulse is the amount of fuel added when the ignition is first switched on. It is to help the engine start a little quicker during cranking. I tend to leave this at zero when messing about with the install, etc, as flooding can soon occur if your switching the ignition on and off a lot. So this is best set after the engine is running.
The MS1-Extra code had the option for a fixed value for this, or the same value as the cranking PW, so this can be set to a similar amount as before to get you going.
You can also set all the Warmup Enrichment and the After Start Enrichment Percentage. Simply write down your previous settings from MS1 and then convert them over to MS2:
|
MS1-Extra Settings |
MS2-Extra Settings |
.....
..........................
The Cranking Pulse is now a percentage of the Req_Fuel, so it may need to be re-tuned. It has been found that the default values are pretty close and it is therefore recommended that you start tuning using these as a base setpoint.
The After Start Enrichment is added to the base fueling map once the engine starts. The rate at which it decreases can be changed, as the warmer an engine is the less time it needs the ASE running for. This can be setup in the AfterStart Enrichment Taper table, try using the default settings to start with and see how it goes. Again this will need fine tuning for your setup.
.......
The MS2 daughter board has a built in stepper motor controller and it also retains the FIdle output if its needed. If you had an FIdle output using the MS1-Extra code then you will need to set this up as PWM, if you have a stepper motor wired in then you can set this up as a IAC Stepper, but remember the 2 programmable IAC outputs (programmable to switch on at xxRPM, or xxxTPS, etc) can not be used when using them as a stepper controller.
If you have an IAC stepper motor, you will have to choose between 'moving only' and 'always active'. If you set your stepper to 'always on' for 15 min or so and it doesn't feel too hot to you, then you can leave it that way. Apparently this is what General Motors does. But if you want to be safe you can test it on the bench for 15 min or so. It will get right warm, but it shouldn't burn your fingers just touching it. If it gets too hot, use 'moving only' instead.
Algorithm (IdleCtl): If you have a:
Fast Idle Valve (FIdle):
For an on/off fast idle valve, set the algorithm to 'Solenoid'. You can also set your Fast Idle Threshold if you have installed a fast idle solenoid. Enter a coolant temperature to turn on the fast idle solenoid. A typical value is 145º Fahrenheit. The Fast Idle valve will be activated below this temperature (145ºF) and turned off above 145ºF. The Fast idle Threshold is independent of any warm-up enrichment. Fast idle valves generally have one or two wires.
PWM Warmup: This is for the Ford or Bosch pulse width modulated idle air valves. Ten temperature dependent levels of PWM are user specifiable if this option is selected (see 'Idle PWM Dutycycle' under 'Tables'). Modifications to the board are required, see this link for more details.
Idle Air Controller (IAC): If you have a stepper motor IAC, you can set the IAC Start position, as well as ten intermediate positions based on the coolant temperature to allow a decreasing amount of "extra air" as the engine warms up. These are set under 'Tables/Idle Steps' in MegaTune. Stepper motor IACs usually have four wires.
IAC Stepper Moving Only: Powers the stepper only when changes in pintle position are requested. This is the most common type, it holds its position if not powered, and is difficult to turn by hand.
IAC Stepper Always On: Powers the stepper at all times. Required if your stepper 'free wheels' when you spin its pintle un-powered with your hand.
15 Minute IAC: This operates the IAC stepper motor as 'always on' for 15 minutes, then switches to 'moving only'. This can be useful in some situations in which the stepper moves unreliably if moving only at the lower voltages of cranking and warming up, etc.
To select the appropriate 'Idle Control/Algorithm' for stepper motor control in MegaTune you may need to do some testing. In some cases setting the stepper motor to "IAC Stepper Always On" will cause the IAC to get hot. However setting it to "IAC Stepper Moving Only", might cause a problem with idle speed changing from one start to another.
You can test if your IAC is suitable for 'always on' by leaving your stepper powered on the bench for 15 min or so. If it doesn't feel too hot to you, then set it to "Always On". Apparently this is what GM does. But if you want to be safe they should test it on the bench for 15 min or so, or monitor it closely in the car while not moving for at least 15 minutes, checking the IAC temperature frequently with your fingers. It may get warm, but it shouldn't burn your fingers just touching it.
Leave the other values (below) alone, you can experiment with them when you get the engine running.
Time Step Size (ms) (IACtstep): IAC stepper motor nominal time between steps (i.e., 2.5 milliseconds gives pulse frequency of 400 Hz).
Acceleration Step Size (ms) (IACaccstep): not currently used.
Number of Acceleration Steps (IACnaccstep): not currently used.
Start Value (IACStart): The number of steps applied to retract the IAC pintle to 'wide open' at power up.
Cranking Position (IACcrankpos): During cranking, extra air may be useful in the same way as extra fuel in cranking pulses. The table value for the starting temperature may be fine after the engine has started up, but during cranking more power may be needed, especially if the starting temperature is cold. To provide this, you can input a step position that provides a larger than normal air opening during cranking. So, if in cranking and 'Cranking Position' < table value, then the IAC motor position (or PWM%) is set to 'Cranking Position', and when cranking is done, the motor position starts tapering (over the 'crank to run taper time') up to the table value over a user input period, typically a few seconds. (See the diagram below) If this feature is not desired, Just set 'Cranking Position' to a value higher than any table value. Then the table value will always be used since it provides more opening.
Crank-to-Run Taper Time (IACcrankpos): This is the time over which the cranking position of the idle (either the stepper steps or the PWM%) is moved to match the table value (see diagram below). Higher values give a higher idle for longer periods, which can improve starting performance.
Hysteresis (°) (IdleHyst): This input can be used to avoid continuous motor motion (and wear) for small coolant temperature changes. Changes to the motor are only made when new coolant temperature> coolant temperature on the last move, or, new coolant temperature < (coolant temperature on the last move - Hysteresis temperature). What this does is allow constant motor motion while the coolant temperature is rising, but when it peaks, there will be no further motion unless things cool back down - which is unlikely.
Time Based After Start (extended warm-up): You should NOT
use the Time Based After Start (extended warmup) option unless
you find you need it, and very few will. Disable it by setting the
'cold temperature to -40°F. Then this feature will not be used
unless the coolant temperature at startup (ECU first powered on) is
below -40°F. This feature is used toward the end of the warmup
sequence when the coolant temperature is close to its final operating
temperature. In this case, fast idle will normally come off, but SOME
cars (very few) may need extended fast idle. An example is a car that
uses heavy weight oil, which is nowhere near at operating temp when
the coolant gets there, plus a hot cam with not enough idle torque to
overcome the oil drag.
This feature is implemented by inputting a
'Cold Position' that is the step position at start of extended
warmup, typically about 80% of the final, fully closed step position.
The IAC behaves normally until the step position commanded from the
table just exceeds this Cold position value (either PWM or stepper).
From that point on, the steps are tapered in so as to reach the last
step value in the table over the 'cold taper time' period. (see the
diagram). This slows the reduction in idle air as the engine
continues to warm up (increasing the idle speed for longer than the
coolant temperature alone would do).
When using the PWM mode it has a table to set the Duty Cycle. In MS1-Extra there were 2 set points, one for hot, one for cold and the code would interpole the value from those points. The original values used in MS1-Extra can be converted over to MS2-Extra:
|
MS1-Extra Settings |
MS2-Extra Settings |
...............

The MS ECUs have a table within the fueling calculation algorithm that changes the fueling depending on the barometric correction. To use this table, 99% of users, keep this graph at 100%. If you feel your fueling has altered during the climb up a mountain then this may be an area to look at, but it really should be the last resort.

This allows for some advance to be added to the base ignition map when the engine is cold, this aids warmup time and helps to increase the idle speed during the cold period of warmup. Ensure the last bin is just below the operating temp (71C) and is set to ZERO so it follows te ignition map above that temperature.
MAT (Manifold Air Temp) Based Ignition Retard

As air warms up it looses density, tis increases the likely hood of detonation, especially in boosted engines. This can remove advance from the base map when air temps reach the limit to help reduce knock. Ensure the first bin is the usual air temperature you experience, 60-90C and is set to ZERO like the above.
The MS2-Extra code also allows the user to fine tune the amount of correction given for the Air Density calculations that is worked out using the air temperature sensor. This compensates for some heat saturation from the plenum, or intake if the air sensor is in a particularly prone position to heat up due to heat saturation from the engine. This should be set to Zero for starters so the standard Air Density correction factor is used.
Over Run Fuel Cut

This is to help cut fuel bills. Basically when your in gear and the engine is on overrun (no throttle, slowing down with the engine) there is no point in fueling it. So we can cut fuel during that period, to do this look through datalogs and see where your MAP drops to during over run, ensure that the MAP doesn't wander that low when your cruising or driving normally! Set the KPA Lower value to just above the minimum it goes on overrun, this is best to ensure it is at least 10KPa lower than your crusing KPa. Delay is usually fine at 2S. Ensure the RPM is greater than 1200ish to allow the fuel to cut back in as the engine slows.
For normal setups this should be OFF.
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 flow rates of the injectors. 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-hysterisis 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. The change over is gradually switched in by the Staged Gradual Transient, in this example it will take 55 ignition events before the staged injection has fully switched over to the 2 injection banks.
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. A secondary switch point (Staged Injection Second) can be added to the mix. This allows the use of another parameter to switch the staged injection point on or it can be used so both setting have to be satisfied before the staged injection point is reached..
The MS2-Extra code can switch between 2 different Fuel
(VE table) and or Spark tables at a specific set point whilst the
engine is running. This can be done based on RPM, TPS, MAP KPa or
even using an external switch, e.g. when LPG switches on. Once the
setpoint has been made the fueling and or spark map will be
instantanously swapped over to Fuel VE Table 3 and Spark
Table 2 respectively. (Fuel VE Table 2 is reserved for Dual
Table)
To use the hardware switched input please see HERE

To help the engine idle smoothly an Idle Advance function has been added. This allows you to fix the advance when the engine needs to be stable. The table is to allw for the advance t increase if the engine starts to stumble (this usually happens with an increase in MAP) so as the map increases it can help to add some advance to allow it to stabalize again.

The MS ECUs correct for dwell (Charge time) times using the standard correction table, as above. This should only be altered from the above if you have specific data about your coils!
For Ignition Settings, etc, please see the General Ignition Manual HERE
If you have a question, comment, or suggestion for these manuals please post it on the forum
No part of this manual may be reproduced or changed without written permission from Philip Ringwood, James Murray, Ken Culver and Lance.