The Detonation Sensor (KS) is located above the engine. It is intended to detect the spark gap. As soon as a spark is present, the sensor produces a signal in the form of a voltage. This signal is sent to the Powertrain Control Module (PCM) which delays the ignition timing. This protects the engine.
The KS Sensor inside is a piezoelectric crystal. It is used to produce DC voltage (alternating current) under vibration. This sensor converts the changes to an electrical signal. The PCM does not send reference voltage to the KS Sensor, rather the sensor creates its voltage.
When the diagnostic code P0326 OBDII is set, it means that the PCM has found a problem in the KS Sensor or the circuit of it. This code refers to sensor number 1, bank 1, due to some vehicles are equipped with two Detonation Sensors.