Click on our menu buttons immediately below to find MegaSquirt® information quickly:
MicroSquirt® Module
V1/V2 MicroSquirt®
Important Safety Information
MicroSquirt® Support Forum
- MShift™ TCU
- MShift™ Intro
- GPIO Build Guide for 4L60E
- Base circuits
- GPO1, GPO2, GPO3,
GPO4 (gear LEDs)
- VB1, VB2, VB3, VB4
- PWM1, PWM2, PWM3, PWM4
- GPI1, GPI2, GPI5
(2/4WD, Input2, downshift)
- GPI3 (Temperature)
- GPI4 (Brake sense)
- EGT1, EGT2, EGT3,
EGT4 (non-CAN Load, line pressure, Input3, Input1)
- VR1 (Vehicle
Speed Sensor)
- VR2 (Upshift button)
- Finishing Touches
- Testing your
GPIO Board
- External Wiring Guide for 4L60E
- Current Release Code
- User Settings
- βeta Code
- Code Archives
- Purchase a
GPIO kit
- Working with the Shift Table
- Serial
Connection Troubleshooting
- CANbus
Set-Up
- Solving VSS
Issues
- Ports, pins, circuits, connections
- MShift™ Discussion
Forums
- Misc. MShift™
Topics
- MShift™ sitemap
- Template Project Code
- GPIO Board Intro
- MShift™/GPIO
Support Forum
|
Ignition Control with MegaSquirtII
To provide improved engine performance, better fuel economy, and reduced exhaust emissions, MegaSquirtII can control spark advance (timing), and this advance is programmable by the user.
For MegaSquirtII (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, MegaSquirtII 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 (1/10°). 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.
Example Spark Advance Table
[ign_table(rpm,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 |
kPa | 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 |
| | 500 | 750 | 1000 | 1500 | 2000 | 2500 | 3000 | 3500 | 4000 | 4500 | 5000 | 5500 |
RPM |
Spark advance entries in the 12×12 MegaTune spark table are expressed in engine degrees, and can be specified in tenths of a degree (1/10°). Note that they are the actual timing before top dead center (BTDC), and include any trigger offset.
MegaSquirt® and MicroSquirt® controllers are experimental devices intended for educational purposes.
MegaSquirt® and MicroSquirt® controllers are not for sale or use on pollution controlled vehicles. Check the laws that apply in your locality to determine if using a MegaSquirt® or MicroSquirt® controller is legal for your application.
©2004, 2007 Bruce Bowling and Al Grippo. All rights reserved. MegaSquirt® and MicroSquirt® are registered trademarks. This document is solely for the support of MegaSquirt® boards from Bowling and Grippo.