MEGAsquirt A place to collectively sort out this megasquirt gizmo

K24z3 in an NB2 running MS3x

Thread Tools
 
Search this Thread
 
Old 07-18-2023, 03:56 PM
  #1  
Junior Member
Thread Starter
 
rabid's Avatar
 
Join Date: Dec 2019
Posts: 58
Total Cats: 10
Default K24z3 in an NB2 running MS3x

I'm doing a K swap with MS3 and the extra add on board. It's the K24z3, BMW ZF 5 speed, Cadillac differential, and G25-660 turbo swap. This isn't my first megasquirt setup. I also have a twincharged crx and I write custom firmware for my ms3. I'm very close to testing firing the engine. I'm creating this thread to show what I'm up to and ask/answer questions.

The BLU/ORG wire controls the MAIN RELAY. That provides power to pretty much everything. If I ground it, the relay will activate. The stock ECU will switch it on but I can't do that with megasquirt. The outputs on megasquirt tend to backfeed and power the ECU. I can't just hook that wire to the ignition switch unless I use yet another relay setup. Before I do that, does anyone have any ideas?






rabid is offline  
Old 07-19-2023, 11:47 AM
  #2  
Junior Member
iTrader: (1)
 
leboeuf's Avatar
 
Join Date: May 2013
Location: Sandia Park, NM
Posts: 454
Total Cats: 52
Default

It's not super clear what you are trying to do. I don't know the NB2 wiring system very well, but I would think the ECU is not powered through the main fuel/ign/etc relays.
Is there any reason not to power the ms3 through an ignition switch source and then use one of the pull down pins on the ms3x to accomplish your goal? It's been almost 10 years since I set my ms3x up, but this is more or less how the fuel pump relay/etc operates.
Sounds like a cool project.
leboeuf is offline  
Old 07-19-2023, 03:11 PM
  #3  
Junior Member
Thread Starter
 
rabid's Avatar
 
Join Date: Dec 2019
Posts: 58
Total Cats: 10
Default

Originally Posted by leboeuf
It's not super clear what you are trying to do. I don't know the NB2 wiring system very well, but I would think the ECU is not powered through the main fuel/ign/etc relays.
Is there any reason not to power the ms3 through an ignition switch source and then use one of the pull down pins on the ms3x to accomplish your goal? It's been almost 10 years since I set my ms3x up, but this is more or less how the fuel pump relay/etc operates.
Sounds like a cool project.
The stock ECU will switch it on but I can't do that with megasquirt. The outputs on megasquirt tend to backfeed and power the ECU.

With that said, I did discover that outputs on the main board do that but outputs on extra board seem to work as expected. So I'm using the MS3extra idle output to activate the main relay.

Outputs on the main board such as FIDLE or INJ1 or INJ2 can't see any kind of 12 volts even if it is through a coil. I tested this. The MS stays powered up. I turned on the ignition and the battery voltage indicator showed 12.5 volts. I turned it off and it dropped to 6 volts. That was because I had an idle valve connected to the main relay but the main relay would stay on because the ECU didn't even know I tried to turn it off. The actual coil in the idle valve powered the ecu through FIDLE. So I had to connect the power of the idle valve directly to ignition switch. It's a black/white wire in the diagram above. It was connected to the white/blue.

I asked DIY autotune how their plug and play ecu works and they just said it uses special circuitry to handle the main relay.
*alright then, keep your secrets*
rabid is offline  
Old 07-19-2023, 05:58 PM
  #4  
Junior Member
 
natewin's Avatar
 
Join Date: Jan 2019
Location: NH
Posts: 147
Total Cats: 23
Default

Not sure exactly what you are looking for When I wired my 95 for MS3X I used info from here.
https://trubokitty.com/#/ms3xassembly
natewin is offline  
Old 07-19-2023, 06:14 PM
  #5  
Junior Member
iTrader: (1)
 
leboeuf's Avatar
 
Join Date: May 2013
Location: Sandia Park, NM
Posts: 454
Total Cats: 52
Default

