Hey everyone,
A weekend ago I helped out a buddy of mine from up island, E30-TourZing (Jan) (his build thread is here, at least I think this is the main one: https://www.r3vlimited.com/board/for...0-stoker-build) get his stroker build running on megasquirt. I won't steal his thunder, so this is strictly about the MS/first run side of things, but I thought I would document briefly the approach we took and some challenges we faced so others have another reference to go on.
For the record this was my first time getting an aftermarket ECM up and running, and although we didn't actually get to any real tuning, that is also something I have not done before. We will do some basic street tuning at some point in the near future, I think the plan is to leave it at that for now and then when he upgrades to ITBs he will get it professionally dyno tuned. I have attached a link to the MS project with some datalogs, if anyone more knowledgeable wants to take a look then I would love to get some advice. I myself am not too far behind with my own stroker build.
Overall it went reasonably well, I arrived early Friday afternoon and left late Sunday afternoon. That said, I think one more day would really have made a big difference in ironing out some of the kinks.
The desire was to have the ECM run wasted spark on the motor, and to also have a functioning idle valve. Jan's primary motivation for going with a MS was simplifying the move to ITBs later on.
Here is a rough outline of what we were working with:
Board pictures:
Top:
Bottom:
The wiring harness itself went reasonably well. The biggest issue throughout the wiring process was that often times the old BMW harness wire did not want to take solder - I suspect this is due to the type of wire and the age/possible oil contamination on the harness I was using. Perhaps crimp connections would have been a better go-to. One of my strong recommendations to Jan was to consider fully replacing the harness in the future with new wire (once he has his ITBs in place and knows all the final routing lengths), as I know his goal with this is a car he can drive for many years without wanting to chase down problematic wiring connections.
Here are some highlights of what needed to be done with the wiring setup:
All of the above can be tested piece by piece with a bench-top power supply (or even a 12V wall wart) and tuner studio. I would highly recommend this! It is much easier to get the wiring right outside of the car than to be tinkering around in it. Strictly speaking some things like the crank sensor can't easily be fully tested but for the coolant and temperature sensors, the TPS and the idle valve testing is easy. If you have a scope, same can be said for idle, and injectors and even the qaud spark outputs (I would not recommend testing the coil packs on the bench. Danger, High Voltage! I actually zapped Jan by accident while we were doing final tests in the engine bay; I am sure he will testify that it is not really a great experience).
So, in terms of electrical issues we ran into (i.e., things you may want to be aware of in your build):
Startup was not too bad (the second time around, we had some minor timing issues we had to work through the first time we tried to start). It was about 5-10 minutes playing with the cranking pulse, ASE and WUE settings, alongside the throttle body idle screw. I can't include the MS file directly, r3v won't let me upload it, but you can grab the full package with the datalogs I took at https://drive.google.com/file/d/1AG-...ew?usp=sharing (remember, we had one dead cylinder due to a plug wire issue, so those logs probably don't look ideal!).
My biggest concern with everything is probably the dead plug on the one cylinder. We cruised around about 10km seating the rings before I left (Jan discovered the dead plug the next day and repeated the break in procedure). No blue smoke or anything, however, and he tells me with the full 6 cylinders operating he is butt-dynoing the car at maybe 30-40% more power than a stock M20 in the range he has been driving it. It has not been taken to WOT yet, and obviously no actual tuning has been done at this point. I am hopeful that without any combustion at all occurring in that cylinder temperatures stayed low and even with fuel washing the cylinder walls, without combustion there was no sealing pressure on the piston rings so it is unlikely they would have seated or glazed the cylinder. Time will tell with some compression and leakdown tests.
Anyway I know I said I wouldn't steal any thunder, but here is the engine bay right after the first cruise (rainy day, naturally) and one of shortly before:
***Edit: As per below discussion, this is actually a good thing. The widebands are prone to failing due to thermal shock - so for tuning idle a manual temporary bypass is a safer bet than always running on the O2 heater when the key is on.
A weekend ago I helped out a buddy of mine from up island, E30-TourZing (Jan) (his build thread is here, at least I think this is the main one: https://www.r3vlimited.com/board/for...0-stoker-build) get his stroker build running on megasquirt. I won't steal his thunder, so this is strictly about the MS/first run side of things, but I thought I would document briefly the approach we took and some challenges we faced so others have another reference to go on.
For the record this was my first time getting an aftermarket ECM up and running, and although we didn't actually get to any real tuning, that is also something I have not done before. We will do some basic street tuning at some point in the near future, I think the plan is to leave it at that for now and then when he upgrades to ITBs he will get it professionally dyno tuned. I have attached a link to the MS project with some datalogs, if anyone more knowledgeable wants to take a look then I would love to get some advice. I myself am not too far behind with my own stroker build.
Overall it went reasonably well, I arrived early Friday afternoon and left late Sunday afternoon. That said, I think one more day would really have made a big difference in ironing out some of the kinks.
The desire was to have the ECM run wasted spark on the motor, and to also have a functioning idle valve. Jan's primary motivation for going with a MS was simplifying the move to ITBs later on.
Here is a rough outline of what we were working with:
- Brand spanking new/freshly machined and painted M20 stroker with metric mechanic 3.0L internals and a Bimmerheads machined head, assembled by Jan. Compression is 10.5:1
- A used megasquirt 2 V3.0 configured to drive a quadspark (for wasted spark) that he got off some random guy for cheap.
- A factory wiring harness for an M20 that I modified and adjusted as needed.
- Jan decided to go the M42 PWM driven idle valve route.
- It had already been configured for 3 spark outputs to drive 3/4 of the qaudspark inputs, using D14, 15 and 16 outputs (you can see the jumper wires going from the LEDs on the board to the IGN, SPR2 and SPR3 pickups for the connector).
- JS11 was used to drive the tach. This was actually connected to IAC1A, not B as shown in the photos, because I wired it to the wrong wire on the plug and it was easier to change on the MS than to tear open the plug again. For the tachometer, absolutely nothing else was done - IAC1A/JS11 connected directly to the wire that runs up the harness to pin 9 on C101, which is the engine speed input.
- For driving the M42 PWM valve, I added a TIP122 (497-2543-5-ND on digikey.com) transistor and flyback diode, 1N4001 (1N4001RLGOSCT-ND on digkey.com) as per the directions in the 'Fast Idle Valve' section of the megamanual (http://www.megamanual.com/ms2/IAC.htm). You can see this mod on the picture of the top of the board - the transistor I mounted to the case beside the large DB37 connector using a nylon fastener and mica insulation sheet to prevent shorts. Also a bit of epoxy, which will make future service a PITA but prevents anything from moving around while cruising.
Board pictures:
Top:
Bottom:
The wiring harness itself went reasonably well. The biggest issue throughout the wiring process was that often times the old BMW harness wire did not want to take solder - I suspect this is due to the type of wire and the age/possible oil contamination on the harness I was using. Perhaps crimp connections would have been a better go-to. One of my strong recommendations to Jan was to consider fully replacing the harness in the future with new wire (once he has his ITBs in place and knows all the final routing lengths), as I know his goal with this is a car he can drive for many years without wanting to chase down problematic wiring connections.
Here are some highlights of what needed to be done with the wiring setup:
- Main relay triggering: The main relay was modified such that when the ignition was moved to run, the relay switched on. The main relay then powered the megasquirt. This was done by permanently grounding the main relay control connection that normally runs into the bosch ECM (pin 85 on the main relay) and wiring the 'hot at all times' pin 86 to the wire that comes from the ignition switch via C101, specifically pin 7, the green wire.
- The fuel pump was wired to pin 37 on the megasquirt. This is the switched ground side of the fuel pump, which is a wire in the factory harness.
- The O2 heater relay was also wired to pin 37 on the megasquirt. This is also another wire in the factory harness that goes back to the ECM, same setup as the fuel pump relay. Note:***(see edit)*** In hindsight, I would probably not recommend this. We were working with an Innovate LC-2 wideband, and there is a 10-30s or so period where the wideband needs to heat-up/initialize before it is usable. It turns out the MS toggles the FP relay when it thinks you are stalling (or, for example, when you are trying to tune idle on a brand new engine), which has the effect of making it difficult to get a good AFR reading while tuning idle. Wiring it in the same manner as the main relay is probably a better choice.
- A variable TPS from a e36 was used, so only two of the wires that connect to the TPS sensor in the factory harness were connected.
- For the coolant sensor wiring, the megasquirt expects to be measuring the current it provides to the sensor. The factory BMW harness we had wired a power line to the sensor, so this was changed to a ground to match the megasquirt wiring diagrams and involved running an extra wire along the harness.
- As for the coolant sensor, the DIY IAT sensor was used and wired in essentially the same manner. We were able to re-use the connection that had previously run to, I believe, the evap canister.
- The crank position VR sensor was wired into the megasquirt as per the diagrams through the factory harness, with an additional 10K resistor across the sensor input signal wire and ground.
- The wideband was wired through the factory harness and O2 connector. Only 3 of the 4 wires that go to the factory Bosch plug were actually used, as I believe two of them are grounds and we never connected the second ground.
- The idle valve control was modified with 2 pin connector to suit the M42 2 wire idle valve.
- The injectors were wired into two separate banks on the megasquirt.
- As mentioned above, the tach wire on the C101 connector (pin 9, black wire) was connected directly to the megasquirt on output IAC1A, which internally was wired to JS11.
- At this time we are not running a fuse on the wire that powers the megasquirt. I would not recommend this, even though the megasquirt is fused internally. It is something we will be correcting soon, but essentially a fuse inline right at the main relay or, better yet, coming off the wires that go to the main relay from the battery terminal post is recommended.
- The qaud spark was wired separately. The qaud spark itself is tucked beside the ECM above the glove box, with 3 of the four outputs routing through the firewall to the 3 coil packs that are respectively driving the plugs on 2 cylinders each.
- Grounding! Grounds are important. The majority are tied together beside the megasquirt with larger wires routed to the ground post on the battery. Sensors are all grounded using separate ground pins that go into the megasquirt, with the exception of the O2 grounds as these are relatively high current due to the heater circuit. So the ground wire coming from the TPS, the IAT, the CLT and most definitely the VR sensor individually connect to the megasquirt ground pins (strictly speaking I think the IAT and CLT share a ground pin on the connector, but these are both very low currents), and remaining megasquirt ground pins all bundle together outside the MS then make a short run to the grounding post. The idea with grounding, to me at least, is to ensure larger circulating currents don't get pumped through sensitive analog areas.
All of the above can be tested piece by piece with a bench-top power supply (or even a 12V wall wart) and tuner studio. I would highly recommend this! It is much easier to get the wiring right outside of the car than to be tinkering around in it. Strictly speaking some things like the crank sensor can't easily be fully tested but for the coolant and temperature sensors, the TPS and the idle valve testing is easy. If you have a scope, same can be said for idle, and injectors and even the qaud spark outputs (I would not recommend testing the coil packs on the bench. Danger, High Voltage! I actually zapped Jan by accident while we were doing final tests in the engine bay; I am sure he will testify that it is not really a great experience).
So, in terms of electrical issues we ran into (i.e., things you may want to be aware of in your build):
- Broken connections. I have been soldering and crimping things for some years, everything from smaller gauge wires and 100+ pin LQFP flat packs at 0.1 pitch to large 2kA multi wire circuits using crimping tools as long as I am tall. For all of it, ~95% of the equation is the right tools. That said, some of the old BMW wiring did not like either my tooling or me. I suspect the solder I used wasn't really ideal, I had some lead-free garbage lying around from some previous work that I used and it did not want to bond with the wire easily. The aftermarket wire I used (mostly CN459B-50-ND but in also in red, XLPE is a decent choice for engine bay wire IMO) would immediately wick up the solder and make great connections, the BMW wire was sometimes fine, sometimes took ten minutes to get one single connection to the point where I was convinced it wasn't a cold solder join. Crimping may have been a wiser choice here, but I recently changed jobs and no longer have access to a wide array of fancy crimping tools.
Anyway, rant aside, we did have a few connections that broke after pulling everything through the firewall. You can only be so gentle, especially with that fucking grommet. We were able to fish the megasquirt connector through the bare firewall hole simply by removing the casing, and the qaud spark wires fed back through the hole and out to the coilpack separately. - Jan is extremely good at making a tidy engine bay. Way cleaner than my usual wiring disaster. I was aware of this and tried to keep things as clean looking as possible. We used heat shrink and sheathing (1030-FGLG.04BK250-ND) everywhere visible wiring is to keep things looking tidy, and I would recommend this, as it provides a lot more reinforcement at solder joins than tape does. Obviously not as easy to pull and move around - take your time and do the connections right the first time. This comes back to testing, I did have to modify a few connections after the fact and it is always a PITA, so the fewer of these the better.
- Bad plug wire connection. Jan didn't actually figure this out until after I left, but the motor was sounding fairly rough after we got it going. Turns out one of the plug wires was not actually connected! Rather embarrassing, but I really wasn't sure what to expect in terms of sound and I don't think he was either. Someone who obviously knows what they are doing on the Vancouver e30 chat basically called it the second a video went up though, and Jan got it sorted shortly after that.
- Backwards TPS wiring. We bench tested the TPS on my throttle body, which actually has it flipped. Jan's does not, so we have to flip the TPS wiring (or the TPS, which is a bit of a huge PITA with the springs). Not the end of the world, but certainly something to be aware of.
- As mentioned above, the O2 relay wiring has the bad habit of causing wideband resets around idle, since we have not tuned idle, or when the RPM dips too low as you are getting the car moving from a stop.
- Downloaded the DIY m20B25 base map they use for the DIYPNP.
- Pulled timing by roughly 4+ degrees across the board in the upper end, and 2-3 degrees in the lower end. My reasoning for this was that I had no idea how much of a change the higher compression ratio and different combustion chamber geometry would effect the likelihood of knocking and or cylinder pressures and temperatures, and I would rather have the motor not making much power and running a little crappy than pre-detonating and possibly damaging my friends 3-4 year long project. This was all knowing that N/A M20s are apparently very much not likely to knock.
- Did a lot of reading around, comparing against relatively low boost turbo maps. My big focus was always on the ignition map. Fueling can be corrected relatively quickly with the wideband. I did some more tweaking here and there, but to be entirely honest I was not ever really sure if it was 'OK' or not - sometimes you just have to run it.
- Once we got ready to start, my big focus was on ensuring we didn't run too rich (seating the rings and all that). Basically I didn't want the AFRs to go below 12, and while in reality we did hit 11.9ish for very brief moments when I was reviewing the log I think overall we accomplished this.
- Second focus was on ensuring we didn't lean out while under load. Again, keeping an eye on the afrs and reviewing the logs after a few runs proved we weren't looking too bad here. It was a bit of a PITA with the wideband resetting here and there, but overall we managed.
Startup was not too bad (the second time around, we had some minor timing issues we had to work through the first time we tried to start). It was about 5-10 minutes playing with the cranking pulse, ASE and WUE settings, alongside the throttle body idle screw. I can't include the MS file directly, r3v won't let me upload it, but you can grab the full package with the datalogs I took at https://drive.google.com/file/d/1AG-...ew?usp=sharing (remember, we had one dead cylinder due to a plug wire issue, so those logs probably don't look ideal!).
My biggest concern with everything is probably the dead plug on the one cylinder. We cruised around about 10km seating the rings before I left (Jan discovered the dead plug the next day and repeated the break in procedure). No blue smoke or anything, however, and he tells me with the full 6 cylinders operating he is butt-dynoing the car at maybe 30-40% more power than a stock M20 in the range he has been driving it. It has not been taken to WOT yet, and obviously no actual tuning has been done at this point. I am hopeful that without any combustion at all occurring in that cylinder temperatures stayed low and even with fuel washing the cylinder walls, without combustion there was no sealing pressure on the piston rings so it is unlikely they would have seated or glazed the cylinder. Time will tell with some compression and leakdown tests.
Anyway I know I said I wouldn't steal any thunder, but here is the engine bay right after the first cruise (rainy day, naturally) and one of shortly before:
***Edit: As per below discussion, this is actually a good thing. The widebands are prone to failing due to thermal shock - so for tuning idle a manual temporary bypass is a safer bet than always running on the O2 heater when the key is on.
Comment