Back to articles
TuningJanuary 19, 2025

Sensor Calibration and Basic MS3 Setup

Guide to sensor calibration and basic engine parameter configuration in TunerStudio for Megasquirt-3

MS3sensorscalibrationTunerStudiosetup

Introduction

After connecting Megasquirt-3 and establishing communication with TunerStudio, the next important step is calibrating all sensors and configuring basic engine parameters. Without proper calibration, the ECU will receive incorrect data, leading to inaccurate fuel delivery and ignition calculations. This guide covers sections 2.11–2.13 of the MS3 Setting Up manual.

Sensor Calibration

Calibration is performed through the Tools menu in TunerStudio. Each sensor is calibrated individually. It is recommended to complete calibration before the first engine start.

TPS Calibration (Throttle Position Sensor)

The TPS tells the ECU how far the throttle is open. This is a critically important parameter for the accelerator pump, fuel cut-off, and the Alpha-N algorithm.

Calibration procedure:

  1. Open Tools → Calibrate TPS in TunerStudio
  2. Make sure the throttle is fully closed (do not touch the gas pedal)
  3. Click the Get Current button next to the Closed Throttle ADC Count field (or click Low)
  4. Fully open the throttle (press the gas pedal all the way down or open the throttle manually)
  5. Click the Get Current button next to the WOT ADC Count field (or click High)
  6. Click Accept to save the calibration

Verification: after calibration, the TPS should read 0% with the throttle closed and approximately 100% when fully open. The value should change smoothly when slowly opening the throttle — with no jumps or dropouts. If jumps are observed, this may indicate a worn sensor or a poor connection.

Important: if the TPS shows values in reverse order (100% with the throttle closed), check the polarity of the signal wire connection. Some sensors operate in reverse — in this case you can swap the Low and High values.

Oxygen Sensor Calibration (O2 / Lambda Sensor)

The lambda sensor is necessary for precise fuel mixture tuning and closed-loop correction (EGO correction). Calibration depends on the type of sensor being used.

Open Tools → Calibrate AFR Table.

Wideband Sensor

A wideband lambda sensor is the recommended option for tuning. It allows accurate AFR measurement across a wide range (from 10:1 to 20:1 and beyond).

To calibrate, select your controller from the drop-down list:

| Controller | Output Signal | |-----------|----------------| | Innovate LC-1 / LC-2 / MTX-L | 0–5 V, linear | | AEM UEGO (30-4110) | 0–5 V, linear | | PLX SM-AFR | 0–5 V, linear | | Zeitronix ZT-2 / ZT-3 | 0–5 V, linear | | 14point7 Spartan | 0–5 V, linear | | DIY Wideband (based on LSU 4.9) | depends on circuit |

If your controller is not in the list, select Generic Wideband and enter the calibration parameters manually from the controller's documentation — typically two voltage values and their corresponding AFR values.

Tip: most wideband controllers have a 0–5 V analog output. Make sure the controller output is connected to the correct MS3 input (usually pin O2 or AD6/AD7).

Narrowband Sensor

A narrowband sensor (stock oxygen sensor) operates in a limited range and only indicates whether the mixture is lean or rich relative to stoichiometry (14.7:1 for gasoline).

To calibrate, select Generic Narrow Band. No additional settings are usually required.

Important: a narrowband sensor is not suitable for precise fuel map tuning. It is only adequate for maintaining stoichiometric mixture at idle and partial loads. For proper tuning, a wideband sensor is strongly recommended.

Temperature Sensor Calibration (CLT and MAT)

The coolant temperature sensor (CLT) and intake air temperature sensor (MAT/IAT) are thermistors. Their resistance changes depending on temperature.

Open Tools → Calibrate Thermistor Table.

Using Presets

TunerStudio includes built-in calibrations for common sensors:

  • GM — standard General Motors sensors (the most common choice for aftermarket installations)
  • Ford — standard Ford sensors
  • Bosch — Bosch sensors (used in many European vehicles)
  • Honda, Toyota, Subaru and other OEM sensors

Select the appropriate option from the drop-down list and click Write to Controller.

Custom Sensor Calibration

