Knock sensor

detonation sensorKSknock detection sensor

A knock sensor is a vibration sensor bolted to the engine block or cylinder head that converts structure-borne noise into a voltage. The engine controller filters that signal for the frequencies typical of knock and, when knock is detected, retards ignition timing on the affected cylinder.12

How it works

Most production knock sensors are broadband piezoelectric accelerometers.

Inside, a seismic mass presses on a ring-shaped piezo ceramic element. Block vibration changes the force on the element, which produces a small voltage proportional to acceleration. Bosch lists this layout for its KS-4 sensors.1

Knock excites pressure waves in the cylinder at resonant frequencies set mainly by bore diameter and the speed of sound in the hot gas. Larger bores ring at lower frequencies. The controller band-pass filters the sensor signal around the chosen frequency.Medium32

The controller listens only during a crank-angle window after each cylinder fires, so it can assign knock to a cylinder. It compares the filtered, integrated signal with a learned background noise level. A ratio above a threshold counts as knock.Medium42

Mounting matters. The sensor must be torqued to specification on a clean, flat seat, because torque and contact change the mechanical coupling and therefore its sensitivity. Washers or thread sealant under the sensor can deaden the signal.Medium12

In tuning

Knock detection is a calibration of its own: filter frequency, listening window, gain per cylinder, background noise learning and threshold. If those are wrong, the system either retards on mechanical noise or misses real knock. Each engine and sensor position needs its own setup.Medium42

Signal quality falls at high rpm as valvetrain and piston noise rise. Louder aftermarket parts such as solid lifters, gear drives or forged pistons can also raise the noise floor. Treat knock control as a safety net and set base timing with margin.Medium23

Formula and worked example

f = (c × ρ) / (π × B)
f
resonant frequency of a cylinder acoustic modeHz
c
speed of sound in the hot cylinder gasm/s
ρ
mode constant for the chosen vibration mode (about 1.841 for the first circumferential mode)
B
cylinder bore diameterm
Medium3

Myths vs facts

Myth The knock sensor measures cylinder pressure.

Fact Standard knock sensors measure block vibration, not pressure. Cylinder pressure sensors are a different, much more expensive device.1

Myth A knock code always means the sensor is bad.

Fact Codes can come from wiring, connector or mounting faults, or from real knock or mechanical noise. Check wiring, mounting torque and fuel before replacing the sensor.Medium2

Myth Any knock sensor works on any engine.

Fact Sensor type and the filter frequency must match the engine. Resonant and wideband sensors behave differently, and the controller must be calibrated for the one fitted.Medium21

Frequently asked

What does a knock sensor do?

A knock sensor listens for the vibration that knock produces in the engine structure and sends a voltage to the engine controller. The controller decides whether that signal is real knock and, if so, retards spark timing on that cylinder until knock stops. It lets engines run closer to their knock limit on varying fuel.12

Where is the knock sensor located?

Knock sensors bolt to the engine block or cylinder head, usually on the side of the block or in the valley under the intake manifold on V engines. Engines may have one, two or more so each cylinder is close enough to one sensor. The exact place depends on the engine design.Medium12

What are the symptoms of a bad knock sensor?

Common signs are a check-engine light with a knock sensor circuit code, reduced power from the controller holding timing retarded as a precaution, poorer fuel economy, and in some cases audible knock that is not being corrected. Wiring and connector faults cause the same symptoms, so test the circuit first.Medium2

How does a knock sensor work?

Inside, a small seismic mass sits on a piezoelectric ceramic element. When the block vibrates, the mass presses on the element, which generates a voltage proportional to the vibration. The controller filters that voltage for knock frequencies and compares it with the normal background noise in a window after each cylinder fires.12

What frequency does a knock sensor detect?

Broadband knock sensors respond over a wide range of several kilohertz up to about 20 kHz or more. Knock itself rings at frequencies set by bore size and gas temperature, typically several kilohertz for passenger car bores. The controller picks the relevant band with a filter, so the calibration sets the frequency, not the sensor alone.Medium13

Does knock sensor torque matter?

Yes. The sensor works by mechanical coupling to the block, so its mounting torque and seat condition change its output. Too loose or too tight changes sensitivity and can cause false knock or missed knock. Use the specified torque, a clean flat seat and no washers or sealant unless the manufacturer specifies them.Medium21

Wiring, pinouts and parts

Used in these guides

Sources

Numbered as cited above. Hover or tap a citation chip to preview it.

  1. Knock sensor product data sheet (KS-4-K1, KS-4-S) · Robert Bosch GmbH · vendor-doc · retrieved 2026-10-25
  2. Knock sensor · Wikipedia · reference · retrieved 2026-10-25
  3. Internal Combustion Engine Fundamentals, 2nd edition (J. B. Heywood) · McGraw-Hill Education · book · retrieved 2026-10-25
  4. Automotive Handbook, 10th edition · Robert Bosch GmbH · book · retrieved 2026-10-25