|Home > RX-7 > Tech/Mods > Mods > Megasquirt > Wire The Megasquirt MS1/MS2 Harness Into The Car|
These instructions cover the Megasquirt MS1/MS2. If instead you are installing MS1/MS2, then you want to read the MS3X and MS3-Pro wiring instructions.
Now the fun stuff can begin when we actually start wiring the Megasquirt harness into the car. This is going to be the most involved section of the writeup and most of the work will take place here. Everything having to do with wiring up the Megasquirt will be covered here including the fuse box, actual Megasquirt wiring, fuel pump and wideband.
From the DB37 end, pull the following wires back:
We are going to use all of these wires except the brown ignition output. Coil the ignition output up and place it out of the way. Another alternative is to just leave it in the harness and ignore it while keeping it in mind for future use.
Remove the case from the DB37 by removing the two screws at the sides. Pay attention to the two screws at the front of the connector as they will fall out and you will need to reinstall them when you reassemble the case.
Cut the shielded wire about one inch from the DB37 and the separate out the inner core conductor from the braided shield. A razor blade helps to cut away the excess material. Cut 2 pieces of small heat shrink tubing about half an inch long and slip them over the ends of the cut ignition cable. You will likely need to twist the braid together to accomplish this. Now strip about 1/4" at the end of the white center conductor.
Pass the 4 conductor shielded cable through the strain relief and strip about 2" of insulation from the end. Separate out the braid and twist it into a wire.
Now strip about 1/4" from two of the shielded wires. Note that most shielded cable has some kind of colour pattern. For example, the cable shown here has two blue (blue, blue/white) and two white (white, white/blue) pairs. Try to keep the pairs together, especially if they are twisted. In this case we are using the blue pair to connect to the stock 'Squirt ignition input. You will need to note down which wires you use so that you can connect the CAS properly later. Now that you have decided which wires you will use, connect one to the white wire (pin 24) by carefully twisting them together and the soldering. Insulate with the heat shrink tubing. Now connect the other wire in the pair to uninsulated braided wire (the former shield), solder, and insulate with heat shrink.
To connect the remaining two wires you will need two DB connector female crimp or solder pins. These are available at any electronics store as well as Radio Shack. It is unlikely that you have the proper crimper so in these instructions we will solder them. If you have the proper crimper, by all means use it.
Strip enough insulation off of a wire in the 2nd pair (white pair in the image below) and carefully solder on a pin. You will find it helpful to use a set of needle nose pliers to slightly crimp the pin so that it grips the wire. Then just use a small dab of solder to make the connection. Perform the same on the second wire in the pair. Now, push one pin into hole number 3 on the DB37, and the next into hole 4. A small screwdriver or bent paper clip will help push the pins until they seat. Remember, write down which wire you have connected to which pin. You will need to know this later!
Finally, strip a bit of insulation on one of the black ground wires and solder on the shield from the 4 conductor cable.
The finished connector will look something like this:
Reassemble the two case halves making sure to reinstall the two screws at the front. It doesn't hurt to use a few dabs of silicone first to stabilize the wires inside the connector.
Run the harness up along the firewall just above the lip, keeping it behind any emissions plumbing that may still be in place. Run it behind the brake booster and then down under the trailing coil (you will need to remove the coil) and finally all the way along the frame rail until it reaches the battery/leading coil area. Leave enough slack so that harness can follow the contours of its path without being stretched or pinched. There is a lot of harness so don't worry about running out.
Now you can start pulling wires from the harness that will be used to connect to the sensor and other components. Pull the thick blue (INJ1), thick green (INJ2) and thin green wires (FIDLE) wires out of the harness around the fuel rail area of the engine. In the same area, also pull the yellow coolant temp (CLT) sensor wire. Run a 12 gauge red wire from the injector area along the harness and fish it back into the car to terminate near the fuse box. Leave plenty of slack. This will provide 12V power to the fuel injectors. To provide a ground for the CLT, run a 16 gauge black wire from the CLT area to the harness along the firewall with a bit of slack. This will eventually tie into the sensor ground wire we will add later. Finally, a 16 gauge red wire needs to be run from inside the car up along the harness and to the BAC valve area. If you have an S4 NA, then the BAC is on the other side of the manifold (mounted to the dynamic chamber) so run those wires while you run the wires to the throttle body.
The picture below shows these wires being run on a TII. This is an "in progress" picture so not everything is in place yet.
Around the throttle body, you need to run the TPS, CAS and IAT wires. Start by pulling the thin blue (TPS Sensor), gray (5V REF) and orange (IAT) wires to the throttle body area. The two TPS wires will ultimately end up at the TPS (duh) while the IAT wires will end up at the IAT (double duh). Note that S5 NAs have the IAT at the other side of the engine so this wire should be run in the injector area. Run the shielded CAS wire as well to the CAS area. I tend to run all of these wires just past the clutch slave cylinder in one bundle then split them up underneath the intake manifold around the oil filter area. I suggest keeping the CAS wire totally separate though to avoid noise issues. A ground wire for the IAT and TPS is necessary so run a 16 gauge black wire from this area all the way back to the Megasquirt ECU panel and leave plenty of slack on both ends. When we actually start soldering, this wire will tie in with the short ground wire ran to the CLT.
The next wires to be run are the coil and e-fan wires. All of these use the IAC wires provided in the harness. The colours of the IAC wires are ambiguous (there are two of each colour) and labelled poorly (two wires share the same label) so you will need to use a continuity tester to find out which wires lead to which pins on the DB37. It is very important you get this right. While the car may run if you mix up the leading and trailing trigger, for example, it will run very poorly. If you connect the coil trigger wires to the e-fan, you will fry parts of the 'Squirt.
Locate the trailing trigger and trailing toggle (IAC1B, IAC2A) wires and run them to the trailing coil area. At this point you may want to remove the trailing coil if not already done. From the trailing coil area, run a 16 gauge red wire all the way back to the ECU, leaving slack at each end. We'll use this red wire to provide IGN 12V to the ECU to avoid having to dig under the dash at the ignition switch. The trailing coil receives IGN 12V from the stock main EFI relay.
Feed the leading trigger (IAC2B) and e-fan trigger (IAC1A) down along the frame rail to the leading coil area. Bring the e-fan wire (IAC1A) out to the front of the car around the driver side front relays (between the bumper and rad). From that same relay area, run a 12 gauge red wire all the way back to the ECU. This wire will provide 12V power for the e-fan.
We are almost done pulling wires in the engine bay at this point. The final two wires you need to run for the Megasquirt harness are 8 gauge power and ground (red and black) wires from the battery area back to the ECU panel. Leave slack on both ends.
Now, take what remains of your stock EFI harness and reconnect it to the engine. Plug it into the wiper motor, alternator (if applicable) and the dash coolant temp sensor.
Finally, run the O2 sensor wire from the wideband through the wiring grommet to the interior of the car. Position the O2 sensor connector on the inner fender (you will find there are convenient factory holes that the connector will clip to). Remove the stock O2 sensor (plenty of penetrating oil helps here) and then install the wideband sensor with some anti-seize on the threads. Connect the wideband sensor to the connector.
All the rough wiring is now complete in the engine bay so next, we move to the fuel pump wiring inside the car.
Below is the master wiring schematic which shows how the whole system is wired. All the steps below this will refer back to this schematic so print it out and keep it handy. Anyone who has looked at a Megasquirt wiring schematic before (such as the one in the Megamanual) will be familiar with the basic layout of this schematic. I made this one using much of the elements and graphics from the standard Megasquirt schematic. The schematic is a bit huge so what you see here has been resized so it doesn't screw up the formatting on the rest of the page. Click on the image to get a full sized view in a new window.
The real wiring starts with the engine where the injectors and all the sensors are connected. These instructions will progress from the left to the right of the engine starting with the injectors.
Start by wiring the primary injectors. Loosely place two of your new injector connectors on the injectors (no point in locking them in place now since they will have to be removed later) and run the wires around the fuel rail. Lay the thick blue (INJ1) alongside and then trim one side of the injector connectors and the thick blue so that they can be connected. Strip the thick blue and the injector connector wires, slip on heat shrink, solder, then shrink. Repeat for the other side of those same two connectors (orange wires in this picture) but connect to one of the 12 gauge red wires.
Now wire the secondary injectors the same way as the first. Connect one side of both injectors to the red 12 gauge wire and insulate with heat shrink tubing. The picture above shows the orange wires connected to the red 12V wire. Connect the other side of the connectors (black wires in this picture) to the thick green (INJ2) wire on the Megasquirt harness and insulate with heat shrink.
Observant readers will notice that the picture shows the colours of the Megasquirt wires to be opposite of what I described. This is a trick of the camera (seriously).
At this point, also splice the black wire from the CLT to the black wire you ran along the firewall harness earlier. The easiest way to do this is to cut the wire along the firewall and strip both ends. Then trim the wire leading from the CLT appropriately, strip and twist all wires together before soldering. Don't forget to slip your heat shrink onto the correct side of the long black harness wire and NOT the black wire coming from the CLT.
There is only one ground wire leading from the Megasquirt harness but two ground connections are needed (TPS and IAT). Split the black wire in the same way that the injector wires were split, making your splice somewhere around the oil filler neck. Insulate it with heat shrink and then run one black wire for the TPS, one for the IAT. You may want to skip placing the upper intake back on until you do this.
If your TPS connector is mangled beyond repair then you will need to replace it with something. If this is the case, most auto parts stores will be able to supply a replacement. Don't ask them for an RX-7 TPS connector, just ask to see a catalog of replacement connectors or bring in the TPS as an example. This writeup assumes you are using the stock connector, which you will now need to cut from your old EFI harness. Make sure to leave a few inches of wire so you can make your connections and clean it up with contact cleaner. In addition, the schematic and these instructions reference the wire colours on the harness and not the TPS. This is because harness colours are the same S4 vs. S5, while TPS wire colours are not.
Plug your TPS connector into the TPS so you can trim all the wires to the correct length, then unplug it for soldering. Trim the gray, blue and one of the black wires on the Megasquirt harness.
Connect the gray wire from the Megasquirt harness (labelled 5V REF) to the brown/white wire of the TPS connector. Connect the blue wire from the 'Squirt harness (TPS Signal) to the green wire on the TPS connector. Finally, the black wire connects to the brown/black (S4) or black (S5) wire on the TPS connector.
Yeah, this is not a stock connector so this picture isn't much of a help. But the TII I am using for the majority of these pictures had such a bad connector that I had no choice but to replace it with a WeatherPack unit. If anyone has a good picture of a Megasquirt wired with a stock TPS connector, feel free to email it to me and I'll update this image.
Plug in the IAT sensor connector and then trim all the wires to an appropriate length. The IAT is non-polar so it doesn't matter how you connect it. Connect the orange (labelled IAT) wire from the Megasquirt harness to the sensor connector, and then do the same with the black wire. If you are using a DIYAutoTune connector, then it has orange and black wires to match. Almost too easy, eh? Don't forget your heat shrink.
Cut the connector and harness wires to length before slipping a largish diameter piece of heat shrink over the 12V wire and the green F-IDLE wire. Then slip some heat shrink tubing over the red 16 gauge 12V wire, and strip about an inch from the end. Now strip an inch from the connector wire. The BAC is non-polar so it doesn't matter which wire you connect. Twist the two wires together and then twist the lead from the banded end of a 1N4001 diode around that joint as per the image below:
Perform the same steps to the green F-IDLE wire, the remaining lead from the BAC connector and the non-banded lead on the diode. This time, make sure to put your heat shrink on the wire from the BAC connector otherwise you will not be able to slip it over the diode.
Solder both connections and then slip the heat shrink over them and shrink it.
Finally, shrink the large piece of tubing over the entire joint to seal it.
At this point you may have noticed that the connector doesn't actually fit the BAC valve. The locating bump of the BAC valve is off center, while the notch in the connector is in the middle. To remedy this, file the bump off of the BAC.
Cut the CAS connector off of the engine harness, making sure to leave a few inches of slack on the cables. Thoroughly clean it with contact cleaner and then examine it for damage. If you find loose pins, cracked insulation or corroded wires, replace it.
Refer to the master wiring schematic when wiring the CAS to make sure everything is correct. The colours of the wires shown in the schematic represent the wires on the CAS itself, not the harness connector. This is because the colours of the harness itself changed between S4 and S5 so to avoid confusion, always go by the wire colours on the CAS.
Remember your heat shrink, and try to keep the wires as short as possible. You don't want a lot of unshielded CAS wiring in the engine bay. Before you connect up any of the CAS wires, slip a big piece of heat shrink over the shielded wire. Connect the wire on the CAS plug corresponding to the red wire on the CAS to the shielded wire on your harness leading to pin 24 of the DB37. Now do the same for the white wire, but connect it to pin 2 of the DB37. Connect the wire on the CAS plug corresponding to the green wire on the CAS to pin 3 on the DB37. Finally, do the same for the white/black wire and connect it to pin 4 of the DB37.
To finish up, seal up all of the CAS wires with the big shrink tube. Not only does this keep the weather out but it provides strain relief to the more delicate wires of the shielded cable and CAS connector.
Congratulations! You have just completed the engine wiring section. It wasn't so bad, was it? Next, we need to wire the coils and fan.
As the coils and fan are on the same side of the car, this section of the writeup deals with wiring them. There are far fewer connections here then on the engine but they are just as important. We need to connect the trigger signals to both coils, and IGN 12V lead to switch the main relay and the power/relay arrangement for the fan. We'll start with the trailing coils.
The trailing coil receives power from the front body harness via the two conductor plug which connects to it's tan wires. The other connector provides it triggering signals through two of it's connections and allows a tach signal back into the harness through the remaining pin (I don't think anyone, including Mazda, knows what the fourth wire is for. If you know, drop me a line...). There are two ways to make the connection to the trailing coil that don't suck; you can cut the connector off the harness and then reconnect the tach wire through a single wire connector, or you can use a 3 (I'll explain the 3rd connection later) pin connector to connect the Megasquirt harness to the body harness. I personally don't like molesting the stock body harness as replacement is not exactly straightforward, so I recommend adding a connector. But it is far easier to cut the connector off of the body harness, wire it to the Megasquirt harness, and then use a single quick connect (spade) terminal for the non-critical tach connection back into the harness.
Regardless of what you choose, you need to make the following connections. Connect the red (trigger) wire on the trailing coil to IAC1B (pin 27 on the DB37). Then connect the white (toggle) wire to IAC2A (pin 29).
Also at the trailing (and leading, for the record) coil is a handy source of switched 12V ignition. You will find this signal on the black/yellow wires on the harness side of the two tan-wire connector. Connect up the spare wire you ran earlier to one of the black/yellow wires.
In the image above, the connections to the front body harness are made using two WeatherPack style connectors, which are available at almost every good auto parts store. A two terminal connector makes the connection to the trailing coil toggle and trigger wires, while a single terminal connector is used for the 12V IGN signal. You can use the connector of your choice but I highly recommend a WeatherPack style connector be used. Most auto parts stores sell them with pigtail leads attached so that you can solder them directly where needed. Molex connectors can be used, but I would recommend staying away from spade (quick connect) connectors unless they are weather tight or you seal them with heat shrink. You'll notice that nowhere I recommend making a soldered connection between the two harnesses. This makes troubleshooting a lot easier and is far more convenient if one of the harnesses has to be removed.
With the wiring done here, you can reinstall the trailing coil.
Connect terminal 87 on the relay to the fans 12V+ connection. Then ground the fans negative connection to a good spot on the chassis using a ring terminal and plenty of dielectric grease. You need to insert a diode between the positive wire to the relay coil and the Megasquirt wire just as you did for the BAC valve. So, connect terminal 85 on the relay to both the non-banded end of a diode, and IAC1A (pin 25 on the DB37) as described in the BAC instructions. Connect both pins 30 and 86 on the relay to the red 12 gauge 12V wire and the banded end of the diode. Refer to the schematic if those instructions are a bit confusing. Now heat shrink everything up and mount the relay and socket to the chassis of the car.
The final bit of engine bay wiring is to wire the main battery and ground feed to the ECU panel. This feeds the Megasquirt and accessories with a clean source of 12V that is separate from the existing 20 year old wiring in the car. Bringing another 12V feed into the car also has the advantage of providing a convenient place to attach add-on circuits and making troubleshooting easier.
Making these final connections is quite easy. Take the 8 gauge black wire you've already run to the battery area and crimp on a ring terminal. Make sure to use dielectric grease and preferably use a heat-shrinkable type ring terminal. If your terminal is the non-sealed type, use heat shrink to seal up the connection. Now connect this ring terminal to the bolt on the negative battery lug.
To connect the positive, you must first mount your 40A breaker to the chassis. There is plenty of space on the inner wheel well near the battery but the final location is up to you. Just make sure that it is physically close to the battery. Using ring terminals, make up a section of 8 gauge red wire to connect between the positive lug on the battery and the "battery" terminal of the breaker. Then use another ring terminal to connect the 8 gauge red wire you ran in the Megasquirt harness to the "aux" or "output" terminal of the breaker. The picture above shows both of these connections and how the wires are neatly tied to follow the stock battery cables. Note you can also see the leading coil connection beside the breaker in the lower right. For now, leave the positive disconnected at the battery.
The engine bay wiring is now totally complete, so it is the traditional time to sit back with your favourite beverage and contemplate where you might have screwed it up. While you are enjoying your beverage, you may want to take the time to go over each connection and make sure things agree with the schematic. You won't be seeing the engine bay again for a while because now it is time to wire the stuff inside the car.
How To Megasquirt Your 2nd Gen RX-7
Prerequisites And Requirements
Building and/or Modding The Megasquirt MS1/MS2
Modding And Setting Up Megasquirt MS3X
Remove Stock Wiring and ECU
Modify Stock Wiring
Mount The Megasquirt ECU
Install CLT and IAT Sensors
Wire The Megasquirt MS1/MS2 Harness Into The Car
Wire The Megasquirt MS3/MS3-Pro Harness Into The Car
Wire The ECU Panel, Wideband and Fuel Pump
Reassemble The Engine Bay
Programming The ECU (MS1)
Programming The ECU (MS2)
Programming The ECU (MS3X / MS3-Pro)
Starting The Car For The First Time
Installation Video and Resources
Back To Mods Page | Mail Me | Search