The last step in assembling...
The last step in assembling the MegaSquirt is to put together a wiring harness. Which wires you need to solder to the DB-37 connector depends on what features you plan on using. In our case, we used a MS-I V3 board, so that's the wiring diagram we used. Each pin on the MegasSquirt's DB-37 connector is numbered and corresponds to the numbers on the V3 wiring diagram, shown here. Because we are not using some features like a fuel pump relay and idle control, etc., we simply left those spots empty on the DB-37. If you look at the diagram closely, you'll see that there are three fuses. Make sure you put these in. We initially didn't. If we had, it's likely the 2-amp fuse would have blown instead of blowing our sensors and coil. We make the mistakes so you don't have to.
The Skinny
Last month, we took the first steps on our journey of ECU enlightenment and assembled a $200 engine management system (EMS) that's capable of doing anything a mega-dollar standalone EMS can. While we haven't reached tuning Nirvana just yet, we're one step closer. And just as importantly, we now know there is no reason to fear the do-it-yourself ECU. However, that's not to say we didn't have our share of teething problems. We'll be the first to admit they were all our own fault, though.
In our haste to get the MegaSquirt installed and tuned a few months ago, we cut a few corners. One big mistake we made was failing to adequately insulate the wires of MegaSquirt's wiring harness when we soldered it together. As a direct result, we fried a couple of sensors and an ignition coil, leaving us with some stinky electronics that were frighteningly expensive to replace (for a $2,500 car, at least). So, learn from our mistakes and cover those bare wires the right way!
We're back this month with parts, ready to give it another shot (this time with well-insulated terminals).
We originally planned on running the MegaSquirt as a stand-alone ECU, but we quickly learned that would require buying and assembling more electronic components, and possibly hunting down used parts at the junkyard for idle control. While it would likely cost less than a $8 bowl of noodles at the local Pho joint, we decided to keep it simple for now and use the MegaSquirt to control just the spark and fuel. The other stuff, like the fuel-pump and cooling-fan relays, and idle will be left to the stock ECU. With a few changes down the road, we ditched the stock ECU entirely.
Take your time when soldering...
Take your time when soldering the wires to the DB-37 connector. We used 20-gauge wire and it fit nicely. Don't let the soldering iron heat up the terminals too much. If you do, the plastic can melt and deform the connector. Having a clean tip on the iron makes small jobs like this a lot easier.
Doing the install in small steps is a good idea. In fact, the MegaManual recommends using the MegaSquirt to control fuel only at first, then adding spark control only after getting the fuel map close and becoming comfortable with the tuning software (MegaTune 2.25, in our case). This is exactly what we did. Plus, if you only make one change at a time, you'll know just where to look if a problem should arise after making changes.
Without knowing which wires go where in the car, there's no way of installing the MegaSquirt. A complete set of wiring diagrams is a must-have for any install.
We logged on to Miata.net, searched around, and found a link to a complete set of wiring diagrams for the Miata. Armed with these, we dug through the factory wiring harness near the ECU and located the wires we needed to tap into by their colors. Once we identified each wire, we spliced it into the Megasquirt's corresponding wire, repeating for each and every wire going to the MegaSquirt.
After spending a few hours tracing, re-tracing and spicing wires, we were confident that we had all the wires coming out of the MegaSquirt connected to the right wires on the car's harness. We then busted out the laptop, plugged it into the MegaSquirt and powered up the car. After a little fiddling with the settings via our laptop, we had the PC and the Megasquirt talking to each other via serial link. But, it quickly became obvious that a few things were amiss.
This is the step we skipped...
This is the step we skipped last month that led to a catastrophic failure of the EFI system. As you can see, these wires are very close together. If you don't insulate them properly, the wires can touch and cause a short; and that's exactly what happened to us. To prevent this from happening to you, do like we did the second time around, and use heat shrink tubing to keep the wires separated.
As we learned the old-fashioned way, when you wire one sensor to multiple ECUs, you send false readings to both ECUs. Incorrect sensor values make the ECU think temps are either too low or too high--meaning that the fuel and spark timing will be off, regardless of how much tuning we do. However, this is only an issue if using the MegaSquirt as a piggyback, like we are. If used as a standalone, this isn't an issue.
In our piggyback setup, when we had the coolant sensor connected only to the MegaSquirt, the MegaTune software showed a coolant temp of 150 degrees. With the sensor hooked up to the MegaSquirt and the stock ECU, MegaTune showed a temp that was over 200 degrees. Obviously, this needed to be addressed.
The solution was to use additional coolant and air temp sensors. The Megasquirt comes configured to use GM-style sensors, so that's what we used. A quick trip to the local "Pick-a-Part" netted us both sensors and harnesses for a paltry $4.50.
 It's damn near impossible...  It's damn near impossible to tune the fuel delivery without knowing what the air/fuel ratio is. To address this, we picked up an AEM Gauge-Type UEGO Controller wideband sensor. The UEGO uses a Bosch sensor and is accurate to within 0.1 AFR, according to AEM. Between the easy installation, the spiffy gauge and the relatively low cost of the unit, picking this UEGO was a no-brainer. Our target AFR was between 12.8 and 15.2 out of boost and around 11:8 in boost |  Connecting the MegaSquirt...  Connecting the MegaSquirt to the car is pretty straightforward. Just connect everything like it's shown on the wiring diagram (the V3, in our case). For example, in this picture, we are connecting the 12-volt switched power supply to the MegaSquirt, which is pin 28 on the DB-37 connector. We looked at our trusty Miata wiring diagrams and found the switched 12-volt line to the stock ECU. According to the wiring diagram, we were looking for a white wire with a red stripe (WHT-RED). We found this wire, and after verifying that it was indeed a switched 12-volt line, we spliced the wire coming from pin 28 of the DB-37 (red) to the white wire with the red stripe. One down, a bunch more to go (ground, sensors, injectors, etc.). |  Here's the completed harness...  Here's the completed harness (minus the two leads for ignition control that we added later). Again, note that we insulated all wires that we soldered to the DB-37 connector and put in three fuses. Now it's time to connect all those wires to the Miata's wiring harness. |