If your sensor is not in the preset list, you will need to enter three calibration points — pairs of resistance and temperature values. This data is usually found in the sensor's documentation.

Example for a typical GM sensor (for reference):

| Temperature | Resistance | |-------------|--------------| | -40°C (-40°F) | ~100,000 Ohm | | 25°C (77°F) | ~2,200 Ohm | | 100°C (212°F) | ~190 Ohm |

Enter the three points (Low / Mid / High temperature with corresponding resistance values) and click Write to Controller.

Tip: if you don't have documentation for the sensor, you can measure its resistance with a multimeter at three known temperatures: room temperature, in a glass of ice water, and in boiling water. Record the values and use them for calibration.

Important: calibrate CLT and MAT separately — they are switched in the calibration window using tabs or a drop-down list. Even if the same sensors are used, the calibration must be written for each channel.

MAP Calibration (Manifold Absolute Pressure Sensor)

In most cases, the MAP sensor is calibrated automatically, since MS3 comes with a built-in MAP sensor (usually MPX4250AP — range up to 250 kPa) and its calibration is already programmed into the controller.

Manual calibration is required in the following cases:

  • An external MAP sensor is used (e.g., for turbocharged engines with boost pressure exceeding 250 kPa)
  • A sensor with a non-standard range is installed (e.g., 3-bar or 4-bar MAP)
  • Pressure readings do not match reality

