The knock sensor can detect mechanical stress and produces a voltage when the car knocks or pings. Under heavy acceleration, it sends signals to the ECU and the ECU retards the ignition timing to compensate for the knocking, which in effect protects the pistons and rings from damage. Knocking also occurs when using low-grade fuel and having the knock sensor allows you to use different grade fuels without causing engine damage.
Knock Sensors
The knock sensor can detect mechanical stress and produces a voltage when the car knocks or pings.