V3 MicroSquirt® - QuickStart Guide

Tuning Your V3 MicroSquirt® Controller

If you are not familiar with tuning EFI systems, you might want to review the material in the Principles of Tuning page before reading this web page.

Tuning Theory

Tuning involves setting all the parameters that your MicroSquirt® controller uses to be optimal for your non-pollution controlled engine, injection components, and driving style. These include things like cold start pulse widths and acceleration enrichments. The most fundamental parameters are in the 12×12 volumetric efficiency (VE) table(s), the 12×12 air/fuel ratio (AFR) table(s), and the 12×12 spark advance table.

Be sure to read all of this document, and the configuration document BEFORE starting to tune your engine. Not doing so can cause damage to your engine.

When tuning:

Before Starting Your Engine

Before starting, make sure to:

If you are not entirely sure about your ignition settings, check the supported list for the settings you should use:

If your module isn't on the 'officially supported' list, you'll need to understand the relationship between the trigger offset, the input capture (falling or rising edge), and the spark out (going high or going low). Here are some tips if you module isn't on that list:

  1. Your MicroSquirt® controller ignition output pins have an internal 5 Volt pullup, but it is only capable of ~10 milliAmps maximum. This may not be enough current for your coil's transistor, so you might need to use the VB921 (or BIP373) high current circuit (JS10-IGBTIN & IGBTOUT-IGN jumpers) with a pull-up circuit.
  2. For the input capture, you have to keep in mind that the MAX9926 VR chip inverts the signal from the module:

    You *could* use either edge IF both event are fixed with respect to the crank position (TDC). This is true for optical sensors, and may be for Hall sensors as well.

    With a VR sensor, both of these event are definitely NOT fixed, only one is (it corresponds to the 'zero-crossing'), so you have to be sure to get it right.

  3. Spark Output is much the same (triggering on different edges gives different timing), you are telling your MicroSquirt® controller which edge of the output wave to send as the spark timing. However, 'spark output' also has another function: it sends the dwell info. Often if you get both the input capture and spark output wrong, the timing will be close, but vary with dwell (and hence rpm).

    If your module relies on your MicroSquirt® controller to set the dwell, the 'Spark Output' should be set so the coil does NOT charge when the engine is off.

    You can test this by looking for:

    However, in some cases the module, and/or wiring will prevent charging when the engine is off, even if the spark output is incorrect. So knowing what sort of signal the module expects is very helpful, and this info can sometimes be found in the service manual, etc.

  4. Failing that, you can try is setting the dwell to 0.3 milliseconds while idling. If the engine runs rough or dies, the spark output setting is likely correct (since the coil doesn't have enough current to make a reasonable spark). Note that extended running with the Spark Output set incorrectly can burn out the coil and/or the module.
  5. Then use a timing light to compare the timing as reported by TunerStudioMS to that seen on the timing light, after you have set the trigger offset ('Tools/Trigger Wizard' in TunerStudioMS).

    The indicated and observed advance should be very close over a wide range of rpms (test at idle, ~1500 rpm, ~2000 rpm, and ~3000 rpm). If the indicated and observed timing values aren't the same at these rpms, then either:

    Note that if you change the 'Input Capture' setting, you MUST recalibrate the trigger offset.

Get the Engine Started and Idling

You start, naturally enough, by getting your engine started. (Be sure you have configured your MicroSquirt® controller first, following the instructions on the Configuring Your MicroSquirt® controller.)

Be sure to set your base timing before starting your car (if it has not been previously been set). And verify that you have entered the base timing value into the 'Advance Offset (deg)' field of the dialog at 'Settings/Ignition Options'.

Note that the prime pulse is NOT meant to provide starting fuel. Supplying fuel for starting is what the cranking pulses are for. Generally, keep the prime pulse as short as possible (typically around 2.0 milliseconds is a good starting point), and tune the starting using the cranking pulse widths instead.

Typically, the first time someone tries to start their engine with a MicroSquirt® controller, it starts after about 5 minutes of alternating various cranking pulse widths numbers to get started, and changing the:

Check that you get a tach signal (i.e. RPM is not zero) while cranking. If it is zero, your MicroSquirt® controller either:

You need to check both of these conditions and fix which ever is not right.

If you have been trying to start your engine for more than 15 to 20 minutes, you ought to investigate other sources of problems before continuing to try to start the engine.

Properly tuned, your MicroSquirt® controller will start your engine quickly and reliably. If you have trouble with starting, either hot or cold starts (or both):


When MegaSquirt® resets, TunerStudioMS sounds a beep alarm (and the clock will reset to zero). Resets can cause a number of problems that cause the engine to run badly, including messing up the baro correction and enabling after start enrichment. So you should try to cure any reset issues before putting a lot of effort into tuning.

Resets generally indicate that the power to the processor was interrupted. This could mean that the input power actually was cut, but it can also mean that there was a power surge into the back plane (ground), so that there was no longer a 5v differential between the inputs and the grounds.

Resets are often caused by noisy power supplies (usually the alternator), or poor grounds.

First, fix the grounds, make sure all are perfect and do not connect to areas that are dirty, rusted or painted. Place them close together.

To check the alternator, you can shut the engine off, remove the wiring to the alternator (don't let it ground on anything, some wires might be hot). The start the engine and see if the resets go away. If the resets disappear, the alternator is the problem.

You can fix the alternator and/or add a car stereo power filter to your MicroSquirt® controller's 12V supply. These are cheap (~$5) and widely available. They typically have three wires: one from a switched 12V source (the original source for your MicroSquirt® controller), one to go to your MicroSquirt® controller (with clean power), and a ground wire.

Ignition noise, solenoids turning on or off, and that sort of thing can also cause resets. Check your harness routing to see if any ground or signal wires are near noise sources such as spark plug wires or the coil. Finally, non-resistor spark plugs have been known to cause resets. Use resistor plugs whenever possible.

Setting the Cold Start and Warm-Up Enrichments

If it is cold out, you may have to figure out the cold start enrichments/warm up enrichments right away to keep the engine running until it warms up. If it is reasonably warm out, the default values may be sufficient and you may be able leave the cold start enrichments until you have the VE table and other parameters in a reasonable state of tune.

During cranking mode (defined as when the RPM is less than 300), your MicroSquirt® controller produces cranking pulse widths that are calculated by a linear interpolation of two end-point values defined by the user, one at -40°F and one at 170°F. these are set in the warm-up wizard under 'Tuning' in TunerStudioMS. They are called Pulsewidth at -40°F (ms) (CWU) and Pulsewidth at 170°F (ms) (CWH).

A typical setting for a Chevrolet 350 small block V8 with a Tuned Port Injection set-up and 30 lb/hr injectors is 2.0 milliseconds at 170°F and 10.0 milliseconds at -40°F. The optimal values for your combination are likely different, though generally should follow a similar pattern.

Once the engine fires up (defined by engine RPM greater than 300 RPM), the engine goes into after start enrichment (ASE). The after start enrichment starts out at a user-defined percentage enrichment value (typically around 20%), and ramps down to 0% after so many ignition trigger events, which is user-defined (use about 200 for this number to start). This is an enrichment above the normal warm-up enrichment, which is temperature dependent.

Tuning the Idle Control

Your MicroSquirt® controller can control either an ON/OFF solenoid style valve or a PWM idle valve. The FIdle valve has a single set point, a PWM valve can be set to different openings. See the IAC page for more information on these different idle speed control devices.

The PWM IAC can be set to close in ten discrete steps with increasing temperature. These are stored in an array called 'iacstep_table' in the code. You can enter the PWM percentage (PWM%) in the dialog at 'Tables/Idle Steps' in TunerStudioMS. Generally, the default values will be suitable for initial tuning, you can fine tune them later to get the idle speed you desire at each temperature.

With tuning of the above numbers, nearly any engine can be tuned to fire immediately, every time, just like any new OEM fuel injected car. However it may take some trial and error to converge on the best numbers, especially the after start enrichment, which needs to be just right, or the engine will run rough or stall immediately after starting.

You can do this as the engine warms by adjusting the warm-up enrichment bins, loading it to the ECU, and noting the effect on idle quality. It will take several starts {from a cold soak} to get this close to optimum. Then you can play around with revving the engine in neutral and adjusting the mix to stoichiometric. Tuning to this point is easy enough to do without an O2 sensor by adjusting for maximum vacuum (lowest MAP kPa) at any given rpm.

Note that you can also set the cold advance values to provide a better warm-up, though this is considered 'fine tuning', and the values generally should be left alone until you have the fuel and spark table dialled in.

Tuning the VE Table(s)

The VE table represents the volumetric efficiency and air/fuel ratio at each rpm and kPa (0=total vacuum, 100=atmosphere, etc.).

Volumetric efficiency is the ratio of the amount of air actually fills the cylinder to the amount that would fill the cylinder in a static situation. The VE is used in the 'fuelling equation'.

There are a number of ways to specify VE. Your MicroSquirt® controller specifies it relative to the manifold absolute pressure and includes the AFR in the VE table.

That is:

VE = (actual air mass)/(theoretical air mass)*AFRstoich/AFRactual

So for your MicroSquirt® controller, entering a larger VE in the table makes that point richer, and a smaller number makes that point leaner.

To set up the fuel curves for the engine with your MicroSquirt® controller, you have a number of parameters to work with. The most important of these are the Req_Fuel value, the 12×12 Air/Fuel Ratio (AFR) table, and the VE table (12×12 volumetric efficiency table).

You should be aiming to achieve 12-13:1 air/fuel ratios under full throttle, and 15-17:1 under light loads for a naturally aspirated engine. Boosted engine may require a richer mixture under power. Conventional wisdom (not always right) suggests that you tune for ~13.1:1 at peak torque, and 12.5:1 at peak power for a naturally aspirated engine. Boosted engines can run as rich as ~10.5:1 to 11.0:1 under boost. In all cases, you don't want to run lean at high loads - it can be very destructive to your engine.

To start you tuning efforts with your MicroSquirt® controller, you can calculate an initial VE table that has sufficient RPM and kPa bins, as well as an estimate of the VE based on your maximum torque and horsepower figures. To do this, use the Tables/VE Tables/Tools/Generate VE Table utility in TunerStudioMS2.25+. This calculated VE table will need to be tuned carefully to avoid damage to your engine, however.

Note: Exhaust leaks 'upstream' of the oxygen sensor will cause the sensor to misread the air/fuel ratio and enrich the mixture. Air injection systems, if upstream of the sensor, will do the same under some conditions. Make sure your exhaust manifold gaskets, etc. are in good shape and your sensors see only exhaust gas before using the closed loop EGO sensor feedback feature of your MicroSquirt® controller!

Most of your driving will occur in a roughly diagonal strip of the VE & AFR tables, from low rpm, low kPa to high rpm, high kPa. You can adjust these values using the O2 sensor, datalogs, and/or the seat of your pants. Low rpm and low kPa (say less than half of the maximum rpm and maximum kPa) might be able to use stoichiometric or leaner. Richer mixtures would be used at high rpm and high kPa.

However, the low rpm, high kPa and high low, low kPa are not seen as often driving your vehicle. Basically, if the engine never runs in certain parts of the table, then the numbers there should not matter. However, since you may not be able to guess where you will run under every possible set of conditions, you put estimated VE numbers that make sense into the little used areas.

From this frequently used diagonal strip of the VE & AFR tables, you will be able to see how much the VE rises from one rpm bin to the next, and use these differences to estimate the low rpm, very high kPa numbers and the high rpm, very low kPa numbers. Since you rarely (if ever) run in these parts of the table, the actual numbers will not make much difference, but they will be there "just in case". You are looking to create smooth VE & AFR tables wherever possible.

Deciding exactly when (and how much) you should run rich is mostly a "seat of the pants" thing. When tuning, you will find the engine will surge (at low loads) and "coughs" at higher loads if it is run lean. Adjust the AFR at the point where this happens so the this does not occur. Check the plugs for detonation (tiny black and white flecks) when tuning at high loads and rpms if you suspect detonation at all. Note that detonation can be caused either by a lean fuel condition (VE too low) or too much spark advance (for the fuel). The simplest way to distinguish these two conditions is with an oxygen sensor. A narrow band should read at least 0.8 volts under full throttle, at least for a starting point in tuning WOT. There are more details later in this section.

You can set RPM and MAP sensor values for table wherever you want them, but they must be in the same order as in the table supplied with the software. The same rpm and kPa values are used for all tables in your MicroSquirt® controller.

For normally aspirated engines, values above 100 kPa are essentially wasted. Put them so they cover entire rpm/boost range of your engine. That is, you want to cover from your slowest idle speed to your red line, and from the kPa at idle or deceleration (whichever is lower) to full throttle (with boost, if applicable). Evenly spaced values work well, but you may choose different values to suit your combination.

Even a turbocharged engine capable of 20 lbs/in of boost will generally not have extremely large VE numbers. The addition of fuel for boost comes through the MAP term in the fuel equation:

pulse width = Req_Fuel × VE(rpm,kpa) × MAP × E + Injector_open_time

In essence, the mass of the air entering a cylinder is computed using the ideal gas law (PV=NRT), where the pressure p is a function of VE and MAP, the volume v = cylinder displacement, the air temperature t is a function of E, r is the gas constant. We are looking for n, the mass of inducted air) and then that result is combined with a characteristic number for a given injector.

If you get the injector opening time correct, and the REQ_FUEL accurately represents the flow rate of your injectors, then the VE entries will be close to the VE noted above. However, if your opening time is not right, or your REQ_FUEL is not, then the numbers will be skewed by the amount the values are in error. In general, except for when you are first trying to get your engine started, use the calculated value for REQ_FUEL and do not change it.

In theory, at stoichiometric mixtures, the VE values at 100kPa would reflect the torque curve of the engine at WOT (ignoring friction effects), assuming a constant AFR level.

Tuning the AFR Table(s)

Air/Fuel Ratio (AFR) entries in the 12×12 your MicroSquirt® controller™ AFR table are expressed as a ratio of air to fuel by volume (for example 14.7:1 represents a chemically correct ("stoichiometric") ratio for gasoline. A ratio of ~16.5:1 gives good fuel economy at low engine speeds and loads, while a ratio of ~12.5:1 gives maximum power at high loads and rpms. These entries are used to only to adjust the oxygen sensor target voltage, and only if you have a wide band sensor.

Your MicroSquirt® controller uses one or two 12×12 Air Fuel Ratio (AFR) tables for tuning. your MicroSquirt® controller uses the AFR table in different ways, depending on the EGO feedback option you have selected:

Note the EGO feedback does not operate if any of the following are true:

  1. your MicroSquirt® controller has not been running for 30 seconds,
  2. The coolant temperature sensor has not reached the Active Above Coolant Temp (°) (EgoTemp),
  3. The TPS is above the 'Active Below TPS (v)' setting, and
  4. The MAP sensor reading is above the 'Active Below MAP (kPa)' setting, and
  5. Either or both of the 'Controller Step Size' (EgoStep) or 'Controller Authority ± (%)' (EgoLimit) are zero.

These are set in the 'Settings/EGO Control' dialog. In particular, unless your 'Active Below MAP' is higher than your baro reading, you will not generate EGO feedback on the stimulator without applying a vacuum to the MAP sensor.

Tuning the Spark Table

Spark advance refers to the position at which the spark occurs in the crankshaft's revolution. It is measured in degrees before top dead center - °BTDC (when the piston is at its highest). The spark occurs before the piston reaches the top of the cylinder because the fuel takes some time to burn, and we want it well under way at maximum compression. Lower cylinder (and manifold) pressures result in slower burning, so low MAP kPa values have higher spark advance numbers in the table. However, because the burn time is relatively constant for a given pressure, the timing must be advanced in degrees as engine speed (rpm) rises.

For your MicroSquirt® controller™ (as for most other ignition systems), the total ignition advance is based on three types of advance:

Total advance = initial advance + RPM based advance + vacuum advance

In particular, your MicroSquirt® controller uses three factors to determine the total advance (called adv_deg).

  1. The first is the relevant value from the (rpm x kPa table), called ign_table(rpm,kPa).
  2. The second is the advance offset (adv_offset), roughly equivalent to the initial timing.
  3. And the final value that your MicroSquirt® controller uses, not present in the above equation, is the cold_adv_deg, which is a 1x10 table based on engine coolant temperature (clt). A cooler engine is less susceptible to detonation, so it can use more advance, and thus make more power and be more efficient.

In the code, all of these advance factors are in tenths of a degree (1/10°), and all are positive only. All ignition parameters are in crank degrees as opposed to distributor degrees.

Before tuning your advance table, be sure to use a timing light to verify that your 'trigger offset' is calibrated. Changing the Trigger Offset in TunerStudioMS will not change the displayed advance, instead, it changes the actual advance as seen with a timing light. Your goal is to make these two match.

To do this, get your engine warmed-up (otherwise the timing moves as the temperature increases) and idling, then use a timing light to verify to be certain your actual advance as shown by a timing light equals your the advance display on the advance gauge in TunerStudioMS. (26.3° in this case). (Note that positive numbers denote BTDC, and negative numbers denote after TDC.)

In the above illustration, you want the 'big' displayed number - 26.3 - to match the number the timing light gives you. You make it match by adjusting the small number - 8.0 - up or down (using the +/- buttons or typing it in).

So in the above example, we wouldn't know how to adjust it, because we are missing the timing light info. But if the timing light showed 28.3 degrees, we would change the trigger angle to 10.0 . This takes 2 degrees out of the timing (because MS-II only adds 26.3-10 = 16.3 degrees, instead of 26.3 - 8 = 18.3 degrees), and the big number should match the timing light, so your trigger offset is correct.

Note that you can also make the big number and timing light match by rotating the distributor. This has the advantage of allowing you to specify the trigger offset directly to your desired value, and still have the correct timing. If you choose this method, you rotate the distributor until the timing light value (which changes with distributor rotation) matches the big number (which doesn't change). Then your trigger offset is correctly calibrated, and set to your chosen value.

The trigger offset value can theoretically be set anywhere physically, however, since it may be used for cranking and 'fault mode' timing (GM 7-pin HEI), it is best to set it at a reasonable number for idle, say ~8° BTDC (or whatever is recommended by the module's manufacturer). Check this with a timing light. To get the trigger offset to this value, you may have to rotate your distributor or move your crankshaft VR sensor.

The trigger offset is a quick way to move the entire table around. This could help in for example dyno tuning if you wanted to see in one run what retarding everywhere did to you, then start moving things around according to the horsepower curve compared to baseline with 0° offset.

To set the spark advance table, you should try to understand what your engine needs in the following areas:

  1. total advance at WOT: should be from ~24° to ~40° depending on your bore size and combustion chamber characteristics. Older design engines (i.e. push rods, domed pistons, etc.), and those with large bores (big blocks, etc.) need more advance, about 36 to 38°. Newer designs (4 valve/cylinder, swirl port engines, etc.), and small bores, generally require less, about 28 to 32°. Engines that have a lot of miles on them require less as well, because of oil leakage into the chamber. Lower octane fuel also requires less advance (it burns more quickly), so if you are running 87 octane, use a few degrees less total advance than if you are running 94 octane.
  2. initial advance (adv_offset + ign_table(idle)): this is the rough equivalent of the old 'idle advance with the vacuum line disconnected' figure. In your MicroSquirt® controller, it is the advance at the lowest rpm bin and a MAP value of 100 kPa. Larger initial advance numbers produce a slightly more fuel efficient idle, but may make the idle unstable and result in higher emissions (this is why most engines use the no vacuum advance at idle). Too much initial advance can also make the engine hard to start. Generally, keep the initial advance at 6° to 10°.
  3. RPM based advance: Generally for a performance engine, you want the advance to be 'all-in' by 3000 rpm. So for a given MAP (say 100 kPa) the spark advance should rise from the initial value to the maximum by about 3000 rpm. Your particular settings will depend on your MAP and RPM bins.
  4. vacuum (MAP) advance: as the load on the engine is reduced, the fuel burns more slowly and more advance is required. This means that you should have the advance increase for a given rpm as the MAP value decreases in kPa. So, for example, if you have 32° advance at 4000 rpm and 100 kPa, you might have 40° advance at 4000 rpm and 50 kPa. You can make the intervening values evenly spaced to begin with, and tune them later. You can experiment by using up to 10° to 20° more advance at the lowest kPa bins compared to the highest kPa bins.

For example, most small block Chevrolet V8 engines like about 32° to 38° degrees total advance at wide open throttle (WOT), depending on the heads, compression ratio, and fuel used. Note that you are aiming to have the RPM based advance (analogous to centrifugal advance on an old style distributor) come in at the right rate relative to engine RPM. Typically, you want it "all in" by about 2800-3200 RPMs for a street performance motor. Additional advance above this RPM point isn't needed because increased combustion chamber turbulence results in faster burn times. Note that getting the advance in sooner does NOT build peak HP, but it does build low rpm torque.

Note that the optimum amount of total advance is not necessarily the most that doesn't detonate. For example, with a modern cylinder head design, you might get maximum power at 32°, but might not experience any detonation until 38°-40°. However you will still want the advance to come in as quickly as possible (without knocking) up to 32°.

The exception to maximizing the total advance is the initial advance the engine uses when cranking. Higher initial advance will generate better 'off-idle' response (especially with an automatic transmission), but can cause hard starting, to the point of physically breaking the starter. Some sources recommend up to 14° to 20° of initial advance for performance engines. However, if you have installed your MicroSquirt® controller on a high compression, large displacement engine that already puts an additional strain on the starter, limit your initial advance to 4°-6°, then have the advance come in rapidly after 600 to 800 rpm.

You might be tempted to be clever and set the high kPa/low rpm bins (bottom right) to 0°, so that the starting would be easy, and the cranking bypass signal will not be needed. However, you need to consider two things:

  1. one might have to use the cranking bypass, the module may not work otherwise, and
  2. the engine really may not want to transition smoothly from cranking to starting unless the high kPa/low rpm bins are at least 8° to 10°.

To tune the spark table, you will need drive the car and listen for detonation. If you hear any (or better yet, if a datalog shows any feedback from the knock sensor) reduce the advance at the spark advance table point where the detonation occurred. Start at low engine speeds and low engine loads, and work towards higher speeds/loads progressively. Always keep the spark table smooth by adjusting the neighboring 'cells', or driveability may suffer.

Let up on the throttle immediately if you hear the rattles of detonation. Then remove and inspect your spark plugs. Look for evidence of detonation on the porcelin nose of the spark plug that surrounds the center electrode. Detonation will show as "salt and pepper", which is tiny flecks of carbon and/or aluminum that indicate detonation has occurred.

If there are no 'rattles', and no “salt and pepper”, you can increase the advance by a few degrees, and repeat. Check the spark plugs after each drive. As you continue to increase advance, you will eventually either hear detonation (let off the gas immediately!) or you will slow down. At this point, decrease the advance at that point of the spark advance table, increase the VE at the same point in the VE table, or use higher quality fuel. Do not continue to operate an engine that shows signs of detonation, even if it is brief.

If you experience detonation in your engine, then either:

Setting the Acceleration Enrichments

In addition to the 'regular' acceleration enrichments, also check the X-Tau enrichments.

your MicroSquirt® controller has blended MAPdot/TPSdot abilities for acceleration enrichment. You can select the proportion of each using the slider in the 'Tuning/Acceleration' dialog in TunerStudioMS (the variable is called Tps_acc_wght in the code). If you choose 100%, you get accel enrichment based on TPS only, if you choose 0%, you get accel enrichment based on MAP only. Of course you can set it to any integer between these (99%, 98%, 97%, ... 3%, 2%, 1%, etc.) and get 'blended' accel enrichment.

The default values are a good place to start (especially if your req_fuel is somewhere between 10 and 20 milliseconds). (To convert v/s (used with older versions of TunerStudioMS) to %/s, assume that 0%=0 Volts and 100% = 5 Volts (which isn't quite true, but it is a start), then 1.0 v/s = 20 %/s, etc.)

The values on the upper right are the TPS based values (as noted by the heading above them), those on the upper left are the MAP based values.

The two vertical columns show the current TPSdot and MAPdot values, with the recent peaks 'tell-taled' in red.

Larger values in the "Value (ms)" entries increase the amount of accel enrichment. Smaller values decrease the amount of accel enrichment.

The slider chooses the percentage of MAP versus TPS, somewhere between 30% and 60% is good for most installations. Some installations may need to use values outside this range to solve specific issues.

The accel time is time during which the full accel enrichment is added to the injector pulse width (in seconds not milliseconds). The accel taper time allows you to have the accel enrichment taper from the set value to the end pulse width gradually, rather than having the accel enrichment end abruptly.

Each of these accel enrichments schemes has its own threshold (the rate below which no accel enrichment is applied). For MAPdot this is the MAPdot Threshold (kPa/s) (MapThresh), for TPSdot it is the TPSdot threshold (v/s) (TpsThresh).

By watching the bar graphs in the accel wizard, you can see how much noise there is in the respective sensor signals. try to set you threshold(s) above these levels to avoid unwanted accel enrichment, which can make you engine run very poorly.

After you have the VE table dialed in, then start adjusting the acceleration enrichment. You may want to try a short acceleration shot time (like 0.2 seconds) and increase the accel enrichment bins.

If the car does not buck under acceleration, you are close to correct settings. If it bucks and stumbles, then it is going too lean and you need to richen that part of the table. Before tuning decel [or accel], make sure you have your VE table close to correct first! One way to do this is to get the VE table set up by setting the TPSdot threshold setting very high (250 kpa/sec or 250 %/s, something like that) so that TPS enrich/enlean never kicks in. Then, (in steady state) set up VE table.

To adjust the accel bins, start with them high, then reduce the lowest bin value by 0.1 milliseconds at a time until the engine stumbles or coughs under gentle opening of the throttle. If it never stumbles, increase the rate at which you open the throttle and try again. If it stumbles even with the above values, double them and try again.

Then repeat with the next higher bin and slightly faster throttle movement. Continue with each higher bin and more aggressive throttle application until all the bin are satisfactory.

The Decel fuel amount (%) (TPSDQ) enrichment can be used to improve the economy of your vehicle. It reduces the amount of fuel injected when the TPS (and/or MAP) are decreasing. A decel fuel amount setting of 100% means no cut. 1% means reduce the pulse width by 99%, to 1% of what it normally would be. Note that decel 'enrichment' is ONLY applied above 1500 rpm.

Tuning for Economy

To get maximum fuel economy, you should aim to:

Tuning the engine for maximum economy with a wide band oxygen sensor is relatively easy. Set your cruise areas of the AFR table to a lean value, say 16.5:1. If you get surging (which indicates a lean misfire) decrease the AFR entries (say to 16.2:1) and try again. A lean 'surge' that feels like someone is pushing the car forwards, then pulling it backwards while you have a constant accelerator pedal position. Generally, this is a sign that you are too lean.

If you don't get any surging, increase the AFR values a bit (say to 16.8:1) until you see signs of surging, then decrease it by about 0.3:1 to 0.5:1. If your EGO ± Limit (%) is sufficient (given the state of tune of your VE table), you should be getting good economy.

With a narrow band, it's a bit tougher to set it for maximum economy. You can adjust the VE table, but the EGO correction tries to bring it back to a stoichiometric AFR.

You could raise your 'EGO Active Above RPM' to just above your cruise rpm, but depending on where that is, it might not be all that workable.

A better method, if you have a narrow band oxygen sensor, is:

Do this for all the values in the VE table you actually cruise at, but not the higher rpm, higher load areas of the VE table.

That keeps the EGO at 16.5:1 at cruise, but lets you set it anywhere else in the rest of the table.

MegaSquirt® and MicroSquirt® controllers are experimental devices intended for educational and research 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.

For some background theoretical information on how tuning affects emissions see the 'Tuning and Emissions' page

Tuning Issues

If you have a very long duration cam in your motor, and it idles poorly, you might be able to get it to idle better through careful tuning with your MicroSquirt® controller. Often a rough idle may be caused by too lean air/fuel ratios. This is really is more of a cam issue than a fueling issue. The exhaust valve is held open later into the intake stroke and the intake opens earlier near the end of the exhaust stroke. At low speeds and relatively high intake vacuum you get more exhaust contamination of the fresh air/fuel charge. As you get more contamination of the air/fuel charge you typically need a richer mixture to get it to ignite and burn properly.

This means you probably cannot run a stoichiometric [chemically correct] mixture of 14.7:1 with a long duration cam at idle. You need to run richer. So you tune your idle to achieve the lowest MAP reading at your chosen idle rpm.

Make sure you are not allowing EGO correction at idle if you have a very long duration cam! It will be trying to “correct” your mixture back to a lousy idle. So set the EGO Active Above RPM to a few hundred RPM above your idle speed. This will ensure that your MicroSquirt® controller does not try to lean the mixture back to stoichiometric to compensate for your adjustments. If you have a wide-band O2 sensor, you can simply set the AFR table value to give you the lowest MAP reading (maximum vacuum) at idle.

Another tip you can try if you have a large overlap cam is to pinch off the MAP hose slightly while the engine is idling, and see if the idle quality improves. If so, then try a restriction in the MAP vacuum line. People have reported success using a 0.040" (1mm) MIG welder jet and a small plastic fuel filter in the vacuum line to your MicroSquirt® controller. (Place the filter closest to your MicroSquirt® controller, the restriction closest to the engine). This has the effect of damping the vacuum pulsation the MAP sensor sees. You will have to experiment with restrictor sizes to see what works for your system.

A few more things to try:

1) Check your VE table entries near the idle point - if the RPM or MAP fluctuate, then you can get rolling idles, etc. You may have to move some of the bins around to bracket the idle RPM/MAP region, and keep flat VE values within this.

2) If you run low-impedance injectors, you need to tune your PWM current limit. Start with 30% (on a V3 main board) or 75% PWM (V2.2 main board) and 1.0 millisecond time threshold. Once you get idling, then first adjust the PWM duty cycle down until you notice a change in idle quality, then move the value back up 3 - 5%. Do the same with the time threshold. On the car it is very easy to do and only takes a few minutes. And, at idle, the overall injector pulse widths are small compared to their close time, so this will allow you to adjust the values. In other words, adjust the PWM current limit before taking the car out on the street where injector pulse widths become high.

Your engine will idle at a certain vacuum. It might help on a street use motor on the VE map to use a lower point for starting MAP than idle vacuum. For example you can have yours set at 20 even though you idle at 27 or so. This allows you to run less fuel on overrun deceleration and coast events (not just for a second like the TPS will do). This allows you a saving of 3-4 MPG on average driving and you might be able to run more advanced timing under this vacuum.

On the other hand, you may want to do the opposite. You can increase the VE values just to the left and above idle. You can make them really rich [say double the idle VE value, to keep the car from stalling. This seems to work really well, if the engine starts to stumble, the PW goes up and it recovers.

By working with the RPM and MAP bins, you should be able to work out a set of values that lets you run lean at cruise and decel [where the RPM is above idle, and MAP below idle], but rich when stalling [RPM below idle].

On the warm up enrichments page, the warm up enrichment only goes to 160° F. The 160° F bin value of the enrichment (which should ideally be 100%) is used at all temperatures above 160° F.

The system compensates automatically for any amount of idle solenoid bypass air because of the effect it has on the MAP value [i.e. the vacuum in the manifold is lowered by the bypass air, this is sensed by the Manifold Absolute Pressure sensor, and the processor decides to inject more fuel. The effect is exactly the same as if you had cracked open the throttle a bit. The fuel goes around the throttle plates, which are never truly closed. They are set at the opening required for the slowest throttle speed desired for the engine under optimal conditions, which leave plenty of room for the fuel to get by. The fast idle air then adds to this baseline amount of air to raise the idle speed. In some circumstances, you may want to run without oxygen sensor feedback, called “open loop”. The best way of forcing your MicroSquirt® controller to run open loop is to change the O2 sensor step to 0 [zero] on the enrichments page. It will still log the O2 voltage, but not do anything about it.

Your MicroSquirt® fuel pump output is programmed with a priming pulse option to shut off the unit in case of an engine stall, etc. It turns on the pump immediately when the power is applied and shuts it off 2 seconds later if the engine is not running. If you set the width of priming pulse in your MicroSquirt® controller to zero, then the system defaults to not turning on the pump until the first tach pulse. If this field is non-zero, then when the key is turned on, the injectors will fire once with a duration specified by the priming pulse field, and the pump is also activated, and will stay on for two seconds if there is no tach activity, or for as long as there tach activity plus two seconds.

On start-up your MicroSquirt® controller records the ambient barometric pressure. The barometer correction multiplier to VE increases as pressure decreases (if set in TunerStudioMS). If it the ambient baro pressure is low (high altitude) the algorithm adds fuel. This is mostly because at a given MAP, the engine will flow more air with less exhaust back pressure and therefore needs more fuel at higher altitudes. Once running the MAP sensor determines fuel based on you VE table entries which are then scaled by the baro correction recorded at start-up. The correction values used by your MicroSquirt® controller came from a code disassembly of a 1990 Corvette ECU.

If your TunerStudioMS displays unusual values for the barometer on the runtime display, 76 kPa, for example, you may be resetting while running. TunerStudioMS has a check that detects most resets by watching the seconds value. If the seconds goes to zero from any value other than 255, then it signals a reset with an audible “beep” and sets a counter visible on the lower right corner of the screen, where it normally says "connected".

As well, you can check the datalog seconds count - make sure it counts up to 255, and then rolls over to zero and continues again and again. If you get shorter counts (like say 56 then a roll over) then the processor is resetting. Note that most of the time on the car you will not notice that the reset has occurred because it happens so fast. What happens when the engine has a running reset (when the engine is running and the processor resets), then it grabs the barometer near the beginning of your MicroSquirt® processor boot procedure. If the engine is running, then it will grab engine vacuum and use this for barometer.

For normal operation the processor comes up so fast that it has grabbed the MAP value before the engine has a chance to start cranking, much less running.


Datalogging allows you to create a running record of your MicroSquirt® real-time variables. Once you have enabled datalogging (by clicking on the Datalog menu item on the File list), TunerStudioMS polls the your MicroSquirt® controller when any of the front page, runtime display or tuning page are active, and writes this data to a file. The file has a comma-separated value format and defaults to having an extension of ".msl" (or ".xls", so Microsoft Excel will open them automatically if you have Excel installed on your system).

When datalogging is enabled, the second status box contains a bold “LOGGING” indicator. The rightmost indicator contains either grayed-out “CONNECTED”, meaning that TunerStudioMS is not communicating with your MicroSquirt® controller, dark “CONNECTED”, indicating that TunerStudioMS and your MicroSquirt® controller communications is working properly, or dark “RESET n”, indicating that the your MicroSquirt® controller controller has been erroneously re-booted n times since TunerStudioMS started talking to it.

To view your MicroSquirt® controller datalogs, you can use a spreadsheet, or Phil Tobbin's excellent MegaLogViewer. MegaLogViewer supports:

Seeing your datalogs graphed can give you a very clear idea of how your electronic fuel injection is working, and make it much easier to spot problems. Get MegaLogViewer here

Note that the datalog includes an 'EngineBit' field. This bit will tell you if the engine was accelerating, warming-up, etc., and can be used to sort unsuitable data lines (because O2 correction is not active under acceleration, warm-up, etc.) from the file.

The enginebit has 7 binary bits. The rightmost bit represents running. It is 1 if ready to run, zero if not ready, so 000001 = 1 or 000000 = 0. The next rightmost value is for cranking, 000010 = 2 if cranking. The fields are:

Binary BitDecimalMeaning
0000X004Start-Up enrich
000X0008Warm-Up enrich
00X000016TPS accel enrich
0X0000032Decel enlean
X00000064MAP accel enrich

Note that the only suitable value for reading narrow band O2 sensor values is when the engine bit is equal to 1 (i.e. running and no enrichments).

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.
©2011 Bruce Bowling and Al Grippo and Lance Gardiner. All rights reserved. MegaSquirt® and MicroSquirt® are registered trademarks. This document is solely for the support of MegaSquirt® boards from Bowling and Grippo.