Megasquirt-3 MS3 Toothed Wheel

Home

Introduction -- Settings -- Hardware -- Missing tooth crank wheel -- Missing tooth cam wheel -- Missing tooth on crank with single tooth on cam -- Missing tooth on crank with polled/half-moon on cam -- Non-missing tooth on crank with single tooth on cam -- Nippondenso CAS -- Non-missing tooth on cam with single tooth on cam -- Non-missing tooth on cam with two tooth on cam -- Non-missing tooth on cam with one tooth on cam per cylinder


Introduction

The Toothed Wheel mode is designed to support most combinations of regular missing tooth wheels with or without a cam signal. Other ignition modes are used to support irregular or OEM specific wheel patterns.

The table below lists all of the valid combinations for toothed wheel. However some of the modes will rarely be used.
The most common are:
36-1 on crank - many Fords
36-1 on crank plus single tooth cam sensor - same
60-2 on crank - many vehicles with Bosch ECU, BMW, VW, Audi, Volvo, Vauxhall, Opel, Peugeot etc.
60-2 on crank plus single tooth cam sensor - same
24 tooth on cam - many Japanese originated vehicles use the Nippondenso 24 tooth CAS with differing numbers of 2nd trigger teeth and sensors.

Note - this table is for four-stroke piston engines. Two stroke or rotaries only need 360 degrees of information for full sequential and COP.
Commonly used modes have detailed sections on how to set them up. Unusual modes are not documented in detail at this time.

For initial setup and determining tooth#1 angle on uncommon setups having timing marks or tape on your crank pulley/damper covering the full 360 degrees will be greatly helpful. Speed shops sell timing tape for a variety of damper diameters. If your engine has no timing marks you do need to add them. Just guessing at timing is a great way to damage an engine.
Running excessive timing under load will almost always cause severe engine damage e.g. broken pistons
It is essential that timing is confirmed with a timing-light on EVERY install.

Physical wheels
Supports
Settings
Main wheelSecondary wheelSingle coilWasted sparkWasted-
COP
COPBatch/
bank fire
Semi-
sequential
SequentialTrigger wheel arrangementMain wheel speed2nd trig every rotation of
Missing tooth on crankNoneYYYNYYNSingle wheel with missing toothCrankn/a
Missing tooth on camNoneYYYYYYYSingle wheel with missing toothCamn/a
Missing tooth on crankSingle tooth on camYYYYYYYDual wheel with missing toothCrankn/a
Missing tooth on crankLS2 4X, VW 2 wide/narrow or half-moon on camYYYYYYYDual wheel with missing toothCrankn/a
Non-missing tooth on crankSingle tooth on crankYYYNYYNDual wheelCrankCrank
Non-missing tooth on crankSingle tooth on camYYYYYYYDual wheelCrankCam
Non-missing tooth on crankCam wheel with tooth per cylinderYNNNYNNDual wheelCrankEvery Cylinder
Non-missing tooth on camSingle tooth on camYYYYYYYDual wheelCamCam
Non-missing tooth on camSingle tooth on crank
or two opposite teeth on cam
YYYNYYNDual wheelCamCrank
Non-missing tooth on camCam wheel with tooth per cylinderYNNNYNNDual wheelCamEvery Cylinder

Terminology notes
Missing tooth - This is a regular wheel with a group of "missing" teeth e.g. 12-1, 36-1, 36-2, 60-2
on crank - the wheel is rotating at crank speed, normally directly attached to the crank pulley or flywheel
on cam - the wheel is rotating at camshaft or distributor speed
Single coil - a single coil and distributor
Wasted spark - double ended coils (or a pair of coils) that fire twice per cycle
Wasted-COP - a single coil per cylinder, but firing twice per cycle
COP - a single coil per cylinder that fires once per cycle
Batch/bank fire - groups of injector fired at once, not timed to a specific cylinder event
Semi-sequential - injectors fired twice per cycle timed to cylinder events
Sequential - each injector fires once per engine cycle timed to a specific cylinder event

