|Click on our menu buttons immediately below to find MegaSquirt® information quickly:|
- 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,
- VR1 (Vehicle
- VR2 (Upshift button)
- Finishing Touches
- Testing your
- External Wiring Guide for 4L60E
- Current Release Code
- User Settings
- βeta Code
- Code Archives
- Purchase a
- Working with the Shift Table
- Solving VSS
- Ports, pins, circuits, connections
- MShift™ Discussion
- Misc. MShift™
- MShift™ sitemap
- Template Project Code
- GPIO Board Intro
Automatic Mixture Control for MegaSquirt-II
There is an adaptive learning algorithm called "Automatic Mixture Control" mode in the MegaSquirt-II code (V2.6+). It updates your VE table while you drive based on when you are at a stable vertex in the VE table and averages your ego correction. If it stays in this state long enough the VE table will automatically be updated, so the ego correction should quickly drop to 0. On a schedule which you can determine it will update the VE in flash - you can set this to be fairly frequent when the car is first being tuned, then set it to very seldom or never.
Automatic Mixture Control (AMC) allows MegaSquirt-II to adjust and make permanent changes to the VE table based on the exhaust gas sensor without a laptop computer attached, much like OEM ECUs.
Before automatic mixture control, there were a few ways to use EGO feedback to adjust the VE table:
- Manually examining a datalog to find areas (rpm & MAP) that were rich or lean of the desired targets, and adjusting the VE table manually (which required some knowledge of what you wanted and how to interpret a datalog),
- Use a separate program (like MLV) to process the datalog and create a new VE table (this frequently depended on having the 'correct' datalog format),
- Use TunerStudioMS's VE Analyzer to re-write the VE table interactively.
Automatic mixture control (AMC) will work entirely internally, no laptop needs to be connected. AMC acts if:
Then the program will average the ego correction for a user specified period and then update the VE table in RAM by some user specified portion of the amount of the correction.
- the user has enabled it, and
- MegaSquirt-II is operating in closed loop mode, and
- the engine operating parameters (MAP and rpm) remains near a VE table vertex (near being user inputs)
As a result, the average closed loop correction should gradually decrease to zero. A separate loop will check and burn flash with the updated VE table, according to again specifiable user inputs.
Because the AMC algorithm relies entirely on the EGO sensor/controller output, it is best used with a wideband controller that is known to be accurate and reliable. Narrow band sensors will work, but will operate only in the areas where EGO feedback is allowed, and only for stoichiometric mixtures.
Automatic Mixture Control is enabled from the 'Settings/Automatic Mixture Control' menu item in MegaTune. It can be set to:
- Disabled: No automatic mixture update of fuelling VE table(s).
- RAM Update: This mode automatically updates the VE table(s) in MegaSquirt's 'volatile' RAM memory, but changes will be lost on power-down if not saved (with a manual 'Burn to ECU').
- FLASH Update: This mode updates the VE table in RAM, and also automatically updates VE table(s) in MegaSquirt's 'non-volatile' FLASH memory periodically, causing the changes to be retained even if MegaSquirt® is shut down (but the original VE table is over-written).
There are a number of settings that affect the operation of AMC:
- Step Size (%): % of AMC correction to be applied when RAM VE is updated. A typical value is 10%, this means apply 10% of the change between the old VE value and the adjusted VE value to the VE table(s).
- Minimum VE Change (%): smallest AMC VE change that will be applied to the table in RAM, if the change is less than this, it will be ignored (until it reaches the threshold).
- Vertex Tolerance (RPM): the furthest that the nearest rpm bin can be away and still have the AMC change applied to that entry.
- Vertex Tolerance (kPa): the furthest that the nearest kPa bin can be away and still have the AMC change applied to that entry.
- Table Change Interval (sec): is the minimum time (in seconds) between updates of RAM VE table.
- Flash Update Interval (sec): is the minimum time (in seconds) between FLASH burns of the RAM VE table (only used when FLASH Update is selected). The flash will retain its memory for at least 15 more years even if it has been written to 10,000 times. The flash is expected to perform well even with 100,000 flash write cycles on it. The default write rate is once every 1800 seconds (½ hour) (but only if the VE table had actually changed). Even if you wrote the flash memory every 180 seconds (3 minutes), to write 100,000 cycles would take 208 days of cumulative MegaSquirt® controller operation (or 4 hours of driving a day for 3.42 years). And once your VE table was dialled in after a few weeks of operation, you could turn AMC off (or reduce the flash update to 1800 and enjoy 30+ years of reliable operation).
- Update After (events): is the minimum number of AMC RAM VE updates that have to be made before the program will burn the table to FLASH (only used when FLASH Update is selected).
Note that if you want to save the changes made to a VE table manually, and not wait for the automated FLASH burn to save the changes, you must do a 'fetch/burn' cycle on the VE table.
Also note that if you enable AMC on the stim, it can pull the VE table 'out of shape', because the EGO input does not reflect the output pulse width. So be careful and watch the VE table to be sure it isn't mangled by AMC on the stim before you transfer those settings to your vehicle.
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.
©2006, 2011 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.