OK so I figured it was time for an updated and more detailed To Do List:
Run new vacuum line with check valve to brake booster
Run new vacuum hose to boost gauge
Run new vacuum hose to ECU
Install Core4 Speeduino in OEM ECU housing
Wire BMW X60004 connector into existing Mazda wiring
Wire Mazda X16 connector into new BMW harness
Wire Mazda ECU connector 1 into new BMW harness
Wire SGI-100BT to generate speedometer signal
Wire SGI-100BT to correct Tachometer signal
Reinstall wiring for reverse light switch
Install new main ground wire from battery
Install new ground strap from engine to body
Thin out unrequired wires from Mazda fuse box side harness
Tighten Diff to Prop bolts
Tighten and check rear suspension bolts
Tighten and check front suspension bolts
Remove, Paint and reinstall shifter adapter plate Wire rad fans
Wire Wideband sensor into ECU Aux pigtail
Tidy passenger footwell wiring and reinstall kick plate
Tidy under dash wiring and reinstall dead pedal Fill and Bleed Brakes
Fill and Bleed Clutch
Tighten turbo oil feed (turbo side)
Tighten hose clamps on turbo water lines
Fill engine with oil and prime
Fill engine with coolant
Assemble and install driveshafts
Reinstall interior trim
Roughly align wheels front and rear
Again I'm sure there are things missing so I'll add them as I find them.
It was a good weekend of work on the car overall. I spent all of Saturday getting the BMW and Mazda harnesses integrated an overall it was pretty simple except that my engine is from an E46 which BMW still considers a "current" model so wiring diagrams are actively removed from the internet unless they are from the official BMW source (which is pricey as fuck!). Thankfully after consulting some wisdom on the BMW forums I found out that the Z3 which is classed as E36 had multiple different engines included the same M52TU that I have and the newer M54 so I was able to use the wiring diagrams from that instead.
I started getting everything integrated together and it was all going good until I came to wiring in the fuel pump relay. Every single piece of Mazda documentation including wiring diagrams as well as forum threads I can find says that the trigger for the fuel pump relay is light green. Mine is red and yellow. This had me stumped for a good while until I found some random pictures on the internet that showed the same wire colours.
Well with everything required to start the car wired it was about 1:30 in the morning and I was incredibly tired and I should have called it a day then but I thought it would be a good idea to try and start the engine... nothing happened, no start, no fuel pump, nothing; and its a bloody good thing nothing happened.
So at this point I called it a night and put the car back up in the air only to realise that the fuel lines weren't connected, neither was the starter motor. I also realised on the drive home that the engine had no oil in it! So here's some golden advice, if It's already gone past 1:00AM don't try and start your engine swapped car.
Well Sunday I came back with a fresher head and made a mental list of everything that needed doing before I could start the car. So I realised that I hadn't grounded the ECU (which is why the fuel pump didn't fire) so I started with that, Then I moved onto the starter wiring, I hadn't connected the trigger or the sense wire. I also connected up the knock sensors so I did that whilst I was there. After that I connected the fuel lines which is tricky as there is shit all space behind the engine but thankfully I opted to keep the standard push fit connectors so It's just a case of lining them up.
Next up I checked the turbo oil drain and tightened it down, tightened down the oil feed and tightened the turbo water feed clamps down. Then most importantly I filled the engine with the required amount of oil and coolant.
At this point I was confident I had everything ready to go so I connected my laptop to the ECU, corrected the displacement and Injector sizing (another thing I completely forgot the night before) then I turned the key on and off a few times to prime the fuel system only to hear the ominous sound of fluid dripping onto the floor.
With the car back in the air I found that the fuel was pissing out of one the fuel line connectors under the car (on the feed line) so I tightened that down and put the car back on the ground. At this point everything looked good so I disconnected the spark plugs and fuel pump relay and turned the engine over a few times to get the oil primed. I reconnected everything and it fired right up!
it then died about 5 seconds later. it did the same thing a few more times before I noticed that the ominous dripping sound had returned. I found that the return line was now leaking in the same place, I hadn't tightened that one either.
Now at this point I started the car a handful of times and it had run for a few seconds and then died, I thought that maybe I'd crossed the fuel lines so I disconnected them and swapped them then tried again. It ran for about 8 seconds before it died and wouldn't start again. I couldn't work out what was happening so I went through the settings on the ECU and found that I had entered the capacity wrong so I corrected it but no change.
I then checked the fuel lines again and realised that I had them right the first time so put them back which was a massive pain in the arse as the plastic clip that holds the push fit connectors on just up and vanished. After about 10 minutes of searching I eventually found it between the block and the back of the starter motor. I reconnected the lines but didn't get chance to check.
Instead of finishing it I decided to watch the football... clearly that was an error in judgement
Hopefully tomorrow I can get it to run and stay running smoothly
Well I spent some time last night trying to solve the issues I was having. As I previously mentioned I left the car with the fuel lines swapped back to how they originally were so I started by trying to start the car and it fired right up and then died a few seconds later. It then wouldn't start again. I thought Initially that maybe the fuel pump wasn't running when cranking/after cranking so I jumped the relay to ground so that it was permanently running with the ignition on. I also changed all of the added BMW relays for spares in case there was an issue with them but again after starting it, it would run for a few seconds and then die and no amount of accelerator pedal action would save it.
Then it hit me. When I started tearing this car about several months ago the fuel tank was pretty much empty, I've since drained out nearly 4 more litres when I removed the old lines and goodness knows how much more spilled on the ground from the leaking lines and swapping lines over on Sunday. I chucked in 5L or so of fuel and tried again, it fired right up and then died however now at this point I was able to keep the engine going by giving it some throttle. The problem is that I hadn't connected the rev counter so I had no idea how high I was revving the engine.
So I figured it was time to wire up the Tachometer. Thankfully the BMW ECU outputs a tachometer signal but obviously that signal is not going to work on an MX5 Dashboard so I had to wire the signal through the SGI-BT100 which allows me to change the 6 cylinder input signal to a 4 cylinder output signal. Nice and simple, so I ran new wires to SGI-BT100 and then to the dash.
With that wired I was able to get it started a few more times and keep it going on the accelerator pedal but unfortunately the battery died shortly after putting an end to my evening.
Hopefully today I can charge the battery and start working on tuning the Idle settings to get the car to start properly.
Well I've solved my idling issue, it now starts and stays running.
After doing some research and reviewing logs I took a punt on there being a lack of fuel for cold start so I bumped the Acceleration enrichment from 7% at 20 degrees C to 60% and then it started and idled until the acceleration enrichment started dialing down and then the AFR started hitting 18 and I turned it off. Out of the 30 seconds or so it ran only about 10 seconds of the log was useful as the wideband didn't finish heating and start outputting until after the first 20 seconds. However it was long enough to realise that the base map I have will not run my setup and that the VE table is way off. I'm not yet sure why the base map is so off, It could be the turbo/intake setup I have, The drop in compression ratio from 10.5 to 8.5 or it could be the 875cc injectors.
at present this is my VE table with the Idle section bumped by probably 80% over how it started.
you can see how out of scale the Idle section is with the rest of the table.
For now I need to wire the fans before I continue so onto that...
OK so I think I've worked out the problem with the VE table being so far off. After some time reviewing the setup I realised that my injector/battery voltage compensation was off. So the battery in the car is pretty much dead and at present with the engine running it sits at about 11v and with the injector voltage corrections that were setup it would have been extending the injector open pulse by about 5-10% when it should have been extending it by about 40-50% according to the data on the injectors I'm using. Hopefully with the correct injector correction curves inputted the VE table will be slightly better.
So I've put the VE table back to how it was before then bumped the fuel up my 20% over all just to be safe for the time being. Hopefully I'll be able to get a new battery tomorrow as well and I can continue tweeking the tune.
Righto so some more progress this evening. I tightened up all of the suspension bolts (will need to roughly align it later) but at least now nothing is going to shake lose when I can take it for a test. After that I got the fans wired on configured the ECU to turn the relay on at the right temperatures, installed a new battery and started tuning again to try and get the idle right.
Well I was on the right track with the Injector compensation, but something else I had done in the tune was throwing it off. So I loaded in the base map again, reconfigured the engine settings, reconfigured the injector compensation, changed the idle mode and then locked the ignition advance to 16 degrees whilst I set the idle. Initially it fired up and then died so I had a look at the ASE settings and bumped it by 30% across the board (I bumped the ASE as once the ASE turns off after 30 seconds I can see how far out the initial VE table is). Well with the ASE up 30% it was about the right AFR for idle and once the ASE was disabled it leaned out. With that in mind I bumped the entire VE table by 30% and then started changing the idle duty cycle to get it to idle at the right RPM. It now idles pretty nicely with a good safe AFR so I'm happy with it for the moment, I also had it fully up to temp and didn't spring any leaks so that's a bonus.
Now I'm kind of at the point where I need to be able to drive the car to tune any further but obviously I don't have any axles yet. So over the next few days I'll probably tidy up some of the last wiring bits and get the suspension roughly aligned after that it's probably gonna have to go on hold until I get the axles.