Monday, March 18, 2013

How to build a wiring harness that will last

Building a wiring harness for an engine swap is a funny thing. You spend dozens of hours doing it, and nobody will ever really get to admire your work. Once it's done, you don't think about it again unless something goes wrong. Lots of people think it's a really hard thing to design, too, which I find interesting. A little bit of planning goes a long way.

In this case, it's a fairly simple exercise to route between the various sensors required to run the engine, the ECU, and a few ancillary subsystems. Once you're familiar with the basics of EFI (and especially speed-density fuel injection), figuring out how to run wires is pretty simple. I won't get into the specifics of my configuration, as I intend this to be an illustrated guide on construction techniques.

Once you've identified all of the various origin and termination points (for example, battery-to-throttle position sensor, or throttle position sensor-to-ECM), it's a good idea to document things thoroughly. Document which plug and pin serves which function, and decide where the junction plugs will be so you can do things like remove the engine without pulling the wiring harness completely off. Document each wire's color, too. Few modern cars follow such time-honored traditions as making every battery-voltage supply wire red and every ground wire black, and you shouldn't either.

I think I bought something like 55 different color/stripe/gauge combinations from EFI Connection, and it was money very well spent. At any given time during the construction process I could trace a wire with ease and immediately knew the purpose of any wire that wandered away from its route. You can see the worksheet I used to document junction plugs, colors, functions and notes here - it's messy, but it's grown organically over the months. The focus there is on sensor-to-ECM wires. I've also got a map of indirect and support wiring that I've developed over time:
Here you can see the junction plugs, connections between the engine and other systems, etc. It's not 100% complete, but it's for my own reference. Because this diagram is much more functional than it is physical, I also created a diagram showing the various branches I'll need, based on the location of plugs in the engine bay.


As you can imagine, once I'm done, it will be very easy to combine the three documents to end up with something I can use as a reference later on. And I will! The shorthand notes I take will mean nothing in two years or even two months.

Okay, so I've done my planning. What do I need? My shopping list  is as follows:

  • Plug/receptacle pairs
  • Pins appropriate to the wire gauge I'm using
  • Butt crimp connectors
  • Dummy plugs to fill "blanks" in the harness junctions
  • Electrical tape
  • Fire-resistant split wiring loom
I give each of these additional discussion below.

I've laid the wire out in the general flow around the engine or engine bay to estimate lengths, and wrapped bundles with blue painter's tape. 
I've also ordered my plugs, receptacles, pins, and dummy pins. For this build, I've relied very heavily on the Molex MX150L series. They're available from Mouser, they're high quality, and they're sealed. They're also complete overkill, but I only want to do this job once. I've also got a good quality stripper tool, and a cheap crimper that I know how to use well. Consider splurging on tools. Eastern Beaver is an excellent source for tools.

After stripping the wire end according to the Application Specification, I crimp the ends.
Repeat this a hundred times or so, poking the terminated wires into the plug or receptacle into the positions documented during planning. 

For wires that require shielding, I purchased shielded tefzel wire from Aircraft Spruce in the appropriate gauge. This is seriously beefy stuff, and I highly recommend it for applications that are sensitive to noise. For maximum noise protection, you have to ground the shield on one end (not both!). To do that, strip the outermost insulation back, exposing the braid. Pick at the braid in a line until it unravels, and then pull it to one spot, twisting it until it looks like this:
Trim the twist, and crimp a splice connector on.
Strip and crimp on your ground wire.
...and connect the ground wire to an appropriate location. It's important not to connect both ends of the shield to ground or you can create ground loops where there exists a voltage potential in different places, such as between the engine and the chassis, for example. That will carry noise into the system.

Now that you've terminated your wires, start wrapping the bare wires with 3M Super 33 vinyl electrical tape. Yes, the specific electrical tape matters. Super 33 is rated to 105 degrees Celsius and resistant to corrosive chemicals. As usual, read the datasheet

