Z31 Megasquirt and Microsquirt Standalone EFI
Megasquirt is a family of programmable engine computers that replace the factory ECU completely. You set the fuel and timing maps yourself with a laptop, so the car can be tuned for bigger injectors, a bigger turbo, more boost or a different engine. That’s the big difference from a fixed-map upgrade like the JWT 450, which can’t be adjusted and tends to run rich.
This page covers what it takes to run one on a 1984–89 300ZX with the VG30E or VG30ET: which unit to choose, and how each part of the Z31’s engine management is handled.
Which Unit
All of these run the same tuning software (TunerStudio). They differ in how many injectors and coils they can drive on their own and what extra outputs they have.
| Unit | Injectors | Ignition | Reads the stock Z31 trigger disc? | Fits the Z31 when |
|---|---|---|---|---|
| Microsquirt | 2 drivers (two banks), high-impedance injectors only, up to four per driver | Up to 4 logic-level outputs (2 without a harness change) | No, use a replacement trigger disc | You want a small, sealed unit and keep bank-fire injection like the factory system |
| Megasquirt 2 (MS2) | 2 banks | Distributor or wasted spark | No, use a replacement trigger disc | A budget build that keeps bank-fire injection |
| Megasquirt 3 (MS3) with MS3X | Up to 6 sequential | Up to 6 coils, sequential coil-on-plug | Owners report MS3 can read the stock disc; the replacement disc also works | You want sequential fuel and coil-on-plug |
| MS3Pro | Up to 8 sequential, low- or high-impedance | Up to 8 coils | Same as MS3 | You want a fully built unit with everything on board |
The factory Z31 system fires the injectors in two groups (cylinders 1-2-3 and 4-5-6), so a two-driver unit like Microsquirt or MS2 matches it. Sequential injection needs MS3 with MS3X or an MS3Pro.
Crank Angle Sensor (CAS)
The Z31’s crank angle sensor is the optical unit in the distributor. Its disc has 360 outer slits (one per degree) and six inner slots for the cylinders, one of them wider to mark cylinder 1. That high-resolution signal is too fast for MS1, MS2 and Microsquirt to read reliably, so those units need a replacement trigger disc. It bolts in where the stock disc goes: remove the cap and rotor, take out the screw holding the disc, swap it, and reassemble with the disc facing the way its instructions show.
MS3 firmware has a decoder for the Nissan 360-slit pattern (DIYAutoTune’s Z32 guide uses the “Nissan RB25” spark mode for the VG30DE/DETT sensor, which has the same pattern). Z31 owners report the MS3 can read the stock Z31 disc that way.
Harness wires at the Z31 CAS connector (check them against your factory service manual first):
| Harness wire | Function | Megasquirt input |
|---|---|---|
| Black/white | 12 V power | Switched 12 V |
| Green/black | Primary trigger (1° signal, or the replacement disc’s teeth) | Primary (crank) trigger input |
| Green/yellow | Secondary trigger (cylinder signal) | Second (cam) trigger input |
| Black | Ground | Ground |
The optical sensor’s outputs need pull-up resistors, and the Megasquirt board jumpers have to be set for an optical (not magnetic) sensor. Those details depend on the board version, so follow the manual for yours before you solder anything.
Ignition
There are two common setups:
- Keep the distributor. The Megasquirt fires one coil through an ignition module and the distributor still sends the spark to each cylinder. It’s the simplest wiring and works with any of the units above.
- Coil-on-plug. Remove the cap and rotor (the distributor stays in as the CAS, with a block-off plate over the opening) and fit a coil on each plug. Coils with a built-in igniter, like the 350Z’s three-pin coils, take a logic-level signal straight from the Megasquirt; each needs switched 12 V, a ground and its own signal wire. Sequential coil-on-plug needs six outputs (MS3 with MS3X, or MS3Pro). With fewer outputs you can run wasted spark, pairing cylinders 1-4, 2-5 and 3-6.
Injectors
Each injector needs switched 12 V and a signal wire from the ECU. The Microsquirt and standard MS2/MS3 drivers are made for high-impedance (saturated) injectors. Low-impedance injectors need either dropping resistors, like the dropping resistor setup, or an ECU with peak-and-hold drivers such as the MS3Pro. If your car had the injector recall, put the injectors back on their own wires first; see Rewiring Your Fuel Injectors. For bigger injectors, see DSM injectors on the Z31.
Sensors
MAP sensor (load)
Megasquirt normally runs speed-density: it measures manifold pressure instead of airflow, so the Nissan airflow meter comes off. Run a vacuum line from the intake plenum to the MAP sensor. A turbo car needs a sensor that reads boost; a 250 kPa sensor covers about 21 psi of boost, and a 400 kPa sensor covers more.
Intake air temperature (IAT)
Speed-density needs the air temperature to calculate fuel, so add an IAT sensor in the intake, after the intercooler on a turbo car.
Coolant temperature
The factory coolant sensor can stay. Enter its resistance curve in TunerStudio’s sensor calibration (or fit a sensor whose curve is already in the software).
Throttle position (TPS)
Megasquirt needs a variable (potentiometer) TPS that reads smoothly from closed to wide open. Calibrate it in TunerStudio. If your throttle body has only an on/off idle switch, fit a variable TPS.
Oxygen sensor
Use a wideband O2 sensor and controller. The factory narrowband sensor can’t tell you the air-fuel ratio under boost, and tuning without a wideband is guesswork.
Idle, Fuel Pump and Tach
- Idle: the factory AAC valve is a pulse-width (PWM) valve, and Megasquirt’s PWM idle output can drive it. Set the idle valve type to PWM, not stepper.
- Fuel pump: the Megasquirt switches the fuel pump relay, priming the pump for a couple of seconds at key-on and running it while it sees a crank signal. Upgrade the pump if you’re adding power; see Fuel Pump Upgrade and Replacement.
- Tachometer: the 1984–86 analog tach is driven from the ignition coil. If you go to coil-on-plug and remove that coil, the tach needs a signal adapter. DIYAutoTune’s AXM-100 high-voltage tach adapter was developed on a Z31.
- Boost control: a spare output can drive a boost control solenoid, so boost can be set by gear, rpm or speed.
Harness
You can splice the Megasquirt into the factory harness or build a new one. A new harness costs more, but it replaces 35-plus years of brittle wiring and connectors, which is a common cause of signal problems on Z31s (one reason owners leave Nistune for a standalone). Options include:
- A universal flying-lead harness from the ECU maker, wired to each sensor and actuator yourself.
- A Z31-specific harness. Hamiltuned (Felix Hamilton) has made DIY and pre-made Z31 Megasquirt harnesses, plus a plug-in version that connects to the stock harness.
Listed for information only. XenonZcar doesn’t recommend any kit or company; they’re mentioned so you know what has been made.
Before installing, it’s worth testing the ECU on the bench with a stimulator (such as the JimStim) to confirm the trigger input and outputs work.
Tuning
- Software: TunerStudio connects to the ECU. The basic version is free; the registered version adds features such as VE Analyze (autotune), which adjusts the fuel table from wideband readings as you drive.
- Start from a base map made for a similar engine, ideally on the same firmware version. A tune file from one firmware version may not load correctly on another, so match them or copy the settings by hand. The Z Garage shares its Z31 base map and tune files on its Megasquirt page, as references to compare against, not as a finished tune.
- Get the basics right first: trigger and timing, injector size and dead time, sensor calibrations, then idle, then the fuel table, then timing.
- Have it finished properly. Even with autotune, a professional tune on a dyno is worth it on a boosted engine.
Related
Credits and Sources
- The Z Garage: their MS3 Gold Box Z31 install, coil-on-plug, harness and tach notes.
- DIYAutoTune: Nissan Optical Trigger Discs (trigger disc, Z31 CAS wire colors and settings) and their Z32 300ZX Megasquirt guide (Nissan CAS decoder on MS3).
- MSExtra: Microsquirt specifications.
- Rewritten for XenonZcar, November 2026.