 |
Quickly to the latest Items |
|
|
 |
Visitors online |
|
There are 4 users online.
|
|
|
|
How to build a standalone MS2-Extra for a '99-'00 Miata
Parts needed:
1x MegaSquirt-II Engine Management System w/PCB3 - UnAssembled Kit
2x PCBv3 and v2.2 -- Relay Control 'ModKit' (Vics and fan)
1x MSPNP IAT Sensor Kit - Steel Bung (GM fast air temp sensor)
1x PWM converter board (needed to resolve loud IAC hum on most cars)
1x 4 channel Ignition/Injection driver board (needed to run full sequential fueling)
1x PCBv3 and v2.2 -- Boost Control 'Mod-Kit' (optional for electronic boost control)
1x MPX4250 2.5 Bar MAP Sensor (optional for constant barometric correction - not recommended)
+ parts for miata specific cam & crank inputs circuits
+ parts for the miata specific alternator mod
+ parts for the low battery light
Background
On my first MS, I kept the DB37 so I could use the Jimstim. On this build, I decided to drop the DB37 and install the Miata specific connector inside the MS case. The reason I could do this is because I didn't build the stock injector driver circuits. Instead I used the 4 channel ignition / injection driver board. This board has the advantage that you can use full sequential fueling (and ignition, but I didn't use that part of the board). By doing this, the entire heatsink area stays empty (except for the LM2937 in U5 and the TIP120 idle mod). The Miata specific connector fits fine on the heatsink area.
Video
on the JimStim (older MS)
in the car (older MS)
Pictures
You can find all relevant pictures in the Megasquirt album here.
JimStim
B uild your JimStim according to the build manual. It's really very simple to build, so I'm not going into it here.
If you buy one, make sure to get the three-dot version. Matt from DIYAutoTune confirmed that the wheel pattern for the '99-up Miata was changed between the two-dot and three-dot versions of the JimStim. The two-dot processor had the wrong pattern and won't generate an rpm reading in Megatune.
Preparation of the JimStim is easy.
- set dips 2,3,6 to ON and the others OFF
- install a jumper from PIN25 (IAC1A) to the 2nd TRIGGER header pin (yellow in the pic below).
Edit: I got a three-dot chip and the Miata 99-00 mode is still not functional. So, if you don't get an rpm reading on the JimStim, don't worry too much about it, just try a different mode for now, like CAS4/1 or Edis. I got mine functioning on CAS4/1.
This is only on the JimStim of course. Once you plug it into the car, you'll obviously have to set the Tach input to Miata 99-00
You can test the functionality of the outputs like this:
- FANS: run 2 jumpers to IAC1 led. 1st one from 12V (black in the pic), 2nd one from SPR1 (red in the pic)
- VICS: run 2 jumpers to IAC2 led. 1st one from 12V (black in the pic), 2nd one from SPR2 (green in the pic)
- ALTERNATOR: run a jumper from IAC1B to one of the 6 IGN leds (blue in the pic). Raise the input voltage of the JimStim. When it goes over 14.3V, the led will light up (dim).
Megasquirt version
We'll be using MS2Extra as that's the only software version that supports the stock '99-'00 sensors and full sequential fuel.
Basically, buy a MS2 and load the MS2-Extra software. Get it here.
Overview of all in- and outputs
This chart shows all possible in- and outputs on the MS. You can use 1 function in every row. As JS1 and JS3 are always the opposite value of JS0 and JS2, we can't use JS1 and JS3. The circuits I'm using are circled in green.
I used up every single in- and output possible. I even had to free one up on the daugherboard for table switching.
 JS0 Fan output (JS0)
