Megasquirt 3 - Ignition settings

Home

This page has now been superceded, please click here

Ignition Options/Wheel decoder - Dwell battery correction - Dwell vs RPM - Cold Advance - MAT-based timing retard - Noise Filtering - Knock Sensor Settings - Knock Sensor Parameters - Knock Window Settings - Knock Coolant Scaling - Ignition tables 1-4 - Rotary Settings - Rotary Split Table - Cyl x-x trim

Ignition Options/Wheel Decoder
Ignition options page

The left hand side :
Spark mode - this sets the type of tach input pattern decoder to be used. For detail on the various modes see here
Trigger Angle/Offset - There are three different ways this setting is used:

  • In Basic Trigger and Trigger Return it specifies the engine angle BTDC that each trigger pulse is received.
  • In Toothed Wheel it should always be set to zero - use tooth#1 angle instead.
  • In other modes this setting can make a +/- 20 degree adjustment to the preset timing alignment.
    Angle between main and return - This is only used in CAS 4/1 mode and specifies the angular length of each tooth.
    Oddfire first angle - For oddfire engines this specifies the angle the engine must rotate from spark A output to spark B output.
    GM HEI/DIS options - With HEI7/8 this setting enables the "bypass" output on spark B.
    Ford TFI options - This allows you to enable Signature PIP mode if you have a Signature PIP distributor, where one vane is shorter than the others. Signature PIP mode is used with "Basic Trigger" and allows the Megasquirt to use these distributors for sequential fuel.
    Oddfire phasing - Oddfire Chevy V6 engines use alternate long/short angles between cylinders. Yamaha Vmax use a paired long/long/short/short pattern.
    Skip Pulses - This tells the code how many input pulses it should ignored before attempting to match the input pattern. The default value of 3 is suitable for most applications.
    Ignition Input Capture - This must be matched to your tach input. If it is set incorrectly you can experience timing drift with rpms or misdetection of missing teeth on a missing tooth wheel. The tooth logger can be used to confirm polarity is correct.
    Spark Output - This setting is CRITICAL or you will melt your ignition coils. For 99% of installs using the MS3X spark outputs, this should be set to "Going high (inverted)". See the ignition outputs section.
    Number of coils - Specifies the type of ignition coils in use. The code automatically chooses the number of outputs to use.
  • Single coil - just one coil or spark output. e.g. single coil, TFI, HEI, EDIS
  • Wasted spark - one double ended coil for a pair of cylinders. i.e. 2 spark outputs on a 4 cyl.
  • COP - coil-on-plug - one coil per cylinder fired once per cycle (typically needs a cam sensor)
  • Wasted COP - one coil per cylinder fired twice per cycle (typically does not need a cam sensor.) Coils are wired the same as COP.
  • Dual dizzy - for engines with two coils and two distributors e.g. Lexus V8.
    Spark hardware in use - Either MS3X or LEDs. The MS3X outputs are ready to use logic spark outputs. The "LED" spark outputs require DIY board customisation and are covered in the MS2/Extra manuals.
    Cam input - Either MS3X or JS10. The MS3X input is ready to use. JS10 requires DIY board customisation.
    The remaining settings apply to Toothed Wheel and are covered in that section of the manual.

    The right hand side :
    Fixed advance - When set to "Fixed Advance" the spark timing is locked to the value set below. This is used for confirming timing with a strobe timing light during setup. (See also Checking Timing.) For normal operation, this MUST be set to "Use table" so that the spark advance table is used.
    Use Prediction - Normally set to "1st Deriv Prediction". Alters the way the internal spark timing calculation functions. With no prediction, spark retard may be observed during engine acceleration. With 1st Deriv, this is automatically compensated for.
    Timing for Fixed Advance - only applies when "Fixed Timing" is set above. Timing is then locked to this specified value.
    Cranking dwell - specifies the base coil dwell time during cranking before battery correction is applied.
    Cranking advance - specifies the ignition advance to be used while cranking. Typically 5-10 deg BTDC.
    Toyota Multiplex - enables specific multiplexed outputs for use with the Toyota ignition module such as used on the 7MGTE.
    Dwell type - Can be "Standard Dwell", "Fixed Duty", "Time after Spark", "Charge at Trigger"

  • Standard Dwell - this is the setting to use for most installs. i.e. regular coils that are fired by a module or with internal drivers or logic-level COPs. This is also used with GM-HEI7 and GM-DIS.
  • Fixed Duty - locks the spark output to a constant duty cycle instead of controlling dwell. This is typically used for ignition modules that control the dwell directly, including Ford's "Push Start" TFI modules, Bosch "smart" ignition modules, or MSD and other capacitive discharge boxes.
  • Time After Spark - only intended for Saab Tri-Ionic DI cassettes that require a backwards dwell signal.
  • Charge at trigger - rarely used. Could be used with MSD type CDI boxes when running Basic Trigger only. Do not use with multi-tooth wheels. Do not use with direct coil control or COP type ignitions as the dwell varies with rpm and advance.
    Use dwell vs rpm curve - For Saab Tri-ionic and time-after-spark, the dwell can be varied with rpm.
    Nominal dwell - The base dwell time before battery voltage correction. (With the standard correction curve, this time is applied at 14V) Typical values are 3-4 ms.
    Spark duration - The time required for the spark to complete, typically in the order of 1 millisecond. Note that in older single-coil systems with many cylinders, the dwell time can be constrained at higher rpms as there isn't enough time between cylinders for the desired dwell and spark. The dwell time is automatically reduced in this case (this is the reason for stock HEI ignition being weak above 5000rpm on V8s.) With wasted-spark or COP there is far greater time between ignition events and this dwell-reduction rarely occurs.
    Dwell time - the backwards dwell time for Time-After-Spark
    Dwell duty - for fixed duty, this specifies the %age duty cycle of the output signal.
    Spark Hardware Latency - all electronic devices take a finite time to propagate signals and switch. This setting allows for that slight delay. If you notice a slight retarding of ignition timing with rpm while strobing with fixed timing, you can enter a small number in here to remedy it.
    Middle LED indicator - for Trigger Return mode only, the middle LED on the case can be used to echo the input signal from the distributor to help in setting up the base timing.
    Spark Trim - enables the adjustment of timing per individual cylinder. This requires a suitable trigger wheel arrangement.

    Dwell Battery Correction (Adjustment)
    Dwell battery adjustment

    The dwell battery correction/adjustment curve is a built-in curve to automatically apply greater spark dwell at lower battery voltages. This is required for inductive ignition systems - more time is required to charge the coil with less voltage. The default curve as shown is suitable for most application. Note that it is centred on 14.4V with 100% - at this voltage the actual dwell time matches the dwell entered on the ignition options page.


    Dwell vs RPM
    Dwell vs RPM

    The Dwell vs. RPM curve is a feature intended to be used with Saab Tri-ionic ignitions only. These require "Time After Spark " to be enabled. The dwell vs. RPM curve must also be turned on.
    Dwell vs RPM enable


    Cold Advance
    Cold Advance

    The cold advance feature can be used to run more (or less) advance on a cold engine. When cold an engine typically requires more advance for normal operation. Conversely though, many OEMs are reported to retard timing during warmup to more quickly bring the catalyst up to operating temperature.

    Ensure that the advance figure in the final row is zero , this will allow the spark timing to follow the advance table.


    MAT-based timing retard
    MAT retard

    High inlet air temperatures (MAT) can make an engine more prone to knock, this is especially the case on boosted engines where prolonged periods of hard driving or idling in high ambient air temperatures can have a significant impact on MAT.
    This feature allows the timing to be retarded at higher MAT readings for greater engine safety.

    Ensure that the retard figure at normal temperatures is zero, this will allow the spark timing to follow the advance table.


    Noise Filtering
    Noise filtering


    Noise filter period - this sets a minimum pulse time to ignore. It can filter out very short noise spikes.
    Primary Tach
    Noise filter enabled - enables noise filter curve on primary/crank tach input.
    Tach period rejection - ignores pulses shorter than time/percentage
    Tach interrupt masking - turns off input pin so pulses are not seen at all for time/percentage
    Time(ms) - time period to ignore.
    Percentage - percentage of "tach interval" to ignore.
    Secondary Tach
    Noise filter enabled - enables noise filter time on secondary/cam tach input.
    Noise filter time period - pulses shorter than this are treated as noise
    Tach period rejection - ignores pulses shorter than time/percentage
    Tach interrupt masking - turns off input pin so pulses are not seen at all for time/percentage
    Time(ms) - time period to ignore.
    Percentage - percentage of "tach interval" to ignore.

    Noise filter curve - the curve sets filter times at varying rpms.

    Examples
    Coil negative triggering for a fuel-only install. This requires noise filtering to eliminate the effects of coil ringing. A typical setting would be to enable crank tach period masking at 2ms and 30%.
    Distributor type pickup, HEI, TFI, EDIS. Noise filtering is often useful here. A typical setting would be crank tach period masking with 1ms and 30%.
    Wheel decoder and other more advanced installs. Noise filtering may be useful on some installs. Due to the multi-toothed input signal the rejection time periods need to be set far smaller.
    e.g. on a V8 with distributor at 6000rpm, the time between tach pulses is 5ms. A 36-1 wheel on the same engine gives a pulse every 0.6ms (600us). Using too large a filter time will filter out the real signal.


    Knock Control

    Note: the knock sensing feedback system can never offer foolproof protection against engine damage. Check your settings with care, take plug readings and use det-cans.

    Spark knock is the sound of abnormal combustion in an engine. Once combustion in a spark-ignition internal combustion engine is initiated by a spark, the flame front is designed to spread from the spark plug and travel across the combustion chamber rapidly and smoothly. As the flame front propagates across the chamber, the remaining unburnt air-fuel mixture can ignite spontaneously (auto-ignites) before the flame front arrives, due to the increasing pressure and temperature in the combustion chamber. When this occurs, there is a sudden jump in the pressure in the cylinder. This causes in the characteristic knocking or pinging sound. It is most common at low-mid rpms and high load, such as ascending a hill in too high a gear.
    Prolonged heavy knock is likely to cause severe and permanent engine damage and must be avoided.
    It is a common misconception that engines make most torque just before knock. Do not use the sound of knock as a guide for best timing, ideally set timing on a dyno to achieve maximum brake torque (MBT) timing.
    Even with a well tuned engine, factors such as fuel octane, intake air temperature, coolant temperature, engine age and condition, air/fuel ratios, air density, altitude and humidity and others can push the engine from a safe condition to borderline knock or worse. The knock control system is a safety measure designed to retard timing under these conditions and safeguard the engine.

    The Megasquirt knock control system supports the use:

    Key to knock sensing is the knock sensor itself.

    GM sensor Bosch sensor

    There are two main types of knock sensor. Resonant and wideband sensors. The resonant sensor is tuned to a particular frequency and is only likely to work on an engine with a very similar bore size. (Bore size determines 'ping' frequency.) The wideband sensors give a lower voltage output but operate over a wider frequency range and can likely be applied to different engines.

    The GM knock sensor is tuned to a specify frequency, like a tuning fork. When this frequency is applied to the sensor (through its connection to the engine), a piezoelectric crystal inside the sensor generates a small voltage (~1 volt), much like a microphone. As an example, some Corvette knock sensors (GM PN 1997562, 1997699, OR Standard Motor Products KS45, KS46, KS49, or KS117) have a design frequency of 5200 Hz, and they produce a signal between 4800 Hz and 5600 Hz.

    The sensor should be mounted near the top of the engine block, as close to the center as practical. Do not mount it close to noisy components such as the fuel pump or cam shaft lifters. Mounting the knock sensor in the cylinder head is not a good idea because of valve train noise.

    Finding a suitable location of the sensor is crucial. Wherever possible, use the location specified by the manufacturer for that engine family.

    Ideally, you will be able to find a suitable threaded hole in your block to which you can mount the sensor. If not, an alternative is to drill and tap the block, or thread a steel adapter to accommodate the sensor on one end and a stub with the thread to match those in an existing pre­tapped boss in your block. Note that it may be necessary to change the sensor location if you cannot isolate engine noise while allowing MegaSquirt to identify knock.

    If you choose to drill and tap your block, choose a thick area of the block with a boss that is at least ¾" (19 mm) thick. Drill a ½" (13mm) hole. The hole should be 0.500" to 0.625" (13 mm to 16 mm) deep. Make absolutely sure that it is safe to drill a hole this size - YOU CAN RUIN YOUR ENGINE'S BLOCK WITH A POORLY PLACED HOLE!

    The GM knock sensors have a 3/8" NPT thread. Tap the hole with a 9/16" UNF starter tap. Go in 4 turns of the tap to begin with, clean out the chips and try the sensor for fit. Keep tapping one turn at a time until the sensor threads in 4 to 5 turns with hand pressure. Stop tapping when the sensor will screw into the hole 6 to 7 threads with a wrench. Note that the thread on the knock sensor is a tapered thread.

    The Bosch sensor can be more simply attached by bolting it to the block. It uses a standard EV1 style injector connector.

    Basic on/off mode - GM ESC module

    Above approximately 5000 rpm, however, this knock may be masked by mechanical noise. MegaSquirt's tuning software allows you to set an upper rpm limit on the knock sensor feedback.

    On the Corvette L83/L98/LT1/LT4 engines, this sensor is usually screwed (with a specified torque value) into the coolant drain hole near the center of the block side, just above the oil pan rail. This location has been chosen as optimum for this sensor and engine family. On the LS1 engine, the sensors (there are two) are located in the center valley on top of the engine.

    A conditioning module is also required, such as GM's Electronic Spark Control (ESC) module (PN 16022621, 16052401), see above. These are also available as Standard Motor Products LXE6, LXE7, and LXE9. These are very common in recycling yards, they were used all virtually all GM vehicles from the mid-1980s to the late 1990s. You should match the sensor and module by application to ensure they will work together properly.

    Note that you can get a KnockSenseMS kit designed to work with MegaSquirt from this site.

    Wiring the Knock Sensor and Module

    The ESC module sends a voltage signal (8 to 10 volts) when NO knock is detected by the knock sensor. If knock occurs, this signal is pulled low.

    This signal is fed to the Megasquirt via a pin of your choice. "Launch", "Datalog", "Tableswitch" can be directly connected. On these inputs ensure the pull up/down is set to "none".

    Internal variable module

    This internal module allows knock to be monitored over a specific crankshaft angle 'window', allows gain to be adjusted and knock level thresholds to be set depending on rpm. This allows far greater tunability and should help to distinguish between engine noise and knock.

    Knock Input Threshold

    For analogue and internal modes this sets a threshold level. If the measured knock signal exceeds the threshold then the control system is started. This allows different thresholds to be applied to match actual engine behaviour. The curve will need to be set empirically by examining datalogs of knock% when operating the engine under safe conditions.


    Knock Parameters

    (Only for 'Internal'.)
    knock parameters

    Some engines have multiple knock sensors. In this case, you will usually want to pair the cylinder with whichever sensor is nearest. For example, LS1 style engines use a pair of sensors in the valley which are positioned to 'listen' to four equally spaced cylinders each. i.e. the front sensor corresponds to cylinders 1,2,3,4 and the rear sensor to cylinders 5,6,7,8.


    Knock Window Settings

    (Only for 'Analogue' and 'Internal'.)
    knock window >
    Sets the start of the knock monitoring window and the size of the window in degrees.
    It is typical (per Heywood) for the knock events to start around TDC and continue for many degrees afterwards.


    Knock Window Settings

    (Only for Analogue and Internal.)
    knock coolant
    Allows up-scaling of knock sensor threshold depending on coolant. Many engines are noisy during cold operating due to increased clearances. This would result in false knock reports if the threshold was not raised at low temperatures.
    Ensure that the final row is 100% for a warmed up engine.


    Ignition Tables 1-4
    Ignition table

    Ignition table 1 is the main 3d table that control ignition timing. (Tables 2,3,4 are used with table-blending and table-switching.)

    The numbers in the body of the table are the commanded ignition advance during run mode. i.e. 21 deg in the table will result in a commanded 21 deg timing.
    The final commanded timing is also impacted by cold advance, MAT retard and knock retard. So if the Ignition Advance in TunerStudio is not matching the number under the 'moving dot' on the table check those first.
    As a reminder, it is ESSENTIAL that the actual timing on the engine crank is checked with a strobe and that it matches the final commanded advance shown on the TunerStudio Ignition Advance gauge. See Check Timing.

    The load axis is always shown as a %age value. For Speed-Density this means kPa. For Alpha-N this is TPS%. For %baro this is MAP/baro %.
    The RPM axis is engine rpm.
    Values in the table are interpolated. i.e. if a value falls between cells the in-between value is correctly calculated (some older non-Megasquirt ECUs were incapable of doing this and required huge tables to compensate.)
    The axis values should be arranged to give you more rows/columns in areas of interest and less points where conditions are changing uniformly. Typically low load / cruise regions benefit from more points. Under boost the behaviour is smoother and the interpolation provides good control.


    See Rotary Settings

    See Rotary Split Table


    Spark trim (Cyl x-x Trims)
    This allows trimming of spark advance by cylinder. Each cylinder has a small 3d table permitting advance to be added or subtracted at given load/rpm points.
    Spark trim can only be used if the Megasquirt knows which cylinder is firing. e.g. you must be running coil-on-plug ignition or sequential fuel. It will not work with EDIS.

    Having confirmed that your tach input system can support spark trim, it needs to be enabled.
    Spark trim

    The spark trim tables are grouped cylinders 1-4, 5-8 (and optionally 9-12, 13-16.) They all share the same load and rpm axes.
    Spark trim tables


    The numbers in the table body are degrees added or subtracted from the advance. i.e. if the advance is currently 17.4 degrees and the table specifies a trim of -3 then the resultant advance on that cylinder will be 14.4 degrees.




    If you have a question, comment, or suggestion for this FAQ please post it on the forum.

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