Squirt and Spark : How Your ECU Works

By Andrew Comrie-Picard

There’s a photo of me as a six-year old in my family’s driveway. The look on my face is one of extreme concentration – I have a stethoscope in my ears and I’m hunched over the V12 that lived (and died) under the hood of my father’s Jaguar. He is beside me, instructing me on how to adjust the four Zenith carburetors for balance by listening to the subtle changes in pitch at the air intake of each one. Didn’t make the thing any more reliable, of course. But it made you feel you’d done something anyway.

Over the last 26 years I’ve figured out how most of an automobile works, and even got good enough at balancing the SUs on my own various MGs and early Jags that I can take care of it while my girlfriend pops into the loo at the filling station, which is about how often you have to do it.

But then they went and invented fuel injection, and then engine management that unites fuel injection with engine ignition, and then they went and packed it in a little metal box. All the magic little set screws and plungers and orifices and weighted distributor advances and points gaps are set into a microchip, and you can hardly tell which part to hold the stethoscope to.

Unless you’re one of the few who really understand how a modern Electronic Control Unit (ECU) works, it is probable that you subscribe to Arthur C. Clarke’s notion that “any sufficiently advanced technology is indistinguishable from magic.” If so, read on.

The Computers Are Just Smarter

Modern engine management is not rocket science. Its just doing the same thing that carburetors and distributors used to do, but better. We know (and the computer is programmed with) the ideal amount of fuel to mix with a certain amount of air at various engine speed and load levels. In The Olden Days the venturis and jets in your carburetor used to approximate this.

We and the computer also know when the plugs should spark to ignite this mixture for best burning at different speeds and loads. All of this was previously the job of your distributor and some kind of advance mechanism, and again it was approximated. Looking at how approximate the ignition and mixture used to be, it’s remarkable that old cars ran at all. Certainly they ran very inefficiently.

Now, thanks to ECUs, we are in a halcyon era of powerful engines with flexible powerbands and relatively low emissions and high fuel efficiency. That Jag of my father’s was the fastest sedan in the world when it was introduced. It put out 250hp from a 5.3 liter V12. Now you have 250hp in a 2005 Subaru Legacy with a 2.5 liter 4-banger. Internal combustion hasn’t changed; the computers have taken over.

It’s All About the Sensors

Electronic engine management is all about getting accurate information from the engine’s environment and then sending out accurate signals to the control mechanisms of the engine. In a typical system you have the following input sensors:

1. throttle position of the accelerator
2. air temperature in the intake manifold
3. air pressure (or weight of the air) in the intake manifold
4. a measure of the residual oxygen in the exhaust manifold (the O2 sensor)
5. engine rpm
6. camshaft position
7. crankshaft position
8. engine load, usually as a function of manifold vacuum pressure
9. engine coolant temperature
10. about a zillion other things, like “knock” sensing, battery voltage, ambient air temperature, and whether Hoobastank is still on the Billboard top 40.

The computer simply takes all this data, compares it to data about optimum spark and fuel volumes for different conditions, and controls how much fuel to inject and when to fire the spark plugs.

Modern Mixture and Maps:

We know that there is an ideal air:fuel mixture ratio for each type of fuel – for gasoline this is 14.7 weight units of air to 1 weight unit of fuel, a so-called “stoichiometric” mixture. In principle, this is the mixture point at which all fuel injected will combust with all the gases in the ambient air. However the combustion is rarely perfect – an oxygen may never meet a hydrocarbon on the other side of a crowded cylinder of dancing vapours – so a somewhat leaner mixture (around 16:1) will ensure that excess air will gather up all of the hydrocarbons in the fuel and so will produce fewer emissions and better fuel efficiency. On the other hand a richer mixture will ensure that all the air that can be moved into the engine will combine with hydrocarbons in the fuel and so for maximum power you actually want this mixture to be richer – closer to 12:1. Since you’re more concerned with power under hard acceleration and less concerned on the overrun (when you lift the throttle), the computer can target leaner and richer mixture ratios depending, literally, on how hard you stomp on the throttle.

Maintaining the ideal mixture is the function of your “fuel map” and it determines how much fuel the ECU will inject during each cycle of the engine. Essentially the map is a compromise to give you power when you want it, keep emissions as low as possible, and all the time keep the mixture within safe parameters to avoid damage to the engine.

How much Air?

Before it can determine how much fuel to squirt in, the main challenge for the ECU is to know what weight of air is in the intake manifold and getting sucked (normally aspirated) or pushed (turbo or supercharged) through the intake valve. Modern ECUs measure this in one of two ways: either by taking the pressure and temperature of the air in the manifold and calculating Manifold Absolute Pressure (MAP), or by measuring the weight of the air (Mass Air Flow or MAF) as it moves into the intake past a heated wire filament across which the ECU can measure electrical resistance. Older systems used other means, including various flaps and pulleys (I’m not kidding) to measure airflow. Now most production cars use MAF, although I use MAP in my rally car and some manufacturers, including Subaru, are moving back towards this.