JS2 VICS output (JS2)
JS4 Constant barometric correction
JS5 knock input from KnockSenseMS
JS7 Active Low input for Launch Control (PE0)
JS10 2nd trigger input
JS11 EBC output
D14 spark A output
D15 tacho output
D16 spark B output
Fidle Idle output
Miata specific circuits
My build is for a '99-'00 using the stock sensors. To get it working, additional circuits will have to be built to control the fan(s), VICS, tacho and the alternator. Optionally, there's circuits for electronic boost control (EBC), table switching and launch control.
You will also need to build new cam and crank input circuits.
The build
I'm using the PWM converter board and the 4 channel ignition / injection driver board.
The 4 channel board replaces the entire stock injector output circuit, so all these components can be left out. It'll free up almost the entire heatsink.
 If you build your MS with all the circuits I described and with Jean's boards, then these are the only parts you'll need to install from the original kit. All the rest will be replaced by the circuits in the proto / opto / VR / injector output / areas. One could start to wonder if it still makes sense to buy an entire kit, seeing as half off it is not needed. If you look closely, you'll see that I installed R19. That's not needed. I removed it later. Also, I used a 2N2222 in Q2, but the stock ZTX450 is just fine (better even).
Start your MSII V3 build as described in the MS2 manual here.
Step 1 to 21: install like it says in the manual
Step 22: Install the jumper from S12C to JS9 in order to be able to use JS0 and JS2 (aka IAC1 and IAC2). It's the yellow wire in tbe picture. Ignore the rest.
Step 28 trough 31: Don't install C20, C21, C24 and C25. Not needed on MS2 (it has its own crystal circuit on the daughterboard).
Step 32: Don't install R1 if you plan on using Table Switching
Step 35 trough 38: Skip. Not needed on MS2.
Step 43: The code for constant barometric correction doesn't work. If you do insist on installing it, each sensor needs 0.1µF so simply double the value of C3 to 0.22µF (closest value).
Step 50: The standard MS2 circuit is inadequate for use on a '99 Miata. You'll need to build new cam & crank input circuits, so completely ignore step 50, 51 and 52.
 This is what the original MS2 input circuits look like. The upper part (Optoin) is the opto circuit, the bottom part (VrIn) is the VR circuit. The VR area is where you build the new input circuits. The only thing I grab from the Opto part is Vcc on R13. The remainder of the opto circuit stays empty. The jumpers from Tachselect to Optoin or VrIn will not be used. in the modified circuits, the inputs are wired directly to C32 and R44.
To the right is the schematic we'll be building instead.
 This is what the new circuits look like and how you build them in the VR area. The dashed lines are connections made with wire. They are the blue wires in the picture. The solid lines are traces already on the board. 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. The 1nF capacitors must be temperature stable ones like NPO or X7R's!