Wheel naming
There does not appear to be universal agreement on the way to name wheels, however in the Megasquirt world, they will be named like the following examples.
36-1. This means a single wheel with place for 36 teeth and a single tooth omitted. i.e. 35 teeth at 10 (360/36) degree spacing.
36-2. This means a single wheel with place for 36 teeth and a two adjacent tooth omitted. i.e. 34 teeth at 10 (360/36) degree spacing.
36-1-1. This means a single wheel with place for 36 teeth and a two non-adjacent single tooth omitted. This type of wheel is not supported by this generic wheel decoder. It is supported as Rover#1
36-2-2-2. This means a single wheel with place for 36 teeth and a three sets of double missing teeth. This type of wheel is not supported by this generic wheel decoder. It is supported as 36-2-2-2 with the specific OEM pattern required.
24/1. This means 24 teeth (non-missing) on one wheel and a single tooth on a second wheel.
36-1/1. This means a one 36-1 wheel and a single tooth on a second wheel.
3+1. This means one wheel with 3 equally spaced teeth and an additional tooth to indicate sync. (Supported somewhat as Daihatsu 3cyl)


Settings

The settings are in Ignition Options ->Ignition options/wheel decoder

Spark Mode - set to "Toothed Wheel"
Trigger Angle/Offset - always zero
Angle between main and return - n/a
Oddfire small angle - for oddfire engines this specifies the smallest of the crank angles between ignition events
GM HEI/DIS options - n/a
420A/NGC alternate cam - n/a
Use cam signal if available - n/a
Oddfire phasing - usually "Alternate" but for Vmax use "Paired"
Skip pulses - number of input pulses at startup that are ignored before decoding begins. Safe to leave at 3.
Ignition Input Capture - see ignition page
Spark output - see ignition page
Number of coils - see ignition page
Spark hardware in use - see ignition page
Cam input - see ignition page
Trigger wheel arrangement - see table above for correct settings
Trigger wheel teeth - the number of effective teeth, counting the missing teeth as if they existed. i.e. a 36-1 wheel has 35 physical teeth, but enter 36.
Missing Teeth - the number of missing teeth. Common are 1 for 36-1, or 2 for 60-2 or 36-2
Tooth #1 angle - definition depends on whether main wheel is missing or non-missing type. See sections below.
Main wheel speed - Does the main wheel rotate at crankshaft speed or camshaft (distributor) speed.
Second trigger active on - Like ignition input capture above, specifies which voltage level is considered "active"
Level for phase 1 - only applies in "Poll level" mode. See Dual+Missing section.
and every rotation of - how often are second trigger input pulses received. See Dual Wheel section
All of the settings on the right hand side of the page are general and will be covered in the Ignition manual.


There are two main categories of install - Existing and Retrofit.

Existing

In this cases where you are fitting Megasquirt to an engine already fitted with a toothed wheel, your main task is to wire up the sensor(s), determine the tooth #1 angle and wire up your coil(s). It should not normally be necessary to alter the engine.

Retrofit

If you have an engine that did not originally come equipped with a toothed wheel (e.g. a distributor based, pre-EFI engine) then you have to mount a wheel and sensor and set the phasing correctly.
For a typical car engine - go for a 36-1 wheel on the crank for non-sequential.
or a 36-1 wheel on the crank and a 50/50 cam tooth with gear-tooth hall sensor for full sequential
60-2 works great on most engines too, but is not advised for very high rpms.
For very high revving engines (such as motorcycle engines) due to the number of teeth per second, 36-1, 24-1 or 12-1 are preferred.

While the code can cope with any sensor/tooth phasing, during cranking the rpms vary up and down greatly as the engine rotates. It is desireable to place the missing tooth such that it passes the sensor when the engine is somewhat stable. The OEMs have found that certain tooth#1 angles work well and it is worth following their lead.

It is suggested to align your wheel and sensor to arrive at the following tooth #1 angles. (See later for explanation of tooth#1.)
4 cylinders ~90-120 deg
6 cylinders ~50 deg
8 cylinders ~40 deg

Take a look at the EDIS pages for places to source used toothed wheels, sensors and coilpacks. Note that you do NOT need the EDIS module, so later ('internal-EDIS') cars are useful donors too.

