March 06
Wiring MegaSquirt into your stock Honda OBD0 wiring harness
Hooking up your car with a MegaSquirt ECU -> cool.
Hooking up your car with a MegaSquirt ECU by wiring it into your car's unmodified stock wiring harness -> very cool.
And we all want to be cool, right
But seriously, connecting a MegaSquit ECU into the stock wiring harness is not only very cool, it allows you to:
1. Switch back to your stock ECU whenever you feel the need (emmisions test, sale of the vehicle, ...)
2. Track down issues easier since you know the wiring is already good (it works with the original ECU doesn't it?)
3. Plug and play your MegaSquirt ECU into any other car of the same design
4. Avoid having to purchase and wire up the MegaSquirt Relay board (you use the stock Honda relays, fuses, and power distribution)
5. Show off your mad skillz
Alright, enough with the generality, lets get down to it. When I decided to run a MegaSquirt ECU in my 1990 Honda CRX (in preperation for a turbo ZC project) I made it my goal to use all of the stock EFI hardware. I wanted to create a harness adapter that would plug into the MegaSquirt and directly into the stock wiring harness. This way I could use all my stock sensors and the Honda ignition system. Since the OBD0 Honda MPFI setup appears as though it were designed for MegaSquirt, this seemed like a plausable endevour.
Why the OBD0 Honda's were made for MegaSquirt:
* The 4 port injectors are low impedance, yet each is wired in series with a resistor to act as a high impedance injector
* The throtle body uses a standard TPS sensor compatible with MegaSquirt
* The intake air and coolant temp sensors work well once you determine the proper bias values
* The TDC sensor (4 spoke VR sensor in distributor) provides you with a good tach signal
* The stock ECU controls the fuel pump relay the same way the MegaSquirt ECU does
* The Ignition Control Module (ICM or ignitor) works beautifully with MegaSquirt as well (once I figured out how it works)
Another wonderful thing about this adapter is that it will work on any OBD0 Honda. This includes certain years of Civic/CRX's, Rovers, Integras, etc. You can use it on your ZC, then move it over to your B16 if you'ld like.
Things you'll need:
1. A Honda OBD0 ECU you don't mind destroying. You should be able to get a PM5 from a junk yard very easily and cheap. It's the DPFI ECU from 88-91 civic/crx dx's and nobody wants it.
2. DB37 connector that plugs into the MegaSquirt ECU (try Fry's electronics or DigiKey)
3. Wire, solder, and heat shrink tubing
4. Desoldering tool (optional, but helpful)
In order to plug right into your stock harnes, you're going to need harness plugs that compliment the ones in your car. That's why we obtained an OBD0 ECU that we can destroy. We will take it apart and remove the plugs from the ECU's circuit board.
1. The first thing you'll want to do is open up the ECU case. There are 4 screws in the top panel and 4 screws in the bottom pannel. Remove them and remove the panels revealing the circuit board inside.
2. Remove the various clamps holding the drivers to the side of the case for heat disipation.
3. Remove the screws holding in the circuit board and remove the board from the case.
4. Remove the screws holding the ECU connectors to the board.
* Note: some of the screws might have too much solder over them to get a screw driver on them. Be creative. Heat up the solder, use pliars/vice grips on the screws, or cut the tabs off the connectors. Just be sure not to ruin the connectors, they're the only parts we do need to save.
5. I chose to desolder the pins on the connectors to remove them from the board. Another option is to cut the leads as close to the board as possible, just be sure there's enough left to solder wires to.
6. Just hang onto the 2 connectors (B and C are conjoined) and discard the rest of the ECU.
Now that we have the connectors, let's give names to them and their pins:
Honda ECU connector A (the green plug, looking at the plug on the car's harness):
17 15 13 11 7 5 3 1
+---------------------------+
| o o o o o o o o |
| o o o o o o o o o |
+---------------------------+
18 16 14 12 10 8 6 4 2
Honda ECU connector B (the larger of the black plugs, looking at the plug on the car's harness):
19 17 15 13 11 9 7 5 3 1
+------------------------------+
| o o o o o o o o o o |
| o o o o o o o o o o |
+------------------------------+
20 18 16 14 12 10 8 6 4 2
Honda ECU connector C (the smaller of the black plugs, looking at the plug on the car's harness):
15 13 11 9 7 5 3 1
+------------------------+
| o o o o o o o o |
| o o o o o o o o |
+------------------------+
16 14 12 10 8 6 4 2
MegaSquirt Connector D (DB37, looking at the connector on the MegaSquirt ECU):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
+-----------------------------------------------------------+
\ o o o o o o o o o o o o o o o o o o o /
\ o o o o o o o o o o o o o o o o o o /
+-----------------------------------------------------+
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
With the connectors labelled, it's simply a matter of wiring each Honda connector pin to the corresponding MegaSquirt connector pin.
Here's the mapping between pins:
Honda to MegaSquirt pin mappings Honda Plug and Pin MegaSquirt Plug and Pin Function
A1 -> D32 Injector 1
A3 -> D33 Injector 2
A5 -> D34 Injector 3
A7 -> D35 Injector 4
A11 -> D30 EACV (Electronic Air Control Valve)
A12 -> D37 Fuel Pump Relay Ground
A13 -> D28 +12V Power
A14 -> D37 Fuel Pump Relay Ground
A15 -> D28 +12V Power
A16 -> D8, D9, D10, D11, D19 Ground
A18 -> D8, D9, D10, D11, D19 Ground
B15 -> D36 Ignition Controll Module (aka. ICM, ignitor)
B17 -> D36 Ignition Controll Module (aka. ICM, ignitor)
C3 -> D7 TDC Sensor (-) (4 tooth VR sensor)
C4 -> D24 TDC Sensor (+) (4 tooth VR sensor)
C5 -> D20 TA (Intake Air Temp Sensor)
C6 -> D21 TW (Coolant Temp Sensor)
C7 -> D22 TPS (Throttle Position Sensor) Signal
C12 -> D8, D9, D10, D11, D19 TA, TW, TPS Ground
C13 -> D26 TPS Reference (+5V)
C16 -> D23 O2 Sensor
One final modification is to add a flyback diode across the EACV (IAC in MegaSquirt terms). On my car, I have added this directly by splicing it into the engine harness, but I would like to ultimately make it part of the harness adapter. This way there is zero modification of the car's wiring harness required. I believe this is doable by adding the diode with the NON-banded end connected to the wire connecting pins A11 -> D30 and the banded end connected to the wire connecting pins A13, A15 -> D28. I will do some research and update this post as soon as I find out if this is a valid solution.
Anyways, there you have it, pretty slick, huh? I will take some pictures in the near future and update this post to add some clarification. As of now, I have my stock Honda CRX running on MegaSquirt using this adapter. It runs great. I plan to eventually install a ZC engine and use this harness adapter and MegaSquirt to run that. I also have a B16a that I may try this on. I will update this post as new information presents itself from trying this out on various OBD0 engines.
Important MegaSquirt hardware stuff (what I used):
* MegaSquirt II CPU on PCB v3
* High current ignition driver. Use a 12V pull-up resistor, not the 5V option. This will be used to trigger the Honda ignitor
* Ford PWM idle output option (must install the beefier transistor). This will operate the Honda EACV
* VR sensor input for tach signal, not Hall sensor. The TDC sensor in the distributor is a VR sensor
* Temp sensor bias resistor value. I added 2.2K Ohm resistors for R4 and R7 instead of 2.49K Ohm. This isn't really necesarry since you can adjust for other sensors in the software
Important MegaTune settings for OBD0 Honda's using MegaSquirt:
* Trigger Offset - 10 deg
* Ignition Input Capture - Rising Edge
* Cranking Trigger - Rising Edge
* Coil Charging Scheme - Standard Coil Charge
* Spark Output - Going High (Inverted)
* Thermistor Measurements
o -10 C - 10,000 Ohms
o 40 C - 1,000 Ohms
o 120 C - 100 Ohms