I initially used 12K+1K for R3 and R9, but I replaced them with the correct 13K resistors later. In some of the pics, you'll see 12K+1K still.
R2 goes in the 2 outer holes of Q23. R9 goes directly over pins 5 and 7 of the the TL082. The holes in the PCB are large enough to push them through the same hole.
When wiring your ECU later:
CKP input will go in on C32 (normally TachSelect on pin 24). The output (pin 1 of the TL082) goes to TSEL.
CMP input will go in on R44 (normally IAC1A on pin 25). The output (pin 7 of the TL082) goes to JS10.
Step 53 and 54: install
Step 56: Skip
Step 57: Don't install R19, we'll be do the PWM converter mod instead (recommended)
Step 58: Skip
Step 59: Don't install D8.
Step 60: Skip
Step 61: You'll be using D15 as tacho output (see below), so do not install R25, only install R24 and R28.
Step 62: Only install Q2. Don't do the TIP120 mod either. We'll be using the PWM converter board instead (recommended)
Step 63 to 64: skip
Step 65: Miata coils have an ignitor driver built in, so there's no need to build this. Instead, we'll use the D14 and D16 LED's to drive the stock coils. Normally you add a 270 to 330 ohnm resistor between Vcc and the output of the 2N3904 to drive the coils. But there's no use to keep the LED's, so just jumper D14 and D16 and use the existing R24 and R28 to drive the coils (they very conveniently already are 330 ohm).
Edit: It's better to lower the resistance to 100 ohm. If you do, use a 1/2W resistor because you're pulling 50mA through it. At 5V that would be 1/4W.
(Remark: set SparkOutInv to NO in MegaTune)
When wiring up your ECU later:
Spark Output A will come out on pin36 (D16 -> IGN)
Spark Output B will come out on pin31 (D14 -> IAC2B)
Step 66 to 73: Skip.
Step 74: Don't install Q20.
Step 75: Don't install R39, do install R40.
Step 76: Skip
Step 77: install Q6, Q7 and Q8
Step 80: You already jumpered D14 and D16. We're using D15 as tacho output so don't install D15 but a 1K resistor instead and bring 12V to t he appropriate point of R25. The collector will be your tacho output. You can find 12V on various points on the board. Yout can take it from S12, but I took it from the left side of D3 (anode) as it was closer by. Also bring 12V to the proto area.
Additional circuits in Proto Area
Fan and VICS
The oem ECU drives the fan(s) and VICS. You'll need to use a programmable outputs (JS0 and JS2) to drive them. These circuits are built in the proto area. It's just a 2N2222 with a 1K resistor. I installed the diodes directly onto the 64 pin connector, not on the board.
Alternator Mod
Megasquirt cannot directly regulate a '99 alternator, so I built an alternator control circuit 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. I used a 5% for R11 and found my setpoint to be over 15V! Make sure your setpoint is about 14.4V.
Testing the circuit is done by measuring the output on the Field wire. Measure the Field output voltage while increasing the 12V input voltage of the board. The output voltage should follow the input voltage up to about 14.4V and drop to zero when you keep raising the input voltage above 14.4V. Measure the current between Field output and ground. You must have ~13mA @ ~14.4V and 0mA above 14.4V.
This is what the circuits look like in the proto area.
- 2 programmable outputs for the fans and vics (green)
- 2 active low input circuits for table switching and launch control (pink)
- alternator control circuit (blue)
There's not enough space for 2N2222A's (metal can) so instead I used the smaller PN2222A (plastic can) and a spare ZTX450 that came in the kit. All 3 are direct swaps. The ZTX450 is rated at 1A, the others at 0.8A.
Should you not need all circuits, just leave out what you don't need.
Don't use a 2N3904 because they're only 200mA.
Table Switching and Launch control
You need to free up 2 additional spare ports on the processor if you want to use inputs for 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.
To use table switching, PE1 on the DIP40 can be used as an input. Basically, add the bron wire in this pic and remove R1. The wire goes from DIP40 pin 15 to JP4. Adding this wire is extremely difficult. Do NOT attempt this if you little soldering experience or bad eyes! After soldering in the wire, the positive side of R1 becomes your input for the (table switching) switch.
I used an active low input circuit on R1. Although the manual here says to use JS7 (PE0), that is NOT correct. You need to use R1 (PE1) as the table on this page suggests.
Launch control
You need to use JS7/PE0 for launch control. JS7 can be used as an input with a small mod on the MS2 card itself. VERY carefully solder a small wire from the DIP40 pin10 (by C10) to "JP4" on the MS2 card. It's the gray wire in the pic above. This one is easy.
There's not enough spare pins on the DB37 for all these in- and outputs, so I added an old chassis mount keyboard connector for the 2 active low inputs (AL1 and AL2).
4 channel Ignition/Injection driver board
To use full sequential, all you need is 4 identical injector outputs. I could have duplicated the standard injector circuit, but that takes up so much space that I found it too unpractical. The benefit of Jean's 4 channel board is that it takes up very little real estate, plus the stock injector circuit can be removed. The only transistors left on the heatsink are U5 (no mica insulator needed) on the far left and the EBC transistor in Q16 on the far right (use a mica insulator). The TIP120 for idle (use a mica insulator) goes on the endplate.
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.
Follow the instructions on Jean's website on how to connect the board to the MS. It's very straightforward. Do not forget to modify the MS2 daughterboard like this.
Wire up the inputs like this.
When installed, you have 4 fuel outputs instead of just 2 like you had before. Wire them up to your cylinders in firing order. You have four outputs, numbered 1,2,3,4 and firing in that order. And you have four cylinders, but they don't fire 1,2,3,4, they fire in a different order, 1342 to be exact. So you match this up:
Wire output 1 to cylinder 1.
Wire output 2 to cylinder 3.
Wire output 3 to cylinder 4.
Wire output 4 to cylinder 2.
PWM converter board
 The stock NB idle valve works best at a frequency of around 500Hz (NA is 170Hz). Problem is that the MS works at a much lower frequency, causing an annoying hum at idle. Jean's PWM converter board multiplies the MS frequency while keeping the same duty cycle without losing any precision.
