|Click on our menu buttons immediately below to find MegaSquirt® information quickly:|
MegaMeet 2015 is coming soon! It will be held October 17th in Mooresville, NC. Click this link for more information.
Code version 2.6 or greater can be configured to use a missing tooth crank wheel for the tach input. The wheel must be of the form M-N, where M > N, and there is only one set of continuous missing teeth. Common OEM wheels are 36-1 (used with Ford's EDIS and others) and 60-2 (common on many makes). (For a custom 36-1 wheel, see: www.megamanual.com/ms2/36-1.htm)
The missing tooth code uses the teeth of the missing tooth crank wheel to create 'tach teeth'. That is, it creates a tach signal from a particular tooth, then skips a number of teeth before declaring another tooth a tach signal. This means that all the tach teeth must correspond to real teeth. For a four stroke cycle engine, this means that the total number of teeth, including missing ones, must be evenly divisible by ½ the number of cylinders (or by the number of cylinders for a 2-stroke).
In later versions of the code (2.883+), the 'tach teeth' are still created for injection events, etc., but instead of the ignition timing advance signal being based entirely on the time after the last tach tooth (with intervening teeth ignored), the timing is set by the counting number of teeth, with only the amount between the last tooth and the desired timing estimated.
For example, if the engine had a 36-1 wheel, and 4 ignition events per revolution (i.e., a V8 with 90° intervals), then if this desired timing was 36° BTDC, the calculation would look like:
|= int*[(90°-36°)/90° × (36 teeth/ 4 events)] + (mod**[(90°-36°)/90° × 9 teeth/event] × last individual tooth interval)***|
|= int[54°/90° × 9 teeth/event] + (mod[54°/90° × 9 teeth/event] × last tooth interval)|
|= int[5.4] + (0.4 teeth × last tooth interval)|
|= 5 teeth + (0.4 × last individual tooth interval)|
|= [(90°-36°)/90°] × last tach tooth interval***|
|= 54°/90° × last tach tooth interval|
|= 0.60 × last tach tooth interval|
* 'int[...]' means truncate to in integer ("whole number"),
** 'mod[...]' (short for 'modulus') means take the remainder after dividing (i.e., the fractional portion),
*** interval adjusted for α, β, γ prediction results.
The net result is that the new code estimates the timing interval over a much shorter period (1 tooth versus 9 teeth in the above example), making it more accurate.
To set the Trigger wheel settings, go to 'Settings/Trigger Wheel Settings' in MegaTune. There you will find:
Some permissible combinations are:
|Skip Teeth Setting|
The trigger offset is 0, if that tooth lies up perfectly with the sensor at TDC.
The best way to think about this is the delay teeth is the 'coarse' setting, and the trigger offset is for fine adjustment (less than one tooth) to account for minor sensor misalignment. If the sensor is misaligned by more then one tooth, the number of delay teeth should be changed, and the trigger offset used to calibrate the advance as seen on a timing light with that seen in MegaTune.
For another example, with a 60-2 wheel, you would have for settings:
Note that you should change these parameters only with the engine OFF (or the stim rpm at no more than 300 rpm).
The missing tooth wheel decoder has been tested up to at least 18000 rpm for 36-1 and 60-2 wheels (yes, 18 thousand rpm) on the bench, and works fine.
For testing the missing tooth decoder on the bench, you may wish to use the crank wheel pulser. There is information on that here: crank wheel pulser.
Note that you must get the sensor polarity correct for the missing tooth code. This is even more important than with regular triggers, because if you get the signal polarity reversed you will get two (½n+1)*t missing tooth 'gaps', instead of the desired one (n+1)*t gap (and the engine might not run at all).
Note that the VR circuit used in MicroSquirt® and the MS-II/Sequencer controllers performs an additional inversion on the VR signal before passing it to the processor. The net result is that you have to use the opposite edge to trigger off, compared to a MS-II controller with the V3 main board. So where MS-II uses 'rising edge', you would use 'falling edge' with MicroSquirt® or the MS-II/Sequencer, and vice-versa.
In this case, an input capture setting of 'rising edge' is correct ('falling edge' for MicroSquirt/MS-II Sequencer).
The proper polarity will depend on the way you wire your VR sensor (swapping the two leads to DB37 pin 24 and ground inverts the signal as seen by the VR input circuit), as well as your input capture setting. You may have to experiment to get them right if you don't have an oscilloscope.
In the code are two input variables to control the interrupt masking to prevent false triggers:
In addition to the above settings, you should set:
These are not needed because the teeth are much closer together than 1 signal/cylinder, and having them enabled only adds to the processor overhead.
If you wish to bench test the trigger wheel operation, you can use the crank wheel pulser program. Find out more here.