How Much Fuel?

The main mixture job of the ECU is to control the injectors. Fuel injectors are little spray nozzles that can be snapped open and shut by an electrical charge: the amount of time they’re open, combined with the pressure of the fuel coming in and the size of the injector, determines how much fuel will be injected. In “multi-point” fuel injection systems there’s an injector for each cylinder, while in more basic systems (“Throttle Body Injection”) there’s just one for the whole intake.

So what determines how long the injectors stay open? The ECU senses the weight of the air, the rpm of the engine, and compares this to the data “map” it contains about ideal mixture for each load-rpm condition (see “base fuel delivery” graph). It then decides how long to open the injectors for and sends an electrical signal to them for the right amount of time. At idle the injectors open for just a millisecond – long enough to keep the engine ticking and no more. But mash the throttle and they go towards the maximum “duty cycle” – theoretically they could stay open 100% of the time but generally are engineered to give full throttle by being open about 80% of the time – that is, 80% of the time that it takes the crankshaft to go around twice. Thus is mixture in the modern engine determined.

When to Spark?

As engine speed increases, you need to ignite the mixture in the combustion chamber progressively earlier to get most efficient ignition. Note that the “explosion” in each cylinder is really a very fast fire and that the “fire front” moves through the mixture until burning is complete. The earlier you can spark the mixture, the more power you’ll get as there will be more time to burn all the vapour before the exhaust valve opens. But if you fire the spark too early, you will end up with the explosion completing too soon and you get an uneven leading edge to the burn – effectively a separate explosion – called a “detonation.” This may allow a “hot spot” of the explosion to hit the top of the piston (normally it is protected by a barrier of other gases at the edge of the explosion), and this is what a “knock” in the engine is. All engines knock somewhat, actually, but if you don’t keep it within an acceptable level you will burn a hole right through the piston. Don’t ask me how I know.

Higher octane fuel, by the way, burns more consistently at the leading edge, which is why for most race applications we use fuels with an octane above 100 while you might use 87 in your street car, and why we can advance the timing and run higher compression in the race cars. Lead additives in the fuel prevent detonation, but as you know this is mildly toxic and so we don’t use it any more. Of course blowing engines is mildly toxic, too.

So for ignition, you have a second “map” that determines when to fire the spark plugs, based again on engine rpm and load (see “base ignition timing” map). In many four cylinder engines you have two coil packs and each has two plugs attached to it – when the ECU determines it’s the right time to fire one of the plugs it sends current to one of the coil packs and two plugs actually fire, although one is redundant and has no fuel to ignite (creating a “waste spark”). It’s just cheaper and more reliable than having four individual coils or (horror!) a distributor.

Other Stuff:

So the fuel delivery and spark timing maps are the real essence of what the ECU is doing for you all the time. Thousands of times per second the ECU is calculating how much fuel to deliver and when to spark.

But that’s not all. For example, it knows when the engine is cold and it delivers more fuel and adjusts the spark for smooth running until the engine warms up. It also knows if the engine gets too hot and it can drop into “limp mode” to get you home by cooling the explosions with a richer mixture and later spark.

It also has two other very important sensors that adjust the fuel and spark maps constantly. The first is the “oxygen sensor” in the exhaust manifold, which sends information about how much oxygen is left over after the explosions in the engine. The computer takes this data and constantly adjusts the fuel mixture to keep this near maximum efficiency (14.7:1) or maximum power (12:1) depending on settings. Running in this mode is known as “closed loop” as the ECU is constantly adjusting itself to get the desired exhaust. There are a couple of interesting consequences to this: it self-adjusts for different qualities of fuel, and (this is cool) it even learns to change the entire fuel map for the car as the engine wears over the life of the car. But the sensor itself is a rather specialized device and deteriorates over time, which is why the #1 emissions-test failure is a faulty oxygen sensor. Now you know.

The second common and important feedback sensor is a little microphone attached to the engine block that can sense “knocking” or detonation from the cylinders, allowing the computer to adjust the timing backward (later) to prevent damage to the pistons. A few knocks per 100 cycles will be OK. More is bad. Note that there can be problems associated with this sensor: the Mitsubishi 4G63 engines especially in Galant VR4s and Talons can be afflicted with a “phantom knock” even when the engine is running properly but goes into limp mode anyway, sapping power. Basically the microphone is picking up noise from somewhere else in the engine and sending it to the computer as a knock; many Mitsu people find that the valve lifters are the source of the noise. Similarly, in a rally car we have constant barrage of noise from rocks on the chassis and this can be picked up. As a result, I don’t have a knock sensor.

