«

Apr 24

Print this Post

S12 – Megasquirting ~ empedocles99

Dunno if anyone cares, but I’m going to use this thread, over time, to detail my Megasquirt adventures in my mk1 1985 Notchback ca20e.

If you don’t know what it is, it’s an aftermarket fully tunable (and inexpensive) fuel and ignition controller. You can read up on it here: http://www.megasquirt.info/

I’m going to run megasquirt’n’spark on the megasquirt 1 v3.0 pcb, so I can control spark.

I bought my megasquirt hardware at: http://www.diyautotune.com

Hardware mods:

wiring harness plugs removed from spare ca20e ecu.
ka24e throttle body (on its way from ebay)
Spare ca20e distributor with rpm & throttle advance disabled (on its way, bought from COandCA)
Cold air intake build out of intercooler piping with vacuum lines added. Throttle body outside diameter is 2.5″, all my intake pipe is 2.5″, and the pipe will end in a k&n universal filter (RC-9420).
Electric fan out of a civic.
25W 5 Ohm dropping resistors 825F5R0 — OHMITE — Wirewound Resistor
ACDELCO 15292 Accessory Drive Belt 88934275 (to remove fan pulley, unconfirmed fit) (Is the fan pulley connected to the water pump? I never did this one)

I spent the weekend reviewing the megasquirt manuals, and FSM. I have most of the wiring down (subject to experimentation/verification, don’t blame me if you blow up your car, the ones marked with ? I am not completely sure of):

Stock CA20e pinout:

Looking at the back of the ECU where the harness plugs in, there are two plugs:

Left Plug:
115 114 —- 113 112
111  X  X  108 107
106 X  X 103 102 101

Right Plug:
10  9  8  7  6  5  4  3  2  1
20 19 18 17 16 15 14 13 12 11

Pin, Color, Description

1) (P)  ??? Check Engine Light (Couldn’t determine exactly what this is for)
2) (W)      Intake Air Temp
3) (Y/G)    Coolant Temp
4) (B)      O2 Sensor +
5) (B)      O2 Sensor GND
6) (Y/L)  ? Common wire for Intake Air Temp and MAF sensor (assumed to be +5V or +12V)
7) (LG/B) ? Provides signal/power to: Power Steering Oil Pressure Switch, Heater Fan, “Lightning Switch”. I am not sure if this needs to be connected or not.
8) (G/Y)    Throttle Position Sensor switch: idle
9) (B/Y)    Start signal in to ECU (+12V when START in ignition switch)
10) (L/W)   Throttle Position Sensor swtich: full throttle
11) (G)     MAF #1
12) (G/R)   Throttle Position Sensor switch: Ecu output (assumed to be +5V or +12V)
13) (Y/R)   A/T Unit (I assume this means Automatic Transmission)
14) (G/OR)  Transmission Neutral Switch (GND when switch is on)
15) (L/Y)   MAF #2
16) (Y/R)   MAF #3
17) (G/R)   Distributor output signal (controls the twin/single spark system, and also modifies timing in the Auto Trans model)
18) (BR)    Check Connector (Not used)
19) (LG)    Check Connector (Not used)
20) (L)     Tachometer signal

101) (W/L)  Injector #4 GND/Signal
102) (B)    Ground
103) (B)    Ground
106) (B)    Fuel Pump GND/Signal (Should be connected to a relay! Megasquirt can’t deal with the current on this wire)
107) (W/R)  Injector #1 GND/Signal
108) (B/W)  Injectors +
111) (Y/W)  Idle Up (turns on under high electrical load to stabilize idle)
112) (W)    Injector #2 GND/Signal
113) (Y)    Injector #3 GND/Signal
114) (L/R)  Air Regulator (Should be on when fuel pump is on, according to FSM)
115) (LG/B) EFI Relay switch signal

Megasquirt wiring:

Megasquirt is wired using a DB37 cable (a serial cable using up to 37 wires).
See here for reference: http://www.megamanual.com/ms2/V3assemble.htm

Here is how I plan to wire, notation is Megasquirt Pin -> ca20e wire harness pin:

MS    ca20e
7, 8, 9, 17, 18, 19 -> Engine Block Ground
20 -> GM Air Temp Sensor in custom cold air intake
21 -> 3
22 -> ka24e TPS pigtail (variable resistor)
23 -> 4
24 -> 20
26 -> ka24e TPS pigtail (variable resistor)
28 -> 115 (main relay power)
30 -> 111
31 -> Coil #2 Negative Terminal (instead of distributor)
32 -> 101
33 -> 107
34 -> 112
35 -> 113
36 -> Coil #1 Negative Terminal (instead of distributor)
37 -> fuel pump relay: 114 (air regulator) + 106 (fuel pump)  (I am going to wire in a relay in to the wiring harness to deal with these, since the OEM Ecu can handle more current from 114 and 106 than the megasquirt can for these pins… there is no fuel pump relay in the car, essentially, and megasquirt requires one).

