The engine is a 4 cylinder with bore: 84.45mm and stroke: 89.0mm.
On the side of the engine block, between cylinder 2 and 3, is mounted a (old) Lucas VP50 knock sensor.
Step#1: Determine knock frequency
The knock sensor is connected (with a 50k series resistor) to the microphone input of a laptop. The laptop records whatever is on the microphone input while the ignition advance carefully is increased. As long as the engine is at idle speed, over increasing the advance isn't too harmful.
The audio file was edited with Kwave and a sonagram was created:
The expected knocking frequency was around 900/(pi*r) = 6.8kHz, and with the measured knocking frequency marked by the red band (6.6kHz...7.4kHz), it is seen to fit nicely.
The nearest frequency in the table of configurable bandpass frequencies for the knock sensor interface is 6.94kHz. Thus config.knock1_bandpass=29
Step#2: Setup integrator timeconstant and gain
to be continued...
Please continue the method of configuring knock detect! I'm working on the knock detect too, and your thoughts would be very precious for me:))
For linux there are millions of good audio program, there are some FFT-capable for win32 too: