Category Archives: MegaSquirt EFI

Harness Wiring

It took most of the day, but I wired the throttle body and reconfigured my original MegaSquirt ECU harness.

For the throttle body, I took the shortest two connectors from Buzz’s old harness and remade them, connecting one injector to each output and running separate power leads. When I originally made the old harness, I was not really aware of the needed seals. It doesn’t do much good to have a weatherproof connector without sealing around the wires. So even though the throttle position sensor (TPS) cable was a suitable length, I needed to cut the pins off anyway, so I rewrapped it in yellow heatshrink while I was at it. Astute observers will see an extra cable in the bundle, the one with the white connector. This is the currently unused factory subthrottle position sensor. It costs nothing to leave it there, just in case someone someday writes subthrottle support into MegaSquirt :)

On Buzz’s harness, the intake air temp (IAT) wiring was sort of an afterthought, so while the sensor was on the throttle body, it was connected through the frame harness. This time, it’s right there with the other throttle body connectors. Also, the old IAT and coolant temperature (CLT) were wired to the ECU in a 3 pin connector that shared grounds because those sensors both came in from the frame harness. In this case, one is on the TB harness and the other will be on the engine harness, so they will each have a two pin connector.

New to this lineup is the wiring for the idle air control (IAC) stepper motor. This was one of the modifications needed inside the shell, adding four wires. The pins are essentially randomly connected to the motor itself. Unless I was just EXTREMELY lucky, I will need to rearrange the pins before I can expect the motor to work.

While I had the DB37 shell open, I also made the injector leads into single 14ga wires instead of doubled 18ga.

As for the harness, it’s mostly like it was, except nicer. Some groups of wires are bundled together with expandable sleeving and all connectors have been remade with seals. Finally, connectors were added for the options applicable to this job that weren’t on Buzz, like the EDIS ignition system and a permanently connected wideband exhaust oxygen sensor.

In the old system, the wire labeling was very clear until the wires were handled. Wherever possible, I have relabeled the wires using white heatshrink tubing, written on with fine point Sharpie then covered with clear heatshrink. As I re-redo a couple of the connectors, I will relabel the lines I missed.

More Intake Progress

I have the throttle body adapted to the manifold in what I presume is very nearly final form.

The 95% completed adapter plate is the key to making this very nearly a bolt on conversion.

Sharp observers will see that I drilled the two inside holes incorrectly the first time. I had my template placed wrong. Luckily, there was still plenty of metal to thread into, though running the tap though was tricky. I had to run it forward all the way through and pull the shank of the tap though the back side of the hole. Attempting to turn it out backward made the tap cam into the erroneous hole and jam.

To truly finish the plate, I need to weld on a brace fro the throttle body, media blast the entire assembly and paint it with something fuel-proof, probably epoxy.

As a side note especially for anyone wanting to use this throttle body, get the stock mounting boots and O-rings. In my opinion, scratch fabricating something to fit is just not worth the effort. They are about $20 apiece from Kawasaki [part no 16065-0024]; I paid $20 for the pair on eBay. One online Kawasaki parts house sells the O-ring for $4.71 each, but I found an excellent equivalent O-ring at AutoZone for $0.99 each, FelPro part number 35087. It happens to be for the water outlet for a 91-95 Saturn 1.9L. Beware, however, my AutoZones tend to stock only one per store, so I had to go to two stores.

As for the rest of the intake manifold assembly, I have not placed it on the trike yet, but I have mocked it up in the level mounting position to see what the angle of the all components will be. As luck would have it, the rearward angle of the manifold and the rearward angle of mounting boots are the same, or at least close enough that I can’t tell. It remains to be seen whether I will have the throttle bodies mounted as shown or flipped around so the throttle cable approaches from the front.

Intake progress

Everything came together to give me a couple hours’ time to work on the intake.

As mentioned earlier, my pretty adapter plate was cut before I knew I would be using the stock Kawasaki boots to mount the throttle body. Because of the way the boots bolt on, there is some degree of overhang.

I welded mounting tabs on the plate, drilled and tapped holes for the boots and drilled holes to mount the plate to the manifold. Sadly, my drill creeped a little, so one of the mounting holes doesn’t line up perfectly. It will be easy to address and will not be visible once installed. Oh, well. Such is the way of hand fabrication.

Other than that, it looks pretty good.

Once I have the manifold installed on the engine, I will have some experimental freedom on positioning the TB. The boots impart a small angle, which leans the TB assembly, and the TB itself can be mounted to the boots with the throttle eccentric on either side of the engine. I don’t think it will clear the doghouse if they lean forward, so I’m sure I’ll need to angle them backward. Then it should just be a matter of choosing which side I need the throttle cable to come in.