Fuel Pump Relay:
One each of the switching wires connected to: (ca 115) Positive and (ms 37) Gnd/Neg
The ‘Switched On’ wire connected to: (ca 114 & ca 106) Positive
The ‘Common Switched’ wire connected to: (ca 102) Gnd/Neg

MegaSquirt assembly notes
Megasquirt 1 CPU on v3 pcb:
http://www.megamanual.com/ms2/V3assemble.htm

22) I did not install the IAC stepper control, since we have on/off idle air equipment on the ca20e.

50) It says you must choose between
1) Hall/Optical/etc. or
2) VR (Variable Reluctor)
We have a distributor/points system, so you should do 50a or 50b. 51 is optional in the case of ca20e (and won’t be of any benefit unless you swap to a different engine with VR)
You must then choose one of:
a) Hall/optical or points without a coil connection (ie.: Megasquirt drives the coil) or
b) coil negative terminal/points trigger
I chose (a) because I plan on using Megasquirt to trigger the coil, not the distributor. I am not completely sure on this, but because the mk1 distributor runs an IC  to trigger the coils anyways, then you may be able to always just choose (a) even if you are not triggering the coils with Megasquirt.

50a) It says that most people don’t need D2, but it should be jumpered. I installed it, on accident. I will remove and jumper this location if there is a problem.

51) Did not install the Variable Reluctor circuit (even though it was recommended, it is optional if triggering off of distributor points)

52) Install the jumpers “For the Hall sensor, optical sensor, coil negative terminal or points”

54) This is needlessly confusing, just install the two resistors and go to the next step.

Use megatherm to program the air and coolant temperature sensors if you’re using the stock ones. From the 1985 FSM:

Air temp sensor resistance (kOhm) (ca20e only):
-10C -> 8.0-10.0
20C -> 2.3-2.7
50C -> 0.7-0.9

Coolant temp sensor (kOhm):
-10C -> 8.5-9.5
20C -> 2.3-2.7
50C -> 0.77-0.87
80C -> 0.30-0.33

65) Did not complete yet, but here is how I will do it:

Since the ca20e has two coils, we need to install a second coil driver. See: “Two Coils Direct Drive Output for a V3.0 PCB” on the Megasquirt ‘n’ Spark Extra Manual. The only difference is that I wired the coil output to pin 31 (instead of pin 6 as in the manual) because my wiring harness already had an unused wire on pin 31 that I could use.

Reference notes:
Megasquirt Manual v3.0 pcb
Megasquirt ‘n’ Spark Extra Manual
240sx Distributor Wiring

69) I screwed this part up a little… the mica insulators are in a bag with a screw, lock washer and plastic washer. The mica insulator are clear rectangles with a hole cut in them.

69,70) Install both (in case of injector upgrades later, and I don’t know if we have low or high impedance injectors anyways)

71) Do not install these. Even though it’d be nice to have the current protection, we need the heat sink space for a second coil driver.

Useful Specifications
Fuel Pressure Regulator: 30 psi at idle, 37 psi at full throttle
Fuel Pump: 43-64 psi, 95 liters/hour or 25.125 gallon/hour (good to at least 150hp or so)
Fuel injector impudence: 2-3 Ohm (low impedance)

Updates
May 24, 2007
I got the parts for the cold air intake (universal intercooler piping kit for my eventual ca18det). I ripped out the maf, the stock intake pipes, the stock fan and fan clutch.
I mocked up the cold air piping and marked where to attach vacuum lines.
I got this rad set of vacuum line taps: “Spectre 8711 Optional Air Intake Installation Hardware Kit” off of (Amazon).
It’s a set of grommets and vacuum fittings to connect vacuum lines to intake pipes, you just drill a hole and pop a grommet in.

Oct 25, 2007
Here’s a link to a baseline tune that should get the car started. It’s tuned for 12.5:1 AFR at 3000 rpms, and 12.0:1 above that.
http://www.indolence.net/s12/resources/meg…_2007_07_14.msq

I’ve decided to take it to the next step and drop a t2 turbo on this bad boy, I’ll make a writeup in another thread.

« Last Edit: 01:54:55 AM / 30-Oct-08 by Empedocles99 »

Permanent link to this article: https://s12wiki.dorkmedia.com/2026/04/24/s12-megasquirting-empedocles99/