There seems to be some confusion still. The injector drivers on the ms3x can handle 12v.
The idle control/injector control/etc don't provide an actual voltage. They provide a path to ground. This is why the injectors share a common 12v rail on a miata.
leboeuf is offline  
Old 07-19-2023, 06:47 PM
  #6  
Junior Member
Thread Starter
 
rabid's Avatar
 
Join Date: Dec 2019
Posts: 58
Total Cats: 10
Default

Originally Posted by natewin
Not sure exactly what you are looking for When I wired my 95 for MS3X I used info from here.
https://trubokitty.com/#/ms3xassembly
Good info on the pins in the stock ecu connection. It doesn't show 3H connected. That's the main relay control wire.

Originally Posted by leboeuf
There seems to be some confusion still. The injector drivers on the ms3x can handle 12v.
The idle control/injector control/etc don't provide an actual voltage. They provide a path to ground. This is why the injectors share a common 12v rail on a miata.
They also provide power to the ecu when they aren't trying to ground. It's a design flaw on the main board outputs.
rabid is offline  
Old 08-01-2023, 08:58 PM
  #7  
Junior Member
Thread Starter
 
rabid's Avatar
 
Join Date: Dec 2019
Posts: 58
Total Cats: 10
Talking

I got it running! No engine modifications. The crank input required a 1K pull up resistor. I didn't think it would but it did the trick. The thing would lose sync barely above cranking speed without it. It started right up first try but then sputtered when the rpm came up.
I also messed with the pots per the instructions to make the test points read 2.3 volts. It said would be 2.5 volts but it doesn't go any higher.
The exhaust cam is on the MS3x cam input and checks the weird tooth wheel when crank tooth 4 comes by. I figure that is the soonest possible tooth to check at for quickest starts.
The intake is datalog in which needed no pull up resistor added. So that's the vvt cam control.
I used a HSD-4 from diy to drive the vvt and vtec. It seems to move the cam around under testing at idle.


Last edited by rabid; 08-19-2023 at 04:02 PM.
rabid is offline  
Old 08-02-2023, 08:55 AM
  #8  
Junior Member
Thread Starter
 
rabid's Avatar
 
Join Date: Dec 2019
Posts: 58
Total Cats: 10
Default

Struggling to get the air out of the coolant system. The lower radiator hose is dead cold. I disconnected the turbo coolant lines to help bleed it. I'll work on it more later today. Any ideas?
rabid is offline  
Old 08-02-2023, 08:56 AM
  #9  
Junior Member
Thread Starter
 
rabid's Avatar
 
Join Date: Dec 2019
Posts: 58
Total Cats: 10
Default

The stock NB2 throttle cable is way too long. Anyone know what to use?
rabid is offline  
Old 08-02-2023, 11:41 PM
  #10  
Junior Member
Thread Starter
 
rabid's Avatar
 
Join Date: Dec 2019
Posts: 58
Total Cats: 10
Default

I removed c12 from the datalog in pt6 circuit. That should eliminate issues reading the cam at high speeds. pt4 doesn't have this but it would need a pull up resistor added.
rabid is offline  
Old 08-03-2023, 07:47 PM
  #11  
Elite Member
iTrader: (2)
 
240_to_miata's Avatar
 
Join Date: May 2007
Location: Cromwell, Connecticut
Posts: 2,606
Total Cats: 16
Default

Originally Posted by rabid
The stock NB2 throttle cable is way too long. Anyone know what to use?
I tried looking into a rhd version but instead ended up cutting and shortening the black outer part. It’s not that bad to cut and remove a section of the outer layer, slide the threaded part down and then cut the cable down and use the dorman throttle cable ends. Not the best solution but it worked ok for me.
240_to_miata is offline  
Old 08-03-2023, 08:11 PM
  #12  
Junior Member
Thread Starter
 
rabid's Avatar
 
Join Date: Dec 2019
Posts: 58
Total Cats: 10
Default

