Tuning · 3 min read · 2026-09-18

How an ECU hears knock, and what it does about it

Knock sensors are microphones bolted to the block. How the engine controller listens for detonation, why it acts per cylinder, what timing retard is protecting against, and where the protection runs out.

Every article on this site about logs comes back to the same column: timing pulled for knock. This one is about the machinery behind that column, because understanding what the ECU is doing makes the number in the log mean something.

What knock is

In a normal combustion event the spark lights the mixture and a flame front crosses the cylinder in a controlled burn. Knock is the part of the charge ahead of that flame front igniting on its own, from pressure and heat, before the flame reaches it. Two flame fronts collide, the pressure spikes, and the cylinder rings like a struck bell. At low levels it costs a little power and nothing else. At high levels it hammers the piston crown, the ring lands and the bearings, and the damage is cumulative.

The sensor

A knock sensor is a piezoelectric microphone screwed into the block, usually two on a four-cylinder engine. It turns vibration into voltage. The block is a noisy place, so the ECU does not listen all the time: it opens a window just after each cylinder's spark, when knock would occur, and filters the signal for the frequency range knock produces in that bore size. What is left is compared against a running estimate of the engine's normal noise. Louder than normal in the window is knock, attributed to the cylinder that just fired.

The response

The ECU retards that cylinder's ignition timing by a step, typically a degree or two, on the next cycle. Less advance means the pressure peak comes later and lower, and the charge ahead of the flame has less time under pressure to ignite itself. If the noise stops, the ECU gives timing back slowly, a fraction of a degree per cycle, and the process repeats. This is continuous, per cylinder, and invisible from the driver's seat except as a car that feels slightly less eager. In a log it appears as the timing-retard columns.

Why it runs out

The response is reactive: the ECU pulls timing after it hears knock, not before. A single knock event is harmless; the system is designed around the assumption that it will hear a few and correct. What it cannot survive is knock so severe, or so continuous, that the retard it can apply is not enough: a lean mixture under high boost on low-octane fuel, on a hot day, with the file already asking for more timing than the fuel supports. Each of those factors on its own is inside the margin. Stacked, they can exceed the range the ECU has to pull, and that is when the sensor is describing damage rather than preventing it.

What a tune has to respect

A calibration sets the baseline timing that the knock control corrects from. Set it near the fuel's limit and the ECU spends its whole range holding the engine back on a bad day. Set it conservatively and the ECU has room to work. A Stage 1 written for the declared fuel, checked against a log that shows small and occasional pull, is a calibration that left the knock control its margin. The pattern to fear in a log is not a degree of pull here and there; it is pull everywhere, growing, which means the baseline is wrong.

The simulator below models the same thing without the microphone: a knock index that climbs as timing, boost and mixture push toward the limit, and an engine that pays for it. The factory system is subtler and quicker, and it is the reason a stock car survives a tank of bad fuel. It is not the reason to give it one.

Try it

The simulator, right here

Everything above can be tried on the model below. It is educational: it will not tune your car, but it shows why a tuner does what a tuner does.