Buzz Robbed

Well, it took about an hour to remove all but three small traces of the EFI project from Buzz. What’s left is the CLT sensor, securely JB Welded to the cylinder head, the FIDLE LED and the O2 sensor bung, plugged with a sparkplug.

The airbox was as much fun to put in as it was to remove. :)

I began cleaning the stock carburetors late this afternoon. By the time I was tired enough to not want to start another, I’d cleaned three of them. The last one has been completely disassembled and the solvent-safe parts are soaking in Berryman’s Chem-Dip.

Between the Chem-Dip and just judicious cleaning, they look pretty close to new.

Buzz will need a plug for where the O2 sensor was removed, the fuel petcock reinstalled in the tank, the carburetors reinstalled and a battery to be ready to start. After that, a thorough and serious cleaning is in order and he’ll be ready to ride or sell.

If I keep Buzz, I will eventually go back to EFI, but I know now that I will need to use a smaller throttle body and will probably need to built a custom intake manifold. It would probably make more sense to procure a bigger bike and ‘squirt that instead.

Clearing The Cobwebs

After the holidays, the recovery from the holidays, a busy travelling February at work and a bit damage from actual winter here in Texas, I think I can finally get this show rolling again.

I’ve decided that amongst the first things to do is to restore Buzz to stock form, salvaging all the EFI components that I now need for the Dragon trike, especially the O2 sensor. I’ve already robbed the ECU…

I’m still contemplating selling Buzz. I could use the space and the funds, but we’ll see.

Here is a list of several big steps before I’m ready to start wiring the engine and ECU:

1: Put the fuel pump (and fuel gauge sender?) in the tank
2: Drill and tap the adapter plate for the throttle body
3: Install the new manifold to the engine
4: Attach the trigger wheel to the crank pulley
5: Mount trigger wheel sensor; will probably require some sort of mounting bracket

By that point, I’ll be very close to ready to crank the engine.

Good question

A friend emailed me asking for clarification in the “big step” update:

Did you get the stepper motor working correctly? In the vid it went to full open then I wasn’t sure if that was the secondary’s @ 60% or the mains.

I replied:

Yes, working well. At least working as well as I can test with it removed from a running engine.

The video depicts the subthrottle’s opening all the way under MegaSquirt control. This, via the cam, opens the main throttle a bit. MegaSquirt then works it back towards about 60%, by which time the main throttle is closed, as I manually adjust the CLT knob on the stimulator. CLT is megaspeak for coolant temperature, intended to represent the running temperature of the engine.

The engine would (likely) not warm from freezing to 160F in 15 seconds, so the throttle would close in many smaller steps instead of the 3 or 4 big jumps shown here as I manually turn the CLT knob on the stimulator. Also, the actual throttle opening needed for warmup will probably be less than the full amount provided by the subthrottle cam. I wont know that for sure until it’s on the engine and the engine is running

Perhaps obviously, neither Buzz nor the VW have “coolant”, at least not a self-contained recirculating coolant. Sometimes people use oil temp for this, but the engine is usually well into operating temperature before the oil gets very warm. Cylinder head temperature is a better representation of CLT on aircooled engines. On Buzz, I JB Weld’d the CLT sensor between some cooling fins cylinder #2.

I was lucky that the fins on Buzz’s head were spaced similarly to the size of the default MegaSquirt CLT sensor. What’s more appropriate, especially for a VW, is something more like this cylinder head temperature sender which goes under the spark plug like a washer. Trouble is that this is a thermocouple, which produces a small voltage based on temperature. MegaSquirt wants a thermistor, which varies resistance according to temperature.

I may hack an IAT (intake air temp) sensor, which is electrically the same at the CLT, and see if I can get it crammed between some fins.

Another complication with the VW is that you not only have to deal with the cooling tins, but what they represent: cooling air forced over the cylinder head, cooling the fins while you’re trying to read their temperature.

Injector Flow Testing

Many months of sporadic research have not revealed a published flow rate for the injectors on my TB. I have am considering sending them to Witchunter Performance for cleaning (probably unnecessary) and more importantly, flow testing.

Sadly, it will run about $50 to clean and flowtest two injectors (or $30 for flowtest only) and return ship them, but that may turn out to be an investment in time and/or sanity saved.

I could save the money by robbing two injectors from Buzz’s old throttle body. They are known to be 245cc/min injectors. Preliminary experiments with settings on MegaSquirt, however, indicate a pretty low idle pulsewidth, just under 2 mS. Maybe I have something set wrong, but that’s not much margin below the recommended minimum of 1.7 mS.

