<h2>Ignition Control with MegaSquirt[sup]II[/sup]</h2> To provide improved engine performance, better fuel economy, and reduced exhaust emissions, MegaSquirt[sup]II[/sup] can control spark advance (timing), and this advance is programmable by the user.
For MegaSquirt[sup]II[/sup] (as for most other ignition systems), the total ignition advance is based on three factors:
Total advance = initial advance + RPM based advance + vacuum advance
In particular, MegaSquirt[sup]II[/sup] uses
three variables to determine the total advance (called
adv_deg).
- The first is the relevant value from the engine speed and load table, called ign_table(rpm,kPa), combining the RPM based advance and vacuum advance in one 12x12 table.
- The second is the trigger offset (adv_offset in the code), which appears to be roughly equivalent to the initial timing, but is really the difference between the trigger and next TDC in degrees (it is frequently used as the base timing in 'bypass mode' when the module is not connected to the MegaSquirt-II, and also when 'trigger rise' is set as the cranking advance).
- And the final value is the cold_adv_deg, an enhancement not available in many ignition systems, which is a 1x10 table based on engine coolant temperature (clt).
Note that you specify the total advance in MegaTune. That is, you calibrate the trigger offset, then put the timing you want in the MegaTune advance table. So if you have calibrated your trigger offset (suppose it is 10°), and want 25° BTDC for the advance, you put 25° in the MegaTune table (
not 15° or 35°).
In the code, these factors are in tenths of a degree ([sup]1[/sup]/[sub]10[/sub]°). These values must be positive, so
adv_offset sets the minimum amount of advance possible.
In general:
- Low MAP (low engine load) = more spark advance
- High MAP (high engine load) = less spark advance
- Low CLT (cold engine) = more spark advance
- High CLT (warm engine) = less spark advance
- Low RPM = less spark advance
- High RPM = more spark advance
The spark advance table is a 12 by 12 matrix (144 values) based on engine RPM and MAP sensor values. A further table of 10 values is used to make adjustments for engine coolant temperature.
<h3>Example Spark Advance Table</h3> [ign_table(rpm,kpa)]
KPa
130 0.0 2.0 6.0 10.0 14.0 18.0 22.0 26.0 30.0 31.0 32.0 32.0
120 0.0 3.0 7.0 11.0 15.0 19.0 23.0 27.0 31.0 32.0 33.0 33.0
110 0.0 4.0 8.0 12.0 16.0 20.0 24.0 28.0 32.0 33.0 34.0 34.0
100 0.0 6.0 10.0 14.0 18.0 22.0 26.0 30.0 36.0 36.0 36.0 36.0
90 0.0 8.0 11.0 15.0 19.0 23.0 30.0 33.0 35.0 36.0 36.0 36.0
80 2.0 8.0 12.0 16.0 20.0 24.0 30.0 34.0 35.0 36.0 36.0 36.0
70 4.0 8.0 12.0 16.0 20.0 24.0 30.0 34.0 35.0 36.0 36.0 36.0
60 6.0 10.0 14.0 18.0 22.0 26.0 31.0 34.0 35.0 36.0 36.0 36.0
50 8.0 12.0 16.0 20.0 24.0 28.0 32.0 35.0 36.0 36.0 36.0 36.0
40 8.0 14.0 18.0 22.0 26.0 30.0 34.0 36.0 38.0 38.0 39.0 40.0
30 8.0 16.0 19.0 23.0 27.0 31.0 34.0 37.0 39.0 40.0 41.0 42.0
20 8.0 16.0 20.0 24.0 28.0 32.0 34.0 38.0 41.0 44.0 46.0 46.0
RPM 500 750 1000 1500 2000 2500 3000 3500 4000 4500 5000 5500
Spark advance entries in the 12×12 MegaTune spark table are expressed in engine degrees, and can be specified in tenths of a degree ([sup]1[/sup]/[sub]10[/sub]°). Note that they are the actual timing before top dead center (BTDC), and
include any trigger offset.
<hr/>