I've gotten the coolant system working. Just had to keep adding water and squeezing hoses. I wish I had ordered a magic funnel before now. I kept putting it off.
The VVT is working. I wish I knew what the stock ecu PWM frequency was. I can't get much range out of the percentage. The lower the frequency, the better the range but it sounds really bad. It sounds like it's banging around and the cam is following the shake of the valve. So I settled on 153Hz.
Does anyone know what the stock frequency is?
There is only a few percentage difference from min to max. A minimum step is about 0.4% and that is enough to move the cam around. It does work though. I see a range of about 22 to 77 degrees on the VVT2 guage. At the higher angle, it is very ruff to idle and the vacuum is around 55kpa. At 22 degrees it idles nice and the vacuum is at 20kpa. So would that mean higher angles is advancing the cam?


Last edited by rabid; 08-19-2023 at 04:03 PM.
rabid is offline  
Old 08-03-2023, 08:14 PM
  #13  
Junior Member
Thread Starter
 
rabid's Avatar
 
Join Date: Dec 2019
Posts: 58
Total Cats: 10
Default

Originally Posted by 240_to_miata
I tried looking into a rhd version but instead ended up cutting and shortening the black outer part. It’s not that bad to cut and remove a section of the outer layer, slide the threaded part down and then cut the cable down and use the dorman throttle cable ends. Not the best solution but it worked ok for me.
Thanks. I asked K-power and they seemed to not understand what I was talking about. But it should be obvious that the throttle cable is way too long. If I can't find anything off the shelf. I'll do what you did.
rabid is offline  
Old 08-05-2023, 11:12 AM
  #14  
Junior Member
Thread Starter
 
rabid's Avatar
 
Join Date: Dec 2019
Posts: 58
Total Cats: 10
Default

I built a throttle cable. That whole thing deserves a stand alone post on it's own. But what forum...
rabid is offline  
Old 08-05-2023, 12:12 PM
  #15  
Elite Member
iTrader: (2)
 
240_to_miata's Avatar
 
Join Date: May 2007
Location: Cromwell, Connecticut
Posts: 2,606
Total Cats: 16
Default

Originally Posted by rabid
I've gotten the coolant system working. Just had to keep adding water and squeezing hoses. I wish I had ordered a magic funnel before now. I kept putting it off.
The VVT is working. I wish I knew what the stock ecu PWM frequency was. I can't get much range out of the percentage. The lower the frequency, the better the range but it sounds really bad. It sounds like it's banging around and the cam is following the shake of the valve. So I settled on 153Hz.
Does anyone know what the stock frequency is?
There is only a few percentage difference from min to max. A minimum step is about 0.4% and that is enough to move the cam around. It does work though. I see a range of about 22 to 77 degrees on the VVT2 guage. At the higher angle, it is very ruff to idle and the vacuum is around 55kpa. At 22 degrees it idles nice and the vacuum is at 20kpa. So would that mean higher angles is advancing the cam?
New MSQ attached. I'm sure you'll get tons of errors opening it.
I posted that I was using 300 something in my other thread. Based on your comment about .4 deg moving the entire cam at 153hz I’m wondering if both of us need to go significantly higher. At the 300-380hz range my cam does a full sweep in only a few % difference. It seems like this is going to be very difficult for the PID to control, but I won’t know until I do a drive and try to hold at say 20deg. I’d like to see a USABLE active control from day 30-70% duty. Right now it’s like 48-55 best case.
240_to_miata is offline  
Old 08-08-2023, 09:00 PM
  #16  
Junior Member
Thread Starter
 
rabid's Avatar
 
Join Date: Dec 2019
Posts: 58
Total Cats: 10
Default

Originally Posted by 240_to_miata
I posted that I was using 300 something in my other thread. Based on your comment about .4 deg moving the entire cam at 153hz I’m wondering if both of us need to go significantly higher. At the 300-380hz range my cam does a full sweep in only a few % difference. It seems like this is going to be very difficult for the PID to control, but I won’t know until I do a drive and try to hold at say 20deg. I’d like to see a USABLE active control from day 30-70% duty. Right now it’s like 48-55 best case.
I tried a bunch of frequencies and the higher the hz made less range. It's just moving the cam forward and backwards and when it gets to the target it holds by going above and below. It does work but I'm not sure it's how it's supposed to work.
rabid is offline  
Old 08-15-2023, 10:06 PM
  #17  
