Parts needed:
1x MegaSquirt-III w/PCB V3.0 - UnAssembled Kit
1x MegaSquirt-III MS3X Expansion Card
1x MSPNP and DIYPNP IAT Sensor Kit - Steel Bung
+ parts for the miata specific alternator mod (required)
This is a how-to for a full plug and play 99-05 MS3. This build does not use the DB37 connector but the oem ecu connector installed inside the case. The connector for the 01-05 is a straight fit, the 99-00 needs a minor mod to the MS3 card.
The official build manual can be found here. Consult it along with my instructions as it’s more detailed in some areas.
One additional circuit is built to control the alternator.
The 00-99 cars have VICS, the 01-05 cars have VVT. The euro 1.6 is identical to the 1.8, except that it has no VICS.
(The wiring for the MSM can be different than the other cars. On the ’04 MSM at least, power isn’t wired like my ’00, 4S is key switch on power, NOT4AF. Until you turn on the main relay by grounding 3H, 4AF doesn’t have power. It’s probably easiest to use a spare INJ output to ground 3H as soon as you turn on the ignition (activate the INJ output when coolant >-60 degrees or so). See also this thread. This information was never verified by me.)
The only transistor on the heatsink is U5 (no mica insulator needed) on the far left. With a near empty heatsink, there’s enough room to install the miata connector inside the case. It’s ok to drill new holes.
Pictures
Software
The MS3 release can be found here.
Look here for info on how to load firmware.
A starting msq for a 99-00 on stock injectors can be found here (use with care).
A starting msq for a 99-00 on RX8 injectors can be found here (use with care).
A starting msq for a 01-05 on stock injectors can be found here (use with care).
Part 1: MS3 main board assembly
Step 1: transistors
- Q2 (ZTX450)
- Q6(*), Q7(*), Q8(*) (2N3904)
- Q19 (2N3904)
- Q22, Q23 (ZTX553)
Step 2: resistors
- R1, R6, R44, R48, R53, R54 (10K)
- R2, R9, R10 (1K)
- R3 (51K)
- R4, R7 (2K49)
- R5, R8 (2K2)
- R11, R51 (1M)
- R16, R26(*), R27(*), R29(*), R42, R55 (1K)
- R49, R50 (100K)
- R24(*), R25(*), R28(*) (330R)
- R40 (1R)
- R45, R46 (10K)
- R47 (47K)
- R52 (install a 100K resistor in pin 1 and 3 – no pot needed)
- R56 (10K pot – make sure the setscrew is towards the top!)
- Turn R56 about 12 turns to the fully anticlockwise position (you may or may not feel a “click”) and then turn R56 back about 10½ turns clockwise.
- 5V pullup for the VR input circuit: install a 1k resistor between the left hole of R13 (= 5V) and the right side of R45 just below it (= VRIN)
Step 3: diodes
- D9 to D11, D4, D12, D13, D19, D24
Step 4: capacitors
- C1, C3, C18, C19, C23 (0.1µF)
- C26 to C29 (0.1µF) (**)
- C2, C9, C10 (0.22µF)
- C4, C6, C8, C15, C31 (0.001µF)
- C5, C7 (1.0µF)
- C32 (0.01µF)
- C16, C17 (polarized!)
- C22 (polarized!)
Step 5: coils and fuses
- L1, L2, F1, F2 and MOV1
Step 6: varia
- U2 (map sensor), U6 (**), DB9(**), U7(LM2904) and the 40-pin socket
Step 7: heatsink
Secure the heatsink by installing U5 with heat paste, no mica insulator, a plastic bolt and the short stand-off. Use a temporary bolt on the other end of the heatsink.
Step 8: leds
- D14 to D16(*)
Step 9: Solder a temporary ground wire to DB37 pin 1 and 12V to DB37 pin 28 and do the tests as described in step 24 of the build manual here.
Step 10: jumpers
- jumper S12C to JS9
- jumper TACHSELECT to VRIN
- jumper VROUT to TSEL
(*) I normally don’t install these parts because you can’t see the LEDs once the ecu is installed.
(**) I normally don’t install these parts. They are for serial comms but the MS3X has USB.
Here’s a component map without serial / leds.
Part 2: building the alternator circuit
Megasquirt cannot directly control the alternator, so you need to build a regulator in the proto area (or install a 90-97 alternator).
The setpoint is determined with the formula: 2.495V*(1+ R4/R11), so it’s important to use 1% resistors for R4 and R11.
Testing the circuit is done by measuring the output on the Field wire. Measure the output while increasing the input voltage of the board. The output should follow the input up to about 14.4V and drop to zero when you keep raising to above 14.4V.
You can take 12V from S12, but I took it from the left side of D3 (anode) as it was closer by. Run the output to 1O (GY/R) in the 64-pin connector.
This is how you order the components in the proto area.
This alternative layout with the resistors layed down is easier to solder, but uses the entire proto area.
Lately, I build the circuit directly on the pcb instead of the proto area. This uses the 100K trimmer pot instead of R4 and allows you to adjust the output voltage. I aim for 14.4V.
See here for more info.
Part 3: MS3X card modification
- Remove the DB37.
- Turn both pots (R11 and R32) full anti-clockwise – approx five turns.
- Turn the top one (R11) 3½ turns clockwise.
- Make sure JP3 and JP7 are installed. JP8 should not be fitted.
- 99-00 only: In order to clear the 64-pin connector, you need to cut off a corner of the MS3X card. There’s no copper in that area. The 01-05 is a straight fit.
Part 4: Wiring
Step 1: idle valve flyback diode
A flyback diode must be installed over the idle valve. Without it, idle pwm % will be around 70, but you want about 30 for best control.
Install a 1N4001 with the banded side to 12V (W/R wire in the ecu connector) and the other side to the idle output (MS3X – pin 9). Solder it directly onto the Tyco connector to keep high flyback currents out of the pcb.
Step 2: VICS/VVT valve flyback diode
Install a 1N4001 with the banded side to 12V (W/R wire in the ecu connector) and the other side to the VICS/VVT output of the MS3X (pin ).
Step 3: Fan and A/C flyback diodes
Install a 1N4001 with the banded side to 12V (W/R wire in the ecu connector) and the other side to the a/c output of the MS3X (pin ).
Install a 1N4001 with the banded side to 12V (W/R wire in the ecu connector) and the other side to the fan output of the MS3X (pin ).
Step 4: pinouts
In case you’re wondering why I’m not using VVT but Nitrous2 to control VVT, this is because there’s only two different concurrent frequencies allowed across all PWM outputs. The outputs are grouped like this:
Group A | Group B |
PP0 – Inj 1 (mainboard) | PP2 – Idle |
PP1 – Inj 2 (mainboard) | PP3 – Boost |
PP4 – Nitrous 1 | PP6 – VVT |
PP5 – Nitrous 2 | PP7 – FIDLE (mainboard) |
What this sharing means is that Idle and VVT must use the same frequency. By moving VVT to an output of group A, this allows for a different frequency.
99-00 MS3+MS3X pinout
You need the 64 Pin Male connector (Tyco 174518-7), available from onlinecomponents, mouser or digi-key.
01-05 MS3 + MS3X pinout
You need the 72 Pin Male connector (Tyco 1123038-2), available from onlinecomponents, mouser or digi-key.
Partnumbers for the connectors here.
Part 5: Final adjustment
Step 1: installation of the MS3X card:
The short stand-off is for U5. Use the longer one in the left bottom corner of the card (99-00) or the top right corner of the card (01-05).Use a plastic bolt with 1 or 2 plastic nuts and some washers to fill up the gaps.
Step 2: fine adjustment of the VR circuits:
- For the main board, measure the voltage on the upper leg of R54 while turning R56.
- For the MS3X board, measure the voltage on the lower leg of R17 (close to U7) while turning R11.
In both cases, you want to see about 2.5 to 3 volts at that point, which puts you right in the middle of the actual output range of the sensors.
Remark on the Nitrous input
I’ve had a bit of trouble configuring that input as it didn’t do what I expected. Turns out that the code is written to expect an active 12V (or 5V) input with the jumper omitted.
With the jumper in place, you can use a switch to ground, but will work in reverse on that input. The input will be active when the switch is NOT to ground.
This means that you could use this input for switches that are normally closed to ground and open when triggered (like some clutch switches).
(move a/c in to datalog, and vss from datalog to flex in)