Megasquirting my stock '99 NB - the initial install
#1
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Previous Threads:
Megasquirting my stock '99 NB
Megasquirting my stock '99 NB - the wiring
I've got the parts (LC-1 and gauge, boomslang, and a v3.57 MSI w/Miata mods. Now I've got the time, so I'm going to start the install. My initial goal is to get the Megasquirt, LC-1, and NA CAS installed in parallel with the stock ECU, and communications from my laptop to the Megasquirt.
Once this is complete, then I'll look at cutting over fuel and eventually spark to the Megasquirt, learn how to tune everything, and then it's off to turboland ...
My parts are all laid out in the attached photo. In addition to the stuff pictured, I've also got a DB 9 cable and a USB->serial adapter for tuning. I still need to get an o-ring for the CAS from Napa.
Here are the steps I plan on taking.
Build the Megasquirt harness
To start out, I'm getting ready to build the boomslang/MS harness, and the further I get into the details, the more questions I have.
For reference, I'm using this diagram from the MegaManual for the DB37 pinouts on the Megasquirt, Braineack's diagram for the '99 ECU pinouts, and this '99-00 NB wiring diagram for further detail.
I plan to use crimp connectors for this (whatever is available from Fry's). I considered soldering them but I don't think it's really necessary, and I don't want to do a crappy job.
For the wiring itself, only pins 3W, 3X, 3Y, 3Z (injectors) and 3G, 3H (coils) should be cut from the stock ECU and connected to the Megasquirt, while the rest of the signals I need from the ECU should be tapped into, allowing both the MS and the stock ECU to read them, correct?
I've been looking through the diagrams listed above in an attempt to understand what I need to tap into or cut from the factory ECU to give the MS what it needs. I have a few questions.
On the factory ECU:
Megasquirting my stock '99 NB
Megasquirting my stock '99 NB - the wiring
I've got the parts (LC-1 and gauge, boomslang, and a v3.57 MSI w/Miata mods. Now I've got the time, so I'm going to start the install. My initial goal is to get the Megasquirt, LC-1, and NA CAS installed in parallel with the stock ECU, and communications from my laptop to the Megasquirt.
Once this is complete, then I'll look at cutting over fuel and eventually spark to the Megasquirt, learn how to tune everything, and then it's off to turboland ...
My parts are all laid out in the attached photo. In addition to the stuff pictured, I've also got a DB 9 cable and a USB->serial adapter for tuning. I still need to get an o-ring for the CAS from Napa.
Here are the steps I plan on taking.
- Build the Megasquirt harness by splice the boomslang and the DB37 pigtail together
- Install the MS without cutting over the fuel / spark control until everything is verified to work
- Install the CAS
- Install the LC-1
Build the Megasquirt harness
To start out, I'm getting ready to build the boomslang/MS harness, and the further I get into the details, the more questions I have.
For reference, I'm using this diagram from the MegaManual for the DB37 pinouts on the Megasquirt, Braineack's diagram for the '99 ECU pinouts, and this '99-00 NB wiring diagram for further detail.
I plan to use crimp connectors for this (whatever is available from Fry's). I considered soldering them but I don't think it's really necessary, and I don't want to do a crappy job.
For the wiring itself, only pins 3W, 3X, 3Y, 3Z (injectors) and 3G, 3H (coils) should be cut from the stock ECU and connected to the Megasquirt, while the rest of the signals I need from the ECU should be tapped into, allowing both the MS and the stock ECU to read them, correct?
I've been looking through the diagrams listed above in an attempt to understand what I need to tap into or cut from the factory ECU to give the MS what it needs. I have a few questions.
- DB37 Pin 2 - crank position input (negative). Where do I get this from? Is this the CKP or CMP signal from the NA CAS?
- DB37 Pin 8-11 - engine ground. Where do you get your grounds from? Pins 3A, 3B, and/or 3C on the boomslang?
- DB37 Pin 18-19 - sensor ground. What's a good location for this ground? Pins 3A, 3B, and/or 3C on the boomslang?
- DB37 Pin 20 - IAT. Tap into Pin 2B on the boomslang harness to get OEM signal. Eventually this will come from the GM IAT once it is installed.
- DB37 Pin 21 - CLT. Tap into Pin 2E on the boomslang harness to get the OEM signal.
- DB37 Pin 22 - TPS Signal. Tap into Pin 3E on the boomslang harness to get the OEM signal.
- DB37 Pin 23 - O2 sensor. Once the LC-1 is installed, I will get this from the brown analog output of the LC-1. (Which I also need for the AFR gauge - can it do both?)
- DB37 Pin 24 - crank position input (positive). Where do I get this from? Is this the CKP or CMP signal from the NA CAS?
- DB37 Pin 25 - Stepper IAC? Are these inputs or outputs? Where do they go?
- DB37 Pin 26 - TPS? I'm confused here as we've already taken the TPS signal as input on pin 22. The factory wiring diagram shows three pins for the TPS. Blk/red goes to the factory O2 sensor. Grn/blk goes to 3E on the boomslang, and is already used for pin 22 of the Megasquirt. Lt grn/red is on pin 2I in the boomslang. Do I tap into that?
- DB37 Pin 27 - Stepper IAC? Are these inputs or outputs? Where do they go?
- DB37 Pin 28 - 12V from where? Do I take this by tapping pin 1B on the boomslang?
- DB37 Pin 29 - Stepper IAC? Are these inputs or outputs? Where do they go?
- DB37 Pin 30 - 12V from relay to fIdle solenoid? I don't know where to get this.
- DB37 Pin 31 - Stepper IAC? Are these inputs or outputs? Where do they go?
- DB37 Pin 32 - output to injectors. Leave disconnected for now.
- DB37 Pin 33 - output to injectors. Leave disconnected for now.
- DB37 Pin 34 - output to injectors. Leave disconnected for now.
- DB37 Pin 35 - output to injectors. Leave disconnected for now.
- DB37 Pin 36 - Ignition module output? I assume this is going to go to the coils (3G and 3H on the boomslang) so I'm going to leave it disconnected for now. I'm confused however as to why there is only one output from the MS if there are two coils on the car.
- DB37 Pin 37 - Fuel pump - I'm pretty sure that I read elsewhere that this isn't necessary on an NB, so I don't plan to touch it.
On the factory ECU:
- 3J - clutch - is this needed by the MS? Which pin on the DB37 would I connect it to?
- 3F - knock - is this needed by the MS? Which pin on the DB37 would I connect it to?
- 3W,3X,3Y,3Z - when I do eventually give the MS control over fuel, these will go to pins 32, 33, 34, and 35 on the DB37, but in what order?
- 3G, 3H - when I do eventually give the MS control over spark, which pins do I connect these to on the boomslang?
#2
Boost Pope
![](/mt2011/images_td/ranks/supporter1.gif)
![](/mt2011/images_td/ranks/smod.png)
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,339
Total Cats: 6,793
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
First off, forget the pretty pseudo wiring diagram pictures. You have a modern car. Thus, get familiar with the schematic, it's what you really need to reference for wiring the DB37: http://www.megamanual.com/ms2/megasquirt_ShemV3.00.pdf
Now, first and foremost, recognize that all the grounds are the same. There are a couple different sections of the plane, but they're all commoned. There aren't dedicated sensor grounds vs. power grounds vs. whatever.
Because the MS was designed originally to drive a single ignition coil with a distributor. Whatever two pins the Miata-specific ignition output mods are wired to is where you'll connect the two coil triggers. Usually this is 36 and 31, but it's not an etched-in-stone thing. You'll need to reference the mod documents to be certain as to which pin drives which coil.
Also, don't forget the second trigger (CMP) input wiring. This goes to a custom circuit on the MS board.
Now, first and foremost, recognize that all the grounds are the same. There are a couple different sections of the plane, but they're all commoned. There aren't dedicated sensor grounds vs. power grounds vs. whatever.
DB37 Pin 2 - crank position input (negative). Where do I get this from? Is this the CKP or CMP signal from the NA CAS
Pin 2 is a ground.DB37 Pin 8-11 - engine ground. Where do you get your grounds from? Pins 3A, 3B, and/or 3C on the boomslang?
DB37 Pin 18-19 - sensor ground. What's a good location for this ground? Pins 3A, 3B, and/or 3C on the boomslang?
Yup. Also run a couple heavy wires direct to the head. DB37 Pin 18-19 - sensor ground. What's a good location for this ground? Pins 3A, 3B, and/or 3C on the boomslang?
DB37 Pin 20 - IAT. Tap into Pin 2B on the boomslang harness to get OEM signal. Eventually this will come from the GM IAT once it is installed.
If you do it this way, you'll need to remove R4 from the MS initially, then re-install it later. No, go ahead and install the GM sensor now. DB37 Pin 21 - CLT. Tap into Pin 2E on the boomslang harness to get the OEM signal.
Yup. And remove R7 from the MS.DB37 Pin 22 - TPS Signal. Tap into Pin 3E on the boomslang harness to get the OEM signal.
Yup.DB37 Pin 23 - O2 sensor. Once the LC-1 is installed, I will get this from the brown analog output of the LC-1. (Which I also need for the AFR gauge - can it do both?)
Yes, and Yes. The LC1 will drive both the gauge and the MS. Since you plan on doing both, you can save a few dollars by buying the AEM, which includes the gauge. DB37 Pin 24 - crank position input (positive). Where do I get this from? Is this the CKP or CMP signal from the NA CAS?
This is CKP from the NA CAS. DB37 Pin 25 - Stepper IAC? Are these inputs or outputs? Where do they go?
The four "IAC" pins are neither inputs nor outputs. They are "spare" pins that you wire to whatever you want.DB37 Pin 26 - TPS? I'm confused here as we've already taken the TPS signal as input on pin 22.
This is the +5 supply you'd need to power the TPS in a standalone install. Since you're parallel, the stock ECU will do this. Leave disconnected. The factory wiring diagram shows three pins for the TPS. Blk/red goes to the factory O2 sensor. Grn/blk goes to 3E on the boomslang, and is already used for pin 22 of the Megasquirt. Lt grn/red is on pin 2I in the boomslang. Do I tap into that?
Grn/Blk is the actual TPS signal. Grn/red is +5 to power the TPS, which also powers the EGR & FTP sensors. Blk/Red is a sensor ground, which is shared with a whole slew of other things.DB37 Pin 28 - 12V from where? Do I take this by tapping pin 1B on the boomslang?
This is the main +12 input. Get it from the white / red wire at 1BDB37 Pin 30 - 12V from relay to fIdle solenoid? I don't know where to get this.
This is where you'd hook up the IAC valve if you weren't parallel. Leave disconnected. DB37 Pin 32 - output to injectors. Leave disconnected for now.
DB37 Pin 33 - output to injectors. Leave disconnected for now.
DB37 Pin 34 - output to injectors. Leave disconnected for now.
DB37 Pin 35 - output to injectors. Leave disconnected for now.
Yup.DB37 Pin 33 - output to injectors. Leave disconnected for now.
DB37 Pin 34 - output to injectors. Leave disconnected for now.
DB37 Pin 35 - output to injectors. Leave disconnected for now.
DB37 Pin 36 - Ignition module output? I assume this is going to go to the coils (3G and 3H on the boomslang) so I'm going to leave it disconnected for now. I'm confused however as to why there is only one output from the MS if there are two coils on the car.
DB37 Pin 37 - Fuel pump - I'm pretty sure that I read elsewhere that this isn't necessary on an NB, so I don't plan to touch it.
It isn't necessary on a parallel. On a standalone, NA or NB, you'd need it. On the factory ECU:
3J - clutch - is this needed by the MS? Which pin on the DB37 would I connect it to?
Not unless you plan to build launch control / flatshift.3J - clutch - is this needed by the MS? Which pin on the DB37 would I connect it to?
3F - knock - is this needed by the MS? Which pin on the DB37 would I connect it to?
None. This is a raw sensor signal, the MS needs a preconditioned signal. Buy a KnockSenseMS if you need knock sensing, but know that it's not completely reliable.3W,3X,3Y,3Z - when I do eventually give the MS control over fuel, these will go to pins 32, 33, 34, and 35 on the DB37, but in what order?
3W (inj1) and 3Y (inj3) to pins 32/33 (bridged together). 3X (inj2) and 3Z (inj4) to pins 34/35 (again, bridged.)Also, don't forget the second trigger (CMP) input wiring. This goes to a custom circuit on the MS board.
#3
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
If you do it this way, you'll need to remove R4 from the MS initially, then re-install it later. No, go ahead and install the GM sensor now.
Yup. And remove R7 from the MS.
The rest of it makes sense - thanks. I just need to find out from DIY which pins on the MS should be used for the CMP input, and for the output to the second coil.
#4
Boost Pope
![](/mt2011/images_td/ranks/supporter1.gif)
![](/mt2011/images_td/ranks/smod.png)
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,339
Total Cats: 6,793
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Slightly confused - do I want to both run wires to the engine for ground, and also use pins 3A, 3B, and 3C on the boomslang? I thought a common ground should be the goal.
A common ground is the goal. Also, a sufficient number of ground lines is also the goal. Ultimately, all grounds terminate at the engine block, as that's where the alternator is. In the factory wiring harness, most of the major ECU grounds terminate at ring connectors at the back of the head.
The best practice, in my opinion, would be to splice into the couple of ground lines in the boomslang harness, and also run a couple of additional grounds to a ring terminal which you bolt directly to the head.
What's R4 (I don't see that on any of the diagrams).
It's a resistor. Specifically, it's a pullup resistor on the MAT input line. Schematically, it's right here:![](http://img37.picoodle.com/data/img37/3/8/27/f_R4R7m_118c564.gif)
If I install the GM sensor now, where would I put it on a bone stock intake? I thought most people used the GM sensor so they could measure the temps near the IC (which I don't have yet).
You could simply drop it into the airbox and let it hang out in there. I'm lost on the R7 part. I'm planning on tapping the CLT sensor on the boomslang so that both the MS and stock ECU share that signal.
Ok, here's a quick tutorial on how ECUs read temp sensors. A temp sensor is a variable resistor. Reading resistance directly is more or less impossible. The way you do it is to apply a voltage, through a pullup resistor of a known value, through the variable resistor. The two resistors in series form a divider network. Then, you sample the voltage in the middle of the network and calculate what the resistance was that caused that voltage. Ok, so look at the above diagram. R7 is a pullup resistor from Vref (+5) to the CLT sensor "input" section of the circuit. In a standalone, this would be the only voltage applied to the sensor.
However, you're planning to parallel. The stock ECU also has a pullup in it on the CLT line. If you apply a second pullup (through the MS) it will throw off the calibration of the circuit.
#5
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
- DB37 Pin 2 (grey) - CKP ground. Will get this from the factory harness or extend it to the engine block.
- DB37 Pin 20 (orange) - IAT. Take from pin A (orange) on the GM IAT sensor.
- DB37 Pin 24 - This should be the CKP signal from the NA CAS, but I can't find it in the pigtail from DIY.
- DB37 Pin 25 (blue/white) - Take the CMP signal from the NA CAS.
- DB37 Pin 31 - second ignition (spark output B). This will go to 3H in the factory harness.
- DB37 Pin 36 - first ignition (spark output A). This will go to 3G in the factory harness.
I'm hunting for the CKP in my DB37 pigtail and can't find it. After taking apart the DB37 connector, I can see a white wire on pin 24, but there is no corresponding white wire coming out of the pigtail. In checking continuity with a multimeter, I can't find it anywhere. I do have continuity to pin 2 (a fatter grey wire curiously labeled "IGN"), which I guess means I have three wires to run to ground.
Now I understand why you guys are always talking about the advantages of building your own harnesses and pigtails. Figuring out what somebody else did is a pain in the ****.
#6
Boost Pope
![](/mt2011/images_td/ranks/supporter1.gif)
![](/mt2011/images_td/ranks/smod.png)
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,339
Total Cats: 6,793
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
DB37 Pin 2 (grey) - CKP ground. Will get this from the factory harness or extend it to the engine block.
As I said, pin 2 isn't specifically the CKP ground, it's just another ground. All fifteen of the ground pins on the DB37 are electrically identical. You can leave pin 2 disconnected for all it matters, so long as you have several other grounds connected. You really need to look at the schematic I linked to, and not that pretty (yet misleading) picture.
DB37 Pin 20 (orange) - IAT. Take from pin A (orange) on the GM IAT sensor.
Yup. Actually, the sensor itself is non-polarized. It does not matter which side of the sensor goes to the MS and which goes to ground.DB37 Pin 24 - This should be the CKP signal from the NA CAS, but I can't find it in the pigtail from DIY.
You bought the pre-wired DB37 pigtail, didn't you? That thing is set up for a car with a distributor...Assuming you did that, pin 24 should be the center conductor of the shielded, coaxial gray wire.
DB37 Pin 25 (blue/white) - Take the CMP signal from the NA CAS.
And be careful- there may be two blue/white wires, both identically marked.DB37 Pin 31 - second ignition (spark output B). This will go to 3H in the factory harness.
DB37 Pin 36 - first ignition (spark output A). This will go to 3G in the factory harness.
You may need to reverse those two if you're using an NA CAS. IOW, pin 31 to 3H, and pin 36 to 3G. Try it your way first, but I think you'll be 180 degrees out.DB37 Pin 36 - first ignition (spark output A). This will go to 3G in the factory harness.
I'm hunting for the CKP in my DB37 pigtail and can't find it. After taking apart the DB37 connector, I can see a white wire on pin 24, but there is no corresponding white wire coming out of the pigtail.
The "white wire" is the inside conductor of the fat gray cable. It's a piece of shielded coax.Also don't forget that CAS of yours also needs to get +12 and GND as well.
#7
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
You bought the pre-wired DB37 pigtail, didn't you? That thing is set up for a car with a distributor...
Assuming you did that, pin 24 should be the center conductor of the shielded, coaxial gray wire.
Assuming you did that, pin 24 should be the center conductor of the shielded, coaxial gray wire.
Why is this one shielded? Do I need to do anything with that shield (just cut it away so that it doesn't ground out the CKP signal)?
And be careful- there may be two blue/white wires, both identically marked.
Also don't forget that CAS of yours also needs to get +12 and GND as well.
Last edited by maharashii; 08-28-2008 at 10:03 PM.
#8
Boost Pope
![](/mt2011/images_td/ranks/supporter1.gif)
![](/mt2011/images_td/ranks/smod.png)
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,339
Total Cats: 6,793
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Long story short- leave the shield connected to ground at the DB37, and trim it on the other end.
Yep - I'm going to be looking for a switched +12v somewhere in the engine compartment (hot when ignition on and when the starter is cranking). Not sure where I'll be taking it from yet.
#9
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
I think it's O.K. to use this thread for my question, because it's refering to the same things:
*copy from original post*
DB37 Pin 32 - output to injectors. Leave disconnected for now.
DB37 Pin 33 - output to injectors. Leave disconnected for now.
DB37 Pin 34 - output to injectors. Leave disconnected for now.
DB37 Pin 35 - output to injectors. Leave disconnected for now.
Could someone please tell me, which to go to which Inj.
I am a little confused about that:
32/33 to inj. 2&4
34/35 to inj. 1&3 according to Braineacks diagramms?
Or the other way round because 32/33 are named inj 1 and 34/35 inj 2 at the MS diagramm...
This confuses me a little bit.
Thanks again for all your help!
*copy from original post*
DB37 Pin 32 - output to injectors. Leave disconnected for now.
DB37 Pin 33 - output to injectors. Leave disconnected for now.
DB37 Pin 34 - output to injectors. Leave disconnected for now.
DB37 Pin 35 - output to injectors. Leave disconnected for now.
Could someone please tell me, which to go to which Inj.
I am a little confused about that:
32/33 to inj. 2&4
34/35 to inj. 1&3 according to Braineacks diagramms?
Or the other way round because 32/33 are named inj 1 and 34/35 inj 2 at the MS diagramm...
This confuses me a little bit.
Thanks again for all your help!
#10
Boost Pope
![](/mt2011/images_td/ranks/supporter1.gif)
![](/mt2011/images_td/ranks/smod.png)
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,339
Total Cats: 6,793
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
3W (inj1) and 3Y (inj3) to pins 32/33 (bridged together). 3X (inj2) and 3Z (inj4) to pins 34/35 (again, bridged.)
#13
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Jason, do you have that schematic somewhere online?
If this circuit works, I could use it with the MS1 (closed loop idle and more possibilities for WI control) instead of having to use the MS2 ('99 sensor control but no closed loop idle and no WI control).
If this circuit works, I could use it with the MS1 (closed loop idle and more possibilities for WI control) instead of having to use the MS2 ('99 sensor control but no closed loop idle and no WI control).
Last edited by WestfieldMX5; 09-06-2008 at 07:47 PM.
#17
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
I built the attached circuit to test the concept. It doesn't include an input noise filter. It shows the concept.
I have another version that was very noise immune but has way more parts. A simplified input circuit as per the other thread is what I would use today.
Also not included is a circuit for generating an NA CKP signal. I can draw it sometime later.
Zaphod, do you have a means of building such a circuit?
I have another version that was very noise immune but has way more parts. A simplified input circuit as per the other thread is what I would use today.
Also not included is a circuit for generating an NA CKP signal. I can draw it sometime later.
Zaphod, do you have a means of building such a circuit?
#18
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
P.S. In designing circuits that take in the NB CMP signal, one must consider its funkiness:
http://forum.miata.net/vb/showpost.p...2&postcount=63
http://forum.miata.net/vb/showpost.p...2&postcount=63
#19
![Default](https://www.miataturbo.net/images/icons/icon1.gif)
Hi Jason,
I am in need of such a circuit for using the NB CAS and CMP signals - as my euro 1,6 NB (99) has no possibility to use the 90-97 CAS.
As I am not that much of an electronics guy - it would be good if someone could build me such a circuit. (You can PM me what the cost would be)
Can I use this with the MS1 (I suppose)?
Greets
I am in need of such a circuit for using the NB CAS and CMP signals - as my euro 1,6 NB (99) has no possibility to use the 90-97 CAS.
As I am not that much of an electronics guy - it would be good if someone could build me such a circuit. (You can PM me what the cost would be)
Can I use this with the MS1 (I suppose)?
Greets