Microsquirting the NC30, part #33: Fixing the exhaust leak

Ever since I bought the NC30, I’ve been unable to get the joints where the front cylinder header pipes attach to the collectors under the bike to not leak. The joints are clamp joints with a cylindrical fiber gasket, but I could never get the gaskets to fit inside the clamps.

These are the old exhaust pipe joints, with the gaskets that don't fit. It turns out this is not a stock exhaust.

These are the old exhaust pipe joints, with the gaskets that don’t fit. It turns out this is not a stock exhaust.

After asking on the 400greybike forum, it became clear that this is not a stock exhaust, so I guess then it makes sense that the gaskets don’t fit. The header pipes, though, appear to be stock.

Normally a little exhaust leak doesn’t matter much. However, with an oxygen sensor any amount of air getting into the exhaust gas will make the lambda readings incorrect, so it was imperative this be fixed somehow so the lambda readings would be reliable. (Even if the average pressure in the exhaust pipe is higher than ambient, so on average it would be exhaust gas leaking out, the exhaust comes in pulses and in between them the pressure can actually become less than ambient, so some air would get sucked in.)

I decided to get rid of the clamp-type coupling completely and instead use a double-slip coupling. As its name implies, a slip coupling is where two pipes just slide into each other. A “double” slip means there are three pipes, where one side slides in between two that are welded together on the other side. Because the fit is quite tight the thermal expansion as the inner pipe heats up more than the outer one will “clamp” the join together when it’s hot.

One of the double-slip couplings. The part on the left is slightly expanded and slides in between the pipe on the right and the outer collar, which gets welded to the pipe.

One of the double-slip couplings. The part on the left is slightly expanded and slides in between the pipe on the right and the outer collar, which gets welded to the pipe.

As you can see from the picture above, it’s a very clean design. The precisely expanded slip joint sections, made out of 403 stainless, were ordered from Burns Stainless, which sell parts for fabricating exhausts. The exhaust pipes are very close to a 1.375″ or 35mm, which luckily is a standard (albeit quite small, as far as exhausts go) size.

To make it easier to work on the bike, I decided to make a small square out of mild steel angle iron that would fit on my Harbor Freight bike lift and make it possible to stick the front wheel of the bike on the lift and jack it up. It’s been a while since I welded mild steel, but, wow, it’s so much easier than aluminum or even stainless.

This holder makes it possible to jack up the front wheel of the bike with the bike lift.

The silver-painted custom holder makes it possible to jack up the front wheel of the bike with the bike lift.

To get the rear wheel up higher, I put the car ramps under the rear wheel stand.

With the front wheel jacked up by the bike lift and the rear wheel elevated by putting the stand on the car ramps, it's much easier to access the exhaust system.

With the front wheel jacked up by the bike lift and the rear wheel elevated by putting the stand on the car ramps, it’s much easier to access the exhaust system.

It looks precarious in the picture, but it’s actually quite stable. For added safety, I also ran a lift strap around the triple tree and a roof beam in the garage, so the bike can’t really fall over. It’s now much easier to work on the exhaust under the bike.

The first step was to get rid of the existing couplings, but while I had the pipes off, I tried polishing them up with some Scotch Brite pads, too.

The front cylinder headers need to have their rear ends, where the clamp gaskets would go, cut off.

The front cylinder headers need to have their rear ends, where the clamp gaskets would go, cut off.

The Scotch Brite pads cleaned up the surface corrosion quite nicely. Note that the collars that hold the pipes to the exaust ports are very rusty. These are apparently normally made of mild steel, not stainless.

The Scotch Brite pads cleaned up the surface corrosion quite nicely. Note that the collars that hold the pipes to the exhaust ports are very rusty. These are apparently normally made of mild steel, not stainless, so I’m tempted to cut them off and replace them with stainless while I’m at it.

The first pipe has been clamped in the saw. Because of the numerous bends, it was a bit tricky to get it securely mounted.

The first pipe has been clamped in the saw. Because of the numerous bends, it was a bit tricky to get it securely mounted.

The header pipes could be mounted in the saw and be cut cleanly. The collector ends, though, could not, so they had to be cut with the Dremel cut-off wheel. Those ends will definitely need cleaning up before anything can be welded to them.

There's no going back now -- all coupling parts have been cut off.

There’s no going back now — all coupling parts have been cut off.

After cutting off the couplings, I put the exhaust pipes back on the bike to see whether they were aligned.

Here's the hole that now needs to get joined. Unfortunately, the pipes don't quite line up.

Here’s the hole that now needs to get joined. Unfortunately, the pipes don’t quite line up. It looks pretty good from this angle, but seen from below there’s a noticeable offset.

Of course, they were not. I’m not sure whether this is because something has been bent out of shape or if it’s because the aftermarket collector was never meant to join up with the stock headers, but this needs to be adjusted somehow. A prime candidate for being out of alignment is the attachment to the rear header pipes, which is bent out of shape.

This is the plate that bolts to the ends of the rear headers. It's bent, presumably from overtightening the nuts, and binds on the collars on the pipes.

This is the plate that bolts to the ends of the rear headers. It’s bent, presumably from overtightening the nuts, and binds on the collars on the pipes.

Because it’s bent inward where it’s supposed to seat on the collars for the exhaust pipes, it binds on them. From the dark soot marks, you could tell that there had been a small exhaust leak here, too, so it’s possible it’s not seated quite right here. Maybe this is why the bottom is not quite aligned?

I’d like to replace or at least straighten this plate, but getting it off requires cutting the collars off the pipes. I don’t think it would be a big deal welding new ones on, but I don’t have any proper material to make them from. I have 1.5″ pipe that will just fit over the headers, but they’re only .065″ thick and the existing ones are about twice that. It appears that what I would need is 40mm OD, 35mm ID, which probably is possible to get in Europe. Maybe I can get my Dad to mail me a piece… After all, I only need a few cm of it.

If it comes down to it, I might have to cut the header pipes and introduce a little kink in them to improve the alignment. I’d prefer not to, but the slip joint has to be aligned.