Although Jean's board is very little, I decided not to use the separate board but instead I built his circuit in the now empty injector part of the board for a cleaner install. Here's what the schematic looks like. I built it in the U4 location. Notice that I installed the chip upside down! Pin 1 is where pin 5 normally goes. The red traces are wires.
R19 is worth mentioning. This is part of the standard idle circuit and must be kept. I moved it from its original location to Q5.
 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.
The flyback diode will be installed directly on the connector and not on the circuit board. That way, there's no risk to burn out the traces on the board should there be voltage spikes.
The TIP120 is missing in this picture.
Optional circuits
EBC (Boost control)
You need a Boost Control 'Modkit' for this. This circuit is built in the Q16 location.
- replace Q16 with the IRLZ44 (use a mica insulator)
- replace R57 with 10K
- replace R43 with a jumper
- install 100R between IGBTin and JS11
- IGBTout is your EBC output
- install the flyback diode directly on the wiring between +12V and the EBC output
Constant Barometric Correction
The MS uses the first reading from the map sensor when it powers up as the barometric reading for correcting barometric pressure. You can gain constant barometric correction by fitting a second map sensor. I used JS4 for this. I soldered the map sensor next to the other one. The 1K and 0.22µF were soldered directly onto the map sensor. The 0.1µF is not needed since we doubled the value of C3 in step 43 of the build.
On my first build, I installed it but the code doesn't work. On my current build, I left it out.
Alternator Warning Light
 This can be built in the original injector output part of the board. Here's what it looks like. I only have a pic of my notes, but it's very simple if you compare it to the schematic. The extra capacitor is 100 to 220nF.
The output is on pin 1 of Q12.
This is what the PCB looks like when all custom circuits are added:

green/white wires: idle pwm converter circuit (TIP 120 is missing in the pic)
orange wires: low battery warning light
blue/white wires: CKP and CMP input circuits
yellow wire: S12C (12V) to SJ9 (to activate JS0 and JS2)
proto area: alternator control circuit
Voltage divider
When I first installed the MS, I noticed that the battery voltage in Megatune didn't correspond with what I saw on my DVM. When my DVM said 12V, MegaTune said 11.6V. Battery voltage is determined with a resistor voltage divider to bring the 12 volts down to under 5 for the MCU to convert. R3 (50K) and R6 (10K) form this voltage divider. These are both 5% tolerance resistors and in my case, the ratio was 5.22 instead of 5, causing the difference between actual and MS values for battery voltage. It's best to use 1% resistors for this. It's important to have a correct reading because the MS changes certain values (injector opening time, dwell etc) depending on the input voltage.
Wiring harness
You need 64 Pin Male connector (174518-7), available from http://www.onlinecomponents.com (or Ebay, or rip one out of an old ECU).

Case
Since I used so little parts of the kit, I only ordered the PCB and got the components locally. I mistakenly ordered the EAS400 (from Mouser, super fast 2 day shipment from the US to Belgium!) instead of the EAF300, but this turned out to be a good thing actually. The EAS400 has 12 slots instead of the 6 slots on the EAF300. So, I just cut of 6 slot to reduce the height and used the cut off part as a heatsink. It slides nicely into a slot, as if it was made for it .
Also, my case has non-flanged endplates with no cutouts. Again a good thing because I don't use the DB37 and the LEDs. I bent the endplates to the new size of the case and drilled a hole for the map sensor. Haven't decided yet what to do with the serial. Use the DB9 or install a 3.5mm headphone jack.
More pics of the case here.
More pics of the inside here.
Notes
Instead of using D15 as a tacho output, you could use it for a programmable output (like fans, vics etc). That way, you have a visual indication that the output activated.
port0 = PM2 = Fidle
port1 = PM3 = Injection LED
port2 = PM4 = Accel LED
port3 = PM5 = Warm-up LED
port4 = PT7 = IAC2
port5 = PT6 = IAC1
port6 = PA0 = Knock Enable
|
|
|