The last post outlined the design of the new Aerovee intake, plenum, and the four equal-length runners. Since then, I’ve been busy with fabrication: Two intake elbows had to be CNC’d and welded to the initial runners, the plenum design finalized and its attachments to the runners measured, and then the actual plenum and runners 3D-printed.
So far, most of the work has gone into machining the intake flanges and making sure that the runners get cut to match the plastic test pieces and then welded on in the right position. This wouldn’t be so much of a pain if I didn’t have to drive down to the airport to do a test fit…. which I’ve done four times now, gradually adjusting the runners and breaking off the tack welds. And that’s just the right intake. The left one is just getting finished on the mill.
The first intake flange almost done on the mill.
The aluminum flange compared to the plastic fitment piece.
Test fitting the intake runners after tack welding. This has been done a number of times…
While the plenum shape was basically finished in the last post, there were a bunch of little things that needed to be worked out: First, it has to be cut in half to be printable, so it needs a way to get back together securely without leaking. Second, it needs attachment points for the brackets that will hold it to the engine. Third, the initial bend of the runners will be part of the plenum, so those angles needed to be measured as accurately as possible. By making the initial bends part of the plenum, the runners themselves become much simpler to fabricate in that they will each only have a single bend. This saves me from having to clock and weld several bends together when they are finally fabricated in stainless.
A rendering of the final plenum shape, including the four runners. The runner rotations aren’t necessarily exactly right since those aren’t constrained, but their shapes should be.
Even split in two, the plenum halves including the runners are quite large and complicated pieces and each takes over 24h to print. I also had to tweak the design a bit because the Alloy 910 I’m going to print with only comes in 1lb spools and each piece was going to use up uncomfortably close to a full roll. Since running out of filament at the end would suck big time (not to mention being $40 worth of plastic wasted), I did not want to take any chances there. The current design, as printed, uses about 320g so that seems OK.
To make sure it would print OK, and to be able to do a final fit of the angles of the runners, I printed a test copy using HIPS (which is < 20% the cost of Alloy 910). I also printed the runners in Nylon. I’ll use the printed runners to test run the engine before going through the work of fabricating them in stainless. Nylon should be plenty strong and for a reasonably short run the heat shouldn’t be a problem. (The main issue would probably be radiated heat from the exhaust headers. There is maybe 2″ between the rear exhausts and the intake runners.)
Here’s the HIPS test print of the two plenum halves, with the temporary nylon runners attached. The HIPS print is clearly a bit warped and also did not come off the supports very cleanly. Who cares, it’s just for test fitting.
Remaining work is final fitting, welding the left-side intake flange, and then printing the final plenum. It shouldn’t be long until we can fire it up and see if this was all for nothing now…
In the last post, I showed my DIY pipe “LEGO” kit that I would use for modeling the runners. Once I had those all fabricated, it was time to go try it on the airplane. To get an idea for how a plenum would fit, I just made a flat disk with four attachment points on it.
Here’s the first indication of how the intake flange with the two bends will look. (Note the snazzy red-dyed nylon. Nylon takes dyes very well, so I had to try it. And, yes, I’ll have to cut a hole in the rear baffle.)
My first idea for a plenum was to put the four exits on the top. However, I had not counted on the starter, at the top of the picture. To get the runners going to the left cylinders to clear the starter, the plenum would have to sit very low. This does not leave much room to fit a plenum, since the carburetor is sitting as low as it possibly can go right now. I also started out with a cylindrical cross section, but the space in the front-back direction is quite constrained due to the engine mount plate and the engine mount.
The first try did not work at all, but yielded several important design considerations:
The starter constrains everything to not go higher than about the crankshaft axis.
If the runners exit the top, there is not enough space to fit the required plenum volume and still fit the carburetor.
In addition, the low plenum makes the runners too long.
The last point warrants a little explanation. It looks like an intake runner tuned for 3100 RPM with the AeroVee crankshaft duration should have a total length of 21-23″. That includes 2.25″ from the valve to the flange inside the cylinder head, about 1″ for the curved flange, and about 1″ to end the runner inside the plenum, leaving 17-19″ for the runners themselves.
The solution was obviously to make the plenum larger so the runners attach closer to the cylinders. This was accomplished first by changing the design so they would exit on the sides rather than the top and, second, by making the plenum wider at the top, moving the attachment points outward. This resulted in iteration number 2.
This is the second iteration of the plenum, with side outlets.
This one was better, but it could be made wider at the top and be taller, since there now was a lot of space between the inlet on the bottom and the carburetor.
For the third iteration, I also made a bracket to attach the plenum to the lower crankcase bolt. This is where the original intake pipe attaches, so it provides a good reference point to keep the plenum in a fixed position to match the runners against.
For the third iteration, I switched from printing the test in Nylon to HIPS (High-Impact PolyStyrene.) Printing these plenums use a fair amount of plastic and HIPS is much cheaper. It’s also much more brittle and not flexible at all, but that really doesn’t matter for the plenum since it doesn’t have any parts that need to flex.
To be able to locate the plenum reliably, I added a bracket that attaches to the crankcase bolt in essentially the same way the original intake does. (The plenum moves with the engine, so it can’t be attached to the engine mount since the engine is mounted in flexible rubber mounts and moves around.)
The third iteration was a further improvement, but it could be made even wider without the outlets while needing to be slimmed down a bit at the bottom to clear the engine mount.
Finally, the fourth iteration seems like it will work. It clears all other parts, the inlet is located at the right height for the carburetor to attach to it, and I managed to route all four runners with a length of 19.5″ from the flange to the plenum.
The runners going from cylinders 1 and 3 out through the baffle (yes, I cut it. It can be fixed if this experiment doesn’t pan out.)
The runners from cylinders 1 and 3 going down to the plenum.
The runners for cylinders 2 and 4, on the right side. This part is practically symmetric between the two sides.
The runners for cylinders 2 and 4 going down to the plenum. Note how these take a noticeably more perpendicular route compared to the 1/3 ones which cut the corner. This is because cylinders 2 & 4, on the right, are located a few inches further rearward than the ones on the left, so to keep all the runners the same length they need to curve around a bit more.
It’s probably hard to see in the pictures, but all four of these runs make up 19.5″ in length. The runs will probably require a little bit of adjustment, because when you clip 19 of those plastic pieces together there’s a fair amount of play, but that should be fine.
The plenum itself will have internal trumpets for the outlets. I made a cutaway render in Fusion of how it will look:
Cutaway rendering of the plenum from Fusion 360. The trumpets are necessary to minimize disruption to the airflow as it enters and exits the plenum.
The intake sections that attach to the cylinder heads will be made of 6061. I’ve already started milling one of the flanges, to which the pipes will attach, on the CNC mill. Then pipes will be welded to the flange to make the two 90-degree exits. I anticipate the aluminum sections to go out through the rear baffles, until the curves start. From there on, I think they’ll be made of 304 stainless, but first I’m going to test run the engine with printed, plastic, tubes to make sure it runs OK.
The plenum itself will be 3D-printed out of Taulman’s Alloy 910 Nylon. It’s a Nylon blend that has one of the highest tensile strengths of all 3D-printed materials, along with the great durability and chemical resistance of Nylon (the plenum will have fuel going through it, remember). Using the static stress simulation in Fusion 360, I’ve determined that it should have sufficient structural strength for the stress the engine-induced vacuum at idle will pose.
In the end, we’ll see if it works. It’s an Experimental, remember!
As explained in the last post, merely making a custom intake elbow for the AeroVee on the Sonex did not yield a satisfactory mixture distribution.
After some discussions, I’ve decided to fabricate an entire intake, using individual runners to the cylinders. This won’t just entail replacing the intake elbow but also designing some sort of intake plenum that the four intake runners can split up into. Ideally you also want these intake runners to have the correct length for the expected full-power RPM around 3100.
The tricky thing whenever making anything like this, either an intake or, more commonly, an exhaust, is to figure out exactly which routing clears all obstructions while bringing the pipes to their endpoints with the correct lengths. A while ago I saw a video on Youtube about someone making a “Lego” for assembling header pipes:
These kits consist of one-inch sections of pipe of the correct diameter and bending radius made in plastic. You can then play around with the routing until you get something that works, and then you know which sections of bends you need to order and how to cut them to get something that fits. Pretty smart!
The only problems are that, first, these guys want like $750 for a kit and, second, since they target the car exhaust market they only have them in diameters that are larger than the 1.25″ intake runners we need.
But now, I have a 3D printer. How hard can it be to design something that can be 3d-printed to snap together like that? Famous last words.
It turns out that getting a good “snap” action that on the one hand holds the sections together securely, while not breaking when assembling or disassembling, isn’t at all trivial. My first design used nGen, a copolyester that’s easy to print and is pretty cheap. However, it turns out to be far too brittle to work for this application.
My next try was to use the PC-max polycarbonate that I printed the intake elbow from. This is much stronger and less brittle than nGen, but my designs still snapped almost right away. I attempted to use the “static simulation” in Fusion 360, where you can take your part and see how it will react to applied forces, to get something that could deflect the required amount without cracking, but that didn’t really work out well either.
Looking for something that was more elastic, I tried a roll of Taulman Alloy 910 that I had bought a while ago but never used for anything. This is a nylon blend, so is more elastic, but it still cracked. Nylon seemed promising, though, and looking at Taulman’s page about “which filament to choose“, it seemed that their “Bridge” Nylon would be a good alternative. It doesn’t have as high tensile strength as either 910 or PC-max, but more importantly it can deflect a lot more before breaking. (It’s also cheaper than any of the other alternatives which is good since this project would require manufacturing a large number of these sections.)
The collection of failed attempts. The ones in red are the nGen, black is polycarbonate, and the white are the Taulman 910 and Bridge nylon.
My first experiments with Bridge did not go super well either. The trick is to get the “tabs” that will snap in and hold the section to be long enough that they don’t break when deflected the required amount, while still being strong enough to hold the piece securely.
In addition, nylon is tricky to print because it is very hygroscopic and absorbs water like crazy. If the filament is not totally dry when you then try to print with it, the nozzle sizzles like a frying pan and little pops of steam shoot out. Needless to say, this wreaks havoc with print quality. Surprisingly enough, even the rolls directly from the manufacturer, vacuum packed with desiccants, are not sufficiently dry when opened.
Once I realized that even if you don’t hear any sizzling, the filament can still have enough moisture to ruin the print, I put the roll in the oven at 75C for five hours and it was like night and day. I also made (printed!) a box with desiccant the filament can be stored in while reeling it out for printing, because with the humidity here the print quality is ruined again after the filament has been sitting out for just a few hours.
The other trick was to get the print settings dialed in. While not very critical if you’re printing some larger or more solid part, these thin tabs would either get big blobs stuck on them from extra plastic oozing out of the nozzle or, if you tried to dial it back too much, be too weak and snap from missing plastic. To figure out the best settings, I set up a couple of grids, systematically varying parameters.
Here’s one of the test grids, printing just the tabs with a bunch of different settings to see which ones worked best.
Finally I came up with something that seemed to work.
Here are two straight 1″-pieces printed with some settings that work well. Cosmetically, there are still artifacts and some stringing on the tabs, but they work reliably.
It was then a matter of designing all the different pieces needed and switching to mass-production mode. The intake is 1.25″ diameter, and it appears those are available with bend radii of either 2″ or 1.25″, in some combination of 15, 90, or 180 degrees. It all comes out to 7 different types of sections.
This is a 1″-long section of a bend with 2″ center line radius. Since the top ends up slanted, you have to use supports when printing the tabs (and also some on the inside of the pipe.) The lines along the perimeter is so that you can line up several bends in the same plane. There is also a tab on the inside of the female end that holds the parts in any of 8 different rotational angles, making it easier to line up a series of bends in one plane, or 90 degrees off, etc.
Each piece takes somewhere between 40 minutes for the straight sections to 2h for some of the bends (you have to use a finer layer separation over a larger height for the bends since the tabs are all at different height and you want to resolve their shape well.) To make printing more of them reasonably efficient I’ve set up a script that prints 9 at a time. With a 3×3 grid, the TAZ6 print head has enough clearance that it can print one whole part before moving on to the next one without bumping into it. This is preferable to printing them in parallel since moving between them for every layer takes much longer and also results in a lot of strings being pulled between the part. It’s much more efficient to just do one part at a time.
A grid of 9 bends being done in one batch. This takes about 18 hours to finish.
At this point I have enough parts that I think it’s time to go down to the airport, pull the cowling, and try it out. They hook together well and hold their shape at least until you get something tens of inches in length.
A demonstration of how this is going to look. By using a number of pieces with the same radius aligned in the same plane, you know you have a shape that you can cut from a single 90- or 180-degree mandrel bend.
I also had to have a way to hold the start of the intake at the right place, so I designed an intake flange with attachments for where the two runners will go. This uses the same measurements that I already had from the intake elbow. This part can be bolted to the engine to provide a starting point.
For the mounting on the intake, I designed a flange with two attachment points in what I hope is the right angle to exit the engine. I’m pretty sure that’s going to work since I know the angles the custom intake elbow used, and with a 1.25″ bend on the left (rear) runner and a 2″ bend on the right (front) one, they should clear the cooling fins on the head and be able to both exit rearward. (Once the routing is worked out, this part will be made by CNCing the flange and welding two aluminum mandrel bends on it.)
So, that’s where this part of the experiment is now. I’ll try to get down to the plane next weekend and figure out how to route the runners. Once I know the angles they will come down with, I can design the attachment points on the intake plenum to match, figure out which mandrel bends I need to buy, and get to work actually fabricating it. It’s going to be a semi-long process, for sure, but I’m convinced this will fix the mixture problems once and for all (and hopefully also give more power, if the intake is tuned correctly). Stay tuned!
The AeroVee Volkswagen conversion engine used for Sonex aircraft is notorious for having poor mixture distribution between the cylinders. During my test runs, I’d noticed that the #4 cylinder (ordered in conventional crankshaft order starting with #1 nearest the prop, which makes #4 the right rear cylinder. For some reason Sonex uses a different numbering scheme) was always the one whose cylinder head temperature overheated way before the others. The rear cylinders normally will run hotter since they naturally get less cooling airflow than the front ones but, as the following will show, they also run much leaner than the front ones.
In reading other people’s experiences, this appears to be fairly universal for all AeroVee-equipped Sonexes. Looking at the intake design, it’s not hard to see how there may be a mixture imbalance. Unlike most intakes that have an intake plenum from which individual runners go to the cylinders, the AeroVee looks very different. The AeroCarb is attached directly to an intake pipe, which splits into left and right branches. These branches go all the way up to the cylinders (about 20″) before ending at an “elbow” mounted to the cylinder head. This elbow has the runners to the two individual cylinders going out at right angle from the incoming pipe, which then dead-ends.
There are several features that seem questionable about this design. First, the two cylinders on the same side of the engine fire consecutively, 180 crank degrees apart. This means that the intake events for the two cylinders that are hooked up to the same intake are not evenly spaced in time. There is 180 crank degrees between the front intake stroke to the rear one, and then 540 degrees before the next front intake stroke. For this reason, exhaust pipes usually merge two cylinders on opposite sides (a “crossover” exhaust), which makes the pulses evenly spaced in time.
The same principle applies to the intake. Since the two intake pulses that share the same intake runner aren’t evenly spaced in time, they won’t affect each other the same way. This gives rise to a fundamental asymmetry.
The other questionable design feature is the intake “elbow”, which just splits the individual cylinders off at right angles. The fuel droplets in the intake charge have higher inertia than the air itself, so when the air makes the 90-degree turn into the “first” cylinder, i.e. the rear one, the fuel droplets will naturally have a tendency to miss this turn and continue to the front cylinder. (In fact, this is exactly the principle by which a device called an inertial separator, which is used to separate particulates out of gas, works.) With this effect in mind, it does not seem surprising that the front cylinder would be running much richer than the rear one; even if the average mixture is correct, more of the fuel will go to the front cylinder than the rear one.
This photo shows the red stock intake elbow, and the custom-designed experimental one in black.
I wanted to see if I could remedy this fact by designing a new intake elbow. Rather than branching the cylinders off one by one, it should split into two equal parts, and then route them to the two intakes. After taking some measurements of the stock elbow and playing around with Fusion 360, I came up with the design in the picture above.
3d-printing the design allowed me to test-fit it on the engine to make sure it would fit. Fabricating it would need to be done in at least 4 separate pieces on the CNC mill, and then welded together. But more than that, I figured I could actually test it on the engine, too, to make sure it worked before going through the effort of fabricating it.
If this was a water-cooled engine, it would not be a big deal. But it’s not. The cylinder head temperatures on air-cooled engines can easily exceed 400F (200C). However, there are some 3d-printing filaments that can handle fairly high temperatures. Polymaker’s PC-max polycarbonate filament has a glass transition temperature above 110C. That’s not nearly enough to be able to work sustainably, but in this case all we need to be able to do is go to full throttle for less than a minute to evaluate the design. It was worth a shot.
For the experiment itself, I refer to this video. (I just got a GoPro for the purpose of recording my flight training, so I figured this was a good opportunity to try it out.)
If you watched through to the end, you learned that while the new intake made the mixture distribution significantly better, it did not cure the problem. Here’s the final graph shown in the video:
With the stock intake (solid lines) the EGT for the #4 cylinder actually decreases at a time of 100 seconds when the engine is leaned, while the #2 rises. With the custom intake (dashed lines), #4 EGT at full rich is lower by maybe 70C compared to the stock one, and now rises slightly when leaned. This is much better, but nowhere near equal to the behavior of #2. Rather than go through the fabrication effort for a half-ass improvement, I think the single intake runner is fundamentally flawed. The only solution is to go to individual runners. Stay tuned for more experiments!
One of the things I’ve worked on with N132EA was to clean up the wiring. As some of you may know, the importance of neat wiring work was ingrained in me from a young age working for the electrician at my Dad’s job during summers. Things were required to be done neatly, any wires crossed in bundles, not routed at right angles, not sufficiently supported, etc, resulted in a do-over with the comment “that looks like the phone company (Televerket) did it!”. He was not a fan of the phone company wiring practices…
As I was going through the Sonex, familiarizing myself with the systems and how everything is set up, I felt an irresistible urge to clean up the wiring. This is kind of what I was presented with:
This is what the under seat wiring looked like. a rat’s nest of wires, connectors and splices with bad crimps, and wires unprotected from the sharp aluminum edges. The two boxes in the center of the picture are the IMU (electronic gyro) and compass connected to the EFIS.
The wires along the right side of the cockpit, mostly routed in plastic split tubing and the com radio antenna coax hanging unsupported.
Where the wire bundles were protected, they were run in hard plastic split tubing (seen in red and black). I’m not a fan of this, it’s sharp enough to scrape your skin on the edges, and it does’t hold the wires in very well so the wire bundles were working their way out of them in several places. The wire bundles were also mostly hanging freely, free to get snagged on anything moving in the cockpit.
The worst part of it, though, was the use of crappy automotive splices (like the red one seen under the red strobe power supply box) that weren’t even crimped correctly, they looked like they were crimped with a set of pliers. And, sure enough, several of them came apart on me as I was trying to unsnake the bundles. I also found a few other bad ones, one was the source of the outside air temperature reading bouncing between 0 and 300F whenever the engine was running.
This had to be redone. I wanted all those splices gone, wires properly protected and supported, and finally an orderly routing. Apart from removing the splices, re-crimping the connectors to the nav/strobe lights, and replacing the incorrect transponder coaxial cable (which was a length of RG-58 50 ohm extended with a length ef RG-59 75 ohm) with a fresh LMR200 low-loss wire, no physical changes were done to the wiring.
The wire bundles were protected with flame-retardant Techflex Flexo F6, a soft, flexible wrap that looks good, protects the wires from sharp aluminum edges, and can handle up to 125C. Wire bundles were (gently) held together with cable ties and where there was no existing support, self-adhesive cable mounts were used. This is how it looks now:
The under seat wiring now. All wiring is supported and protected. The magnetic sensor was moved away from the trim spring and the elevator linkage to minimize disturbances, and the gyro mounted against soft neoprene to minimize vibration while still fixing it much better than before.
The existing connectors to the nav/strobe lights were cut off, since they all had sketchy crimps. Instead, I crimped Molex Mini-Fit Jr. connectors on there, and 3D-printed a small bracket that holds the connectors so they’re not free to move all over the place.
The wiring behind the panel was pretty good, and it’s very handy that there is enough slack in the wiring that you can pull the entire panel out and rest it on the side of the canopy when working on it. I added cable wrap to the bundles, moved the antenna coaxial cables away from the other wires, and made sure there was adequate slack for the connectors and that the pitot/static tubing going to the pressure sensors on the EFIS was not pinched by the cable ties.
I’m pretty happy with the wiring now, the visible wiring looks pretty good and I’ve satisfied myself that there are no remaining dodgy splices that’s going to come apart in flight and no wires rubbing against the edges of the aluminum sheet metal.
I’ve also done some wiring firewall forward, but more on that in a later post.
So it’s been a while since the last update… What happened is that one of the members of our local EAA chapter was going to ship his home-built Sonex airplane to the mainland and sell it. A couple of us who are interested in flight training made a deal that if we each became co-owners of the plane instead, the builder (who’s a CFI) would train us to fly in it. So I quite suddenly and unexpectedly found myself owner of 1/3 of Sonex #830, N132EA.
N132EA on the ramp at Hilo airport
This lead to a flurry of activity since the original owner (Bob) was about to head to the mainland for 4 months and he needed to go through the plane with us before he left. The plane also needed some work, which we attempted to get done but ultimately failed. So, over the last month I’ve been going over the plane with a fine-toothed comb, fixing a bunch of little issues, redoing some things I weren’t happy with, etc. I’ll try to write a few posts about the work itself later.
There was a certain time pressure, because the plane does not have a hangar and is parked outside. Before he left, Bob got permission from the airport to park the plane in an unused, old building for a while so we could work under roof, but we had to get the plane out about now so that’s been my ultimate goal. Today I taxied N132EA back to its parking spot.
N132EA from a different angle.
Part of what we’ve been working on is polishing the aluminum skin. The climate in Hilo is murder on aluminum, so the entire plane had a dull, gray appearance after being parked outside for a few years. Me and my co-owner put in a good amount of hours polishing the aluminum back to a reasonable shape. It’s not anywhere near what I’d like it to be, but it turns out polishing 6061-T6 (which is a hard aluminum alloy) sheet metal is a lot of work, and with the corrosion pitting present you have to go over each area many, many times to get it looking pristine. In the end, we decided to go for “not embarrassing” rather than “wow”. But it really looks quite good, at least from a distance. At least the right side, which is done. The left side isn’t (which is why I’m not showing you that side in the pictures above…)
When I taxied out to the parking, I stopped a bit away to do a full-throttle run to see how the engine worked. We’ve done some work on the engine itself and on the fuel system, and we didn’t want to run full power inside the building we were in, blowing crap everywhere. Anyway, I tied the plane down and ran it for a minute (the engine overheats really quickly when stationary) and when I shut down a bicyclist came by outside the perimeter fence and yelled “Damn, that’s a good looking airplane! Can I take a picture?” Guess which side was facing the fence? 😉
Anyway, the plan now is for us to get the airplane back in tip-top shape before Bob comes back from the mainland in August, and then I’m going to start flight training in earnest. Before then I should also take care of the written test (which I already passed back in 2001, but the tests are only good for 2 years.) Unfortunately I have to fly to Honolulu to do the written test because there’s no one that offers it on the Big Island. If only I could fly my plane there!
As I mentioned in the last post, I left the key on and ran down the Ballistic Lithium battery. Instead of just forking over another $100 I thought it would be fun (and “cheaper”) to make my own pack.
This is what the Ballistic battery looks like if you crack it open.
This is what the Ballistic battery looks like on the inside. It’s just 4 A123 Lithium-ion cells in series. Should be a piece of cake to DIY.
The battery cells are about $10 each, so it should be possible to make it for a lot less than it sells for… once you’ve acquired the necessary tools to make it, of course! 😉
It so happens that I recently bought a 3D printer, a Lulzbot TAZ6. I’ve been thinking that this would be a very useful tool to have for some time, and I’ve had a price watch set on Amazon. I’d seen on camelcamelcamel (a very useful site if you want to get alerted to bargains on Amazon) that there would be occasional sales, so when I got alerted that the price had dropped by almost $400 from the standard price I pulled the trigger.
With the 3D printer, I had the capability to print a new battery case. This would have three advantages. First, as you can see above, I mutilated the old case pretty badly getting it open. Second, I could print it in a plastic that doesn’t melt if it comes in occasional contact with gasoline. And third, since the old battery was just on the hairy edge of being too tall, I could rearrange the cells to lie them down (like in the picture above) which would better utilize the space in the battery compartment.
This is the 3D-printed battery box, with the cells inside for test-fit. The hole in the lid is for mounting the terminals from the old battery. This lid had to be redone, as I had miscalculated the room needed for the terminal connections on the inside.
The next challenge was how to hook up the cells. The normal procedure for connecting battery cells is by spot welding a nickel strip to them. It is technically possible to solder them, but this imparts a lot of heat on the cells and you can easily damage them. The problem with spot welding is that I didn’t have a spot welder…
Luckily you can get Chinese spot welders for a bit more than a hundred bucks on ebay. They’re not exactly high quality, but for occasional use they should be perfectly fine. So I got one of those.
The only somewhat sketchy part about this is that the starter current is very high. These cells are rated for continuous 50A, 100A intermittent discharge current. Nickel has a much higher resistance than copper, so in high-current applications it’s not ideal. The Ballistic battery indeed had spot-welded copper connectors, but spot welding copper requires much better equipment.
I asked the people at batteryspace.com, who I’ve bought Lithium batteries from before, and they said they used 0.3mm thick Nickel strips for their A123 cells without a problem, so that’s what I went ahead and used.
Here are the spot-welded cells ready for mounting. You really don’t want to accidentally short these cells, so I covered the connections with kapton tape.
Before spot-welding the final connections, I soldered those strips to the copper connectors going to the battery terminals. Then I just had to put the cells into the box and, voila, we have a new battery!
The assembled battery, getting its first charge.
The new box fits very well in the battery compartment, and there is no longer any interference with the seat. The motor cranks about the same as before. It’s possible that the cranking speed is a bit lower, judging from the data logs, but there was absolutely no problem starting.
However, there’s something weird going on. When I rode the bike, it ran crappily, and the data log shows that it ran much leaner than before. The battery voltage is pretty much the same, so I don’t think it’s possible that the new battery could be the cause. There was some ethanol-blended fuel in the tank, so maybe letting the bike sit for a few weeks made it absorb water, which would make it run leaner? That also doesn’t seem plausible, though. The effect is large, like more than 15%.
Unfortunately I haven’t had time to troubleshoot any further. More info when I have it.
Since the last post only got to the first tricky thing, here’s the sequel.
In addition to getting the air density right, the second tricky thing has been parametrizing the volumetric efficiency.
The Megasquirt engine controller can use different parametrizations of the VE. It always depends on the engine RPM, but there are several alternatives for the second variable (usually referred to as “load” because it describes how much power the engine is producing):
Manifold pressure (MAP) is the most common variable. In general this works well for automobile engines that have a common intake manifold and a single throttle valve for the air entering the manifold. In those engines, there’s enough volume to get a fairly stable “average” pressure in the manifold that determines the density of the air the engine is ingesting. However, for motorcycles and other engines with “individual throttle bodies” (ITB), the volume behind each throttle butterfly is small and is only used by a single cylinder. This leads to a highly variable manifold pressure (see the post on idle tuning) that is difficult to use as an indicator of engine load.
The throttle position sensor (TPS) is sometimes used in the situations where it’s difficult to get an accurate MAP reading. I don’t have a lot of experience with this but my impression is that it works fairly well at high throttle openings but with the throttle almost closed small changes in throttle and RPM can have drastic changes in the VE and it’s difficult to get an accurate mapping of the volumetric efficiency.
To overcome the problems with these two methods, they’ve added the “ITB mode”, which is essentially a combination of the two: at low throttles and manifold pressures, it uses the manifold pressure; at high throttle and MAP, it uses the throttle position. The switch happens when the MAP is greater than 90% of barometric pressure and the throttle position is higher than an RPM-dependent value. Because this method does this blending inside the ECU, the procedure for tuning the VE table is the same as for the other ones, it’s just the load value that’s calculated in a different way.
Because my setup combines the measurements of the pressure in all four manifolds and times the measurement to when the intake valve closes, I thought I had a good MAP value and embarked on tuning using the MAP value as the load variable in the VE table. (Actually, the two VE tables, since I have one table for the front and one for the rear cylinders, because they actually have a quite different VE.)
This worked well at first, but as my tuning converged and I began to be able to run at full throttle without going horribly lean, I noticed that at as the throttle was opened beyond the halfway position, the manifold pressure no longer changed, but the air/fuel ratio did.
This is apparently a fairly normal effect on engines with individual throttle bodies. Because my setup uses the minimum of all four intakes and there are strong pressure pulses in the intake, the manifold pressure reading will essentially never get to ambient pressure once the engine RPM is high enough that this becomes important. Essentially, the intake is like a pipe in an organ. While there is no standing wave, the pressure pulses created when the intake valve opens and closes will travel up the intake and reflect off the end of the runner in the airbox. (Because this is a reflection off an open medium, the reflected wave will also be out of phase, i.e., a high-pressure wave will be reflected as a low-pressure wave.)
The intake is about 0.3m in length, so it takes the pressure wave about 1.8ms to do the round trip. At the 14,500 redline, that’s 150 crank degrees, so always much less than an engine cycle. So these waves bounce back and forth many times during an engine cycle.
Anyway, the end result of this is that the manifold pressure sensor never really reads ambient pressure, even with the throttle fully open, especially since it’s using the minimum value within the sample interval. The amount of air that gets into the cylinders, though, does change. This means the volumetric efficiency can not just be dependent on the measured MAP and RPM.
Like I said, this is not some new phenomenon, and people have solved this before by adding a secondary, throttle position-based, load table. The VE is then determined by multiplying the values in the two tables, and this makes it possible to add throttle-dependent fueling at high throttle values when the MAP value no longer responds.
The problem with this approach is that I’m already using two tables, for the front and rear cylinders. The Microsquirt can use two separate tables for separate injectors, or two tables that are multiplied together. It does not have the capability to do both at the same time. The newer Megasquirt-3 based ECUs can do this, but that’s not really an option.
The other option that is available are the “trim tables”, that make it possible to trim fueling to individual outputs if different cylinders require different amounts of fuel. This sounds exactly like my situation, but the problem is that these tables can only adjust fueling +/- 12% from the “master” table, and in some conditions my current tables differ by more than 25%. This means the trim tables won’t have enough authority to handle the full difference, but it would be close so I decided it was worth a shot.
The first thing I did was to convert my two separate VE tables into one average VE table and two trim tables. I coded up some python code to read the table dumps from TunerStudio and output the new tables. This appears to have worked well, because there was no noticeable difference when running with the average VE + trim tables compared to the two independent VE tables.
At that point I could start playing with the throttle-based correction. To do this, I started with all 100% everywhere, then plotted the air/fuel ratio as a function of RPM and throttle position. Where the data showed the engine ran lean, I increased the values, up to about 120% in the most lean spots. While this was somewhat painful, because the “auto tune” function doesn’t understand the dual table calculation making manual tweaking necessary, it totally worked!
While there were still a few spots where it was a bit leaner than ideal, the engine now had reasonable fueling in all conditions from cruise to wide open throttle at redline. Unfortunately that’s where things stood when I left the ignition on and ran down the Ballistic lithium battery. Lithium-ion batteries are very sensitive to overdischarge and in this case it was dead. Rather than ordering a new hundred-dollar battery I decided to attempt to just replace the cells. But that turned out to be a rather long story that will have to wait for a later time.
The blog was down for just over a week, the machine hosting it just suddenly refused to post. This was one month after the three-year warranty ran out, but Asrock came through and replaced it anyway, probably because there is a known hardware problem on these low-power “Avoton” boards.
Anyway, I’ve done a lot more NC30 tuning and had to change my strategy a couple of times, so I thought I’d give an update.
One thing that’s been kind of helpful is to record audio along with the Megasquirt log. By syncing up the audio with the log it’s easier to remember what was happening, and since I was encountering occasional knocking that’s audible on the recording you can match up that with the log and see what the parameters are. Much easier and safer than trying to look at the cellphone doing the logging while riding around…
I’m using a Zoom H1 digital recorder and an external microphone stuffed into a sock on the dash. The sound is surprisingly good even at higher speeds, although it makes you appreciate how much louder the bike is at full throttle because I’ve yet to manage to not clip the sound level. Here’s a proof of concept, just riding around a bit:
As you can see, the logs contain an absolute load of information. The four panes I plotted in the movie are as follows:
Top pane, main fueling variables:
White: RPM.
Red: manifold pressure as percentage of atmospheric pressure.
Green: throttle position in percent.
Second pane: Air/fuel ratio:
White, red: rear and front cylinder pair air/fuel ratios (AFR), expressed as lambda offset from the target lambda. This means positive values are leaner than desired, negative values richer. The values have the exhaust gas correction “undone” from them, so they’re not actually what the AFR was, it’s what it would have been if the correction had been disabled.
Green, yellow: exhaust gas correction factors, as percentages, for the rear and front cylinder pairs. Since the tune isn’t perfect, the AFR won’t be exactly right. The controller will see this and attempt to “correct” by adding or removing fuel. This makes it less likely the engine will run lean because of a bad tune, which can lead to knocking. The controller is only allowed to add/subtract 15%.
Third pane: Temperature-related variables:
Red: air density temperature correction, as a percentage of the density at standard temperature. The controller computes how much air the engine is pumping, and the warmer the air is, the less dense it is. This affects the calculation of how much fuel should be injected.
Green: coolant temperature, in C.
Yellow: manifold air temperature, in C.
Bottom pane: Volumetric efficiency
White, red: computed volumetric efficiencies for the rear and front cylinder pairs. These come from the VE tables described in the previous tuning post.
So, with all that information, what’s the problem?
There’s been two things in particular that has been tricky to get right.
The first issue is the air density. There are two measurements of temperature, the air temperature in the intake and the coolant temperature, which basically is the temperature of the metal of the intake tract and the valve that the air passes through on its way into the cylinder. The effective temperature of the air, that determines the density of the air in the cylinders, will be somewhere between these two values. At full throttle the air flow is high and there’s less time for the air to change temperature from its temperature in the airbox, while at cruise power the air flow is less and the air will heat up more.
To take this effect into account, the engine controller uses a weighted average of the two temperatures when it calculates air density, where the weight is a function of the airflow through the engine. The trick is to figure out what this function should look like. To a large extent, this function is degenerate with the VE table, because a change is the calculated air density can be offset by a change in the volumetric efficiency.
The general idea is that this function starts out at 100%, which means the air temperature is equal to the coolant temperature, at very low airflow and then decreasing to reach 0%, which means the air density is only determined by the temperature of the incoming air, at some high airflow. But what’s the shape and how fast does it decrease?
The way I attempted to determine this was by looking at how the AFR changed as the bike warmed up. Since the amount of fuel being injected at a specific RPM and throttle position is always the same except for the air density correction, any change in air/fuel ratio as the motor warms up must be due to the temperature average being incorrect. If the engine runs leaner as it warms up, the engine is using too much coolant temperature in the average, leading it to calculate a too low air density and inject too little air. Conversely, if the engine gets richer as it warms up, it’s injecting too much fuel, meaning it’s overestimating the air density and thus underestimating how much the air warms up.
Here’s a plot of some of the data I gathered:
Data from a warmup run showing how the air/fuel ratio changes as the engine warm up. The X-axis is the air density at the coolant temperature as a percentage of the air density at the manifold air temperature. 100 means they are at the same temperature, i.e., the engine is cold. The Y-axis is airflow, calculated as RPM*manifold pressure. Each box shows the air/fuel ratio offset from what’s desired. Positive numbers are lean. If we look at the results across the higher airflows across the top, this is basically riding at roughly constant RPM and throttle. As the engine warms up, it moves to the left. The numbers across the top get smaller from the right to the left. This means the engine got richer as it warmed up, which means the ECU thought the air warmed up less than it really did.
In this case the engine got richer as it warmed up, so the air warmed up more than the ECU calculation assumed, and it overestimated the mass of air going in to the engine. (Strictly speaking, it’s not important here whether it’s over- or underestimated. The important conclusion is that it is more overestimated at high engine temperatures than at low ones.) This means the weighted average needs to have more coolant temperature and less manifold air temperature, at this airflow.
In practice, this effect is visible but quite subtle. It’s difficult to measure it at many different operating points, so it would be useful to have some theoretical expectation for what the shape of the curve should be.
If we make a simple Newtonian heat transfer model, which says that the heat flux between two materials of different temperatures T1 and T2 will be some constant k*(T1-T2). This in turn means material 1 will change temperature as a result of the energy flow as dT1/dt = -k*(T1-T2)/C, where C is the specific heat of the material.
This is a first order ODE that we can easily solve for the temperature difference, ΔT = T1-T2, and get
ΔT(t) =ΔT0 * exp(-k/C*t)
where ΔT0 is the initial temperature difference. This means that, in our case, the temperature of the air will exponentially approach the temperature of the intake.
Furthermore, for a given airflow F, it will take the air approximately a time t=V/F, where V is the volume of the intake, to pass through the intake tract. This is how long the air has to heat up. If we substitute this value for t into the expression above, we get
ΔT/ΔT0 = exp(-constant/F)
So this is the expected shape of the curve. As expected, for small F ΔT will approach zero, ie the air approaches the temperature of the engine, and at large F ΔT approaches ΔT0, ie the air has no time to change temperature at all.
In the context of our function, however, it is more convenient to talk about the percentage by which the air warms up, which is 1-ΔT/ΔT0. If the air doesn’t warm up at all, ΔT=ΔT0 and the percentage is zero. If we plot this function, it looks like this:
The theoretical expectation for how much the air will heat up towards the coolant temperature as a function of airflow. As you can see, for low flow rates the temperature fully reaches the coolant temperature, as expected. The curve declines quite slowly, however, so even for quite large flow rates there’s still an appreciable amount of heating. (The air flow scaling here is arbitrary.)
With this curve as a guide it would in principle be enough to have one point to be able to nail it down. I attempted to measure the effect at two airflows, at idle, which is near the “knee” in the curve where it dips downward, and at cruise power (the table shown earlier.) From these two points it was clear that the curve did not have exactly this shape, it actually appears to decline even slower than the curve would indicate (ie, the air heats up more). This is a much slower variation than I had initially thought it would be.
If you look at the “air density” in the movie log above, you can see that it quickly changes between two distinct values. These are the “air doesn’t heat up at all” and “air heats up all the way to the engine temp” cases, because I had a curve that quite quickly declined from 100% at near idle to 0% at just a bit higher air flows. With the new curve, the effect is much more gradual.
After refining these measurements on a couple of warmup runs, I think I have this part dialed in pretty well. There’s no longer a noticeable effect of the engine going leaner or richer as the temperature changes.
Well, that was the first tricky thing. However, this has already run on for longer than I thought, so I think I will save the second one for the next post.
As the last post ended, I had to pull out the welder and fix the leak in the fuel pump housing. Even though it’s been a while since I welded aluminum last, the corner weld worked OK. There were a few little snags but after letting it cool down I put the housing under water and pressurized it again and the leak was fixed.
At least the hole I had welded up was fixed… but when I blew into the inlet as hard as I could, I noticed a tiny, tiny stream of bubbles coming from another spot (another one of the trouble spots from welding it together.) That was not an inside corner, though, so it was a quick fix and then I could not get any bubbles no matter how hard I blew. Calling that good!
After putting the pump housing back together, there was one more thing I wanted to take care of. I have been meaning to fabricate a bracket to hold the inline fuel filter in place. I didn’t bother with it for just getting the motor to run, but it’s only held in place by the hoses and it has been vibrating against the top of the cylinder head cover so that definitely needed to get done.
Emulating the approach used to hold the wire harness on the other side of the crankcase breather, I meant to make a bracket out of stainless sheet metal. I had some ~1mm thick stainless (probably 18ga), but I wasn’t sure how to cut it to shape. After reading answers to similar questions, I decided to try to superglue the sheet metal to an aluminum base.
The starting point was to fix the stainless sheet to the aluminum base using superglue. After clamping it for an hour, it seemed to be stuck.
The first thing to do was to drill the mounting holes. That way, if the superglue didn’t hold, I could at least screw the sheet to the base using those holes.
The superglue held up for drilling the screw holes, but when the endmill started clearing the material off the side it didn’t last more than 20s.
This would be the first time the mini mill would cut stainless steel. I was using a 1/8″, 5 flute, carbide endmill from Lakeshore Carbide that’s specially designed for stainless. I’d picked this up a long time ago because I figured it would come in handy at some point. Cutting stainless is kind of hard, because it work hardens and if your endmill isn’t sharp things can go downhill rapidly. (Check out this NYC CNC video, for example.)
Turns out it was good I drilled those holes first, because the endmill didn’t get more than a few cm into the first cut before the sheet popped off. Oh well. I put it back and bolted it down and tried again. I wasn’t entirely happy with this because the two holes are even both on one side so I was afraid the cutting action would lift the sheet.
Halfway through the job. Having the piece bolted down in those two holes turned out to work fine.
Turns out it worked fine. I should have removed the plastic backing before starting, though, because it ended up catching the chips and holding them near the cut. No big deal, but I think it lead to some recutting. The end result wasn’t bad given that this was the first time I’ve cut stainless, but the piece definitely needed deburring.
Job done. Given that it was the first time I’ve cut stainless I think it came out fine, although the piece needed a fair amount of deburring.
I didn’t drill the hole in the tab where the clamp that holds the filter will go at this point, because I wanted to test fit it first. The position doesn’t have to be very accurate, so I mounted the bracket on the engine, held the clamp in position, and marked the spot with a marker. Then I bolted it back on the mill and manually moved it to that spot and drilled another hole.
The final result: the fuel filter held in place with the bracket and the rubber-covered clamp. It’s not super tight, but all we want is to not have it vibrate around. I could have shortened the tab that the clamp attaches to since the hole ended up pretty far in from the edge, but it’s not a big deal.
The clamp had to be twisted a bit to point the filter in the right direction, but this is pretty good. The filter can’t really move front or back (left or right in the picture) due to the hoses, and the clamp holds it maybe 5mm away from the top of the head cover (right above the arrow on the filter.)
So now the filter can’t vibrate around any longer. Nothing fancy, but it should do the job. Time to put the bike back together and get back to tuning!