Mounting the wheel is quite critical in that it MUST be mounted so it rotates without moving up, down, left or right as the sensor needs to see all of the teeth with a gap of 0.75 - 1.0mm.

Having mounted the wheel and sensor, you can proceed for an existing install.


Sensors and wiring

Refer to the ignition page and build manual for how to connect your crank and/or cam sensors.

Spark outputs

Refer to the ignition page for how to connect up your ignition module and coils.


Missing tooth crank wheel

This is a very common configuration for wasted spark with the most typical wheels being 36-1 (Ford) and 60-2 (Bosch.) Note that the missing teeth are in a single group - if your wheel has multiple groups then you need a special wheel decoder. Many custom decoders already exist e.g. 36-2-2-2 and the one matching your wheel must be used instead of the 'generic' toothed wheel mode.

The Megasquirt-3 code benefits from a reasonable number of teeth (hence 36 or 60) for best ignition timing accuracy. Low tooth count wheels such as 4-1 are not advised.

What is Tooth #1

Make sure you understand this!
With the engine rotating in the normal direction...

Tooth #1 is the first tooth to pass the sensor after the missing tooth gap.

We use the term "tooth#1" as it is consistent across wheels with one, two, three or four missing teeth in the group.
Once the code knows the tooth#1 angle it automatically calculates other needed information internally. (No need to manually enter trigger teeth or delay teeth etc.)


Clockwise rotation (normal) - method a

Set your engine at TDC, then count the number of GAPS to tooth#1 in the direction of rotation (clockwise here) and multiply by the angular size of the tooth.
e.g. 8 teeth * 10 deg per tooth = 80 deg
36-1 wheels are 10 deg per tooth (360 deg / 36 teeth)
60-2 wheels are 6 deg per tooth (360 deg / 60 teeth)
24-2 wheels are 15 deg per tooth (360 deg / 24 teeth)


Clockwise rotation (normal) - method b

A different way of looking at the SAME phasing.
Turn your engine so that tooth #1 aligns with the sensor. Read off the tooth#1 angle from timing marks/tape on the crank pulley.

Critical tuning software settings are in Ignition Options ->Ignition options/wheel decoder

Typical settings:
Ford 4 cyl = 36-1, 80deg tooth #1
Ford 6 cyl = 36-1, 50deg tooth #1
Ford 8 cyl = 36-1, 40deg tooth #1
Bosch 4 cyl (Peugeot, Vauxhall) = 60-2, 114 deg tooth #1


Missing tooth cam wheel

This arrangement is not commonly used by OEMs but does support full sequential with a single wheel and sensor. Cam triggering is less accurate than crank triggering due to timing belt or chain stretch.

The Megasquirt-3 code benefits from a reasonable number of teeth (hence 36 or 60) for best ignition timing accuracy. Low tooth count wheels such as 8-1 are not advised.

The previous section on missing tooth crank wheel generally applies when the wheel is mounted to the cam, but remember that one rotation of the cam is 720 crank degrees. The settings are in crank degrees. So a tooth#1 that is 8 gaps earlier than the sensor on a 36-1 wheel would give a 160deg tooth#1 angle (8 * 10 * 2 [for cam] )

Critical tuning software settings are in Ignition Options ->Ignition options/wheel decoder


Missing tooth crank wheel and single tooth cam wheel

This is an very common arrangement that supports full sequential and coil on plug. (For 50/50 half-moon or 4-window wide/narrow or other polled cam wheels see the next sub-section.)

The definition of tooth#1 is the same as the basic missing tooth crank wheel and should be phased in the same way. Ensure you also read the section above. The cam input tells the code which engine cycle/phase it is on. From the crank wheel alone the code knows when cylinder one is at TDC, but it cannot distinguish TDC compression or TDC exhaust. The cam sensor adds this information which is why it needs to be one pulse only per engine cycle.

The cam signal is a single pulse usually generated by a narrow tooth, vane or window. Technically it is edge triggered. For VR type sensors, the edge setting will depend on the wiring you use (typically Rising) as the signal is a very short pulse. For a hall type sensors you need to ensure that the edge you choose matches up with the phasing as below. (*Needs more explanation on how*)