Junior Member
Thread Starter
 
rabid's Avatar
 
Join Date: Dec 2019
Posts: 58
Total Cats: 10
Default

Might as well put this here. This is how I made a throttle cable for the K-swap. Stock cable, shortened.

Pull out the cable housing from the crimp.

Before I cut the cable, solder it at the cut so it won't fray.

Had to be creative to open up the crimp a little.

19 inches


Heavy duty heat shrink to make sure it stays together. This shrink bonds when it shrinks.


This is a 1/4" bolt that I rounded and drilled through.

Temporary way to mark the perfect spot to attached the "thing". There is someone out there that makes a set screw version of this.

Soldered and crimped

The heat shrink wasn't my idea and this isn't my engine. Mine isn't this clean.
rabid is offline  
Old 08-15-2023, 10:16 PM
  #18  
Junior Member
Thread Starter
 
rabid's Avatar
 
Join Date: Dec 2019
Posts: 58
Total Cats: 10
Default

How to depin de-pin take apart megasquirt db37 db-37 connector diyautotune

There are four little tabs that keep the metal part together.

You have to drill the back side of the two holes that crimp the metal parts together
rabid is offline  
Old 08-19-2023, 04:15 PM
  #19  
Junior Member
Thread Starter
 
rabid's Avatar
 
Join Date: Dec 2019
Posts: 58
Total Cats: 10
Default

I've been making the wiring harness for the last few weeks. Everything was put together with extra wire and wago lever connectors for testing. I have a dozen wires left to figure out how to route.

I played with VVT settings again. I tried 383hz but I think I'll keep it at 153Hz. It seems like the angle change is more responsive and accurate.
Attached Files
File Type: msq
2023-08-06_18.34.16.msq (251.5 KB, 14 views)
rabid is offline  
Old 10-23-2023, 12:05 AM
  #20  
Junior Member
Thread Starter
 
rabid's Avatar
 
Join Date: Dec 2019
Posts: 58
Total Cats: 10
Default

Quick update. Car is doing great.

I've attached my wiring notes.

I had a very strange electrical issue this week. The ecu would reboot while accelerating.The first time it did this, I was testing boost control in third gear going up a steep hill. The thing died and I saw my oil pressure and AFR gauges died. It was like the main relay quit. If you look close at my wiring document, you see I have the ms controlling the main relay. This was because my goal with the car was to wire everything directly to the main dash connector and make everything a direct plug in. After messing around in the fuse box. It just restarted and drove. I replaced the main relay with an upgraded one.
It happened again a few day later so I made the main relay output (idle) activate after a few seconds of the ms being on. That way it wouldn't be a quick restart under boost and I would see it happen. The issue got more frequent. I thought it was related to boost or vtec after looking at the logs. I disconnected and disabled boost. I also disabled vtec. It was even getting worse to the point a light accel would do it. I thought a ground was getting loose or something. When I checked the battery ground, what I found actually made me happy. The battery positive was shorting on the hold down because it wasn't doing a good job of... holding the f'n battery down! Easy fix.

I've been fighting a transmission oil leak. It's the ZF 5-speed. I thought it was the shift rod seal. Replaced. Then I tried the output shaft seal. Then I tried making a vent tube. Still getting oil. I'll try doing the shift seal again. I'm just not having luck on this. It's going to autocross next weekend. Wish me luck!

Have I mentioned this is an autocross build? It's going to be SSM but for now I'll run it in XB for testing.
Attached Files
File Type: pdf
Miata MS3x Wiring.pdf (26.1 KB, 14 views)
rabid is offline  


Quick Reply: K24z3 in an NB2 running MS3x



All times are GMT -4. The time now is 10:50 PM.