MegaSquirt Install On KA-series 240SX (S13)

Troubleshooting, DIY's, How-To's and articles about all Nissan vehicles. Non-vehicle specific "General" How-To and tech information is also here.
User avatar
WDRacing
Moderator
Posts: 23925
Joined: Mon Nov 25, 2002 2:00 am
Car: 95 240SX, 99 BMW 540i, 01 Chevy Express, 14 Ford Escape
Location: MFFO
Contact:

Post

Compliments of DIY Auto Tune:

Jerry and I have put together a guide to setting up Megasquirt on the KA-series engine. Right now this article covers what specific mods you will need to the Megasquirt and what wiring you will need to set up Megasquirt on an S13 with a KA24E or KA24DE. We'll be adding more information on settings, the S14, and the factory ignition module soon!

How to MegaSquirt your 240SX

Directly driving the coil with the MegaSquirt-I PCB 3.0 and MSnS-E 029v or later or the MegaSquirt-II

Updated 1/10/2007

Application(s): 1989-1994 Nissan 240SX with KA24E or KA24DE

Also applies to 1994.5 and later converted to an external coil distributor from the 89-94.

Other vehicles with KA series engines, such as Nissan pickup trucks, are similar.

Level of control: Full Standalone EMS-- Fuel and Ignition Control



The optical trigger on a 240SX may look a bit complicated, with two rows of slits and the unequal slit sizes in the inner ring. However, setting up Megasquirt to work with this ignition is surprisingly simple. Megasquirt does not need or use the information provided by the second ring of 360 slits or the length of the inner slits, so you just need to obtain a signal from the trailing edge of the ring of 4 slits. This writeup covers using a VB921 for controlling the coil.

ECU Modifications

It's choice time, MS-I with MSnS-E firmware, or MS-II. The choice is yours. It's possible to make your KA run with either ECU. The MS-I with MSnS_E is extremely mature, has a ton of features, and is pretty near the end of its development cycle. The MS-II is much newer, faster hardware, though the development is really just getting kicked off. While it has some features that MSnS_E doesn't have, the reverse is also true in that MSnS_E has some features that the MS-II doesn't have (though most require mods to enable them). The writer of the MSnS_E firmware has been conducting some tests on the MS-II firmware and I expect to see some really cool things happen soon...

Using the MS-I PCBv3 with MSnS-E firmware

This is assuming you are starting with an ECU built up like I build my assembled MS130-C MegaSquirt-I PCB3.0 units. If you are building your unit up from a kit you can implement these changes during assembly.Flash ECU with MSnS-E version 029v or later. (How? Click Here.) (Or Here)Jumper IGBTOUT to IGN to send to IGBT ignition coil driver signal out of pin 36 on the DB37.Cut out C12 and C30. (Only needed when triggering from the - terminal of the coil, which you are not)Remove D1 and jumper it, or just install a jumper wire across it's leads. (Only needed when triggering from the - terminal of the coil, which you are not)Cut out R57 if fitted (this won't be there on my units though).Get a 330 ohm 1/4w resistor and cut the leads down to about 1/2" at each end. Maybe a bit less.Tin each end of the resistor with a bit of solder.Cut a 5" piece of hookup wire (22ga is fine) and strip just a 1/8" or so. Tin the stripped wire with solder. Melt the tinned wire tip to one end of the tinned 330 ohm resistor tip and let it cool.Heatshrink wrap this wire/resistor assembly.Use this wire/resistor combo to jumper the 'top' (top as in when you facing the silkscreen side of the PCB, with the text so that you can read it normally) lead of R26 to IGBTIN on the opposite side of the PCB.

Thats it!

Using the MS-II PCBv3 ECU

Build the ECU up to trigger from the Hall/Optical Input (all of our MS230-C units are by default configured this way).The only change is to enable the IGBT High Current Ignition Coil Driver Circuit to directly drive the coil.Remove the jumper from JS10 to IGN (if exists)Jumper IGBTIN to JS10Jumper IGBTOUT to IGN(This will enable the VB921 Ignition Coil Driver)

Thats it!

Wiring]

The output is quite straightforward - you will just need to connect the negative terminal of the coil to pin 36. The specifics of the input wiring will depend on which year 240 you have; Nissan changed the wiring colors in 1991. However, the wires serve the same purpose; only the colors changed. Note that these years apply to the 240SX and are not the same for other KA-powered vehicles. For example, it appears that some Nissan pickup trucks with the KA24E engine retained the earlier color scheme for considerably longer.





Distributor Wire Colors'89-'90 [Purpose]B/W [12v]+G/B [MS Trigger (to Pin 24 on DB37, or Relay Board TACH terminal)]G/Y [not used]Black [Ground]

'91 and later PurposeB/W 12v+White MS Trigger (to Pin 24 on DB37, or Relay Board TACH terminal)Black not usedBlack Ground

Fast idle valves, relays and other components

The 240SX used a thermal type fast idle valve that just needs to be supplied with 12 volt power when the engine is turned on. The valve will open on its own, so you do not need to set up any sort of idle control with Megasquirt.

The stock Nissan ECCS relay is grounded through a circuit in the ECU. Also, the stock S13 wiring harness is set up to send the injectors 12 volts at all times, even when the ignition is turned off. When converting to Megasquirt, the injectors must not have 12 volt power unless the Megasquirt is also powered up. Sending the injectors 12 volt power with the Megasquirt ECU off can result in damage to the injector drivers.The wiring diagram below shows one possible way of modifying the stock wiring so that the ECU and injectors power up at the same time, and also allows the other components drawing power from the ECCS relay to work as normal.



An alternate method of dealing with this is to use the Megasquirt relay board instead of the stock ECCS relay to power the Megasquirt, injectors, and crank angle sensor.

MegaTune Configuration for MSnS-E

On the 'Spark' menu choose 'Spark Settings' and set 'Spark Output Inverted' to YES. It is critical to get the Spark Output Inverted setting correct, as setting this wrong can result in damage to the VB921. Dwell settings will depend on the coil used. A typical rule of thumb is to back off the dwell until you can just barely detect a misfire under lean cruising conditions, then add 0.2 ms of dwell time.

If you use someone else's .msq file I do recommend you check the MSnS-E firmware version the .msq file was built on as you cannot always use a file built on one version of MSnS_E with a different version-- it's best to use the .msq files with the same version of the MSnS-E firmware that it was built on.

MegaTune Configuration for MS-II

As this is a 'path less traveled' thus far you probably won't find people with maps to share for your car just yet. You can however dial it in with a bit of patience and some 'how to tune' homework, most of which you can do in the Megamanual at http://www.megasquirt.info.

Set ignition capture to "Falling Edge."

Important when using the VB921: On the 'Ignition Settings' menu make sure to set 'Spark Output' to 'Going High (Inverted)' and set 'Coil Charging Scheme' to 'Standard Coil Charge'.

We'd like to hear from you!

These settings cover the basic hardware changes required and some of the MegaTune settings based on our research and customer feedback, but we would love to hear from anyone who has set up Megasquirt firsthand on a KA24E or KA24DE and would like to share their configuration settings to help better this article. Also were particularly interested if you are using the stock ignition power transistor (ignition module) instead of VB921 direct coil control which will simplify things further for many. We have a couple of local 240's we may get in the shop soon to 'squirt and further improve this article.

If you have any further information, contributions, or questions about this article, please send mail to [email protected]


Return to “Nissan Articles”