Robbing Buzz

I have elected to keep Buzz for the time being, but rob the parts I need for the trike.

Thus far, I have only removed the ECU itself, but I’m rapidly approaching a point where I will need the injector harness. The O2 sensor will be soon to follow. I intend to dedicate a work day to removing all the EFI hardware and plumbing from Buzz, even if I don’t yet take the time to reinstall the carburetors. They really should be rebuilt before I do that, anyway.

I still want to get Buzz on the road on EFI and though I want to get the trike on the road first, I know now what I need to do for Buzz. In the mean time, I will also keep my eyes open for appropriate throttle bodies. Really, there are quite a few that would probably work, though all will need some degree of manifold fabrication because there aren’t many 50 horsepower inline fours to rob parts from.

Since I consider this to be a continuing, if delayed, project, I will continue to update this blog as things develop.

A big step that looks small (pun intended)

The snow came, but was indeed light and is mostly gone already. It’s not even supposed to freeze overnight. It’s still cold, just not the major death-to-all-fools-who-venture-outdoors that the news media might prefer. Maybe next time.

I rushed home and, after delays from trying to find and gather stuff (never organize; it’s just not worth it!), I reflashed the ECU with the latest firmware (v2.890), wired to support stepper IAC (Idle Air Control) and connected up to the JimStim.

One of the first things I had to do was some wire mods on the ECU board. By default, the stepper feature is not physically connected on MegaSquirt. The output connections are left unconnected because they can be used for any of several options; stepper IAC is just one of the options. The mod itself is very simple, adding five jumper wires on the bottom of the board.

After lots of experimenting, I also had to perform another minor mod, bypassing some current limiting resistors that are built in to protect the circuit board and wiring from shorts. I guess I will have to just leave my shorts at home.

After that, it was just setting parameters, which was a very much experimental “try this and observe” process. I eventually arrived at some workable values.

One thing to keep in mind is that my throttle body in it’s original Ninja 650 form uses a stepper motor to operate sub-throttles, but there is also a cam on the end of that shaft that operates the main throttle butterfly to provide fast idle. As I discovered experimentally, the subthrottle is completely open when the cam is operating the main throttle as far as it can. The subthrottle is at about 60% open when the cam disengages the main throttle completely. Although the partially closed subthrottle is not expected to affect normal engine operation until the main throttle is more than 60% open (and maybe not even then), I will probably remove the butterflies anyway.

One thing that I found confusing is that I was erroneously thinking in kind of “absolute position” terms. At power up, the ECU moves the IAC 350 steps (Start Value) to ensure it is open all the way. I thought of that as position 350, thinking that the system would then want to close the IAC down to 0 as the engine warms up.

I was wrong.

The two main states of the IAC, power-up and operation, are relative to one another. At power up, the ECU will use the Start Value to open IAC all the way with, in this case, 350 steps in one direction. Once the power-up routine is finished, that position becomes 0 and all temperature points are expressed as steps in the other direction from there. In my case, it then takes 145 steps in the other direction to completely close the IAC, or more precisely, to completely disengage the fast idle cam from the main throttle. It is 0 and 145 that are needed to generate the IAC Steps curve.

The other major value arrived at experimentally is the Time Step Size, basically the time between stepper pulses. The smaller the time, the quicker the motor moves, at least up to a point. I found that it seems reliable at 0.5 mS, which is way down from the default of 2.5 mS. I decided to give it a little margin and set it at 0.7 mS. It moves quickly, smoothly and quietly there.

For the entertainment value, at 5.0 mS, it sounds like an old 5-1/4″ floppy disk drive and at 10 mS, it sounds like a blender stuck on a piece of ice.

Sorry for the poor focus, but here is a bit of Blackberry video of it working.

Finally, it seems that operating the motor in the ‘Always On’ mode, where voltage is left on the motor to keep it stationary, makes the motor and driver chip run pretty hot. That mode is not really needed here, so I am running it in ‘Moving Only’ mode, which only sends power to the motor to effect an actual position change.

So, to summarize, it took me about 5 hours to make MegaSquirt open and close a little motor, but I think it still counts as a big step!

Decembre Loco

I’m sure I wasn’t the only one with a crazy month. It’s been go go go go go. I think the last of it is done.

Well, except for the weather… Expecting a bit of snow tomorrow, though it’s not expected to be much nor to stick around.

Santa thought organizing my tools might help me be good for next year, so he brought me a big rolling tool chest/organizer. I loves me some Santa. Lucky for me, Santa’s pretty cute, too.

Now that I’m not spending every evening getting the house ready for guests or shopping or whatever, I should FINALLY be able to start playing.