Oxygen sensors and other engine sensors
9 minutes
Estimated lesson time
Intermediate
Builds on earlier levels
How the ECU checks every burn with a sensor in the exhaust, and the other sensors it relies on to run the engine
Builds on: What an ECU does, Catalytic converters
What it is
The ECU can’t see inside the engine. Everything it knows comes from sensors, which turn something physical, such as a temperature, a pressure or a position, into an electrical signal. What an ECU does showed how it uses them. A typical modern engine has 20 or more.
Most of them tell the ECU what’s about to happen: how much air is coming in, where the pistons are, how warm the engine is. The oxygen sensor is different. It sits in the exhaust and tells the ECU how the last burns actually went, so it can correct its own mistakes. It’s also called a lambda sensor, after the lambda number in Air-fuel ratios.
Most cars have two:
- The front sensor, also called upstream or sensor 1, in the exhaust manifold or just after it, before the catalytic converter. This is the one the ECU uses to set the mixture.
- The rear sensor, also called downstream or sensor 2, after the converter. It checks that the converter is working.
Engines with two banks of cylinders, such as a V6 or V8, have a pair for each bank, so four in all.
How it works
The front sensor flips between rich, about 0.85 V, and lean, about 0.05 V, as the ECU nudges the fuel either side of 14.7:1, one swing a second. The converter’s stored oxygen evens the swings out, so the rear sensor reads a steady 0.6 V or so, and 98% of the harmful gases are cleaned up.
- Front sensor
- 0.85 V
- Rear sensor
- 0.61 V
- Fuel trim
- +0%
The demo shows both sensors and graphs their voltage over the last four seconds. The front sensor here is the switching kind, called a narrowband sensor.
- It only says rich or lean. A switching sensor gives out about 0.85 volts when the mixture is rich and 0.05 volts when it’s lean, and it flips sharply right at 14.7:1. It can’t say how rich or how lean.
- So the ECU keeps nudging. It adds fuel little by little until the sensor flips to rich, then takes it away until it flips to lean, over and over. This is called closed-loop control. The mixture swings a tiny amount either side of 14.7:1, about once a second, and you can see the front signal switching.
- The converter evens it out. As Catalytic converters explains, the converter stores oxygen when the mixture swings lean and gives it back when it swings rich. So the gas reaching the rear sensor is steady, and it reads about 0.6 volts.
Now slide the air leak up. Air is getting in after the airflow sensor, so the ECU doesn’t know about it, and the mixture goes lean. The front sensor sees it, and the ECU learns to add more fuel. This correction is the fuel trim: at a 15% leak it’s +15%, and the sensors look normal again. Past 25%, the ECU won’t add any more. The front sensor reads lean all the time, and the ECU stores P0171, system too lean.
Press Lazy sensor. An old sensor answers more slowly, so the ECU overshoots each way before it hears back. The mixture swings further and more slowly, the converter can’t quite keep up, and the ECU, which times the swings, stores P0133, slow response.
Then press Worn converter. It has lost most of its stored oxygen, so the swings go straight through and the rear signal copies the front. The ECU compares the two signals and stores P0420, catalyst efficiency below threshold.
The model is simplified, but the numbers match the earlier lessons.
Inside an oxygen sensor
A switching sensor’s tip is a small thimble of zirconia ceramic, coated inside and out with platinum. The outside sits in the exhaust; the inside is open to fresh air, which gets in through the sensor’s wiring. When it’s hot, the zirconia lets oxygen pass through it, and the difference in oxygen between the two sides makes a voltage. Lean exhaust has plenty of oxygen, much like the air inside, so the voltage is low. Rich exhaust has almost none, so the voltage is high.
It only works above about 300°C (572°F), so modern sensors have a small heater inside that brings them up to temperature within a minute of starting. Until then, and whenever you floor it or lift off, the ECU runs in open loop, following its maps without checking.
Most new petrol cars use a different sensor at the front: a wideband sensor, also called an air-fuel ratio sensor. It has a second cell that pumps oxygen in or out of a tiny chamber to hold it at 14.7:1. The current that takes tells the ECU the exact mixture, anywhere from very rich to pure air, so it can correct it in one go instead of nudging. Tuners fit the same kind to set up an engine, and diesels use them because they always run lean. The rear sensor is usually still a switching one, as it only needs to check the converter.
The other sensors
These are the main sensors on a modern engine, and what the ECU does with each:
- Crankshaft position. Reads a toothed wheel on the crank, with a gap where a couple of teeth are missing to mark the top. It gives the engine speed and exactly where each piston is. It’s the most important of all: without it the ECU can’t time the fuel or sparks, so the engine won’t run.
- Camshaft position. Tells the ECU which stroke each cylinder is on, as Camshafts and valve timing explains, and where the cams are for variable valve timing.
- Airflow sensor. A heated film in the intake that measures how much air is going in, as How an engine gets air shows.
- Manifold pressure sensor, or MAP sensor. Measures the pressure in the intake manifold, which tells the ECU how hard the engine is working, and the boost on a turbo engine. Some engines use it instead of an airflow sensor.
- Air temperature sensor. Colder air is denser, so the ECU allows for it. It’s often built into the airflow sensor.
- Coolant temperature sensor. Tells the ECU how warm the engine is, so it can add extra fuel and raise the idle when cold, and switch the cooling fan on when hot.
- Throttle and pedal position sensors. Two of each, so the ECU can spot a fault, as Throttle bodies and electronic throttles explains.
- Knock sensor. A small microphone bolted to the block that listens for knock, so the ECU can fire the sparks later, as in the octane lesson.
- Fuel pressure sensor. Measures the pressure in the fuel rail, especially on direct injection engines, which run at very high pressures.
- Oil pressure sensor or switch. Lights the oil warning light if the pressure drops.
Diesels and some turbo engines add exhaust temperature sensors, a pressure sensor across the particulate filter to tell when it’s full, and NOx sensors to check the AdBlue system is working.
What goes wrong
- Oxygen sensors wear out. Over time they get slower and coated in deposits, so the mixture control gets sloppier and fuel use creeps up. Many last 100,000 miles (160,934.4 km) or more, but a slow one may set P0133 long before it fails completely.
- Contamination. An engine that burns oil, or leaks coolant into the cylinders through a failing head gasket, coats the sensor’s tip. So do some silicone sealants and leaded fuel.
- Heater failure. If the heater fails, the sensor takes much longer to start working, and the ECU stores a heater code such as P0135.
- Exhaust leaks. A leak before the front sensor lets air in between pulses. The sensor sees the extra oxygen and reports lean, so the ECU adds fuel and the engine actually runs rich.
- Seized sensors. They sit in hot exhaust for years and rust in. A special slotted socket, a warm exhaust and penetrating oil help get them out without stripping the thread.
- Crankshaft sensor failure. The engine cuts out or won’t start, often only when hot, then restarts after cooling down.
- A wrong coolant temperature reading. If the sensor says the engine is cold when it’s warm, the ECU keeps adding warm-up fuel, so the engine runs rich, uses more fuel and may be hard to start when hot.
- Don’t just replace what the code names. A fault code tells you what the ECU saw, not which part is broken. P0171 means the oxygen sensor saw a lean mixture; the cause is usually an air leak, a dirty airflow sensor or low fuel pressure, not the sensor itself. A reader that shows live data, including the fuel trims, helps you find the real cause.
Modifications
- Bigger intakes and airflow sensors. A wider intake pipe changes how the airflow sensor reads, so the ECU gets the air wrong. The fuel trims hide small errors, but a big change needs the ECU’s airflow table adjusted.
- Wideband gauges. Fitting a wideband sensor and gauge is one of the first things a tuner does, to see the real mixture at full throttle, where the ECU isn’t checking.
- Sensor spacers and switching off the rear sensor. Spacers that pull the rear sensor out of the gas flow, or software that ignores it, are used to hide a removed or failed converter. Both are illegal on a road car.
- Moving sensors. A new manifold or downpipe has to keep the oxygen sensors in the right place. Too close to the end of a pipe, they read air drawn back in from outside; too far from the engine, they’re slow to warm up.