Return to Westfield page

This article covers the fitment of a Megasquirt ECU and the process of engine tuning (without rolling road) as applied to a 2 litre Ford Zetec engine with Suzuki 600 GSX-R individual throttle bodies.

This is part of the project to convert my Westfield from twin Weber carbs to individual throttle bodies on a tight budget but incorporating good engineering practice. It would probably help to read through the article (accessible from the Westfield page) on the throttle body conversion first to get some of the background.

The ECU (engine control unit) manages both the fuel injection and the spark ignition on the Zetec engine. It takes signals from a whole variety of sensors and translates this through various algorithms (hard sums) into outputs that trigger fuel injection and sparks. ECU's are available ready built and programmed from a number of suppliers and to a certain extent you get what you pay for. Amidst the choices there is one oddball, and that's the Megasquirt, and I can do no better than quote a few words from the "Megamanual". "The MegaSquirt is intended as an educational project for those who want to learn about electronic fuel injection. It is an experimental Do-It-Yourself programmable electronic fuel injection controller that you build yourself."

Actually they can now increasingly be bought ready assembled and pre-programmed with an initial dataset to get things started, obviously at an additional cost. There are also new developments such as Microsquirt and Microsquirt Sequencer that I would look at if I were starting this project again now.

Anyway I chose the MS1 V3.0 DIY kit in component form, and there'll be more about the assembly later in this article. However, for the moment, having completed the build and tune of an MSQ, I'd like to digress and discuss briefly why, in my opinion, you should or should not buy a MSQ kit. If you're interested in understanding what goes on during the combustion process, if you want to be able to change parameters in the setup and see the effect, if the researching, building, experimenting and developing of your car is as much part of the joy of ownership as driving it, then the Megasquirt, or one of its newer derivatives is for you. If you're looking at the MSQ because it's cheap you'll probably be disappointed as there's the risk if you build it yourself of having to do a spot of troubleshooting if it doesn't work first time, and there's likely to be a longer development and tuning phase once it's up and running. Of course, that's only my opinion. To find out more take a look at the various Megasquirt forums.

Relay board on front bulkhead

In spite of having very little electronics experience I just fancied the challenge of making my own system from the component kits. There are basically three kits to be made. the stimulator, relay board and ECU. Strictly speaking the relay board is an option, but stongly recommended as it provides protection to the ECU and simplifies the connection of the various sensors, injectors, etc. Additionally the Zetec engine in standard form uses its own ignition system module, EDIS 4, and whilst the Megasquirt can be modified to replace it and power the coils directly, it is more common to retain the EDIS 4 unit and use the MSQ in conjunction to control the spark timing.

As an inexperienced pcb solderer I made the relay board first because the components are more robust than the stimulator or ECU, so it formed a good piece to practice on. As well as following all the good tips in the MSQ manuals on good soldering practice, I also invested in a magnifying lens and checked every solder joint as I made it, and resoldered any that did not look just right.

As the ECU itself contains many sensitive electronic components it is good practice is to fix it somewhere inside the passenger compartment, to avoid the more extreme environment of the engine compartment. The relay board, being robust in its construction, can be mounted next to the engine and is shown here on the main engine bulkhead of the Westfield.

MSQ stimulator

The stimulator is the second kit to make. It moves on from the relay board and uses various miniature electronics components, so requires more precise soldering, but it doesn't actually go on the car so is quite forgiving of any heavy handed soldering whilst building up sufficient skill to tackle the ECU. The stim serves to simulate many of the engine and sensor characteristics and is used extensively during the build of the ECU to check and set up various circuits. It can also be used if at some future date you decide to modify the ECU and want to test the revisions before refitting to the car.

The ECU itself follows as the third kit to make. It is certainly an order of magnitude more challenging than the relay board or the ECU. There are several hundred components to fix to the board so it is especially important to be organised and careful in making sure the correct item is selected and soldered the correct way round. It's also important to note that some of the components are static sensitive so the workplace and yourself need to be earthed. I used an antistatic mat and a wrist band attached to a nearby radiator. I would estimate it took me 7 or 8 evenings, a couple of hours each, and was without doubt one of the most interesting and satifying parts of the entire project.

ECU installed in passenger footwell

