Sensor type · Piezoelectric (AC)

Knock sensor

detonation sensorESC sensorpiezo knock sensor

A knock sensor is a piezoelectric accelerometer bolted to the block. Vibration squeezes a piezo element and produces an AC voltage, which the ECU filters in the knock frequency band. Bosch's KS4-P covers 3-25 kHz at 26 ± 8 mV/g at 5 kHz and must be torqued to 20 ± 5 N·m.2

Parts in the library

Support across ECUs

Across the 2 parts in this hub (1 with a maker-verified pinout). Open a part for the setup notes and sources.

GAINS ECU21 configurable (generic input) · 1 to be confirmed
Haltech (Elite / Nexus)2 configurable (generic input)
Link (G4X)2 configurable (generic input)
MoTeC (M1)2 configurable (generic input)
ECUMaster (EMU Black)2 configurable (generic input)
AEM (Infinity)2 configurable (generic input)
MaxxECU2 configurable (generic input)
Holley (Terminator X / EFI)2 configurable (generic input)

Trademarks belong to their owners. Names are used only to identify compatible products; no endorsement is implied.

How it works

A seismic mass inside the sensor presses on the piezo ceramic as the block vibrates, giving a voltage proportional to acceleration.2

The ECU windows the signal around each cylinder's combustion and band-pass filters it, then compares energy to a background level. The sensor itself makes no decision.Medium1

Mounting decides the signal. Bosch requires a clean, machined contact surface and the sensor sitting directly on its compression sleeve.2

Types and variants

Broadband (flat response)Piezoelectric (AC)

Bosch KS4 series: 3-25 kHz, main resonance near 30 kHz, impedance above 1 MΩ.23

ResonantPiezoelectric (AC)

Tuned to one frequency band; common on older OEM engines.Medium1

Wiring

Two wires, Sig+ and Sig-. Run them as a shielded twisted pair with the drain at the ECU end only, and route the cable so it cannot resonate against the engine.Medium275

Do not use the sensor body as a ground. Both signal pins go to the ECU's knock input.Medium2

Connector and wiring library

Common faults and checks

False knock at high rpm

Likely cause Valvetrain or accessory noise in the knock window, or a loose sensor

Check Check the sensor torque and log raw knock level against rpm with the engine not knocking.Medium24

No knock signal at all

Likely cause Open sensor or broken shielded lead

Check Measure across the pins: a piezo sensor shows a very high resistance (Bosch: above 1 MΩ), not an open-circuit fault code value.Medium2

Ghost knock after a used-part swap

Likely cause Tired junkyard or low-quality sensors

Check Replace with a known-good sensor before changing calibration.Medium4

Frequently asked

Does a knock sensor need shielded wire?

Yes. The signal is a small AC voltage at several kilohertz, so ignition noise couples in easily. Use a shielded twisted pair with the drain at the ECU end only.Medium27

What torque for a knock sensor?

Use the maker's value: Bosch specifies 20 ± 5 N·m for the KS4-P and KS4-R. Under- or over-torquing changes the coupling to the block and the signal level.23

Why does my knock sensor show false knock?

Mechanical noise from valvetrain, injectors or accessories lands in the knock window, or the sensor is loose. Log the background level and check mounting before changing timing.Medium24

Related

Use it with GAINS

Knock sensor on GAINS hardware

ECU2KNOCK

Pins
On the ECU2 pin map
Pull-up
Not used
Shielding
Shielded, drain at the ECU end only

One knock input. A V engine with two sensors needs a mapping to be confirmed (two sensors summed or one per bank).Medium5

GAINS hardware is pre-release concept design. Pin numbers come from the ECU2 v0.3 pin map and the PDM2 specification and can change before release; none of it has been tested on a vehicle yet.56

Concept Pre-release hardware. Pin assignments come from the current design documents and may change.

Sources

  1. Automotive Handbook, 10th edition (2018) · Robert Bosch GmbH / Wiley · book · retrieved 2026-10-27
  2. Knock Sensor KS4-P data sheet 69010059 · Bosch Motorsport (Bosch Engineering GmbH) · vendor-doc · retrieved 2026-10-27
  3. Knock Sensor KS4-R data sheet 69002507 · Bosch Motorsport (Bosch Engineering GmbH) · vendor-doc · retrieved 2026-10-27
  4. Dialing in LS sensors for various generations with Michigan Motorsports · EngineLabs · press · retrieved 2026-10-27
  5. internal GAINS internal: ECU2 concept and pin map v0.3 (hardware/mini-ecu/CONCEPT.md §3)
  6. internal GAINS internal: PDM2 input and output specification (hardware/mini-pdm/SPEC.md)
  7. Shielded cable · Wikipedia · reference · retrieved 2026-10-27

Not yet indexed: fewer than 4 FAQs.