The inside of the headers are completely covered in soot, in case we needed yet another example of how rich the bike has run before.

The inside of the headers are completely covered in soot, in case we needed yet another example of how rich the bike has run before.

Finally, just in case we needed another example of how rich the bike has run up to this point, the inside of the headers are completely covered in soot, as are the exhaust ports in the head. I’d really like to be able to look into the cylinders to see how they look, there’s so much carbon everywhere. I wonder if getting the bike to run at lambda 1.0 or even a tap leaner during cruise operation will cause this to gradually burn off, once there’s some excess oxygen in the hot exhaust gases.

 

 

 

Microsquirting the NC30, part #32: New battery wiring

As I started working on hooking up the fuel pump, I also realized it was time to make new battery wires. Because the Ballistic lithium battery is much smaller than the original lead acid one, the existing positive wire was too short, and the ground wire is fraying, so I decided to redo that one, too.

I’d already ordered AWG #6 (about 13mm^2 for the Europeans) battery wire and lugs a while ago, knowing that I was going to have to do this, but until everything was in place it didn’t make sense to make the wires. Now it was time.

Here's the new battery compartment, with the Lithium battery on the left and the fuel pump housing on the right.

Here’s the new battery compartment, with the Lithium battery on the left and the fuel pump housing on the right.

Using a pretty cheap hydraulic crimper I’d gotten off ebay, it was a breeze to crimp the lugs onto the wire. However, I was unable to find lugs that had the same shape as the old ones, so the rubber covers on the positive wire did not fit super well. They are covered, though, so I think it’s good enough. I also realized that I was lucky, because the seat has a large tongue that hooks in under the bracket the tank sits on in the top center of the picture above. This tongue is actually low enough that it touches the rubber boot on the positive terminal. It doesn’t actually touch the terminal, though.

I was also going to run the fuel lines, but I realized that the 180-degree turn in the fuel line needed to pass forward between the battery and the fuel pump housing requires bending the hoses considerably more sharply than the required bending radius, which is 3″. Instead, I’ll get a 180-degree hose end and use that to turn it around. That should pretty much have the right offset to come out in between the battery and pump housing.

I also need to make some sort of bracket to hold the fuel filter, which will sit immediately above the frame rail in the picture above, above the #1 spark plug. There’s a space there, under the tank and to the left of the cam chain cover, where the fuel filter can go. It just needs to be held by something so it doesn’t vibrate against the tank or head cover.

 

 

Microsquirting the NC30, part #31: Finishing up the fuel pump housing

Way back in June, I talked about making the parts for the fuel pump housing. Since then, I’ve slowly been gathering courage to weld it together. My first practice runs welding together 1.6mm (1/16″) 6061 sheets were not encouraging. It’s just very easy to blow out one of the sides if you add a bit too much heat.

One thing that Jody on the WeldingTipsAndTricks Youtube channel (highly recommended if you’re learning to weld) recommended was to use a piece of copper on the back side of the weld. This acts as a heat sink and makes it a lot more forgiving. I tried it and it works like a charm.

So I started slowly working on it.

Figuring out the order of assembly was a bit tricky. I started by welding the bottom to the large piece that has the fuel inlet. Then added the small front plate. For welding the thin pieces to the large CNC milled parts, I added an inside flange on the large parts. This make the mismatch in thickness less and makes it easier to weld.

Figuring out the order of assembly was a bit tricky. I started by welding the bottom to the large piece that has the fuel inlet. Then added the small front plate. For welding the thin pieces to the large CNC milled parts, I added an inside flange on the large parts. This make the mismatch in thickness less and makes it easier to weld.

 

As usual, it didn't always go so well. Here's the aftermath of accidentally touching the filler rod to the tungsten electrode. All that crap needs to get cleaned up otherwise you get a contaminated weld.

As usual, it didn’t always go so well. Here’s the aftermath of accidentally touching the filler rod to the tungsten electrode. All that crap needs to get cleaned up, otherwise you get a contaminated weld.

That’s as far as I’d gotten back in August. At that point, the work on the fuel tap and idle air control took precedence for a while until I got back to it this week.

Here the bracket that holds the lower end of the pump has been welded, and the lid tacked in place.

Here the bracket that holds the lower end of the pump has been welded, and the lid tacked in place.

These are the only welds in the assembly that are between two thick pieces, so these were done with a lot higher current and a thicker tungsten electrode.

These are the only welds in the assembly that are between two thick pieces, so these were done with a lot higher current and a thicker tungsten electrode.

After addition of the top of the box here, the only part remaining is the one open side. Note the copper bar used as a heat sink.

After adding the top of the box here, the only part remaining is the one open side. Note the copper bar used as a heat sink.

This is what the completed front side, with the fuel inlet, looked like. The outside corner welds don't look terrible. Being able to have a short tungsten electrode, and the copper backing bar, really helps.

This is what the completed front side, with the fuel inlet, looked like. The outside corner welds don’t look terrible. Being able to have a short tungsten electrode, and the copper backing bar, really helps.

Note that the three welds that make up the inside corner are on the inside. I deliberately planned this, since welding outside corners is a lot easier than inside ones. However, this was a bad idea, as you’ll see further down.

With only the side wall missing, the fuel pump could now be test-fitted. I'm happy to report that it works just as I hoped, the pump is held in place with a small amount of pressure on the O-rings.

With only the side wall missing, the fuel pump could now be test-fitted. I’m happy to report that it works just as I hoped, the pump is held in place with a small amount of pressure on the O-rings.

The last piece was a tight fit and had to be sanded down a bit on the upper right edge before it could be squeezed in and tacked in place. The bottom warped a bit where the pump holder was welded but not too bad.

The last piece was a tight fit and had to be sanded down a bit on the upper right edge before it could be squeezed in and tacked in place. You can see that the bottom has warped a bit where the pump holder was welded in, but it’s not too bad. A little squeeze and a final tack held that in place.

This side obviously had to be done without the aid of the copper bar, since there's no longer any way to get to the back of the weld. I was a bit apprehensive but maybe the practice from all the other sides paid off because it went fine without it.