Starting with the smallest bunches of wires, begin your wrap a few inches away from the plug, and work your way up toward it, stopping at the distance specified in the plug/receptacle data sheet.
Slip your split loom onto the wire, with the end of the loom coming halfway up the tape. The loom should be long enough to reach from this point until the nearest y-split in the harness.
Then continue wrapping to enclose the end of the loom. This is your waterproof seal. As usual, being judicious in your wrapping is beneficial. Stretch the tape according to the instructions in the data sheet, and use only as much as is necessary. 
Start working your way down, continuing to stretch the tape appropriately. You should be able to clearly make out the ridges in the loom, and the tape should overlap half its width. Once you've made it all the way to the nearest y-split, give a couple of wraps around the bigger portion of the harness on either side. This will keep your branch from separating, and will anchor the other ends of the wire.
In this photo, you can see how I've anchored the branch. Continue working your way around the harness, covering the smaller branches in turn, and then doing the larger.
Branches should stick out of the split in the larger lengths of loom, and get wrapped similarly on the outside to anchor them where they exit. Always wrap "down" the harness, from the sensor to the ECM. In combination with the method for starting the wrapping inside the loom, that will ensure that you never have any exposed edges of electrical tape. If you do it right, the only tape end that will be exposed will be way down at the ECM plug, which is inside the car.


Friday, March 15, 2013

Designing intake runners in SketchUp

As part of my ongoing Subaru EZ30 engine installation into my 1974 Porsche 914, I discovered that the stock intake manifold simply won't work. The inlet faces the wrong way (rearward), and cutting a hole for relief would interfere with the engine cover latch. 

Unfortunately, unlike the EJ engines, it can't be reversed to face forward, either. The bolt pattern is uniform left-to-right so the intake runners line up okay, but the engine case has some bosses on it that interfere. Grinding those off might work, but there is an oil line that would have to be relocated, as well as figuring out a way to mount the alternator in a way that doesn't interfere with the manifold. As a fun addition, due to the location of the engine in my particular application, I have to drop the engine to lift the intake manifold - it interferes with the rear trunk firewall. Needless to say, another solution is required.

I've always liked the idea of ITBs (individual throttle bodies). They have kind of an old-school carburetted feel, and there's a long history of sexy Weber carbs on 911s.
911 with dual Weber triple carbs.
But I hate carbs. I will not abide them. They suck. Enter the Speed Triple:
Triumph Speed Triple 1050i
It's got a 1050cc inline three-cylinder engine that revs to 10,000 RPM and makes about 130 horsepower. That's 123 hp/L, which is quite a bit more than the EZ30's 212 horsepower from 2998cc (70 hp/liter), but in terms of overall power-per-cylinder-bank (130 vs ~100) and torque, it should be a reasonably good match. I also have a suspicion that the long intake runners in the stock EZ intake manifold restrict high-rev power in order to increase torque. As well, the fuel injectors in the EZ and the S3 fit into bosses directly in the head (as opposed to fitting into the throttle bodies or intake runners, as used to be common). So, in a fit of profligacy, I bought two sets of throttle bodies and intake boots. Yay!
The Speed Triple throttle bodies are one unit, and both the inlet and outlet are circular.
The boots are oval on the engine manifold side, and circular on the TB side.
With my trusty micrometer, I spent some time measuring the intake manifold gasket from the EZ and the TBs themselves, and determined that both the EZ and S3 intake ports are rect-oval shaped, with the ends being semicircles, and the long sides being straight.
  • The EZ intake ports are 52mm long by 33mm wide
  • The S3 intake ports are 45mm long by 35mm wide
  • The S3 throttle bodies are 88mm center-to-center
  • The EZ intake ports are 98mm center-to-center.
The EZ's intake ports are offset by ~46 mm right-to-left (the driver-side cylinders are rear of the passenger-side). That doesn't matter for this design, but if I were to build a single-piece manifold, I'd need to know it.