To confirm correct cam sensor phasing proceed as follows.
First, set your engine at TDC compression #1
Now rotate the engine backwards to tooth#1
The angle read off the damper is the tooth#1 angle
Now rotate the engine backwards some more - this is the best place for the cam tooth to pass the sensor.

The settings are in Ignition Options ->Ignition options/wheel decoder


Missing tooth crank wheel and polled (50/50 or half moon) cam wheel

This is an fairly common arrangement that supports full sequential and coil on plug. Here a missing tooth wheel is used on the crank in the common way and a hall-effect or geartooth sensor is used on the cam with a long tooth or window or vane. This gives you the ability to have full sequential, but the engine syncs up as fast as a regular missing tooth crank wheel.
Different OEM implementations exist - some engines use a 50/50 cam pattern, Vauxhall red-top engines use a window in the distributor rotor that spans the missing tooth region. Many newer engines with Bosch ECUs utilise a 4 tooth wide/narrow cam trigger, this is used on some VW, GM LS2 and some Mercedes. As far as the code is concerned these are equivalent because it only 'looks at' (polls) the cam just after the missing tooth.

Typical polled cam triggers:
VW cam VW cam4 tooth wide/narrow type

e.g. GM LS2 4X / VW / Mercedes
vane with single windowVane cup with single window

e.g. 1 window Bosch dizzy in Vauxhall red-top.
half moon camHalf moon type

General arrangement

The definition of tooth#1 is the same as the basic missing tooth crank wheel and should be phased in the same way. The cam input tells the code which engine cycle/phase it is on. From the crank wheel alone the code knows when cylinder one is at TDC, but it cannot distinguish TDC compression or TDC exhaust. The cam sensor adds this information which is why it needs to be one 'tooth' only per engine cycle.

At close to tooth#1 the code examines the voltage level on the input to determine which phase it is on - the 'tooth' should be normally start at least 20 crank degrees before tooth#1 and continue for another 20 crank degrees afterwards. (The level is actually polled at tooth#2.)

To confirm correct cam sensor phasing proceed as follows.
First, set your engine at TDC compression #1
Now rotate the engine backwards to tooth#1
The cam sensor should be roughly in the middle of window/tooth/vane
With the cam sensor powered and connected to the Megasquirt, measure the output voltage.
When using the MS3X cam input, a voltage of ~0V here requires the HIGH setting and a voltage of ~5V here requires the LOW setting.
Now rotate the engine backwards a full revolution.
The cam sensor will be opposite that previous window/tooth/vane. (If there was a window before it must be a vane now and vice-versa.)

Example of a distributor converted to a cam sensor, using a Honeywell 1GT101DC gear-tooth sensor.

The settings are in Ignition Options ->Ignition options/wheel decoder


Nippondenso CAS

The Nippondenso CAS (crank angle sensor) comes in a number of versions which all appear to use a 24 tooth main wheel and a second wheel with one, two, three or four teeth. There is a single sensor (called Ne) pointing at the 24 tooth wheel and one (G1) or two (G1 and G2) sensors pointing at the second wheel.
This style of CAS is very common on Toyota and Mazda engine from the 1980s and 1990s.
The number of teeth on the second wheel determines whether it can be used (without modification) for single coil distributor, wasted spark or coil-on-plug (COP) and sequential.
The version with a single tooth and two pickup sensors is intended for sequential. The two sensors are used by the OEM to allow the engine to syncronise within one engine revolution. Presently we only support using one of the 'G' sensors.