This side obviously had to be done without the aid of the copper bar, since there’s no longer any way to get to the back of the weld. I was a bit apprehensive but maybe the practice from all the other sides paid off because it went fine without it.

With all the parts welded in place it was time for the test: would it leak. I filled it up with water and was dismayed to see water dripping out in several places! It’s kind of hard to see where the water is coming out though, so it was more efficient to instead plug up the pump hole with a piece of plastic, hook up a hose to the inlet, and blow in it. Just like when you’re fixing a bicycle tire, you can see exactly where the air is bubbling out.

It turns out alternating inside and outside welds was a bad idea. If you don’t get 100% fusion when welding the parts, you’re left with a little unwelded section on the back of the weld. This normally doesn’t matter, but if you now alternate to welding on the other side, it’s possible for this to become a “channel” from the inside to the outside. This was exacerbated by the flanges I had added on the inside, because that meant there was even more of a hidden section in the middle of the weld.

There were a couple of leaks that were easily fixed by just completing the welds on the outside. However, two leaks were in the inside corners where the inlet is. I attempted several times to seal them on the outside ends, without success. In the end I had to make those inside corner welds anyway, and it wasn’t pretty.

To stop the leak, I ended up having to weld the inside corners by the inlet after all. To get to the corner, you need a super long tungsten electrode and even though you'd think the argon would flood the corner pretty well, it wasn't pretty. I screwed up several times and had to cut away the weld with the Dremel until I got to this state, which isn't pretty but at least doesn't leak.

To stop the leak, I ended up having to weld the inside corners by the inlet after all. To get to the corner, you need a super long tungsten electrode and even though you’d think the argon would flood the corner pretty well, it wasn’t pretty. I screwed up several times and had to cut away the weld with the Dremel until I got to this state, which isn’t pretty but at least doesn’t leak.

Pretty or not, at least it does not leak now; I blew through the hose will all my might, but no more bubbles were seen anywhere. Since the housing won’t be pressurized more than by the height of the fuel level in the tank, that seems like a sufficient acceptance test.

After rinsing out the inside first with water and then with ethanol to make sure there aren’t any particles inside that could get sucked into the fuel pump, I mounted the fuel filters and the pump.

Before mounting the pump, I squeezed the fuel filter sock on the inside end of the inlet and addad the small fuel injector strainer to the vent hole.

Before mounting the pump, I squeezed the fuel filter sock on the inside end of the inlet and addad the small fuel injector strainer to the vent hole.

So that’s it, it’s done! The only thing remaining now should be to route the hoses and run the power to the fuel pump and then we should have a functional fuel system. I sure hope the fuel will flow properly into the pump housing after all this work.

It should now be possible to start the bike and test the idle air control. There are still no linkages to the throttles, though. That’s the next and hopefully final major conversion task.

 

Microsquirting the NC30, part #30: Finishing up the airbox work

After getting the idle air control stepper motor working as desired in the last post, it was time to clean up the installation a bit.

First, the stepper motor had to be wired up. This necessarily involved yet another hole in the airbox to get the wires out. I drilled a hole next to the previously drilled hole for the intake air temperature (IAT) sensor and ran the 2-pair wire through.

The idle air control stepper motor wire goes out through a hole in the airbox next to the intake air temperature sensor. To be able to remove the plastic cover, there's a 4-pin connector inside the air box.

The idle air control stepper motor wire goes out through a hole in the airbox next to the intake air temperature sensor. To be able to remove the plastic cover, there’s a 4-pin connector inside the air box.

The stepper motor wire is held in place with a wire clip, only I can’t tighten it because you can’t hold the nut on the bottom after the plastic part of the airbox bottom is mounted. It holds the wire fine even slightly open, though. I just want some support on the wires so they don’t vibrate all over the place.

While I was at it, I poked a hole in the #3 cylinder intake trumpet for the IAT thermistor. I wouldn’t do that to the OEM ones, but these are a set of cheap aftermarket trumpets I ordered along with the NC23 carb seal kit from LiteTek in Thailand. This way the thermistor will be in the air flow and somewhat shielded from the metal parts that might radiate heat if the bike has been heat soaking.

The wire going through the airbox is just a short stub.

The wire going through the airbox is just a short stub.