Opening Pandora’s Box:

So now you have a dangerous amount of knowledge and want to completely remap your Honda, right? Be careful. It’s not rocket science, but it’s not model rocketry either. Still, there is good reason to start fooling around. Modern cars are mapped to provide a reasonable tradeoff between fuel efficiency, emissions, and power. If you care more about one of these things you can tune the engine more aggressively towards that. I’m going out on a limb and guessing you want more power, right?

Basically your typical aftermarket remapping is about richening the mixture throughout the range towards maximum power (12:1) and away from maximum efficiency (14.7:1). You’ll use more fuel, but get more grins. Also you’ll get more emissions, not just because of the residual hydrocarbons in the exhaust, but because this will cool the exhaust and catalytic converters are designed to operate within a very narrow temperature window.

In terms of timing, the factory settings are very conservative, presuming you will run rotten fuel sometimes and that you want the engine to last for a while. If you’re committed to running higher-octane fuel all the time and putting your engine at some risk of detonation, then you can advance the timing a bit and get more power.

How much more power, and how to get it?

Basically you have four options if you start playing with your ECU: 1. replace or “reflash” the memory chip that contains your fuel and timing maps. Normally you remove the ECU and send it away for this to be done; some devices now exist for you to do this on your own. ($50 to $800) 2. Put a “piggyback” additional board between the ECU and the sensors/injectors/coils that modifies the signals to and fro and allows you to effectively remap the engine, although you’re limited by some of the original ECU’s parameters. ($500 to $1200). Note that you can reflash the chip at the same time to open the limiting parameters, and I’ve seen 450hp Evos with this system. 3. Replace the entire board in your original ECU case and plug the factory wiring harness directly into it (a “plug-and-play” board) that offers full programmability. This is what I use in my rally car. (to approx. $2000) Or 4. replace the ECU with an aftermarket one that will require you to significantly rewire your car (to approx. $2000).

But the real challenge is not how to get programmability. It’s what to program. Either you should rely on another tuner’s wisdom and use their maps (Dinan, Cobb, Vishnu, etc.), or you need to get on a dyno and burn up some tanks of fuel to find out what mixtures and timings really produce the most power and torque for your particular engine on your particular fuel. It’s a time-consuming and precision process and requires some experience. The bottom line is what you see on the horsepower and torque curves from the dyno.

There’s another device you need, though, and I’m happy to report that it is now available to the common man. You need to get information from that oxygen sensor in the exhaust so that you can monitor mixture while you’re tuning for power – too lean and you’ll start blowing engines; too rich and you’ll lose power (and, at the extreme, start blowing engines). Although you can get little LED readouts for your dash that appear to tell you about mixture they’re not accurate enough and you really need a digital device that can log the mixture against load, rpm, throttle position, etc. Until recently, the main options were air-fuel meters available from MoTEC ($2200US) or Autronic ($1800US) which is a serious investment.

But there’s a new product on the market that I’ve used and I love: Innovate Motorsports (www.innovatemotorsports.com) now makes an affordable fully digital and data-logging air-fuel meter that retails for $349US. I’ve used it to tune my Evo already and I find it perfect for the job. Install the sensor in your exhaust and power the device up and you are already looking at the A/F ratio (or “lambda”). Wire in up to five additional inputs and you can watch them on screen as you tune, or log them for up to 44 minutes in the device itself and download it later (great for road tests). Also you can take the analog output signal and feed it to your ECU, as I’ve done, so that you can see A/F ratio against all the other engine parameters you can monitor by hooking up directly to the ECU. I really like this device, and won’t tune without it now. I recommend it strongly. It won the SEMA award for “Best New Product – Performance and Racing” this spring and I can see why.

Conclusions:

Any questions? There will be an exam on Friday. Or rather an exam on the weekend, when we go out racing and see who has more power and who blows his engine. Now you wish you’d studied, right?

The bottom line is this: ECUs use a group of sensors to gather information about engine running conditions and use two maps – one for fuel and one for spark – to control how long to open the injectors and when to fire the spark. Playing with these yourself is entirely possible, although it requires some knowledge to get the best out of it. Note that any remapping is likely to cause you to fail emissions tests and void the warranty of your car, so you’ve been warned. But who’s thinking about that when you’re putting out 450hp from 2 liters, right? Best of all: no stethoscope required.

Recommended Reading: Forbes Aird, Bosch Fuel Injection Systems, HP Books 2001.

For complete version of this article visit Inside Track News