Engine Control Units (ECUs)
[ June 11th, 2008 ] By: Charles Smith Posted in » Technical Articles
ECUs are black boxes that make your fuel injected engine run. They are commonly microcontrollers that take some inputs in, compare those to a table and spit out an output or two.
What are those inputs? Basic ECUs look at only a couple things, including: Air available (MAF/MAP) and Engine RPM. The Air Available is related to the throttle position. The Engine RPM equates to how long the valves are open for and combined with the air available the computer can figure out how much air is entering the cylinder. With that key piece of information the ECU can then figure out its output.
What is the output? We are still considering the basic ECU here. It has one output, and that is the amount of fuel it should spit into the cylinder/manifold. Really, it is even simpler than that. The output is just how long the fuel injector fires for.
But of course we can make the ECU do way more than manage a single fuel injector. Now they commonly control 4+ fuel injectors and at least the spark plugs. We could also slap on a boost control unit for any turbocharger that is in the car. While we are at it let us add variable valve timing to the mix and control that with the ECU. We could even make it more accurate by adding a bunch of inputs…like:
- Oxygen sensors on the exhaust
- Many temperature sensors (intake, post turbocharger, engine block, oil, exhaust)
- Throttle Position sensors
- Boost Pressure sensors
- Fuel Pressure sensors
- Valve sensors
- etc…
All of this in a pursuit to more accurately control the amount of fuel we inject into each cylinder at a given time. Some of the inputs determine how much air is available, while others are guessing at how much power the driver really wants. And one important input is watching to see how wrong the ECU’s previous decision was, so it can self correct (hint: we breath what it looks for).
However, what I find funny is that all the ECUs I have ever seen achieve this by looking up fuel injector times in a table. What takes a human mind ages to do succesfully a computer can do in practically an instant. But with every input we add a dimension to the tables. This makes me wonder what the future of the ECU is. Will we start making simple mathematical formulas to take these inputs and quickly produce an output? Maybe we will augment the result from the table with some formulas, but I don’t know yet.
What I do know is that, as computers get faster and more robust, so do automotive microcontrollers. This will allow us to continually add to the giant black box we call the Engine Control Unit. The more we add to it, the better off cars will be. We can give even more control to the driver (not likely) and allow them to choose economy or performance, or maybe even torque curves and rpm limits (Variable Valve Timing).
Hopefully I was able to get you somewhat interested in ECUs. Maybe I’ll be able to start a series on ECUs much like Mark’s Turbocharger series. Perhaps even one day, work on my own custom ECU for a rally car.

July 6th, 2008 at 7:30 pm
Unfortunately I forgot to mention a critical sensor. the Cam sensor. Otherwise how would it know when to inject fuel :(
August 13th, 2008 at 1:21 am
This concept is called Space-time trade off and it is a fundamental concept of computer science. The idea of using a lookup table in an ECU biases to using more space(computer memory) that cpu time. That means use more space and save more time. These tables are generated using simple formulas so theoretically the ECU is capable of calculating the values on the fly but that takes more time (which means faster, more expensive processors to keep up with the engine.) With the cost of memory continuing to fall, it is much more effective to pre-generate massive tables (By massive I mean a few megabytes) for every conceivable condition and store them on large chips rather than trying to put expensive heat, power, and cash consuming processors in modern ECUs.
However I can imagine there is a market for a more flexible ECU, maybe for after market application that can accommodate additional tasks like boost, vvt, and other technologies that require computation. Something like this would require a powerful processor because it can’t anticipate what devices that it will be controlling.
August 13th, 2008 at 2:21 am
Yes sir it is. It is much cheaper and easier to use the memory in place of a ‘Real Time’ unit.
The more flexible ECUs are there. Mega/Microsquirts is an opensource version that does a bit of neat stuff. Autronic, GReddy, etc… are all adding to the wonderful world of ECUs.