Knock Sensors and Knock Control Explained: A Workshop Guide

If a turbo petrol engine feels flat on a hot day, or a fresh remap pulls well on the first run and then loses power, the knock control system is often the reason. It is one of the quietest systems in the ECU, yet it decides how much ignition advance the engine can actually use. This guide covers knock from the workshop point of view: what causes it, how the piezo sensor picks it up, what the ECU does with that signal, and how to tell genuine knock from a wiring fault or mechanical noise.

Detonation in plain terms

After the spark fires, a flame front spreads through the combustion chamber. The mixture that has not yet burned is squeezed and heated by the rising pressure. If it gets hot enough, it self-ignites before the flame reaches it. That sudden, uncontrolled burn creates pressure waves that make the chamber ring like a bell. The extra heat and shock load attack piston crowns, ring lands, head gaskets and bearings, which is why sustained heavy knock can destroy an engine quickly.

The usual causes are easy to remember because they all make the end gas hotter or more compressed: too much timing, too much boost, hot intake air, a lean mixture, carbon build-up, overheating and fuel with an octane rating below what the calibration expects.

Do not confuse detonation with pre-ignition. In pre-ignition the mixture lights before the spark, from a glowing deposit or, on downsized direct-injection turbo engines, from oil and fuel droplets at low rpm and high load. Ignition retard cannot cure that, so manufacturers combine oil specifications, injection strategies and load limits to deal with it.

Inside the sensor

The typical knock sensor is a small piezoelectric accelerometer with a centre bolt hole. A seismic mass sits on a piezo ceramic element. When the engine structure vibrates, the inertia of the mass loads the ceramic, which produces an alternating voltage. The sensor is self-generating, so it needs no reference voltage.

Early systems used resonant sensors matched to a single frequency. Today broadband sensors are the norm: they respond across a wide frequency band and the ECU chooses which frequencies to evaluate. The knock frequency of an engine depends mostly on its bore diameter, so a large-bore engine knocks at a lower frequency than a small-bore one.

Because the sensor measures vibration through its mounting, the contact face must be clean and flat and the bolt torqued exactly to specification. Too loose and real knock is missed. A bad seat can also distort the signal.

Cross-section diagram of a piezoelectric knock sensor with seismic mass, piezo ring and mounting bolt
Inside a piezoelectric knock sensor (schematic). Original diagram.

Signal processing in the ECU

The raw signal contains every mechanical noise the engine makes. To pick out knock, the ECU:

  1. opens a measuring window for each cylinder, a few degrees of crank angle after top dead centre on the combustion stroke, using crank and cam position to identify the cylinder;
  2. passes the signal through a band-pass filter set to the engine’s knock frequency;
  3. rectifies and integrates it to give a single knock intensity per combustion;
  4. compares that intensity with a learned noise reference for that cylinder and operating point, and flags knock when it exceeds the reference by a calibrated factor.

The per-cylinder reference matters because a cylinder right next to the sensor always shows a bigger signal than one at the far end of the block.

Knock sensor signal versus crank angle with measurement window and knock threshold
The ECU only evaluates the knock signal inside a crank-angle window and compares it with a learned noise level. Original diagram.

Knock control strategy

Once knock is detected, the ECU retards ignition on the affected cylinder by a fixed step. Repeated knock adds more retard until a maximum limit is reached. When the cylinder runs clean for a while, the timing creeps back toward the base map in small increments. Watch this in live data and you see a sawtooth: quick drops, slow recovery.

On top of the fast loop, many ECUs keep adaptive values that shift the base timing when the engine repeatedly needs retard, which is how they cope with lower-octane fuel. Turbo engines may also reduce boost or enrich the mixture when retard gets large. If the sensor or its circuit fails, the ECU usually runs a fixed safety retard, and the engine feels noticeably weaker.

The same principle applies beyond passenger cars. Some modern motorcycles have knock sensors, and spark-ignited natural-gas engines in buses, trucks and agricultural equipment rely on knock control because gas composition varies from one fill to the next.

Chart of ignition retard applied by cylinder-selective knock control
How knock control pulls ignition timing and then re-advances it (illustrative). Original diagram.

Workshop diagnostics

  • Fault codes: P0325 and P0330 are circuit faults for knock sensor 1 (bank 1) and sensor 2 (bank 2). Check connectors, the harness under the intake manifold and the sensor resistance or signal on a scope before replacing parts.
  • Per-cylinder retard: one cylinder retarding points to a local problem such as a weak coil, wrong plug, injector issue or carbon. All cylinders retarding points to fuel, intake temperature or overall calibration.
  • Mechanical noise: loose heat shields, chain rattle, worn tappets or noisy injectors can generate false knock. Find and fix the noise rather than reducing sensitivity.
  • Fitting: when replacing a sensor, clean the seat and follow the torque specification.

