Megasquirt-3 Troubleshooting
Guide to diagnosing and resolving common Megasquirt-3 ECU issues: resets, sync loss, communication problems, and electrical noise
Megasquirt-3 Troubleshooting
This guide covers the most common problems encountered by Megasquirt-3 ECU users and offers a systematic approach to diagnosing and resolving them. The material is based on Section 5 (Troubleshooting) of the official MS3 Setting Up manual.
1. Resets
What is a reset
A reset is a momentary shutdown and restart of the ECU processor. It occurs when the processor supply voltage goes outside acceptable limits due to electrical noise or a voltage drop in the vehicle's electrical system. The processor reboots, and the controller loses engine management for a fraction of a second.
Symptoms of a reset
- The engine briefly stumbles or stalls for an instant, then resumes normal operation.
- The USB or RS232 connection to TunerStudio is briefly lost and then re-established.
- The SecL counter (seconds since power-on) resets to 0.
How to identify a reset in the datalog
Open the log in TunerStudio and look for two key indicators:
- "Mark — RESET" label — TunerStudio automatically marks the moment when the connection was lost and restored.
- SecL = 0 — the seconds counter resets to zero, confirming that the processor actually restarted.
If SecL has not reset to zero but the engine still stumbles, the problem is not a processor reset. In this case, look for the cause in sync loss (see Section 2) or other systems.
Causes and solutions
Grounding
Poor grounding is the most common cause of resets. All ECU ground wires must go directly to the engine block, not to the vehicle body. There is resistance between the body and the engine block (especially with engine mounts), which creates a potential difference during high starter or alternator currents.
Recommendations:
- Connect ECU ground wires directly to a bolt on the engine block.
- Use a separate grounding point for sensors and a separate one for power outputs (injectors, coils).
- Make sure the contacts are clean and tight.
Power supply
The ECU requires a clean, stable power supply. Connect power directly from the battery (or as close to it as possible), not from intermediate points in the vehicle's electrical system.
Recommendations:
- Do not connect ECU power to the same line as high-current devices (cooling fans, window heaters, powerful audio systems).
- Use a wire of adequate gauge.
- Install an additional capacitor (100 uF, 25 V) at the ECU power connector if voltage drops persist.
Ignition coil noise
Ignition coils generate powerful voltage spikes that can induce noise in the ECU wiring. This is especially critical when using wasted spark or coil-on-plug systems.
Recommendations:
- Make sure each coil has a suppression diode installed (if required by the circuit design).
- Coil control wiring must be separated from sensor signal wires.
Fuel pump and wideband controller noise
The fuel pump creates a significant current surge when it turns on, and a wideband controller (e.g., Innovate, AEM) can introduce noise through the power line or signal cable.
Recommendations:
- Power the fuel pump through a relay fed from a separate line from the battery.
- The wideband controller should have its own power line and ground to the engine block.
Spark plugs and ignition wires
Non-resistor spark plugs are a powerful source of electromagnetic interference. High-voltage ignition wires routed near the ECU wiring can induce false signals.
Recommendations:
- Use only resistor-type spark plugs (marked with "R" in the designation, e.g., NGK BKR6E becomes BKR6ER-11).
- High-voltage wires should be at least 2.5 cm (1 inch) away from the ECU wiring harness.
- Where possible, route the ECU harness and spark plug wires on opposite sides of the engine.
2. Sync Loss (RPM-Sync)
Symptoms
- The RPM-sync indicator in TunerStudio turns red.
- The engine runs rough with misfires or injection dropouts.
- In the datalog, RPM drops to 0 or jumps sharply to unrealistic values.
- The Lost sync count increases.
- SecL continues counting — this is the key difference from a processor reset.
Lost Sync Reason codes
The datalog and TunerStudio diagnostics panel display a numeric code indicating the reason for sync loss:
| Code | Meaning | |------|---------| | 0 | No problems (sync was not lost) | | 2 | Missing tooth detected at the wrong time | | 11 | Too few teeth between the first and second trigger signals | | 17 | Second trigger signal (cam) not found |
Code 2 usually indicates a mechanical problem (trigger wheel play, damaged tooth) or electrical noise creating phantom teeth. Codes 11 and 17 are more often related to camshaft sensor or wiring issues.
What to check
Crankshaft sensor and its mounting
- Make sure the sensor is securely tightened and has no play. Vibration can cause momentary signal loss.
- Check the gap between the sensor and the trigger wheel — it should be within 0.5–1.5 mm (depending on the sensor type).
Wiring quality
- Crankshaft position sensor wires (VR or Hall) should be twisted pair and shielded.
- Ground the shield on one end only — on the ECU side.
- Sensor wires must not run alongside spark plug wires or coil control wires.
Mechanical issues
- Check the timing belt or chain tension and condition. A stretched belt or worn chain with slack causes trigger wheel jitter, resulting in an unstable signal.
- Inspect the trigger wheel for damage, cracks, or contamination.
VR sensor polarity
If a VR (variable reluctance) sensor is used, incorrect connection polarity causes the ECU to detect the signal edge at the wrong moment. This can cause sporadic sync loss, especially at high RPM.
To check: swap the two VR sensor wires and see if stability improves.
Misfires
Misfires create sharp changes in crankshaft rotational speed that the ECU may interpret as sync loss.
Causes of misfires:
- Fouled or worn spark plugs.
- An excessively rich or lean mixture.
- Faulty ignition wires or coils.
- Non-resistor spark plugs (they create noise that triggers false crankshaft sensor inputs).
3. Noise Filtering
Megasquirt-3 provides several software-based noise suppression mechanisms for the crankshaft sensor input signal. These settings are found in TunerStudio under the trigger settings section.
Noise Filter
Filters out pulses whose duration is shorter than the expected duration of a real trigger wheel tooth. If noise creates a very short pulse (significantly shorter than the period of a real tooth passing), the filter discards it.
Use this filter if the log shows phantom extra teeth at stable RPM.
Tach Interrupt Masking
After detecting each tooth, the ECU disables the sensor interrupt for 30% of the expected period between teeth. This prevents processing of false pulses that may occur immediately after a real tooth (e.g., contact bounce or reflected electrical signals).
Tach Period Rejection
The ECU compares the time between the current and previous pulses. If a new pulse arrives significantly earlier than expected (based on current RPM and acceleration), it is discarded as false.
This mechanism is effective against isolated noise pulses that pass through the Noise Filter.
Polarity Check
Automatic polarity check of the input signal. Noise typically has a very short duration and does not produce a full bipolar signal. Polarity Check analyzes the pulse shape and filters out signals that do not match the expected waveform.
Filter tuning recommendations
- Start with default settings.
- Enable additional filters one at a time, checking the effect of each.
- Excessive filtering can cause real teeth to be missed at high RPM — always test engine operation across the full RPM range after changing settings.
- Software filters do not replace proper wiring routing and the use of resistor-type spark plugs. First eliminate hardware causes of noise, then adjust filtering.
4. Communication Problems
Diagnosing connection issues in Windows
The first step when experiencing communication problems is to verify that the computer detects the COM port:
- Open Device Manager.
- Expand the Ports (COM & LPT) section.
- When you connect the USB cable to the ECU, a new COM port should appear.
If the COM port does not appear:
- Try a different USB cable — a faulty cable is a common cause.
- Reinstall the USB-Serial driver (FTDI or CP2102, depending on the board model).
- Try a different USB port on the computer (preferably a port directly on the motherboard rather than through a hub).
Cable loopback test
This test allows you to verify cable and COM port functionality without connecting to the ECU.
- Disconnect the cable from the ECU.
- On the DB9 connector, short pins 2 and 3 (TX and RX) together — for example, with a paperclip or jumper wire.
- Open MiniTerminal (included with TunerStudio) or any other COM port terminal program.
- Type the word "test" and press Enter.
- If the cable and port are working, the typed text should echo back (appear on screen).
If the text does not echo back, the problem is in the cable, USB-Serial adapter, or COM port settings.
Board loopback test
If the cable test passes but communication with the ECU is absent, the next step is to check the circuit on the board itself:
- Remove the MS3 CPU board from the main board.
- On the main board, short pins 12 and 13 of the U1 chip (MAX232 or equivalent).
- Repeat the loopback test from MiniTerminal.
If the text echoes back, the RS232 circuit on the main board is working and the problem is in the CPU board or firmware. If the text does not echo back, the U1 chip or traces on the main board are faulty.
Firmware test
If the loopback tests pass but TunerStudio cannot connect:
- Reinstall the CPU board and connect the cable.
- Open MiniTerminal.
- Type the capital letter "S" (without quotes) and press Enter.
- The ECU should return a string with the firmware version (e.g., "MS3 Format...").
If the version string is returned, the firmware is working and the problem is in the TunerStudio settings (wrong COM port, baud rate, or protocol). If there is no response, the firmware may be corrupted and reflashing is required.
5. Sensor Fault Detection
Megasquirt-3 has a built-in sensor failure detection system. When a fault is detected, the ECU enters limp mode, substituting safe values in place of the faulty sensor readings. This allows the engine to continue running (with limitations) and reach a repair location.
MAP Failure (manifold absolute pressure sensor failure)
When a MAP sensor failure is detected, the controller substitutes values from the MAP fallback table, which calculates approximate intake manifold pressure based on throttle position (TPS) and engine RPM.
This table should be pre-filled with approximate values for your engine. Accuracy will be lower than with a working sensor, but sufficient for safe operation under moderate loads.
CLT Failure (coolant temperature sensor failure)
When the CLT sensor fails, the controller estimates engine temperature based on the time elapsed since startup. The logic is simple: immediately after starting, the engine is cold; after a certain period, it warms up to operating temperature.
The estimated value is used for warmup enrichment correction and other temperature-dependent functions.
TPS Failure (throttle position sensor failure)
When a TPS fault is detected:
- Throttle position is assumed to be 0%.
- The acceleration enrichment (AE) function is disabled, as it depends on the rate of TPS change.
- The engine continues to run, but throttle response to sudden pedal inputs will be sluggish.
EGO Failure (oxygen sensor failure)
When the oxygen sensor (EGO / Wideband O2) fails:
- Closed-loop fuel correction is disabled — the ECU stops adjusting the mixture based on oxygen sensor readings.
- The engine runs on the base fuel map (VE Table) without feedback.
- The mixture may deviate from optimal, but the engine will continue to operate.
Configuring Sensor Fault Detection
Fault detection thresholds and limp mode parameters are configured in TunerStudio. It is recommended to:
- Enable fault detection for all critical sensors (MAP, CLT, TPS, EGO).
- Fill the MAP fallback table with realistic values for your engine.
- Periodically review the datalog for sensor fault entries — this allows you to catch a problem before it leads to serious consequences.