| Quote, originally posted by DIYAutotune » |
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. ![]()
![]()
![]() Thats it! Using the MS-II PCBv3 ECU
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 '91 and later Purpose
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 contact us.. |
Again I do not take credit for this, this was done by the awesome crew at DIYAutotune and gave me permission to post this.
Definatly will go great with the other write up for the CA.
Post Title:
Posted by: fiznat at 11:23 PM 1/15/2007
I'll add it to the stickey. 
Post Title:
Posted by: KATwo40 at 5:59 AM 1/16/2007
im so glad I did great in electronics in highschool very straight forward and simple schematics
im doing it very very soon
Post Title: Re: (Biggamehit)
Posted by: WDRacing at 11:43 AM 1/16/2007
WD
Post Title: Re: (Biggamehit)
Posted by: bige240 at 9:50 PM 1/17/2007
http://www.diyautotune.com/tec...s.htm
Post Title:
Posted by: daconkiftador at 10:26 PM 1/17/2007
WD
Post Title:
Posted by: S13FX at 11:22 AM 1/19/2007
| Quote, originally posted by WDRacing » |
| Added that to the sticky as well, what we need are a few more members running MS. WD |
You'd be surprise how many people are running megasquirt on Nissans and 240's
Post Title: Re: (WDRacing)
Posted by: Biggamehit at 3:15 PM 1/20/2007
but really, somebody needs to do a full writeup of all the wires that go here and there on a 240, what sensors are kept, or wires, what gets used to control the idle and other things.
Post Title:
Posted by: KATwo40 at 6:56 AM 1/22/2007
The stock ECU uses 16x16 tables, whereas the MS uses 12x12.
While both use interpolation to fill the gaps between cells, I wonder if anyone finds that they need to tune a particular area that just can't be accessed because it's an interpolation spot, rather than a tuneable cell on the map.
I'm still not giving up on using MS, as I've been SERIOUSLY contemplating using it. WD and I have discussed this pretty in-depth and I'm nearing a point when I can do some MS testing.
Post Title:
Posted by: The_Chosen_One at 9:58 AM 1/22/2007
The cool thing about the megasquirt software if their is a trouble spot, you can expand it and tune it more.
you can also run Dual maps 1 for each bank of injectors.
Interpolation happens on every single ecu because its impossible to map every point on a motor no matter how big your maps are, thats why it's EXTREMLY important that the code is solid to make good calculations when the system interpolates.
I'm a megasquirt user with boost, to be honest my car actually feels a lot better than any stock ecu setup that I've driven or used. To put it bluntly it feels like I'm driving a brand new car thats how smooth it is, from normal cruising to boosting hard.
Also a lot depends on the person tuning, after speaking with a few people that have used both stock and MS. Some said they had issues because their wasnt enough map points, it was the result of crappy tuning.
Here are examples of insane Megasquirt setups with high boost.
http://diyautotune.com/cars/cu...k.htm
http://diyautotune.com/racing/...6.htm
Dont forget these are computers based on user inputs "Garbage In, Garbage Out"
Post Title: Re: (TheOne)
Posted by: The_Chosen_One at 10:05 AM 1/22/2007
| Quote, originally posted by TheOne » |
| nice writeup, seriously makin me think about using MS, i though 1 of the hard parts was gettin the ignition installed, guess that made it easy. but really, somebody needs to do a full writeup of all the wires that go here and there on a 240, what sensors are kept, or wires, what gets used to control the idle and other things. |
Aside from the wires that are listed above for the distributor. Their is only 2 other wires to connect. 1 is Fuel Pump, their is a plug near the battery hold down area, its a Brown 8 pin plug, look for a Black/Pink wire thats your fuel pump relay wire thats where you wire up for Megasquirt. The 2nd wire is the 12volt ignition, you can find it on the ignition cylinder where you insert your key, test for the wire that gives power while cranking and on the run position I'm pretty sure its Black/White on the cylinder and when you follow it, it changes to a Black/Red wire.
Go here for more info and pics.
http://forums.nicoclub.com/zerothread/164446
Post Title:
Posted by: KATwo40 at 10:51 AM 1/22/2007
Great thread so far.
Post Title:
Posted by: KATwo40 at 11:56 AM 1/22/2007
Hopefully Neo (The Chosen One) will chime in here with some good news for me!
Post Title: Re: (KATwo40)
Posted by: WDRacing at 1:19 PM 1/22/2007
| Quote, originally posted by WDRacing » |
| Why? is it that important to remove the ecu? Are you being gay? |
Do you really have to ask?
Post Title: Re: (WDRacing)
Posted by: KATwo40 at 2:02 PM 1/22/2007
| Quote, originally posted by WDRacing » |
| Why? is it that important to remove the ecu? Are you being gay? |
Hell yeah, it's important. What's the use in spending several hundred dollars on MS (or any other standalone) if you still must shoulder the stock ECU? If I have to keep the stocker, I'll just use it for the whole deal.
Post Title:
Posted by: The_Chosen_One at 7:35 PM 1/22/2007
Just remove the engine harness, and ECU, but keep the lower harness as that connects your speedo, reverse lights etc etc. The lower harness connects to the main body harness which Tees off to the cluster harness.
At the moment the DIYAutotune crew is experimenting with A/C load detection which is what the stock ecu does when you turn on the A/C. But if you arent using A/C it doesnt matter and your good to go.
So yes removing harness and ecu is ok and cluster still works fine.
The only thing you have to do is run a wire for your Tach to Megasquirt.
The wire on the Tach is Yellow/Red.
Post Title:
Posted by: babowc at 8:40 PM 1/26/2007