For this design, I'm going to build a short intake manifold, something like this:
911 Weber intake runners made from cast aluminum
It's simple, and will allow me to position the TBs where I need them, which is about 4" up from the intake port mating surface, and with the rearmost cylinder TB located about 2" forward of the intake port. I considered tilting the TBs to increase the runner length, but the alternator becomes an issue on the passenger side, and I'd really like to be able to make the manifold symmetrical to ease design and production.

I'm also going to make them out of composites. I don't have easy access to a 5-axis mill, nor the expertise to program one. I do, however, have a working knowledge of SketchUp and know where to have things 3D printed. Also, CF makes all the onlookers excited.

The next step, then, is to draw the footprints I'm working with in SketchUp. I start with a 3D model, but lay out the shape of the intake port in 2D. For the rect-oval shape, I lay out two circles with centers the correct distance, lay a rectangle over them, and delete the corners. The result is something like this:
The shape of an EZ30 intake port
The guide points are for the centers of the circles (left/right) and the center of the overall shape. I then duplicated the shape, and laid three out on a plane according to the centers I measured earlier. The same process is used for the throttle body mating surfaces. I then arrange the two sets of outlines in 3D space, separating them by the height I want my manifold. In the next picture. I've added interior shapes in order to be able to make walls (more on that later), and drawn a Bezier curve between the center points. This curve defines the path that the intake manifold runners will follow. I adjusted the control points to balance keeping the inlets straight without having hard kinks in the runner. Here it is now:
Port outlines arranged in 3D space
Because the port shapes have different dimensions, I had to find a way to draw a surface smoothly between them. In the CAD world, this is called "lofting", and there's a fantastically useful tool for SketchUp called Curviloft. Take careful note that I kept the centers aligned on a plane - that is, both faces "point" the same way. This was both for symmetry and because lofting in complex 3D ways is difficult. I could never get it to work quite right, and always had odd twisting effects introduced if I rotated them in order to, for example, orient the throttle bodies horizontally.

Once I've gotten the edges placed, I loft the faces of the walls, and use the push/pull tool to add a few mm of straight section. I'll slip the flanges over that. The result looks something like intake runners.
Intake runner interior volume shapes.
It's worth discussing now that I'm going to be 3D-printing this using the Ponoko service in white plaster. My intention is to use it as a plug for the interior volume of the intake runners, and lay up the manifold around them. Because 3D printing is really expensive, I've made the plug hollow - that's why there are 3mm "walls". The outside dimension is the one that matters here. 

I've also added some details. Because the three runners are all different (each port is on a slightly different center, remember), they're each unique. Ponoko doesn't permit separate parts to be printed in a single job, and there's a $15 setup fee per job, so I've "bridged" the parts. The bridge will also help hold the parts in place while I prepare them later. I've added offset notches so I know where the center of the part is (for making a flanged mold), and marked the parts with letters just to I'm sure which runner is which. The final result is this:


The final plug CAD design, ready to print.
Once I've got the runners printed, I'm probably going to fill them with something - silicone or urethane, perhaps - to make them solid.

So now that I've got my runner volumes mapped, I need to cut some flanges. That's easy! Using the FlightsOfIdeas SVG Outline plugin, I select the relevant edges and export. I then import the result into InkScape. The initial import looks like this:

I then used my flatbed scanner to scan the intake manifold gasket:

I then overlaid them to check the match. The error ended up being on the order of 1mm! That's within the fudge factor of the intake manifold gasket, in my opinion. Great news. With that, I traced the gasket in InkScape, and the repeated the process for the throttle body flange. With a little bit of further cutting and pasting, this is the result of putting the outlines in the Ponoko template:



The final cost for the parts from Ponoko was about $160. That's astoundingly cheap to go from measurement to physical widget. Now I wait until the print arrives and I can start prepping it for use as a plug.