For manual calibration, specify the sensor parameters in the settings: voltage at 0 kPa and voltage at maximum pressure (or the corresponding values from the sensor's datasheet). This setting is available under Basic/Load Settings → MAP Sensor Calibration.

Verifying Sensor Readings

After calibrating all sensors, you need to verify their readings are correct. Open the live data screen in TunerStudio (Dashboard or Gauges) and compare the values against expected ones.

MAP (Manifold Absolute Pressure)

With the engine off and ignition on, MAP should show the current atmospheric pressure:

  • At sea level: ~100–101 kPa (29.9 inHg)
  • At 500 m altitude: ~95 kPa
  • At 1000 m altitude: ~90 kPa

If the value is significantly different (e.g., 60 kPa or 250 kPa), check the calibration and vacuum hose connection. Make sure the hose is connected to the manifold and has no cracks or kinks.

TPS (Throttle Position)

  • Throttle fully closed: 0% (0–1% is acceptable)
  • Throttle fully open: ~100% (95–100% is acceptable)
  • When opening smoothly, the value should increase evenly, without jumps or dropouts

If the value "jumps" or has dead zones — the TPS is worn and needs replacement. A faulty TPS can cause hesitation during acceleration and unstable idle.

CLT (Coolant Temperature)

On a cold engine, it should approximately match the ambient temperature. As the engine warms up, the value should rise smoothly to operating temperature (typically 80–95°C).

Signs of incorrect calibration:

  • Shows -40°C or an extremely high temperature — the sensor is not connected or the circuit is open
  • Shows a temperature significantly different from actual — incorrect calibration or wrong sensor type

MAT (Intake Air Temperature)

On a cold engine, it should be close to the ambient air temperature. While the engine is running, it may be higher due to heat soak from the engine. Verification is similar to CLT.

O2 / AFR (Lambda Sensor)

  • Wideband: with the engine off and the sensor warmed up, it should read approximately 14.7 AFR (lambda 1.0), as the sensor is measuring ambient air. Some controllers may show different values before fully warming up.
  • Narrowband: with the engine off, it reads approximately 0.45 V (mid-range value). While the engine is running, it switches between ~0.1 V (lean) and ~0.9 V (rich).

If readings are clearly incorrect (AFR 6.0 or 25.0 in open air), check the controller selection in the calibration and the analog output connection.

MAF (Mass Air Flow Sensor)

If your system uses a MAF sensor, make sure its reading is close to zero with the engine off. While the engine is running, values should increase proportionally with RPM and load. MAF is used less frequently than MAP and requires its own calibration table.

Battery Voltage

TunerStudio displays the electrical system voltage:

  • Engine off: ~12.0–12.6 V (depending on battery charge)
  • Engine running: ~13.5–14.5 V (alternator charging the battery)

If voltage is below 11 V or above 15 V, this may indicate problems with the vehicle's electrical system. MS3 uses battery voltage to correct injection pulse width and ignition coil charge time (dwell), so accurate voltage measurement is important for proper operation.

Basic Engine Settings

After sensor calibration, you need to configure the main engine parameters. These settings determine how the ECU will calculate fuel delivery and manage ignition.

Fuel Control Algorithm

The control algorithm determines which parameter the ECU uses to calculate fuel quantity. This setting is found under Basic/Load Settings → General Settings.

Speed Density (MAP-based)

Recommended for most configurations. The ECU calculates air quantity based on manifold absolute pressure (MAP), intake air temperature (MAT), and engine RPM, using the ideal gas equation.

Advantages:

  • Simple and reliable
  • Works well with stock and moderately modified engines
  • Does not require a mass air flow sensor
  • The most common choice for Megasquirt

Suitable for: stock engines, turbo/supercharged, ported cylinder heads, larger throttle bodies.

Alpha-N (TPS-based)

The ECU calculates cylinder filling based on throttle position (TPS) and engine RPM. Manifold pressure is not used for the primary calculation.

Advantages:

  • Ideal for engines with individual throttle bodies (ITBs), where manifold vacuum is unstable
  • Fast response

Disadvantages:

  • More difficult to tune
  • Does not directly account for air density changes
  • Requires more careful VE table tuning

Suitable for: motorcycle engines with ITBs, race engines with aggressive cams and ITBs.

MAF (Mass Air Flow-based)

The ECU uses the mass air flow sensor signal to directly measure the amount of incoming air.

Advantages:

  • Direct air mass measurement — theoretically the most accurate method
  • Automatic temperature and altitude compensation

Disadvantages:

  • Requires a MAF sensor (usually the factory one)
  • Restricts intake airflow
  • Requires a MAF calibration table

Suitable for: restoring a factory management system with MAF, projects with minimal intake modifications.

Blend (Mixed Mode)

A combination of Speed Density and Alpha-N (or other algorithms). The ECU uses a configurable percentage ratio between the two methods, which can vary depending on RPM or load.

Suitable for: complex configurations where no single algorithm provides optimal results on its own. For example, an ITB engine where Speed Density works better at low RPM and Alpha-N works better at high RPM.

Engine Type

Engine settings are found under Basic/Load Settings → Engine and Sequential Settings.

Number of Cylinders

Specify the number of cylinders in your engine (from 1 to 12 and above). This parameter affects the Required Fuel calculation, the number of injection events per cycle, and spark distribution.

Engine Stroke

  • 4-Stroke — the vast majority of automotive engines. Work cycle over 720° of crankshaft rotation.
  • 2-Stroke — motorcycle, snowmobile engines, and similar. Work cycle over 360° of crankshaft rotation. Requires specific injection settings.

Cylinder Layout

  • Inline — all cylinders in a single row (I4, I6)
  • V-type — two banks of cylinders at an angle (V6, V8, V10)
  • Flat/Boxer — two banks of cylinders at 180° (Subaru, Porsche)
  • Rotary — Wankel engines (Mazda RX-7, RX-8)

Firing Order

Specify your engine's firing order. Examples:

| Engine | Typical Firing Order | |-----------|--------------------------| | 4-cylinder inline | 1-3-4-2 | | 6-cylinder inline | 1-5-3-6-2-4 | | V8 (Chevrolet) | 1-8-4-3-6-5-7-2 | | V8 (Ford) | 1-3-7-2-6-5-4-8 | | Boxer 4 (Subaru) | 1-3-2-4 |

Important: an incorrect firing order with sequential injection will cause fuel to be delivered to the wrong cylinder. With semi-sequential or batch injection this is less critical, but the firing order should still be correct.

Trigger Wheel / Toothed Wheel

The trigger wheel determines how the ECU obtains crankshaft position information. This setting is found under Basic/Load Settings → Trigger Wheel / Input Decoder.

Correct trigger wheel configuration is critical — without it, the engine will not start.

Missing Tooth

The most common type. The wheel has evenly spaced teeth with one or two missing to establish a reference point.

Popular configurations:

  • 36-1 — 36 teeth, 1 missing (many Japanese vehicles, popular aftermarket option)
  • 60-2 — 60 teeth, 2 missing (Bosch, VAG, many European vehicles)
  • 36-2-2-2 — Ford (some models)
  • 12-1 — simple systems
  • 24-1 — Nissan (some models)

When configuring, specify the number of teeth, the number of missing teeth, and the angle at which the gap is located relative to TDC of cylinder 1.

Dual Wheel

A system using two sensors: one for the toothed wheel on the crankshaft (usually with fine teeth and no missing tooth), and a second for a single-tooth wheel on the camshaft (for phase detection). Often found on older Japanese vehicles.

Specific Patterns

MS3 supports many OEM configurations:

  • GM LS1/LS2/LS6 — 24x on crankshaft + 1x on camshaft
  • GM LS3/LS7 — 58x on crankshaft
  • Ford TFI — distributor with PIP/SPOUT sensor
  • Ford EDIS — 36-1 with EDIS module
  • Nissan CAS — optical sensor in distributor (360+4, 360+6, and others)
  • Mazda Miata — CAS with combined pattern
  • Honda — 24+1, 12+1 (depending on model)
  • Subaru — 36-2-2-2 or 6/7
  • Toyota — various configurations (2JZ: 36-2, 1UZ: 36-1, etc.)

Select your configuration from the list. If your engine is not listed, refer to the MS3 documentation or forum to determine the correct setting.

Ignition Setup

Ignition settings are found under Basic/Load Settings → Ignition Settings. Incorrect ignition configuration can damage coils or ignition modules.

Output Polarity (Going High / Going Low)

Determines how the ECU controls the coil or ignition module:

  • Going High — the output is activated by a high level (voltage is applied to charge the coil). Used with most logic-level ignition modules and smart coils (e.g., GM LS-style COPs, most aftermarket COPs).
  • Going Low — the output is activated by a low level (grounding to charge the coil). Used with some OEM modules and systems with an external ignitor.

Important: incorrect polarity will cause the spark to fire at the moment the coil begins charging rather than at the moment of release. This will result in incorrect ignition timing and can damage the coil due to overheating.

Dwell Time (Coil Charge Time)

Dwell is the time during which the ignition coil charges before firing the spark. Measured in milliseconds.

Typical values:

| Coil Type | Dwell (ms) | |------------|-----------| | Standard oil-filled | 3.0–4.0 | | GM LS COP | 3.5–4.5 | | Ford COP | 2.5–3.5 | | Wasted Spark (aftermarket) | 2.5–3.5 | | CDI (capacitor discharge) | 0.5–1.0 | | High-energy aftermarket | 4.0–5.0 |

MS3 automatically adjusts dwell based on system voltage: when voltage drops (e.g., during cranking), dwell is increased to compensate.

Warning: excessive dwell can cause coil overheating and failure. Insufficient dwell leads to weak spark and misfires. If unsure, start with a lower value and increase gradually.

Coil Type / Spark Mode

  • Wasted Spark — each coil serves two cylinders. The spark fires simultaneously in both cylinders: one gets the working spark, the other gets a waste spark (on the exhaust stroke). A simple and reliable scheme that does not require a camshaft sensor.

  • COP (Coil-On-Plug) — each cylinder has its own coil. Requires a camshaft signal for phase detection (sequential mode). Provides the most precise control.

  • Distributor — a single coil with spark distributed by a mechanical distributor. MS3 controls only ignition timing; distribution is handled by the distributor.

  • Dual Distributor — two distributors (found on some V-type engines).

Steps After Setup

After completing all calibrations and basic settings, the following steps are recommended:

  1. Save settings — click Burn in TunerStudio to write the parameters to the ECU
  2. Make a backupFile → Save Tune As to save the tune file to your computer
  3. Re-check all sensors — review the Dashboard and make sure all readings are reasonable
  4. Check the trigger wheel signal — crank the engine with the starter and verify that RPM is displayed stably and correctly
  5. Verify ignition timing — use a timing light to confirm that the actual advance angle matches the value in TunerStudio (use the fixed timing mode — Fixed Timing)

Only after successfully verifying all of these points should you proceed to starting the engine and tuning the fuel maps.