Related fault codes (DTCs)

Generic OBD-II (SAE J2012) codes related to knock sensing and knock control. Sensor 1 is Bank 1 or the single sensor; sensor 2 is Bank 2. Manufacturers may word them differently, so confirm with the vehicle-specific description.

CodeMeaningTypical causes
P0324Knock Control System ErrorKnock sensor signal missing or implausible, wiring, internal ECU knock evaluation fault; real heavy knock on some systems
P0325Knock Sensor 1 Circuit (Bank 1 or Single Sensor)Sensor or wiring fault, unplugged connector
P0326Knock Sensor 1 Circuit Range/Performance (Bank 1 or Single Sensor)Wrong mounting torque, corrosion or dirt under the sensor, mechanical engine noise, sensor ageing
P0327Knock Sensor 1 Circuit Low (Bank 1 or Single Sensor)Signal open or shorted to ground, loose sensor, failed sensor
P0328Knock Sensor 1 Circuit High (Bank 1 or Single Sensor)Signal shorted to voltage, damaged screening, failed sensor
P0329Knock Sensor 1 Circuit Intermittent (Bank 1 or Single Sensor)Loose connector pins, chafed harness, oil/coolant in the connector
P0330Knock Sensor 2 Circuit (Bank 2)Sensor or wiring fault, unplugged connector
P0331Knock Sensor 2 Circuit Range/Performance (Bank 2)Wrong mounting torque, corrosion or dirt under the sensor, mechanical engine noise, sensor ageing
P0332Knock Sensor 2 Circuit Low (Bank 2)Signal open or shorted to ground, loose sensor, failed sensor
P0333Knock Sensor 2 Circuit High (Bank 2)Signal shorted to voltage, damaged screening, failed sensor
P0334Knock Sensor 2 Circuit Intermittent (Bank 2)Loose connector pins, chafed harness, oil/coolant in the connector
P2336Cylinder 1 Above Knock ThresholdActual knock (low-octane fuel, carbon deposits, high intake temperature, lean mixture, aggressive timing) or mechanical noise / sensor fault on that cylinder
P2337Cylinder 2 Above Knock ThresholdActual knock (low-octane fuel, carbon deposits, high intake temperature, lean mixture, aggressive timing) or mechanical noise / sensor fault on that cylinder
P2338Cylinder 3 Above Knock ThresholdActual knock (low-octane fuel, carbon deposits, high intake temperature, lean mixture, aggressive timing) or mechanical noise / sensor fault on that cylinder
P2339Cylinder 4 Above Knock ThresholdActual knock (low-octane fuel, carbon deposits, high intake temperature, lean mixture, aggressive timing) or mechanical noise / sensor fault on that cylinder
P2340Cylinder 5 Above Knock ThresholdActual knock (low-octane fuel, carbon deposits, high intake temperature, lean mixture, aggressive timing) or mechanical noise / sensor fault on that cylinder
P2341Cylinder 6 Above Knock ThresholdActual knock (low-octane fuel, carbon deposits, high intake temperature, lean mixture, aggressive timing) or mechanical noise / sensor fault on that cylinder
P2342Cylinder 7 Above Knock ThresholdActual knock (low-octane fuel, carbon deposits, high intake temperature, lean mixture, aggressive timing) or mechanical noise / sensor fault on that cylinder
P2343Cylinder 8 Above Knock ThresholdActual knock (low-octane fuel, carbon deposits, high intake temperature, lean mixture, aggressive timing) or mechanical noise / sensor fault on that cylinder

Tuning considerations

Knock control is the safety net of any petrol remap. After changing ignition or boost maps, log retard on every cylinder with the fuel the customer actually uses, preferably in warm conditions and at full load. Occasional small corrections are normal. Consistent retard means the timing or boost is too aggressive for that engine and should be reduced. Hiding knock by raising thresholds or disabling knock control removes the protection that keeps the engine alive.

Summary

A knock sensor is a piezo vibration sensor, and the ECU turns its signal into a per-cylinder knock decision through windowing, filtering and reference comparison. Retard comes in fast steps and goes back slowly. Reading that behaviour is one of the most useful checks you can make on any spark-ignition engine, original or tuned.

Looking for an original or tuned file for a petrol engine? Find your ECU file on ECUFlashFiles.