The ECU really needs to be installed where it's accessible as there's a lot of tuning and datalogging to be done with a laptop connected. The photo here shows it fitted alongside the passenger footwell in the Westie which is ideal as it's a fairly benign environment and also allows easy datalogging either with a passenger operating the keyboard, or with the laptop in the passenger footwell. Incidentally here's a really useful link to an article on making the lead that connects the relay board to the ecu.

I don't plan to go into much more detail on the build, installation or software download of the ECU and sensors as it is much more completely described within the Megasquirt manuals, all of which are available on the web from here. The only point perhaps worth making is that to control ignition as well as fuel injection with an MS1 board also requires the "MSExtra" software downloaded. This can be located here. As I mentioned previously, the MSQ suits people of an inquisitive nature and you can already get a feel from these two sites how much reading matter there is available.

Before I move onto the tuning process I should mention the MSQ forums. These are very useful with many thousands of members from all around the world. Since completing this project I've personally shared information with other MSQ users from the UK, USA and Australia.

Let's get into the process of tuning the engine to run well. There are base maps available from the MSQ forums, and getting the engine started isn't that hard to be honest. However, there is a big issue to overcome, especially with bike TB's, to move on from getting started to running well. The standard fuelling algorithm is known as speed-density, which means the fuel map essentially has rpm along the x-axis and uses inlet manifold pressure as the load indicator up the y-axis. The problem here is that at idle the manifold pressure will be around 45kPa (about half atmospheric), but as soon as the throttle butterfly is cracked open the manifold pressure immediately increases to around 90kPa. Further throttle opening will see the MAP (manifold pressure) increase to 97-98kPa. The problem is that with over 95% of the throttle range being reflected by a change in MAP (which is used to mirror load) of 7-8kPa there is insufficient resolution to create a stable fuel map. Do you remember in the article on installing the throttle bodies I mentioned that we had to remove a second set of butterflies driven by an electric motor as installed in the original bike? Well, these are used to damp this swing in manifold pressure on the bike engine, but it's really impractical to use them in the car installation as the control algorithms aren't available to us. So, we need to come up with an alternative solution (and thankfully there is one).

Within the MSQ code options there is an alternative configuration known as Alpha-N. The manual states it is rarely needed, but it's just what we need for this application. What it does is reset the fuel and ignition advance maps to work from a table with rpm along the x-axis and throttle position (tps) up the y-axis, so it abandons manifold pressure as a load indicator and replaces it with throttle position. This then gives us the resolution we need to use the full range of map values.

Innovate LC1 installation

To tune the engine anywhere close requires a wide band lambda sensor, which will analyse the exhaust gas and calculate the air-fuel mixture. The Bosch type lambda sensor fits in suitable boss in the exhaust manifold, and is connected into a processor such as the Innovate LC1 seen fitted here on the bulkhead of the Westfield which has its output connected directly into the ECU. (Note, the sensor isn't visible in this photo, I tend to only install it when I'm actually doing some tuning.) Linking the LC1 through the ECU has two benefits; one is that the output can be included in the Megasquirt datalog, which as we shall see later enables us to use some smart analytical software; the other is that it is possible to run the ECU in closed loop mode with permanent feedback from the lambda sensor modulating the fuel map as you run (although personally I run mine open loop to save wear and tear on the sensor, and as the exhaust is external it also looks "naff".)

With the engine running the first task is to get an idle. Don't worry about the air-fuel mix, indeed lambda sensors can be a bit irratic at idle anyway, just tweak the idle using the real time tuning function in Megatune until it sounds and feels right. I would expect it to be running numerically a bit rich to feel right. While you're doing this disable the accelerator enrichment by setting the trigger levels as high as they will go - we'll come back to AE shortly.

