9.9. Knock

9.9.1. Operation

Before the knock solution, a standalone engine management system was in some sense a step backwards for many people when they removed their knock-detecting factory ECM to control the freshly turbo'd engine.

Knock frequency estimation formulas: Start at page 20, paragraph 2.6. For diesel engines , but chapter 4.1 gives the equation: f=const*c/pi/B. Where c is the sound velocity (c=sqrt(kRT), k=1.4, R=287, T is the average gas temperature in the cylinder, c=630m/s if T=1200K; B is the bore; const is the so called mode constant, and can be: 1.841 4.4 kHz 3.054 7.2 kHz 3.832 9.1 kHz 4.201 10.0 kHz 5.332 12.7 kHz However according to this paper, exact calculation won't be possible: It won't matter much, as we won't know the exact temperature anyway, and the filter has a quite wide bandpass frequency range.

The circuit starts in hold mode. When we fire a cylinder, we pull the hold/integrate line high to start listening to the knock sensor. When out of the knock window again, we release it and check the voltage on the chip's output. The knock sensor is sampled cylinder per cylinder and data are stored for each cylinder, thus individual adjustment of each cylinder will be possible. Example of sampling (a single ignition event): For a 4 cylinder engine, the knock sensor is sampled in a J-degrees window starting at K degrees ATDC, the noise is correspondingly sampled in a J-degrees window following the first window. The resulting data is referred to as knock_val and noise_val.

9.9.2. Installation

9.9.3. Wiring

The required chip and 4MHz crystal is factory installed on v3.3 and later boards if your board was ordered with the knock kit. You will only need to connect the sensor input through the 3 pin header (pads) at the northwest corner (looking at the "top")

  • North pad (close to board-edge): knockA signal (channel 0) (usually through EC18pin3)
  • Middle pad: knock GND (usually through EC18pin2)
  • Southern pad: knockB signal (channel 1) - usually not used

9.9.4. Configuration

The knock sensor frequency must be manually configured with any reasonable acoustic-knock system. Each engine is different, and tailoring the knock frequency to your setup will only enhance its capabilities.

Mik measured his knock freq to be around 7.4 kHz: MembersPage/MichaelKristensen/KnockExperiments

MembersPage/Fero's Mazda 1.8L 4cyl: expected to be higher frequency than Mik's, but the knock3.wav shows 6.2-6.7 kHz which is decimal 39 (knock1_frequency=0x27) according to

Variable Name Starting point value Units Description
knock_conf 0x00 0x00=Disable knock detection and ignition retard. 0xFF=Enable knock detection and ignition retard.
knock_sampling_window 0xFF (255)
knock_minrpm 0xFF (255) 0xFF=No minimum RPM limitation on knock detection enable. 0x01=100rpm Minimum RPM before knock detection is enabled.
knock_maxrpm 0xFF (255) 0xFF=No maximum RPM limitation on knock detection enable. 0x01=100rpm Maximum RPM knock detection is enabled to.
knock1_frequency 0x29 (41) TODO: 0x01=? Listen specifically for knocks in this frequency range.
knock1_gain 0xFF (255)
knock1_integrator 0xFF (255)
knock2_frequency 0x29 (41)
knock2_gain 0xFF (255)
knock2_integrator 0xFF (255)
knock_threshold 0xFF
knock_noise_scale 0xFF
knock_max_retard 0xFF (255) 0x01=0.25 crank degrees. Maximum amount to retard ignition.
knock_default_retard 0x00 0x01=0.25 crank degrees. Default ignition retard.
knock_retard_step 0xFF 0x01=0.25 crank degrees Retard step.
knock_retard_delay 0xFF 0x01=15ms Retard delay.
knock_advance_step 0xFF 0x01=0.25 crank degrees. Ignition advance step size.
knock_advance_delay 0xFF 0x01=15ms Ignition advance delay.

Table 9.7. Knock sensor config variables


9.9.5. Tuning

9.9.6. Testing and Monitoring