Introduction to TunerStudioMS | Installation | File | Options |
Data Logging | Fuel Set-Up | Other Fuel Set-Up | Ignition Set-Up |
Basic Tables 'Basic Tables' are displayed as 12x12 'spreadsheets' to allow easy viewing of the numbers in the tables. This is best for setting up the tables. For tuning the tables in the vehicle or on a dyno, see the 'Tuning' menu item. These can be indexed to MAP or MAP/Baro.
|
Basic Tables
These can be indexed to MAP or MAP/Baro.
|
Basic Tables
This can be indexed to MAP or MAP/Baro.
|
Other Tables |
Tuning
Tuning offers a 3-D view of the table a a number of gauges simultaneously, so is a good place to be when actually tuning. |
Cylinder trims | X-Tau Tuning | Other Tuning |
Communications | Tools | Help |
The cross-platform Java software application you use to tune and configure your MegaSquirt® or MegaSquirt-II is Tuner Studio by Phil Tobin. You also need a computer (a laptop or notebook computer if you want to tune in the car) and a conventional serial port to communicate with MegaSquirt-II™. A USB/serial converter may work, and many people have reported that they have been successful using a USB-serial adapter. Just about any computer that is capable of booting Windows 95 (or better) will be fast enough, but get the fastest laptop computer you think is reasonably priced, obviously. This document covers the use of the 3.7 versions of embedded software (aka. "code") on MegaSquirt-II™.
Overview
This documentation, while written for the Sequencer™ controller, also applies to MicroSquirt® controllers using v3.x code, and differences in configuration have been noted where applicable. As of 8/5/2011 the latest code version is v3.770 and it is to this code that this document applies.
The Sequencer™ controller consists of three parts: a MicroSquirt®-like section containing the main processor, a routing processor, and a Complex Programmable Logic Device (CPLD) that is configured by the routing processor and then does the spark routing when directly triggered by the IGN1, 2 signals from the main processor. The routing processor also handles routing of the fueling outputs, which are triggered from the main processor by sending a tach pulse for each cylinder or cylinder pair injection, followed by an INJ1 pulse whose duration compresses the actual pulse width to the nearest +/- 6 microseconds. Both Sequencer™ controller and MicroSquirt® controller V3.0 pcb incorporate a new, more robust VR circuit.
The new 3.x code is the only code that can be used with the Sequencer™ controller and it can also be used with any MicroSquirt® controller. Between these two ECUs, the following engine configurations can be supported:
Summary of Sequencer™ controller V1.04/ MicroSquirt® controller V3.0/ Code V3.x Upgrades/ Input Notes
This summary and the following section on model based code are most meaningful for people who are already familiar with MegaSquirt® and MicroSquirt® controllers and code. For those who are new, you can skip these sections and come back to them later, after starting on input configuration and tuning.
The most significant upgrades in Sequencer™ controller and MicroSquirt® controller with the new code v3.x are as follows:
This code also simplifies the Fuel Injection Timing logic by allowing the user to enter start of injection in crank degrees relative to TDC compression of cylinder 1. The same relative timing will automatically be applied to all other cylinders, taking account, with some limitations, of odd-fire offset.
Finally, this option also adds the capability of entering separate sampling angles, in crank degrees relative to TDCC1, for MAP and MAF. This sampling is now separate from injection start angle.
Note that you must cycle power afterward if CPWOption is changed. Note also that there is no control of when injections begin during cranking when the simultaneous CPW option is used (because it makes no sense). Another thing to note is that fuel trim is not added into the cranking pulse width. Finally, when the mode changes from wasted to sequential during cranking, simultaneous CPW continues until past cranking rpm.
Old Equation:
New Eq (model-based):
This is important because now AFRTGT has a big effect on fueling and ReqFuel is used only with MAP.
These pins are on the Router processor and using them is completely transparent to the user. You use them just as you did A0 and M3, but wire to pins 31 (old A0) and 20 (old M3) on the Red (output) Ampseal. They can also both be turned on/off via a CAN message from the main processor to the Router.
In addition, a third GPIO input from the Router, with 5 Volt pull-up, was added on Ampseal pin 30 for possible future use. This could also be used as a PWM output controlled via a CAN message to the Router, but the pull-up would have to be removed. The following table summarizes this:
Outputs | Function | Control |
Router PT0 (Red Ampseal R-PW0, pin 31) | GPIO PWM | ECU, CAN device CAN device |
Router PT1 (Red Ampseal R-PW1, pin 20) | GPIO PWM | ECU, CAN device CAN device |
Router PT3, w/ pull-up (Red Ampseal SEQ-PT3 pin 30) | GP Input PWM (remove pull-up if output) | CAN device CAN device |
Note that for 3.7 Code, the first thing you must do after loading code is set the ECU Type (under 'Fuel Set-Up/General') to match your hardware (MS-II™ or MicroSquirt® controller), TunerStudioMS will not let you change anything else until you do this. Do not change settings, expect the stimulator to work, load an MSQ, etc., until you have set the ECU Type (MS-II™ = 1, MicroSquirt® = 2, the MS-II Sequencer™ controller™ will be 3). This setting applies to MS-II™ derivatives with code 2.8 or higher code only.
ECU Type setting was inserted to head off the potential MicroSquirt® problems due to the coils being turned on with the old default configuration. As of the 2.8+ code, if ECU Type is not set, the code will put the ignition outputs in a safe state (cycling the tach display from 0 to 8000 rpm, and also flashing the fuel pump LED) and wait until a known ECU type is put in by the user.
TunerStudioMS is a cross-platform Java-based MegaSquirt® configuration editor software. It is written by Phil Tobin, and it used for the MegaSquirt® and MegaSquirt-II EFI controller. It allows all of the tuning and set-up parameters to be modified and has a real-time VE table editor, which allow a vehicle passenger to tune the engine while driving.
General Advice and Operation Some general principles to follow when setting the configuration parameters are:
Note that it is possible to damage your engine by choosing inappropriate tuning or set-up parameters in TunerStudioMS. Be sure to read this document, and all associated tuning documents that apply to your engine, vehicle, and tuning circumstances. In particular, read the safety precautions.
Information on tuning using tuning software with MegaSquirt® or MegaSquirt-II is listed separately from this section, and depends on the processor you have.
Note: for installing TunerStudio, please see the TunerStudio web site: www.efianalytics.com/TunerStudio/
Communications/Settings You need to set the appropriate communications parameters to communicate between the PC and the controller. You do this in a dialog on the TunerStudioMS menu called 'Communications/Settings':
There are two parts for any firmware release:
If you download a different .s19 file (i.e., a different embedded code version) to your MegaSquirt® EFI Controller, then you must install the corresponding INI file in the place expected by TunerStudioMS.
If the INI file does not correspond to the code you have load, TunerStudioMS will generate an error message when starting. The error you see is telling you that the signature in the INI doesn't match what TunerStudioMS is receiving from MegaSquirt. This can be for a number of reasons, the most common are:
TunerStudioMS can store and retrieve set-up files, both entire set-ups (.msq files), and VE table files (.vex).
For the 3.7 code version, the datalogged variables are:
Datalog Label | INI Variable | Code Variable (outpc.) | Description | |||||||||||||||||||||
Time | time | none | This is a time variable generated by TunerStudioMS that counts up with the tuning PC's clock. It is helpful for spotting gaps in the datalog (which can be caused by changing dialog pages (datalogs are not recorded if the user is on some pages) or communications issues.) | |||||||||||||||||||||
SecL | seconds | seconds | This is the internal CPU clock from the controller's processor. | |||||||||||||||||||||
RPM | rpm | This is the engine rpm (revolutions per minute). | ||||||||||||||||||||||
MAP | map | map | The engine intake manifold kPa from the Manifold Absolute Pressure (MAP) sensor. | |||||||||||||||||||||
Tbl Indx | kpaix | kpaix | The current MAP value (above) divided by the current baro value to be used as an alternative load index. Baro pressure is not in the default datalog (the baro correction amount, Gbaro is, but not the baro value the correction is based on). Baro can be added by including the line:
in the [Datalog] section of the INI. | |||||||||||||||||||||
MAF | maf | maf | This is the Mass Air Flow value determined from the MAF sensor feedback and the MAF table. | |||||||||||||||||||||
TP | throttle | tps | Throttle opening position in %, 0% is closed, 100% is WOT, if the TPS has been calibrated properly. | |||||||||||||||||||||
vBatt | batteryVoltage | batt | This is the battery voltage as measured at MegaSquirt-II. | |||||||||||||||||||||
if NARROW_BAND_EGO O2 elif LAMBDA else | egoVoltage lambda1 afr1 | ego1, ego2 | This is the ego sensor output voltage (if a narrow band sensor is selected). | |||||||||||||||||||||
IAT | mat | mat | The intake air temperature in °F or C, depending on your settings. | |||||||||||||||||||||
CLT | coolant | clt | The coolant temperature in °F or C, depending on your settings. | |||||||||||||||||||||
Engine | engine | engine | Engine Operating/Status variables - bit fields for "engine" variable. This value will tell you if the engine was accelerating, warming-up, etc., and can be used to troubleshoot by telling you if accel enrichment, warm-up, etc. was active at any given time.
Note that running and cranking are allowed at the same time, so you will normally see 3, not 2, while cranking. | |||||||||||||||||||||
Gego | egoCorrection | egocor1 | This is the percentage correction to the fuelling pulse width used to adjust the pulse width calculated from the fuelling equation based on EGO sensor feedback. | |||||||||||||||||||||
Gair | airCorrection | aircor | This is the percentage correction to the fuelling pulse width used to adjust the pulse width calculated from the fuelling equation based on intake air temperature (IAT) density correction and the ideal gas law. | |||||||||||||||||||||
Gwarm | warmupEnrich | warmcor | This is the warm-up percentage correction to the fuelling pulse width used to adjust the pulse width calculated from the fuelling equation based on coolant temperature (CLT) and the warm-up enrichment table (WUE). | |||||||||||||||||||||
Gbaro | baroCorrection | barocor | This is the barometric pressure percentage correction to the fuelling pulse width used to adjust the pulse width based on the user's setting for baro correction (2-point, table; start-up, real-time, etc.). | |||||||||||||||||||||
Gammae | gammaEnrich | gammae | This is the 'net' percentage correction to the fuel pulse width from the other gammas - air density, warmup and barometric corrections (but not including accel enrichments). | |||||||||||||||||||||
AccelEnrich | accDecEnrich | tpsaccel | This is the 'net' correction (in milliseconds) to the fuel pulse width of accel enrichments, including TPSdot, MAPdot, and X-Tau, where used. | |||||||||||||||||||||
Gve | veCurr1 | vecurr1 | This is the current interpolated VE value used for the fuelling equation for injector driver #1 (and #2 if not using dual tables), based on the current rpm and MAP value (or alpha-N conversion table, where appropriate). | |||||||||||||||||||||
PW | pulseWidth1 | pw1 | This is the injector pulse width time in milliseconds (including the opening time) for injector driver #1 (and injector driver #2 unless you are using the dual table option). | |||||||||||||||||||||
DutyCycle1 | dutyCycle1 | computed by TunerStudioMS | This is the duty cycle of injector driver #1 (and injector driver #2 if dual tables option is not selected). The duty cycle is the percentage of the time available that the injector is opening or squirting. Values over 100% are not physically possible, and indicate that the settings in TunerStudioMS exceed the capabilities of the injectors (which may be too small). | |||||||||||||||||||||
Gve2 | veCurr2 | vecurr2 | This is the current interpolated VE value used for the fuelling equation for injector driver #2 if using dual tables, based on the current rpm and MAP value (or alpha-N conversion table, where appropriate). | |||||||||||||||||||||
PW2 | pulseWidth2 | pw2 | This is the injector pulse width time in milliseconds (including the opening time) for injector driver #2 if you are using the dual table option. Otherwise it has no meaning. | |||||||||||||||||||||
DutyCycle2 | dutyCycle2 | computed by TunerStudioMS | This is the current interpolated VE value used for the fuelling equation for injector driver #2 if using dual tables, based on the current rpm and MAP value (or alpha-N conversion table, where appropriate). | |||||||||||||||||||||
SparkAdv | advance | adv_deg | The spark advance as seen at the crank shaft, including the all the factors such as trigger offset, spark table value, temperature corrections, etc. It is what you should see on a timing light, if you have set everything up correctly. | |||||||||||||||||||||
knockRet | knockRetard | knk_rtd | This is the current amount of ignition retard being subtracted from the spark advance table 'look-up' value when knock is detected. It is determined from the user inputs. | |||||||||||||||||||||
ColdAdv | coldAdvDeg | cold_adv_deg | This is the current amount of ignition advance being added to the spark advance table 'look-up' value advance when the coolant temperature is low. It is determined from the user inputs. | |||||||||||||||||||||
Dwell | dwell | coil_dur | This is the actual computed dwell output, including all corrections. Does not apply to Ford EDIS. | |||||||||||||||||||||
tpsDOT | tpsDOT | tpsdot | This is the current rate of change of the throttle position sensor - TPS - output (%/sec). | |||||||||||||||||||||
mapDOT | mapDOT | mapdot | This is the current rate of change of the manifold absolute pressure (MAP) sensor output (kPa/sec) | |||||||||||||||||||||
IAC | iacstep | iacstep | This is the current position (number of steps) of the stepper motor from the fully retracted position. | |||||||||||||||||||||
deltaT | deltaT | dt3 | The time delta (interval, aka. ΔT) between rpm pulses in microseconds. It is the time between skip teeth - the processor is interrupted every time a tooth arrives, when it counts 12 teeth, as in your case, it calculates deltaT as the difference between present CPU clock time and the saved clock time 12 teeth ago. It is accurate to within better than a microsecond, because all the times are stored at the time the tooth arrives, even if the interrupt isn't entered until a bit later because there was another interrupt at that instant. | |||||||||||||||||||||
Trigger± | trig_fix | trig_fix | The code for toothed wheels checks for missing or extra teeth and handles them if they occur, but only allows one or 2 corrections in a row. More than two corrections and it re-synchs.
The code works like this: when a tooth input arrives, the code checks the new time between teeth against the previous time between teeth. The processor compares the time between teeth = present time - last tooth time, with the previous time between teeth. If the new tooth time is within PulseTol % of the old, it is accepted. If it is out of tolerance too long, the trigger± counter counts down (missing tooth), if too short it counts up (extra tooth). Account is taken of whether it is time for the missing tooth, so the counter is not changed in this case. Also, if 1 tooth is missed, it adds in a virtual tooth, and if there is an extra tooth it ignores it. But it only does this one time in a row, then the next time between teeth must be in tolerance or the ignition input resynchs. However this cycle can repeat indefinitely as long as there is a good tooth after the bad tooth. This will tell users when they have noise or weak signal issues. When trigger± counts down it means that it is losing tooth pulses, that is,a pulse is coming in much slower than the previous two, as if there were a missing tooth, but the missing tooth is not where its supposed to be. If this only happened once in a great while, the ECU would insert a tooth and keep going, but if it happens twice in a row it declares resynch (and forces rpm to 0), then it waits to get two regular teeth, then looks for the missing tooth, etc. It works like this precisely because the timing can get very screwed up if the controller were to keep putting in teeth, so there is a lot of error checking and if things don't look right, the safest course is to resynch. When it resynchs the timing goes back to normal, so at worst you might miss a tooth, go back to sync, miss a tooth, etc, but you won't end up 180° out of time. If trigger± counts up, it means the controller is seeing noise, that is extra teeth that don't really exist. It discards these extra teeth signals. | |||||||||||||||||||||
Sync Stat | synch | synch | This is the sync status. | |||||||||||||||||||||
tachCount | tachCount | tachCount | Counts tach pulses for use in correlating datalog values with tach pulses (at low rpm). | |||||||||||||||||||||
XTau1 | xTauFuelCorr1 | XTfcor0 | This is the current X-tau fuel correction for injector driver #1 (and injector driver #2 if not using the dual table option). | |||||||||||||||||||||
XTau2 | xTauFuelCorr2 | XTfcor1 | This is the current X-tau fuel correction for injector driver #2 if using the dual table option. | |||||||||||||||||||||
E85fuelCorr | fuelCorrection | fuelcor | This is the current fuelling correction based on the fuel composition sensor feedback and the flex fuel settings. | |||||||||||||||||||||
Ethanol% | fuelComposition | computed in TunerStudioMS from default values | This is the current calculating ethanol percentage in the fuel based on the flex fuel sensor feedback. | |||||||||||||||||||||
AFRtrgt1 | afrtgt1 | afrtgt1 | This is the current target value from the AFR table for the current operating conditions (rpm and MAP kPa). | |||||||||||||||||||||
knck-V | knock | knock | This is the current knock signal voltage. |
Note that there are a number of other items that could be included in a datalog, these are shown in the [OutputChannels] section of the INI.
This will close TunerStudioMS.
On the main TunerStudioMS menu is an item called 'Settings/General'. You can set these as follows:
It includes the runner volume plus any plenum volume. You can measure this by removing the manifold and measuring the amount of water it takes to fill it.
If you don't want to measure the manifold, and it is a fairly standard configuration, the default is 2400 cc's; and this is for a typical V8 single plane 'spider-style' manifold. For a 4 cylinder engine, you might use ½ this value (1200 cc), and for a 6 cylinder you might use 1800 cc).
There are 453.6 grams in a pound, and 3600 seconds in a hour, so if you are using gasoline:
For cc/min, one milliliter of gasoline is roughly 0.737 grams. 1 cubic centimeter (1 cc) equals 1 milliliter (for example: 5000 cc = 5000 milliliters = 5.0 liters). The density of gasoline is 0.737 g/mL and there are 60 seconds in a minute, so:
Here is a calculator to help with the conversion of the usual injector flow rates to grams per second as used by MegaSquirt® controllers: