How to build a full plug and play MS3-Extra for a 1.6 or 1.8 NB Miata
This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!
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 (optional but strongly advised)
[shashin type=”photo” id=”2949″ size=”large” columns=”max” order=”user” position=”center”]
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.)
[shashin type=”photo” id=”3141,3142,3143″ size=”small” columns=”max” order=”user”]
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 in the heat sink if needed.
[shashin type=”album” id=”4,63″ size=”medium” crop=”n” columns=”max” caption=”y” order=”date” position=”left”]
Part 1: MS3 main board assembly
(*) 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.
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 – when installing this on the board, 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 ppust 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: jumpers
– jumper S12C to JS9
– jumper TACHSELECT to VRIN
– jumper VROUT to TSEL
Part 2: the alternator circuit
Although Megasquirt can control the alternator by software, it is strongly suggested to build a hardware circuit. 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.
[shashin type=”photo” id=”3147,3149,2954″ size=”medium” columns=”max” order=”user” position=”left”]
Part 4: Wiring
Step 1: idle valve flyback diode (optional)
For best control, you want idle pwm % to be around 30. Should idle pwm % go over 60-70, then a flyback diode will bring it back down.
Install a 1N4001 with the banded side to 12V and the other side to the idle output of the MS3X (pin 9). Solder it directly onto the Tyco connector to keep high flyback currents out of the pcb.
Step 2: 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.
[shashin type=”photo” id=”3157,3155,3492″ size=”medium” columns=”max” order=”user” position=”center”]
01-02 MS3 + MS3X pinout (03-05 is different, need to update this page)
You need the 72 Pin Male connector (Tyco 1123038-2), available from onlinecomponents, mouser or digi-key.
[shashin type=”photo” id=”2951,3493″ size=”medium” columns=”max” order=”user” position=”left”]
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.[shashin type=”photo” id=”4003″ size=”small” columns=”max” order=”user” position=”right”]
solder a wire from the ‘C’ end of D1 on the MS3X to s12 on the mainboard.
[shashin type=”photo” id=”3166″ size=”medium” columns=”max” order=”user” position=”center”]
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).
note to self: move a/c in to datalog, and vss from datalog to flex in