RSS Feed

99-05 MS2

How to build a full plug and play MS2-Extra for a 1.6 or 1.8 NB Miata (99-05)

Parts needed:
1x MegaSquirt-II Engine Management System w/PCB3 - UnAssembled Kit
1x PCBv3 and v2.2 -- Relay Control 'ModKit' (required for the fan)
1x PCBv3 and v2.2 -- Relay Control 'ModKit' (required for Vics - ONLY for 99-00)
1x PCBv3 -- PWM IAC Valve Control (TIP120) 'Mod-Kit' (required for the IAC valve)
1x PCBv3 and v2.2 -- Boost Control 'Mod-Kit' (optional for EBC)
1x PWM converter board (required to prevent humming IAC valve)
1x 4 channel Ignition/Injection driver board (required for full sequential fuel)
+ parts for miata specific cam & crank inputs circuits (required)
+ parts for the miata specific alternator mod (required)
+ parts for the low battery light (optional)
+ parts for the table switching / launch control / ebc ... (optional)
(here's a parts list of all the above circuits)

Update
Since the MS3X is released, I no longer see any benefit in building a MS2.  MS3 is a lot easier to build and has many more options.  FWIW.

About

This is a how-to for a full plug and play 99-05 Megasquirt on stock sensors. The 64-pin connector can be installed inside the case. Additional circuits are built to control the fan, VICS, tacho, alternator and cam & crank inputs. Optionally, there’s circuits for EBC, table switching and launch control.
The euro 1.6 is identical to the 1.8, except for the VICS which is not present on the 1.6.

This build uses Jean Belanger’s 4 channel driver board to get full sequential injection. The benefit of Jean’s board is that it takes up very little space and the stock injector circuit can be removed freeing up nearly the entire heatsink! The only transistors left are U5 (no mica insulator needed) on the far left and the optional EBC transistor in Q16 on the far right (use a mica insulator).

With the near empty heatsink, there’s enough room to put the miata connector inside the case, bolted to the top lid. Jean’s board fits nicely next to it, in the top slot of the case.
You only need to buy the board and 4 injector drivers (FET + resistors), you don’t need the ignition drivers.
Attention, this board only works with hi-imp injectors. If you intend to use lo-imp injectors, you need Jean’s peak&hold driver board as well. I’m assuming you’re using hi-imp injectors.

Pictures
You can find all pictures here:

 

Software version
You need to use MS2Extra as that’s the only software version that supports the stock NB sensors. Get it here.

 

The build

Only very little components are installed from the standard kit.  This drawing shows the only parts you need to install. All the rest will be replaced by the circuits in the proto / opto / VR / injector output / areas.
Start your MSII V3 build as described in the MS2 manual. Just follow the manual along with my instructions.

Step 1 to 21: install the DB9, MOV1, C15 to C19, C22-C23, D9 to D13, D19, L1-L2, F1-F2 and U5
Step 22: install the jumper from S12C to JS9. Ignore the rest of the instructions in this step.
Step 23 trough 27: install C26 to C29, U6 and C1
Step 28 trough 31: skip
Step 32: install R1 unless you plan on using hardware based table switching (see below)
Step 33 and 34: install R3 and R6
Step 35 trough 38: skip
Step 39: install the 40-pin DIP socket and insert the CPU
Step 40 and 41: test with Tunerstudio
Step 42: remove CPU
Step 43 trough 49: install C2 to C10, R2, R5, R8 to R11
Step 50 through 52: skip completely because the MS cam and crank input circuits don’t work on a Miata. We’ll build new input circuits.

stock input circuits
stock input circuits
 
MS2 new input circuits
MS2 new input circuits
 
To the left are the original MS2 input circuits.To the right are the new schematics.

 

 

 

MS2 new input circuits in what used to be the stock input circuit
MS2 new input circuits in what used to be the stock input circuit
 
This is how to build the circuits in the VR area. I tried to copy the same layout as the MS V3 schematics so you can see what components I left out, shorted or replaced with different values. Dashed lines are connections made with wire (blue in this picture). Solid lines are traces already on the board.

By putting a jumper in R13, OptoOut becomes a 5V source that you can use to power other optional circuits.
The green values are the original MS values.
The gray values are what you replace them with.
The 1nF capacitors must be temperature stable ones like NPO or X7R’s.
If you can’t find 13K for R3 and R9, it’s ok to use 12K.
Run a wire from the bottom hole of R44 to 2J (GY/R) of the 64-pin connector
Run a wire from the bottom hole of C32 to 2H (GR/L) of the 64-pin connector

Step 53 and 54: install U2, R4 and R7
Step 55: test
Step 56: skip
Step 57: install all resistors except for R19, we’re doing the PWM converter mod instead (see further down). IOW, install R16, R26, R27 and R29.
Step 58: skip
Step 59: only install D4
Step 60: skip
Step 61: install R24, R25 and R28
Step 62: only install Q2. Don’t do the TIP120 mod, we’re doing the PWM converter mod instead
Step 63 to 64: skip
Step 65: Skip. We use D14 and D16 to drive the stock coils. Add a 100 to 330 ohm 1/2W resistor between Vcc and the output of the 2N3904 to drive the coils.

MS2: leds replaced with ignition outputs
MS2: leds replaced with ignition outputs
 

Shashin Error:

No photos found for specified shortcode

Set Spark Output to ‘Going Low (Normal)’ in TunerStudio.

 

 

 

Spark Output A goes to 3G (BRN/Y) on the 64-pin connector.
Spark Output B goes to 3H (BRN) on the 64-pin connector.

Step 66 to 73: skip
Step 74: only install Q19
Step 75: only install R40
Step 76: skip
Step 77: install Q6 and Q8. Q7 is too weak to drive the fans, so use the ZTX450 that you have left from step 62 (or a 2N2222/PN2222) in the Q7 location.
Step 80: install D14 to D16

 

PWM converter board (optional but I always build it)

MS2 idle pwm circuit built in what used to be the injector outputs
MS2 idle pwm circuit built in what used to be the injector outputs
 
idle pwm circuit
idle pwm circuit
 
The stock NB idle valve works best at a frequency of around 500Hz. Problem is that the MS works at a much lower frequency, wich can cause an annoying hum at idle. Not everyone has the hum, but I have it on my car. Jean’s PWM converter board multiplies the MS frequency while keeping the same duty cycle without losing any precision.
The board is very little and not so easy to install. It’s easier to install the components directly on the MS in the U4 location. Notice that I installed the chip upside down! Pin 1 is where pin 5 normally goes. The green traces are wires. It looks complicated, but it really is very easy. R19 is worth mentioning. This is part of the standard idle circuit and must be kept. Install it in Q5 (2 outer holes). The resistors are 1K, the capacitors are 100nF.

 

jumper for PWM idle convertercut trace
jumper for PWM idle convertercut trace
 
jumper for PWM idle converter
cut trace (circle)
jumper for PWM idle converter cut trace (circle)
 
You’ll have to cut the 2 traces to PWM0-1 and PWM1-1 and jumper pins 4, 6 and 7 of U4. Insert the jumper and put the chip over it. The holes are large enough. The jumper leg in pin 6 is longer so it can be bent further to pin 7 on the underside of the pcb. Again, the chip is installed the other way round, so make sure you short the correct pins.
Solder the flyback diode (1N4002) directly on the 64-pin connector.
The TIP120 is missing in this picture. Install it on the end plate or get creative and install it on top of the EBC transistor.
The idle output is pin 30 on the DB37, so wire it to 3O in the 64-pin connector (or directly run pin 2 of the TIP120 to 3O). Make sure to bring 12V to 3M in the 64-pin connector to power the idle valve.

Fan

Use warmup led D15 to activate the fan.
The output is the negative side of D15 (top hole of D15). Wire it to 1R (R/G) on the 64-pin connector. Solder the flyback diode (1N4002) directly on the 64-pin connector. That way, there’s no risk to burn out traces should there be voltage spikes. You may leave R25 and D15 in place as an indicator when the fan comes on.
Make sure you didn’t install the 2N3904 in step 77 because it’s only rated at 200mA. Instead, use the ZTX450 that you have left from step 62. A 2N2222 a PN2222, is fine as well (they’re all equivalent). A BC639 works too but it has a different pinout.
In Tunerstudio, enable output port PM5.

Tacho

Use JS0 as a tacho output. Build the circuit in the proto area. It’s ok to use the 2N3904 that you have left from step77 because the tacho doesn’t draw much current.
The input of the circuit goes to JS0.
The output goes to 2K (G/O) on the 64-pin connector.
In Tunerstudio, set the tachometer output to IAC1.

VICS

Use JS2 to activate vics. Build the circuit in the proto area. Solder the flyback diode (1N4002) directly on the 64-pin connector.
The input of the circuit goes to JS2.
The output goes to 3Q (W/L) on the 64-pin connector.
Vics is only present on 99-00 cars. The later cars have VVT.
In Tunerstudio, enable output port PT7- IAC2.

Alternator Mod

MS2/MS3 alternator charging circuit
MS2/MS3 alternator charging circuit
 
Megasquirt cannot directly control a ’99 alternator, so you need to build a regulator in the proto area.
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. Measure the current between Field output and ground. You must have ~13mA @ ~14.4V and 0mA 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.
If you can’t find a PN2907, you can also use a BC640 (different pinout though).

Table Switching and Launch control (optional)

Shashin Error:

No photos found for specified shortcode
You need to free up 2 additional spare ports on the processor if you want to use table switching or launch control. You’ll have to build an active low input circuit for each (AL1 and AL2). Again, there’s room enough in the proto area.
I intend to use table switching as a failsafe mechanism when I’ll be running waterinjection and EBC. When the pressure switch closes (and activates the WI), the timing map will switch from a standard map to a more agressive map. If the WI fails (no water) the map remains in the standard mode. Also, the boost controller will remain bypassed to protect the engine. Take unused pins in the 64-pin connector to go to the switches. You could use 1E for table switching as it terminates at the FEN terminal on the diagnostics connector (top row, leftmost pin). Another possibility is 1D. It goes to the diagnostics connector between the FEN and TEN terminals (2nd pin from the left).

wires for launch control and table switching
wires for launch control and table switching
 
Table switching
This modification is only necessary if you want to do hardware based table switching (like a failsafe switch in combination with waterinjection for instance). Should you want to do software based table switching (based on a parameter like RPM, boost etc), then you don’t have to do this modification. It’s unlikely that you ever need this.
The bottom hole of R1 (aka PE1) is the table switching input. Add the yellow wire in this pic and remove R1 (see step 32). The wire goes from pin 15 of the DIP40 to the corner pin of the C64 chip. Adding this wire is extremely difficult. You could ask DIY to do it while ordering your kit, I believe they ask $20 for this service.

Launch control
JS7 (aka PE0) is the launch control input. Again, we need to do a small mod on the MS2 card. VERY carefully solder a small wire from pin 10 of the DIP40 (by C10) to JP4. It’s the green wire in the pic above. This one is easy.

This is how you order the components in the proto area.

Shashin Error:

No photos found for specified shortcode

- 2 active low inputs for table switching and launch control (pink)
- output for vics (yellow)
- output for tacho (green)
- alternator (blue)

 

There’s not enough space for 2N2222A’s (metal can) so instead I used the smaller PN2222A (plastic can)

4 channel Ignition/Injection driver board

Shashin Error:

No photos found for specified shortcode

To use the additional injector drivers, you need to add 2 wires to the MS2 card.

pin 1 of the chip goes to pin 4 of the 40-pin header
pin 4 of the chip goes to pin 5 of the 40-pin header

 

4 channel ignition / injection driver board for MS2.  We only use the fuel part.
4 channel ignition / injection driver board for MS2. We only use the fuel part.
 
Assembly is simply a question of soldering all the components to the board.
R1 to R8 are 330 Ohm and R9 to R12 are 100K.
Installation consists in connecting the board to the appropriate places on the MS board.

JBPerf.com sequential fuel board is connected to these 4 points
JBPerf.com sequential fuel board is connected to these 4 points
 
Solder a wire from the INJ1to INJ4 pads to the same points on the MS board.
Solder a wire from the GND pad (next to INJ4) to GND (SG) on the MS board.
There’s also 3 common ground pins for the injector outputs that you must bring to a good ground (I bring these directly to the ground on the 64-pin connector).
The outputs of the 4-channel board are wired to your 4 injectors, in firing order. You have 4 outputs, numbered 1,2,3,4 and firing in that order. And you have four cylinders, but they don’t fire 1234, they fire 1342.
So you match this up:

Wire output1 (Q5) to injector 1on pin 3W (Y/B) on the 64-pin connector.
Wire output2 (Q6) to injector 3on pin 3Y (Y/R) on the 64-pin connector.
Wire output3 (Q7) to injector 4on pin 3Z (Y/G) on the 64-pin connector.
Wire output4 (Q8) to injector 2on pin 3X (V/G) on the 64-pin connector.

EBC (optional)

MS2 electronic boost control circuit built in Q16 location
MS2 electronic boost control circuit built in Q16 location
 
This circuit is built in the Q16 location.
- replace Q16 with the IRLZ44 (use a mica insulator)
- install 10K in R57
- install a jumper in R43
- install 100 ohm between IGBTin and JS11
- IGBTout is your EBC output
- the flyback diode in the picture is not required
The EBC output goes to an unused pin in the 64-pin connector. You can use 1L (BR/Y) for this as it terminates at the TEN terminal (top row, 2nd pin from right) on the diagnostics connector, probably right were you want to install your EBC valve. Next to the TEN terminal, you can take 12V to feed the EBC valve (top row, rightmost pin).

Alternator Warning Light (optional)

MS2 low battery warning light
MS2 low battery warning light
 
MS2 this is how you build the low battery warning light in what used to be the injector circuit
MS2 this is how you build the low battery warning light in what used to be the injector circuit
 
This can be built in the original injector output part of the board. Here’s what it looks like. Only install what I drew in green.

 

 

 

- R14 in Q12 (pin 2 and 3)
- R15 in Q11 (pin 2 and 3)
- R16 in Q9 (pin 2 and 3)
- R17 in R31
- R18 in R30
- R25 in R34
- 100 to 220nF in R18
- ZTX690 in Q13
- TL431 in Q3 (flat side away from the heatsink)
- jumper from D6 (left hole) to R33 (right hole)
- jumper from Q9 pin1 (leftmost hole) to R36 right hole
- jumper in R35
- jumper in Q10 (pin 1 and 3)
- output is Q12 pin1, so wire it to 1Q in the 64-pin connector.

Result
This is what the PCB looks like when all custom circuits are added:

idle PWM converter, new input circuits, low battery light and alternator control (proto are)
idle PWM converter, new input circuits, low battery light and alternator control (proto are)
 

green wires: idle pwm converter circuit (TIP 120 missing in the pic)
orange wires: low battery warning light
blue wires: CKP and CMP input circuits
yellow wire: S12C (12V) to SJ9 (to activate JS0 and JS2)
proto area: alternator control circuit

 

99-00 MS2 pinout

You need the 64 Pin Male connector (Tyco 174518-7), available from onlinecomponents, mouser or digi-key.

Tyco 174518-7 (64-pin connector) needed on 99-00 but fits anything from '90-'00
Tyco 174518-7 (64-pin connector) needed on 99-00 but fits anything from '90-'00
 

 

 

 

01-05 MS2 pinout

You need the 72 Pin Male connector (Tyco 1123038-2), available from onlinecomponents, mouser or digi-key.

Tyco 1123038-2 (72-pin connector), fits 01-05 only
Tyco 1123038-2 (72-pin connector), fits 01-05 only
 

 

 


 

Partnumbers for the connectors here.

Geen reacties »

Nog geen reacties

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Verplichte velden zijn gemarkeerd met *

De volgende HTML tags en attributen zijn toegestaan: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>