Next I would get some steady state fuel map cells sorted. I would set the laptop into datalogging mode again within Megatune and go for a gentle 15 minute drive. Find some flat straight roads and just run at some steady engine revs, do not drive too hard or at high revs just for the moment, it's a case of walking before we run, or more accurately I guess cruising before we thrash... There is an autotune function in Megatune which adjusts the fuel map while you're driving, but whilst I stand to be corrected I'm not at all sure this works well in Alpha-N mode, I certainly didn't get on with it very well. (Note, as much as possible run without any accelerator enrichment right now, that's the next step after getting the steady state sorted.) What I would recommend is to save the datalog and then open it in Megalogviewer, another piece of software available from the Megasquirt website. You may have to make a small configuration setting in MLV to get it to read in Alpha-N mode, but it's quite easy, just set the y-axis option to TPS absolute value. When this all looks to be working correctly and you can see some sensible graphics, open the VE analyser and run with your datalog against a target suitable AFR table. (There are good examples available on the MSQ forums, but setting everything to 13.0 at this stage won't be a bad place from which to start.) Save the calculated fuel map, load it into the ECU, and repeat the process expanding the rev range a little bit at a time. Repeat this process five or six times and you'll be approaching a decent fuel map.

The remaining task is to set the accelerator enrichment. I would strongly recommend using rpm-based AE. Whether you trigger with TPS or MAP rate of change depends on the quality of MAP trace you see on your datalog. If the MAP trace is smooth and responds well to throttle movement I would use that to trigger the AE. The reason is that the rapid increase in MAP just off idle that scuppered our opportunity to run in speed-density mode actually gives a really crisp trigger for AE. On the other hand, if the MAP trace is heavily corrupted by individual cylinder pulses, use the tps rate of change to trigger AE. Setting the values is really a bit of trial and error, you shouldn't need too much as using the tps as the load indicator to drive the fuel map takes into account some of the enrichment requirements. The one thing I wouldn't worry about is a really crisp throttle blip when you're standing still. I know it sounds great in front of your mates but you rarely use it for driving. Throttle blipping is important but on the road it's rarely starting at idle speed, it's much more important to have the throttle blip right at typical gear change speeds. The reason I suggest not worrying about this is that the large change in manifold pressure just off idle means you will need a great chunk of fuel to keep pace with the change in air volume, and to get this right will take 2 or 3 of the 12 available fuel map rows - save them for the range of driving conditions that actually matter. I also know of some of the best proprietary ECU's which purposely limit the idle blip for engine stress reasons, not allowing the engine to accelerate rapidly until there's some oil pressure available.

Following this process should get you close to running well fairly quickly. Getting it just right is then a matter of taking a number of 20-30 minute runs, datalogging, and then studying the traces, especially AFR (air/fuel ratio) and then tweaking individual cells, or AE settings, to get it running fairly constantly around the 13:1 region. Don't ignore the overrun fuel map cells either, that's the bottom row at high revs. If you can set these so the AFR doesn't exceed around 16:1 on overrun all the popping and banging that seems commonplace in performance engine conversions disappears; it's only usually a sign of the mixture going excessively weak. (It's often mistaken as being rich, but what happens is that by going very lean combustion doesn't occur in the cylinder, unburnt fuel gets into the exhaust manifold and ignites there. It's not that good for silencers either.).

I'd be keen to learn of anyone else's experience with the Megasquirt and to include some more notes in this article. The more information the better for the budding engine tuner.

Well done if you've reached this far, and good luck!

Westfield on rolling road

Update - July '09

I wrote most of the above notes early in 2008 when I did most of the work on the injection system. In July '09 I decided that to fine tune the engine I would have to arrange a rolling road session. So, I set off somewhat nervously to Jamsport in Northampton, with every rattle sounding 10 times worse than usual, convinced this would be the end of the car with most of the engine, gearbox or axle being scattered over Northants. Anyway, Jamie (the Jam of Jamsport...) set the car up on the rolling road, I gave him 2 minutes tuition in the real time tuning function in megasquirt, and off he went...2 1/2 hours on the hottest day of the year. The end result was improvements in max power and torque (now 174bhp @ 6450 rpm, 152 ft-lbs @4850 rpm), plus cleaner running throughout the range, a cleaner accelerator blip, and better economy. Remember, I have done nothing with the head or cams in this engine other than clean them up and build the engine carefully. So, from the standard 130hp for this engine as installed in the Mondeo I have gained 44 bhp purely by improving the induction and exhaust. I reckon that's pretty impressive.

Rolling road power plot, July '09

...and here's the proof...what is good about this is the flatness of the torque curve and the linearity of the power curve, which gives the car excellent driveability on the road.

Return to Westfield page.