How an ECU Works
An engine control unit (ECU) is the small computer that runs a modern engine. Many times every second it reads a set of sensors, decides how much fuel to inject and exactly when to fire the spark, and drives the actuators that carry those decisions out.
01What it actually controls
Think of the ECU as the bridge between what the driver asks for and what the engine can safely deliver. The systems it manages include:
- Air — throttle position and, on turbo engines, boost pressure.
- Fuel — how long each injector stays open.
- Ignition — when each spark plug fires (petrol engines).
- Emissions — the systems that keep the exhaust within legal limits.
02Inside the box
Open an ECU and the parts that matter to a tuner are the memory chips. Three pieces do the heavy lifting:
- Microcontroller— does the maths, runs the firmware (the ECU's operating system), and talks to the outside world.
- Flash memory— stores the calibration: the maps and functions that define how the engine behaves. This "original file" is what tuners read out and modify.
- EEPROM — vehicle-specific data such as the VIN, immobiliser codes and mileage. You generally leave this alone.
- Common file size
- 8 kB – 4 MB
- Diesel ECU example
- Bosch EDC17
- Petrol ECU example
- Bosch MED17
- Diagnostic port
- OBD-II / CAN bus
03Sensors in, actuators out
The ECU can only be as good as what it can measure. Key inputs include airflow (MAF), manifold pressure (MAP), intake air temperature (IAT), throttle position (TPS), coolant temperature, crank and cam position, the knock sensor, and the oxygen (lambda) sensor. From those readings it commands the injectors, the ignition coils, the electronic throttle and the boost control.
04Open loop vs closed loop
At light load the ECU runs closed loop: it watches the oxygen sensor and constantly trims fuelling to hit a target air–fuel ratio — a feedback loop. Under hard load or wide-open throttle it switches to open loop, stops trimming, and simply follows the values baked into its tables (usually richer, for power and safety). Drag the gauge to see what "richer" and "leaner" mean.
Chemically complete burn — what closed-loop targets at light load.
05It's all tables
The calibration is stored as lookup tables (maps): fuel against rpm and load, ignition timing against rpm and load, boost targets, and many more. When the engine sits between two cells, the ECU interpolates between them. Tuning is, at its core, carefully changing the numbers in these tables.
Checksums
Test yourself
Quick check
5 questions. Answer them all, then submit to see how you did.
01Which memory chip stores the tunable maps (the 'original file')?
02In closed-loop operation, the ECU adjusts fuelling based on which sensor?
03When does an engine typically switch to open loop?
04What does the ECU do when engine conditions fall between two table cells?
05Why must a checksum be corrected after editing the file?
Educational use only.This content teaches how engine control systems work. Modifying a vehicle's emissions or safety systems may be restricted by law in your region. Always follow local regulations and work on vehicles you are authorised to service.