The three main versions of this CAS are handled in the sections below

  • 24/1 (24 main teeth and 1 second tooth)
  • 24/2 (24 main teeth and 2 second teeth)
  • 24/x (24 main teeth and one second tooth per cylinder)

    Non-missing tooth cam wheel with single-tooth cam

    This arrangement is one of the variants used in NipponDenso CAS.

    With the single tooth every 720 degrees this setup gives enough engine information for full sequential fuel and spark.

    What is Tooth #1

    Make sure you understand this!
    With the engine rotating in the normal direction...

    Tooth #1 is the first tooth to pass the main sensor after the single tooth has passed the second sensor

    Make sure these do not happen at the same time - in the diagram you can see that the main sensor is over a gap when the secondary sensor is aligned with its tooth.
    First, set your engine at TDC compression #1
    Now rotate the engine backwards until the 'cam' sensor and tooth line up.
    If you rotated more than one turn, then add 360 to your tooth#1 angle.
    Now rotate the engine forwards until the next 'crank' tooth aligns with its sensor.
    The crank angle now is the tooth#1 angle.
    (Note that angles shown in diagram are examples only)

    The settings are in Ignition Options ->Ignition options/wheel decoder


    Non-missing tooth cam wheel with two opposite teeth on the cam

    This arrangement is one of the variants used in NipponDenso CAS.

    With the cam tooth every 360 degrees this setup gives enough engine information for semi-sequential fuel and wasted spark. (On a rotary such as the RX7, or a two-stroke engine, full sequential fuel and spark is possible as the engine cycle spans 360 degrees.)

    What is Tooth #1

    Make sure you understand this!
    With the engine rotating in the normal direction...

    Tooth #1 is the first tooth to pass the main sensor after either cam tooth has passed the second sensor

    Make sure these do not happen at the same time - in the diagram you can see that the main sensor is over a gap when the secondary sensor is aligned with its tooth.

    Use the instructions in the previous single cam tooth section to determine your tooth#1 angle. It will always be between 0 and 360 degrees.

    The settings are in Ignition Options ->Ignition options/wheel decoder


    Non-missing tooth cam wheel with one cam tooth per cylinder

    This arrangement is one of the variants used in NipponDenso CAS. Three and four cylinder versions are known to exist.

    As there is one tooth per cylinder, there is only enough information to run a distributor and untimed injection.
    It is not strictly necessary to use both Ne and G wheels. Using both will give you the improved timing accuracy from the 'every-tooth' wheel decoder system, but for simpler installs that do not have both input circuits, it is possible to use the 'G' input only and configure as "Basic Trigger" instead. Timing will not be as accurate though.

    What is Tooth #1

    Make sure you understand this!
    With the engine rotating in the normal direction...

    Tooth #1 is the first tooth to pass the main sensor after any cam tooth has passed the second sensor

    Make sure these do not happen at the same time - in the diagram you can see that the main sensor is over a gap when the secondary sensor is aligned with its tooth.

    Use the instructions in the previous single cam tooth section to determine your tooth#1 angle. It will always be between 0 and 360 degrees.

    The settings are in Ignition Options ->Ignition options/wheel decoder


    Non-missing tooth crank wheel with one cam tooth

    This arrangement is not commonly used by OEMs but could be used to extend a simple 'distributor' crank trigger to support sequential.
    Generally Megasquirt-3 benefits from many crank teeth to improve ignition timing accuracy. However, with this wheel arrangement, you need to beware of trying to use too many teeth on the crank as there is a risk of the trigger inputs overlapping as the cam belt or chain stretches. If this overlap occurs, it will cause sync-loss as the cam tooth moves from being seen "before" to "after" a crank tooth or vice-versa.

    What is Tooth #1

    Make sure you understand this!
    With the engine rotating in the normal direction...

    Tooth #1 is the first tooth to pass the main sensor after the cam tooth has passed the second sensor

    Make sure these do not happen at the same time - in the diagrams below you can see that the main sensor is over a gap when the secondary sensor is aligned with its tooth.

    First, set your engine at TDC compression #1
    Now rotate the engine backwards until the cam sensor and tooth line up.
    If you rotated more than one turn, then add 360 to your tooth#1 angle.
    Now rotate the engine forwards until the next crank tooth aligns with its sensor.
    The crank angle now is the tooth#1 angle.
    (Note that angles shown in diagram are examples only)

    The settings are in Ignition Options ->Ignition options/wheel decoder


    Other wheel arrangements

    The examples shown here are not an exhaustive list of all the combinations that are possible, for other arrangements of crank and cam wheels you will need to apply the principles here to your install.


    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.