After wiring up the stepper motor, I also hooked up my QuadraMap, which is a little box with 4 pressure sensors. This is a solution to the problem of how to measure a reliable manifold pressure (MAP) on engines with individual throttle bodies. (It was mentioned in the comments in part# 22.)

The small black box is the QuadraMap, which contains four pressure sensors. Each sensor is connected to the intake port on its corresponding cylinder with the red 2mm ID silicon hoses.

The small black box is the QuadraMap, which contains four pressure sensors. Each sensor is connected to the intake port on its corresponding cylinder with the red 2mm ID silicon hoses. The QuadraMap will be mounted on the bottom of the throttle body assembly.

 

The QuadraMap has two outputs. The main one is the reading of whichever pressure sensor is reading the lowest value at any given time, which will generally be the one connected to the cylinder that’s on the intake stroke. Because the Microsquirt samples the manifold pressure once per intake event, it’s difficult to get a sane reading with individual throttle bodies if you only have a single sensor, but with the QuadraMap you effectively have an individual sensor reading for all cylinders, in a “time multiplexed” fashion.

The second output is a digital signal that goes high whenever the manifold pressure for cylinder 1 goes below a settable value. This can be used as a fake “camshaft sensor” for phase detection, making it possible for the Microsquirt to know which of the 2 revolutions in the 4-stroke cycle the engine is on. This is needed for full sequential fuel injection, where the injection is timed so the fuel is sprayed when the intake valve is open, but isn’t immediately useful in this case because the Microsquirt only has 2 injector outputs. This requires running the front and back cylinder injector pairs in parallel, so I can’t use sequential injection anyway.

The list of remaining tasks is growing shorter: I still have to weld together the fuel pump housing, which as I feared is turning out to be quite tricky. I’ve started but have ended up with some seriously bad welds in the numerous inside corners, so I’m afraid it’ll leak.

Once that’s done, the final task is to link the four throttles together. I still don’t have a good idea of how to do that, but I’m sure with some experimentation it’ll work out.

 

Microsquirting the NC30, part #29: Even More Idle Air Controller

The last post ended without holes to mount the idle air control valve.  This turned out to not be a big deal. There’s a raised edge around the entire airbox casting that I could rest it on while clamping it to the mill table.

Fixturing the air box casting  to the mill table turned out to not be a problem. I rested the outer edge on two 123 blocks and clamped it down. I'm not sure this would have been good enough for milling, which causes a side load, but for drilling it worked fine.

Fixturing the air box casting to the mill table turned out to not be a problem. I rested the outer edge on two 123 blocks and clamped it down. I’m not sure this would have been good enough for milling, which causes a side load, but for drilling it worked fine. At this point, I’m checking that the airbox is square to the table by running the dial test indicator against the edge.

With the holes drilled and tapped, the valve fit perfectly.

The IAC valve fits exactly like it should.

The IAC valve fits exactly like it should. There’s maybe a mm of clearance to the inner edge of the plastic frame, and the valve is lower than the intake trumpets so it won’t hit the air filter.

The next step was to route the hoses to the intake ports on the throttle bodies.

The air connections are made with a 5mm ID silicone hose from the IAC valve body to a T on each side. From the split, 4mm ID hoses go to the two throttle bodies. One side has an additional split for the connection to the fuel pressure regulator pressure reference.

The air connections are made with a 5mm ID silicone hose from the IAC valve body to a T on each side. From the split, 4mm ID hoses go to the two throttle bodies. One side has an additional split for the connection to the fuel pressure regulator pressure reference. (That hose has not yet been cut in this picture.)

Trial fitting the intake assembly on the engine, everything looks good. It’s probably going to be necessary to support the hoses with a few clamps, but I’ll deal with that when everything’s working.

Test-fitting the intake assembly. The idle air hoses appear to clear all the possibly interfering parts.

Test-fitting the intake assembly. The idle air hoses appear to clear all the possibly interfering parts.

That completes the mechanical part of the idle air control. The one remaining thing is to wire the stepper motor up. I’m not 100% sure how to do this, I think I’ll need two connectors, one inside the airbox so you can remove the stepper, and one on the outside so you can disconnect it for removing the airbox. I’ve been using “Mizu-P25” connectors from Molex for other things on the bike so I’ll probably use them here, too. I’m very happy with them, they’re waterproof, small (2.5mm spacing), handle up to 4A, are easy to crimp and plug/unplug and are relatively cheap (like $8 for all the parts for one connection).

To avoid having the electrically noisy stepper motor interfere with other sensor wiring, I’m using a 22AWG 2-pair shielded wire. The stepper motor only runs 150mA so 22AWG should be plenty.

I also tweaked the software side a bit. The trouble was the homing, which was trickier than I first anticipated. The idea is that there is a hard stop on the valve and at powerup the controller will run the motor far enough that it can be assured it’s against the stop. It can then be initialized to the known position. You can see this in action in the very short video clip below.

When I initially tried this, the repeatability of the valve position after homing was not good. After a bit of thinking I figured out what’s going on:

When the motor runs into the hard stop, it’s unable to follow the magnetic field and will “slip” back to its next equilibrium position. This will happen at a specific switch of the motor phases (if you’re unfamiliar with how stepper motors work, check out Wikipedia). At full-step operation, a stepper motor can be in one of four states, let’s call them 00, 01, 10, 11 (indicating the direction of the current in the two phases). In each of these states, the rotor will be at a specific angle and each move from one state to the next moves the shaft by 1/200 revalution. This means the pattern repeats 50 times for one full rotation. Now say the motor hits the hard stop when going from the 10 to 11 state (this will always be the same as long as nothing moves mechanically.) It will then move back 4 steps (1/50 of a revolution) to the previous 11 position.

With that background, the problem should be clear: the stepper driver is stateful. While to the outside, it just moves the motor one step every time it gets a step pulse, it has an internal state machine that moves through the four motor states. (If the driver operates in microsteps, the number of internal steps are larger but the principle is still the same.)

Since the homing sequence just sends a fixed number of steps N to the driver, the final position of the motor depends on where it started. In the above example, if it happens to be in a position such that stepping N steps in the homing direction puts it in state 10, the motor will be very close to the hard stop. If it was one step closer to the home position, however, it’ll end up in 11 which causes the rotor to slip back 4 steps. The final position can be any of the 4 states. This is significant, since the range from the valve being fully closed to fully open is only about 45 full steps.

The only way to know what state the stepper driver is in is to reset it. Had I thought about this I would have wired up the reset line so it could be controlled by the Arduino, but I’m not about to solder any more wires onto that chip. It should be fine, however, because in normal operation it will only home at power-up which is also when the stepper driver is in a known state. It was just during testing the homing that I was resetting the Arduino, but that leaves the stepper driver in an unknown configuration.

I’m currently running the stepper in quad-step mode, but I wired up the microstep selection to the Arduino so it can do the homing in full step mode. If everything is perfectly rigid, it shouldn’t matter, but the smaller the steps, the smaller the margin between the step that pushes the rotor against the stop and the next one that makes it slip a step. Using full steps should make the process more robust.

 

Microsquirting the NC30, part #28: More Idle Air Controller

In the previous post, I described my solution for controlling the idle speed. That post ended with some unfinished business. Let’s finish that up.

The prototype idle air control valve needed to be remade for real. I incorporated some changes to make it easier to machine, and took a bit more care the second time around.

The second version of the valve body, done.

The second version of the valve body, done.

The tricky part was to get the rotor really concentric. I made one and failed to get the hole centered well enough, so the rotor rubbed against the valve body. After some thinking I decided to start with the hole, and then turn the perimeter with the mill-as-a-lathe. Maybe it was luck, or maybe it was that I had an easier time centering the drill bit and reamer, but this time I ended up with a well-centered hole.

Test-fitting the rotor on the stepper motor. The larger-diameter part will be removed at the end.

Test-fitting the rotor on the stepper motor. The larger-diameter part will be removed at the end. This time I managed to get the hole for the motor shaft sufficiently concentric with the outer profile of the rotor.

I could now mount the rotor onto the stepper motor shaft and with the motor mounted in the valve body, there was little but sufficient clearance between the rotor and the body.

The idle air control valve body with the stepper motor and rotor mounted.

The idle air control valve body with the stepper motor and rotor mounted.

The next step was the point of no return — cutting a hole in the airbox casting. The hole was generated in the same Fusion360 design as the valve body, but I had to measure and model the quite irregular shape of the airbox. There’s a small, flat area in the middle that’s just barely large enough for the valve outlet to come through. I started with air cutting to make sure the end mill wouldn’t hit any of the walls.

After mounting the airbox casting on the mill table, I ran the program in the air several times to make sure it wouldn't do anything unexpected.

After mounting the airbox casting on the mill table, I ran the program in the air several times to make sure it wouldn’t do anything unexpected.

After ascertaining that the coordinates were at least approximately aligned, I lowered the Z-axis enough that it cut just a tad into the surface.

The final check was to set the milling height so only a thin layer of the surface was removed. This made the extent of the hole very obvious.

The final check was to set the milling height so only a thin layer of the surface was removed. This made the extent of the hole very obvious.

Finally, when I was certain the hole was in the right spot. I set the height for the full through cut. This was the point of no return.

Finally, it was time or the real cut.

Finally, it was time for the real cut.

The size of the hole was perfect, which wasn’t surprising since it came directly out of the Fusion360 design. There is about 0.5mm clearance to the part of the valve body that goes through. There wasn’t a lot of margin to the edge of the flat inside surface, though. I don’t think there’ll be a significant air leak there, but it wouldn’t hurt to use a thin gasket.

The hole ended up where it should, although there's certainly not much margin to the edge of the flat surface in the upper left corner.

The hole ended up where it should, although there’s certainly not much margin to the edge of the flat surface in the upper left corner.

What remains is to drill and thread the three bolt holes in the casting. This is going to be a bit tricky because there’s no obvious way to mount it in the mill with the inside side up, since the bottom is angled. I don’t want to hand drill them, because there’s not much margin for misalignment. I think I’ll figure out some sort of fixture, it should be possible to brace it symmetrically on both sides so the holes can be drilled.

CNC Mini Mill #13: Gib mod

As I described in the post about making the compressor intake, the gibs took a beating with all the vibration. The gibs on the mini mill, especially the X-axis, leave a lot to wish for in the best of situations. The problem is that the adjustment screws, which are “dog point” set screws (which means they are cylindrical with a flat edge. What that has to do with dogs I’m not sure…) but the gib is at an angle and doesn’t give them a flat surface to push against. This results in the screws pushing “off center” and because they essentially contact the gib at a point, they don’t do a good job of holding the gib in the right position. It appeared there were two local minima in the gib position. There’s the correct one, shown in the picture below, where it bears on the entire slanted part of the way, but it could also end up in a different position where it would move down, the bottom move to the right, and the top to the left. In this position, it only contacted the bottom edge of the way. There was a noticeable notch worn in the gib from this.

Here's a close-up of the X-axis gib, in the correct position. However, with a bit of vibration, it would often move down so it contacted the table way only at the point on the bottom.

Here’s a close-up of the X-axis gib, in approximately the correct position. However, with a bit of vibration, it would often move down so it contacted the table way only at the point on the bottom.

Looking around the web for ideas for improving the situation, I found a page at “benchtop machine shop” that described the exact problem. He machined proper flats into the gib by plunging a 3/16″ endmill (the M6 dog points are 4mm, 3/16″ 4.8mm) in the right spots. This sounded like a good solution, so I attempted to do the same thing.

Of course, I couldn’t use the mill to do it, and it needs to be done at the correct angle for it to be useful. I attempted to use the entire table itself as a fixture by clamping it to the drill press table, clamping the gib in place, and then putting the endmill in the drill chuck. This did not work well… The drill press has a lot of sideways play in the column, and since the endmill contacts the gib at an angle, it wanted to walk off. And walk off it did. I managed to make some flats, but it was not pretty.

Attempting to hand-make the flats with the drill press did not work well.

Attempting to hand-make the flats with the drill press did not work well.

Worse than not being pretty, it didn’t work at all. The flats weren’t in the right positions and there were so many overlapping regions of different height that the gib would just wedge itself and lock up. Total failure. Time to order some new gibs. Luckily they’re only like $3.50 a piece.

New gibs in hand, I could at least replace the ruined one with one that was no worse than what I started with. Meanwhile, I had designed a fixture in Fusion that would make it possible to clamp the gib in the vise and hold it at the right angle.

The ruined gib would be my test case. Here it's mounted in the vise using the fixtures that hold it at the correct angle.

The ruined gib was my test case. Here I’ve completed cleaning up the two flats on the left. 

I’ve never attempted machining steel before, so I was a bit apprehensive. However, G-wizard gave me some feeds and speeds and being a bit conservative it worked perfectly. I tried it and with flats that now were just slightly larger than the 4mm dog points (and using new screws that hadn’t been mushroomed from a year of use) the gib was held securely in the right position.

I duplicated the same operation on one of the new gibs. This looks much cleaner.

One of the pristine gibs with freshly cut flats.

One of the pristine gibs with freshly cut flats.

The flats on the outer two screws are 4.25mm, just larger than the screws, so they locate the gib. The two inner flats are 4.75mm diameter to give some margin for the flats being a bit off in position.

The flats on the outer two screws are 4.25mm, just larger than the screws, so they locate the gib. The two inner flats are 4.75mm diameter to give some margin for the flats being a bit off in position.

This seems very promising. I haven’t run it much with the new gib, but I hope now that the screws are in full contact with the gib and the gib in full contact with the way it’ll be possible to keep it quite tight without binding.

If anyone’s interested in doing this on their own mill, here’s a link to the Fusion360 design.

 

Microsquirting the NC30, part #27: Idle Air Controller

The lack of updates does not mean a complete lack of progress on the NC30 project, I’ve mostly been in “pondering” mode and haven’t really had anything coherent to say. But now I do have something coherent to say about a completely new topic: idle air control.

After the first start on EFI (hard to believe that was 6 months ago) I realized it would be really hard to not have a way to control the idle air. The choke on a carb does two things: it richens up the air/fuel mixture, but it also lets in extra air. The extra air is needed because otherwise the idle on a cold engine, even with a richer AFR, would be low enough that the engine would tend to stall. With EFI, the enriching of the AFR is done automatically based on the coolant temperature, but without a way of also giving the engine a bit more air when cold it would likely be necessary to set the amount of idle air so high that the idle when warm would be annoyingly high. (And a high idle also makes the bike more likely to overheat when e.g. sitting in traffic, something the NC30 already had a tendency to do.)

So the conclusion was that I’d need to figure out how to make the Microsquirt control the amount of idle air. The devices that do this are called “Idle Air Control”, or “IAC” valves. They typically employ some sort of adjustable orifice that is connected between the airbox and the intake tracts, downstream of the throttle butterfly. There are pulse-width modulated valves, essentially a slide connected to an electromagnet that pushes against a spring, that can be controlled directly by the Microsquirt, but the only ones I could find were for cars and were far too large. Modern EFI motorcycles typically have the idle air integrated with the throttle bodies, so there were no discrete parts there I could use either.

As usual, there’s also the ever present complication of how to fit whatever system I could find into the cramped space of the NC30. There is no way to get air out of the airbox without cutting a hole in it. Then the air would have to be routed through the IAC valve, and then split up into 4 separate connections to the ports on top of the throttle bodies. Not so easy.

Eventually, I decided that with the power of Fusion360 and the minimill, I could design and manufacture a stepper-motor controlled IAC valve from scratch. A sufficiently small design, using a tiny NEMA-8 stepper motor, could actually fit inside the airbox, between the left and right intake trumpets. This should also provide some protection from overheating the motor since there will be continuous airflow, at least as long as the engine is running.

This is the airbox bottom that the throttle bodies will need to mount to. The carbs are hard-mounted to this bracket.

The only place it seemed reasonable to fit the IAC valve was inside the airbox, on that flat segment between the left and right intakes. The outlet will go down through a hole in that surface into the space between the throttle bodies, split up to go forward and rearward to the four ports on top of the throttle bodies (visible in the picture as brass barbs.)

To control the amount of air, the stepper motor would turn a rotor in the form of a half-cylinder, that could cut off more or less of a hole in the side of the cavity. As usual it required a few iterations to get everything packed into the small amount of space, but it worked out. These two renderings from Fusion illustrate how it works:

This is a section rendering of the IAC valve in its fully open position. The half-cylinder rotor is driven by the stepper motor (not visible), the intake is towards the back, and the outlets are the two barbs in the lower left.

This is a section rendering of the IAC valve against the end stop in its fully open position. The half-cylinder rotor in the upper right is driven by the stepper motor (not visible), the intake is in the back of the hole the cylinder is in, and the outlets are the two barbs in the lower left.

Here, the valve has rotated clockwise and the rotor now almost completely covers the hole in the side wall. The hole is tapered, and only a small opening, visible by the light coming through, remains.

Here, the valve has rotated clockwise and the rotor now almost completely covers the hole in the side wall. The hole is tapered, and only a small opening, visible by the light coming through, remains in this position. It’s possible to completely close the hole at which point the only remaining airway is the clearance between the rotor and the wall.

Because the outlet part with the two barbs is on the outside of the airbox, it’s a separate piece that screws on from the outside, so there are three pieces that have to be made. The clearance between the rotor and the wall of the hole needs to be small, since the air leak through this area determines the minimum amount of air that the valve can be set to. This means there’s a fairly tight tolerance on the size and shape of the hole and the cylindrical part of the rotor.

I’ve manufactured all three parts, but for a number of different reasons they’re all junk. The most obvious problem was that I didn’t realize that there’s apparently no standard dimension for a “NEMA-8” stepper motor. I designed the piece from some published diagram before I had the motor in hand, and I neglected to actually measure that the motor had the dimensions I expected. It turns out both the distance between the bolt holes and the diameter of the locating circle is different on my motor, so it doesn’t fit. That would have been annoying, but the part was already ruined because of a CAM programming error that caused the drill bit to wander on two of the holes where the valve body will screw to the airbox.

It was still useful as a prototyping exercise, though. Here it is:

The body of the idle air control valve. The outlets are on the top and the large hole is where the stepper motor mounts.

The body of the idle air control valve. The outlets are on the top and the large hole is where the stepper motor mounts. To give you an idea of how small this thing is, those bolts attaching the outlet part are M2.5.

 

A better view of the hole for the valve rotor.

A better view of the hole for the valve rotor. The hole visible in the back is the air intake. Note the gouge on top of the piece — another CAM error…

 

This is how the stepper motor mounts. Note that it doesn't actually fit correctly, because the locating hole in the valve body is too small.

This is how the stepper motor mounts. Note that it doesn’t actually fit correctly, because the locating hole in the valve body is too small.

The rotor is also no good. To ensure that the outer profile was perfectly cylindrical, I made it by mounting a short length of 0.75″ round 6061 stock in the mill spindle and turned it down with a lathe tool mounted in the vise, sort of using the mill as a lathe. This worked well. Then I mounted the part in a V-block, located the center, and drilled the hole for the motor shaft. However, it’s still about 0.25mm off center, which is more than the clearance to the side of the hole. I don’t know if this is because the drill wandered when drilling the hole, if I failed in measuring the center, or if the drill somehow lost position. Backlash in the mill means that the exact position will depend on which way you go to a point, but the backlash has been measured to be well below 0.1mm so that shouldn’t be a factor.

Turning the cylinder that will become the idle air valve rotor on the "mill-as-a-lathe".

Turning the cylinder that will become the idle air valve rotor on the “mill-as-a-lathe”.

If I had a real lathe, I could drill the center hole along with turning the outside, but I don’t. I could align the spindle of the mill-as-a-lathe with some point and mount a fixed drill bit there, but I don’t think I can do that with higher accuracy than I can align the mill to the workpiece. What I will do differently next time is to at least locate the center by making a small hole with the mill-as-a-lathe. This should provide a precise starting hole. We’ll see how it goes.

So that’s the mechanical side of the task. There’s also the electronics. While the Megasquirt firmware can use both PWM and stepper motor idle air control valves, the Microsquirt doesn’t have the hardware to control a stepper. This shouldn’t be a problem since I’m already using an Arduino to read the wideband oxygen sensors and drive the tachometer. It shouldn’t be a big deal to also make it read the desired IAC valve position from the Microsquirt over the CAN bus and then run the stepper motor to that position.

An extra complication was that I had already appropriated the Microsquirt’s IAC valve PWM output to drive the coolant temp gauge (since the idle air position is controlled by the coolant temp, I just needed to determine which PWM values corresponded to the desired gauge readout and program the MS with that “idle air” table.) However, I was now actually going to use the idle air control for its intended purpose, so the coolant temp gauge also had to be driven by the Arduino. No big deal, that’s also available over the CAN bus and driving a PWM is trivial.

That is now all done. I added an “EasyStepper” stepper motor driver to the circuit board, soldered a bunch of more wires onto the Arduino pins (since I didn’t anticipate using them, they’re not connected to anything on the board) and completely rewrote the Arduino code which had become really messy. Now it’s much better structured, you can add things you want to execute periodically to an “event loop”, the things using inputs coming from the CAN bus are loaded up with the memory locations where they can find what they want, etc. If you are interested, the code is in my Arduino library on BitBucket.

The Arduino circuit board is getting quite messy. The new "EasyStepper" stepper motor driver is in the upper right, and lots of new loose wires have been added to hook it and the coolant temp gauge up. I'm already planning how I'm going to redo this...

The Arduino circuit board is getting quite messy. The new “EasyStepper” stepper motor driver is in the upper right, and lots of new loose wires have been added to hook it and the coolant temp gauge up. I’m already planning how I’m going to redo this…

The circuit board has gotten pretty messy, though. It’s clearly showing its “prototype” nature. Once this is all working, I’ll probably design a completely new, cleaned up, board and get it from OshPark.

But this all works! The stepper motor responds to the commands from the MS. Check this out:

There are a few things that remain, apart from obviously making a new IAC valve body. This has mostly to do with exactly how to route the hoses from the idle air valve to the throttle bodies, without interfering with the throttle linkage, but I’m pretty happy with how this is turning out.

 

More quiet compressed air

As I mentioned in the last post, I’ve been working on quieting down the new 60-gallon air compressor. People claim a significant fraction of the noise from an air compressor comes from the air intake. For this reason, I was going to fit a larger intake filter/silencer.

The stock air filter is a chunk of what looks like fiberglass sandwhiched between two layers of metal mesh. Hence, to be able to attach something to the intake, I had to manufacture an adapter.

After careful measuring on the compressor, I designed a piece in Fusion that would slide into the slot that holds the existing fiberglass filter and convert to a 1.25″ pipe. The larger air filter has a 1.25″ pipe thread, so then I could run a short length of pipe and locate the filter on the wall behind the compressor.

The air filter is quite large, so this adapter piece ended up being the largest design I’ve ever tried to make on the mini mill, and because it’s hollow you end up needing long endmills to reach into the hole. Long endmills are much more prone to flexure and vibration than the ones I normally use, and the long leverage also means that any play in the head of the mill gets amplified.

I ended up using 3/8″ flat and ball endmills with about 70mm of stickout from the collet. This piece was really pushing the limits of what you can do with the mini mill, and even then total machining time was probably upwards of 4 hours.

 

This is a short bit into the machining of the inside of the compressor intake adapter.

This is a short bit into the machining of the inside of the compressor intake adapter. This is still using the normal, short endmill.

 

This is the 72mm long 3/8" endmill that I used to get into the hole and clear out the material.

This is the 72mm long 3/8″ endmill that I used to get into the hole and clear out the material.

The final operation of the inside was to clean up the contours with the ball nose endmill.

The final operation of the inside was to clean up the contours with the ball nose endmill.

To give you an idea about how much the mill struggled with this job, I collected some clips of the various operations into a movie:

There were basically two problems. The first was that the long endmill would chatter. This is when the periodic disturbance of the flutes hitting the material causes the endmill to start vibrating like a tuning fork. This is the very loud and high-pitched squeal you can hear in the video above. Because this is a resonance phenomenon, it’s worse at some RPM than others. I kept lowering the RPM until I got to 900 (normally I use 2500) where it finally was somewhat tolerable.

The other problem was that the flutes cutting into the material causes a vibration in the mill table itself. Any play in the gibs or backlash in the ball screws means that the table can shake back and forth every time the flutes take a cut. This is the much more lower-pitched vibration that you notice at some points in the movie.

The latter problem can be mitigated by taking a deep enough cut that the endmill always has a flute engaged. In this situation there is a more constant cutting force that tends to not excite vibrations. That’s the reason I take those very deep cuts (14mm) in the movie. 14mm was way better even than 3-4mm.

Anyway, it was painful both for me and the mill, but we made it. The gibs really needed adjustment afterwards and some of the adjustment screws were mushroomed from the vibrations in the table. Pretty bad…

After a few small adjustments, the piece ended up fitting perfectly.

Test fitting the intake adapter on the compressor. (I did that before machining the outside so I had some options in case it didn't fit.) Luckily, it did.

Test fitting the intake adapter on the compressor. (I did that before machining the outside so I had some options in case it didn’t fit.) Luckily, it did.

Next step was to make a lid that could be welded to the adapter and screw into the three holes where the stock lid mounted. This job was a bit more reasonable, since it was just a flat piece. I cut some fins into it for cooling. The two were test fitted and then welded together.

The welds really do not look good, but it's not like this is critical work.

The welds really do not look good, but it’s not like this is critical work.

With the adapter completed, I could finally mount the new intake filter. I used a flexible rubber coupling to connect the intake to a 1.25″ PVC pipe going to the filter. Since this is all covered by the “muffler box”, I placed the filter in the corner. This is the furthest away from any openings on the box, and is also the suction side of the fan blowing air over the compressor, so it should give it nice and cool air to suck in.

Here's the final arrangement of the intake filter. It's quite large, so it was placed in the corner. A piece of rubber flex coupling connects the PVC pipe to the intake.

Here’s the final arrangement of the intake filter. It’s quite large, so it was placed in the corner. A piece of rubber flex coupling connects the PVC pipe to the intake.

The rubber coupling is a source of some concern, as the compressor head gets very hot (easily over 100C) during heavy use. Time will tell if it holds up, but for moderate air use the compressor just doesn’t run enough for it to get very hot. The real test will be trying to use an HVLP pain gun or maybe my air-driven sander.

The final piece of the puzzle was to apply a layer of fiberglass insulation on the closet walls around the compressor and on the inside of the box.

To absorb the sound coming from the compressor before it can get out of the box, I mounted fiberglass on the inside. It's held in place with chicken wire stapled to the MDF box.

To absorb the sound coming from the compressor before it can get out of the box, I mounted fiberglass on the inside. It’s held in place with chicken wire stapled to the MDF box.

I also added 1/2″ rubber vibration isolators under the compressor feet to cut down on the vibration conducted into the concrete floor.

So, how does this all work? Actually, remarkably well. The larger filter itself made a noticeable difference, and the box took it from annoyingly loud to perfectly tolerable. I haven’t made any measurements, but I can now stand outside of the closet and without a problem have a conversation with the compressor running. Outside of the garage, it’s basically inaudible. It’s not even in the same ballpark in loudness as the old one.

I made a movie comparing the stock intake, the new filter, and the final configuration with the fiberglass insulation. The auto gain on the microphone makes it difficult to appreciate the volume differences but you can kind of get an impression by comparing it to how my voice sounds.

That completes the saga of quieting down the air compressor. I sure hope the neighbors appreciate the amount of work I’ve done here, but I must say that it’s also awesome to be able to use the mill without needing ear plugs like I did with the old compressor.

Compressed air improvements

For my compressed air needs, I’ve so far used this 8-gallon Husky air compressor I bought back in Torrance, and while it’s been adequate, it can’t really keep up with really any use of air tools. Even just running the mister for the CNC mill, which doesn’t use a lot of air at all, it cycles very often. It’s also really loud, which is annoying to us and also apparently to the neighbors because we got a notice that someone’s lodged a complaint about “excessive noise from construction equipment”. I don’t know if it’s the air compressor or the long hours of sanding that was the culprit, but since the compressor was inadequate to begin with I decided to make some upgrades.

The only real step up, compressor wise, is to go to a 60-gallon one. These typically have 3-4hp motors and a capacity that’s about 4x that of my previous one. They’re still loud, but because they are belt driven and run at lower rpm, the noise is less bothersome. They also weight over 200lbs, so the only practicable way of getting one is from Home Depot. (For some reason, Amazon refuses to ship one Prime here…) Luckily HD had a 60gallon, 3.7hp Husky in stock.

To minimize noise, I decided this should go in the garage closet where the PV inverter is mounted. This is an internal closet so has no direct noise route to the outside except a few vents.

This is the 60-gallon Husky in its closet, with a new, larger filter/regulator.

This is the 60-gallon Husky in its closet, with a new, larger filter/regulator.

I’ve also gotten rather tired sneaking long air hoses around the garage, so I decided to invest in fixed air lines. There are various ways of doing this, you can use iron pipe, copper pipe, or other options. Since running iron pipe is a gigantic hassle, even if it’s cheap, I ordered a “Maxline” kit on Amazon. This is thin aluminum tubing with plastic cladding on the inside and outside, which means it’s bendable and goes together with compression fittings. The kit comes with pretty much all you need for a small installation, and even if the 3/4″ tubing isn’t super easy to bend, it went together pretty quickly. It took me a few hours across two evenings to install the kit, and I had absolutely no leaks.

This is going to be so much better than sneaking the long hoses around. If you use air a lot in your shop, I can totally recommend this kit (or the 1/2″ equivalent; The kits are the same price, and since I want to, at some point, run an air line into the basement, too, I went with the larger tubing.)

The kit comes with 3 of these Tees and outlets. This is the dedicated CNC mill outlet.

The kit comes with 3 of these Tees and outlets. This is the dedicated CNC mill outlet.

To further cut down on the compressor noise, I built a “box” around the motor and pump from 20mm MDF. It’s not enclosed, since the compressor needs air flow (it gets pretty hot even in free air, something about p-dV work I believe…) but it should prevent direct noise paths.

The box hangs on the wall and is open-bottomed. There's also a large hole in the top where the heated air from the compressor fan can get out.

The noise suppression box doesn’t touch the compressor at all, it hangs on the wall and is open-bottomed. There’s also a large hole in the top where the heated air from the compressor fan can get out.

The box didn’t have any noticeable effect on the noise level in the garage as measured with the sound meter app on my phone. However, those are not very accurate. The noise did have a more muffled quality to me, so I suspect the higher frequencies are attenuated but the low-frequency rumble is not. I’m still going to line the inside of the box and the walls of the closet with fiberglass insulation to further try to attenuate reflections, so we’ll see if that makes a difference.

The other thing I’m going to do is replace the tiny foam filter for the pump inlet with a large Solberg filter. This should cut down on the intake noise which I think is a large factor. That however requires machining an adapter so it’ll be a few days until I can mount that.

So how much is it going to run? I’m not sure yet, but I measured that 4 minutes of the mister will drop the tank pressure by 10psi. Since the compressor pumps the tank to 150psi and the mister only uses 50, I could in theory run it for 40 minutes without needing to start the compressor. However, I’m not sure at what pressure the compressor cycles, so it remains to be seen how long it can go without kicking in. I’m sure it’ll be a whole lot less than the old one, which could only go for about a minute before starting up again.