I am trying to figure out whether it's worth to just make one's own harness for the MS...
Has anyone removed the engine harness completely and made their own relay box? What would be included in such a relay box?
Post Title: Re: (sil80drifter)
Posted by: bige240 at 10:56 PM 2/6/2007
The alt and starter are controlled by the ignition...
In actuality you could just pull every one of the wires out of the back of the stock ECU and connect them to the relay board or make the pigtail to go to the megasquirt and just leave the rest of the stuff hanging.
You can't make your own relay box, at least I don't think so. You have to buy the relay board, or make your own pig tail
Post Title: Re: (bige240)
Posted by: sil80drifter at 8:17 AM 2/7/2007
Has anyone got an examples of such a board on the 240? What relays are needed and which can be re-used?
Also, does the tach use the engine harness for signal? I know that once I've connected my SAFC, the RPM's wouldn't work right on the SAFC (but worked fine on the tach), but then, oddly, when I connected the MSD BTM (some wiring on the coil) the SAFC started working great but the tach died. As soon as I unplugged the BTM and replugged the wires on the coil, the tach came to life again and the SAFC started showing rpms poorly like before.
So those are some of my worries about the engine harness...
Post Title: Re: (sil80drifter)
Posted by: bige240 at 12:19 PM 2/7/2007
Yes the tach gets its signal from the engine harness, namely the dizzy wiring, but with the relay board you just connect everything up and you run a signal wire to the tach from the relay block, along with a power and a ground.
I'm not sure what relays you'll want to keep, since I went buckwild and tore them all out.
You can also do ABS Megasquirt, if you so choose...The hall sensor is a powerful thing...
Post Title: Re: (bige240)
Posted by: 98240kat at 1:10 PM 2/7/2007
This ecu will work on ANY fuel injected engine.
You can get a 2bar (26psi) or a 4bar (52psi) map sensor for the Board also and run boost until your engine explodes.
The wiring is very simple and not much different than the wiring you already have in your engine bay.
I could buy just about any standalone out there and I still like the megasquirt. If more 240 guys would buy it, I'm sure someone would make a plug-and-play harness for it just like someone did for the Toyota 4AG series (corolla, mr2) engine.
Post Title: Re: (bige240)
Posted by: FattyMcBaggins at 12:10 AM 2/8/2007
Their write-up above states that "We'll be adding more information on settings, the S14, and the factory ignition module soon!"
So keep your fingers crossed and try to reasearch it on your own for now. Best of luck and don't forget to post any findings!
sil80
Post Title: Re: (sil80drifter)
Posted by: sil80drifter at 9:25 AM 2/8/2007
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 JS10
Jumper IGBTOUT to IGN
(This will enable the VB921 Ignition Coil Driver)
That's it!
Well, at least the guys from DIYAutotune are really nice. Matt responded to my email almost immediately and was the one who pointed out that there are very few differences between the two boards in terms of set-up, so hey! I'm an idiot but at least it's all settled now.
Let's hope they come out with something for the 95+ 240s soon.
In the mean time I am selling my SAFC II, VAFC II (Honda phase, don't ask), SOHC VTEC Head and MSD BTM, so I can buy the MS! Whoo!
sil80
Post Title: Re: (98240kat)
Posted by: WDRacing at 9:46 AM 2/8/2007
But don't count on me for this writeup...but one of you other guys could head that up.
WD
Post Title: Re: (WDRacing)
Posted by: 98240kat at 10:12 AM 2/8/2007
Look at my write up I did a yr ago.
Even though its for a CA and FORD EDIS it still should explain EVERYTHING for you.
http://forums.nicoclub.com/zerothread/164446
Heres a wiring diagram I made for my harness as you can see the color changes 



So pretty much remove the ecu and the plug that goes with it. Leave the lower harness and tranny as that controls your speedo, reverse lights, alternator, starter etc etc. All that will connect to the main body harness.
As for the RELAY board, thats really only meant for older cars that arent as advanced as ours. The 240sx has its own relays so you tap into them which in reality is only 2 wires 1 for the fuel pump relay and 1 for the Ignition switch.
98240KAT I could probably help you in the future as I live in South Florida as well. Pembrooke Pines is like 30mins south of me.
Post Title: Re: (The_Chosen_One)
Posted by: 98240kat at 4:52 PM 2/8/2007
| Quote, originally posted by 180sx » |
| There is quite a fe ka's out there with megasquirt. And its better to rip out old ecu and harness and just run new clean wires all together. Old harness has useless crap. But yah people still prefer to buy easy tap ins or tuned ecu. ALot just wanna plug and play, or punch in or load in a few settings.Tuning standalone requires time and knoweledge and a few blown engines or money to pay someone to tune it right. Othrwise you'll never see full use out of it. What support does Megasquirt provide for knock sensor that comes oem on ka24de? |
Just wire up the knock sensor, input your parameters and off you go. Plus knock sensors are crap useless little buggers.
Post Title: Re: (180sx)
Posted by: sil80drifter at 9:46 AM 3/2/2007
I am in the process of talking to DIYAutotune and starting my own MS-II conversion soon, sans the EDIS stuff, as it makes me uncomfortable and seems moot with the stock dizzy able to be utilized just as well.
I will be doing a detailed write up and hopefully this will be the start of the KA24E MS period, where people see just how easy it is to standalone their KA-Es themselves. Someone should do one for the KA24DE.
You got me fired up, WD, I don't have much time lately to write up things I do, but this seems like a great contribution to a board which has given so much to me in terms of knowledge and experience.
I'll be making a separate thread soon.
sil80
Post Title:
Posted by: The_Chosen_One at 2:49 PM 3/3/2007
As for doing a write up if ya want sure, but not really necessary their are 2 write ups.
1 is for a KA with ITB and the other is for the CA18DET. Even though the CA18DET write up isnt KA specific its the same concept the Ford EDIS-4 doesnt care what more as long as its a 4 cylinder and that you have the crank trigger positioned correctly, so using the write for the CA is exactly the same for the KA.
http://forums.nicoclub.com/zerothread/164446
Post Title:
Posted by: WDRacing at 3:41 PM 3/3/2007
http://www.megamanual.com/ms2/tune.htm
http://www.megamanual.com/v22manual/mtune.htm
Post Title: Re: (The_Chosen_One)
Posted by: WDRacing at 4:57 PM 3/3/2007
Lambda...Gasoline...Propane...Methanol...Ethanol.......Diesel
0.70...........10.3.........11.0.........4.5...........6.3...........10.2
0.75...........11.0.........11.8.........4.9...........6.8...........10.9
0.80...........11.8.........12.5.........5.2...........7.2...........11.6
0.85...........12.5.........13.3.........5.5...........7.7...........12.3
0.90...........13.2.........14.1.........5.8...........8.1...........13.1
0.95...........14.0.........14.9.........6.1...........8.6...........13.8
1.00...........14.7.........15.7.........6.5...........9.0...........14.5
1.05...........15.4.........16.5.........6.8...........9.5...........15.2
Very good tuning writeups. MSII gets better everytime I look into it. By the time I get the motor swap half done, the MSII won't have any bugs and probably a few new options.
WD
Post Title:
Posted by: The_Chosen_One at 5:15 PM 3/3/2007
http://www.megamanual.com/flexfuel.htm
At the moment its the only aftermarket EMS that allows you to use Flex Fuel technology. The way it works is that you use a sensor from any of the flex fuel cars and what it does is sense the frequency change from Gasoline to E85 even straight up Alcohol. What this does is megasquirt will adjust your maps accordingly when it senses the new fuel. So you dont have to constantly tune if you switch fuels.
As for bugs I havent noticed any, only problem I had was a fuel richness problem which was my own stupid fault.
Overall I'm REALLY REALLY happy with my setup.
Post Title:
Posted by: WDRacing at 10:27 PM 3/3/2007
WD
Post Title: Re: (WDRacing)
Posted by: sil80drifter at 8:12 AM 3/22/2007
I figured when I make a separate thread, I could open it up with my progress on removing the old harness and prepping the rest up for MSing, and then go into the detail of wiring it up and seeing if it blows up when I try to crank it.
I am SO happy I won't have the damn MAFS anymore... ugh, how I hate that wire that goes to it, it's never in a good place and always in the way.
Also, that really thick wire that combined injectors and distributor that always rubs the valve cover, I'll figure out just how to make it nice and concealed and NOT RUBBING.
On the other hand I am concered about passing emissions without an air pump... Not baswed on visual, but on the smog results alone...has anyone passed them before while turbo and w/out air pump? I would think yes, but just wondering...
sil80
Post Title:
Posted by: WDRacing at 8:49 AM 3/22/2007
http://www.diyautotune.com/cat...e502f

Post Title: Re: (The_Chosen_One)
Posted by: sil80drifter at 12:17 PM 3/22/2007
http://www.diyautotune.com/cat...e502f
AND this:
http://www.diyautotune.com/cat...e502f

sil80
Modified by sil80drifter at 3:38 PM 3/22/2007
Post Title:
Posted by: The_Chosen_One at 12:31 PM 3/22/2007
I like the relay board a lot, it will make it a snap to trace down any issues, and wiring to it is also very simple. Yes I could try to utilize the old fuses and relays, but WHY?
To me it's worth to have a simple solution, and if I spent an extra $100 on it, it's ok. The total coat of the MS with all the stuff is still $620 total for me, and that's under my $700 budget. I know I will be buying some connectors and etc, but again, simplicity and ease of use are important to me.
Similar to why you chose the pre-made harness instead of making your own again, I chose to buy the MS assembled and ready to go. I am comfortable with soldering, but it's just not worth my time, especially having to worry about tracking down solder issues with the Stimulator, when I could be spending that time tuning/driving/f-in my ex. Yes, someone could spend $250 less and 20-30 more hours DIYing the whole thing, instead of buying complete components.
But to me 20 hours are worth more than $250. I make more at work
, and I def don't need solder practice.
sil80
Modified by sil80drifter at 6:43 AM 3/23/2007
Post Title:
Posted by: The_Chosen_One at 1:27 PM 3/22/2007
Also the only relay you have to tap into is the Fuel Pump, which is taken care of when you splice into a Black/Pink wire thats on a 8pin brown connector near the battery. Than you give power to MS via the ignition switch on the steering wheel.
With the relay board you do the same work as if you did the regular harness but with a few steps more like wiring it to the fuel pump.
If the OEM setup is too old just replace the relays.
Post Title: Re: (The_Chosen_One)
Posted by: sil80drifter at 7:44 PM 3/22/2007
Additionally the injector, fuel pump and main fuses are also on the board. It's quite useful, if you ask me.
So... I don't think I threw money away on this one.
sil80
Modified by sil80drifter at 11:07 PM 3/22/2007
Post Title: Re: (sil80drifter)
Posted by: Edub1 at 4:11 PM 4/14/2007
I'm wondering though, what all would have to be rewired if I choose to use a new harness Vs splicing into the factory wires? I realy don't think my wiring is in all that bad of shape but if it's not too much trouble new wiring might be nice.
Also, does anyone know how the MS addresses the fast idle control for the AC? I know it works with the idle control but couldn't find any mention of the accessory controler.
Post Title:
Posted by: The_Chosen_One at 9:58 AM 4/18/2007
as for the A/C idle control, their working on it.
Post Title: Re: (The_Chosen_One)
Posted by: 480sx at 5:44 PM 4/18/2007
First of all, instead of dealing with 6-8 ground wires for each sensor, you deal with one. From that one ground wire you can run wires to the 2 major ground points on the KA, and your set.
You also eliminate relay setup for the FP, which is a pain to even get at. The wires criss cross in the cab from the FP, go to the relay, and from the relay they go up underneath the dash to the ECU.
To top it all off, the relay board makes things so easy to install, and then later, to diagnose if any problems arise. Its got 20 different connectors, each one having a place where the wire or wires go into, then you tighten down the screw and your connection is made. Like the connections on an amp for car audio, except smaller.
There are other reasons to switch to the relay board im sure, but i cant think of anything else right now.
As a side-note, i just finished installing my MS unit, and tomorrow i go to test all the sensors and that good stuff. I would HIGHLY RECOMMEND the relay board.
The IAC-FCID unit is a PWM/Stepper type motor, and MS can control those types of circuts. However no one knows how to do it yet. I just left all those idle control systems connected to the ECU, so i dont have to worry about losing any drivability.
Modified by 480sx at 9:46 AM 4/20/2007
Post Title: Re: (480sx)
Posted by: Edub1 at 2:36 PM 8/16/2007
Anyway, How does the MS relay board work with all the accessories and would it be a benefit even if my dash is out?
Also, as per the write up, do I need to buy 2, 12V relays to wire the injectors up as shown or are these found in the vehicle somewhere.
Post Title: Re: (Edub1)
Posted by: 480sx at 3:29 PM 8/16/2007
If you get the relay board it takes care of your injector problem.
The relay board wont replace your stock relays, it only controls all the engine bay wiring for MS. So, to answer your question, it would still be a benefit, however it really wouldnt matter if your dash was in or not.
Post Title: Re: (480sx)
Posted by: Edub1 at 9:34 AM 8/17/2007
Am I right in understanding that I need to cut the constant hot and add those two relays to the system for the injectors if I don't have the relay box?
Post Title: Re: (The_Chosen_One)
Posted by: Edub1 at 8:40 AM 8/19/2007
< Contact Us - NICO
>
Visit G37Driver.com for Infiniti G37 Information
NICOclub's Nissan forums and Infiniti forums and all affiliated sites are the property of HDS Holdings, Inc.
They are independent publications and are not affiliated with or endorsed by Nissan Motor Company or Nissan North America.
Information © Copyright © 2000-2009 by NICOclub
All rights reserved. Material may not be copied or reprinted without written permission.
Visit 370zclub.org for Nissan 370z Information