Knock detection


A while ago I fitted the Megajolt Light (MJLT) ignition controller into my car. After installation I needed to develop an ignition map to suit my car - but this proved to be very difficult as I couldn't hear if the engine was suffering from pre-ignition (also known as 'knocking' or 'pinking') due to wind and exhaust noise. Because of this I needed some form of 'computer' to identify when it was happening.

The electronic detection of engine knock is a bit of a black art, and the solution always has to be tuned to suit the particular engine's performance and layout. As there was no off-the-shelf solution available, and I wasn't prepared to spend a large amount of time trying to design and make one, I decided to make use of a freely available frequency-sensitive device - the human ear - connected to a very effective detector of unusual noises - the human brain. This solution isn't new and has been used in some form or other for many years, as discussed on Piston Heads.

Components required

The requirements appear simple, but the first item is actually highly sophisticated and complex.

Knock sensor : Some form of knock sensor can usually be found on any modern fuel-injected petrol engine. It's a small thing that either screws into a hole in the block, or is held on a stud. It's an piezo-electrical microphone in a very durable package, specially designed to give a strong signal at between 5KHz and 15KHz (5,000 - 15,000 cycles/sec). Mine is from a Vauxhall and has a short ready-wired lead and connector, but most have a socket (as in this picture).

Amplifier and headphones : Almost any simple mono amplifier will do the job, together with a suitable pair of headphones. The headphones should be fairly closed-in, so that external noise is reduced - close-fitting earplugs would also work. I am using a fairly elderly pair of Peltor noise-limiting amplified ear protectors that were designed for use on firing ranges.

The amplifier module has a socket for an external microphone, which I have used to connect to the knock sensor.

Cable and connectors : Decent-quality screened microphone cable, and appropriate connectors. I used 'twin and screen' cable sold for use with automotive sensors, which comes with heavy and tough insulation.


The only part that needs special attention is the knock sensor, which needs to be mounted firmly against the block somewhere near to the top of the cylinder. Fortunately the Ford Crossflow block has an unused threaded hole just below the thermostat.

I have been told that this was used for mounting heavy-duty alternators when required. I can neither confirm nor deny this.

This hole is 3/8" UNC; unfortunately, the hole in the sensor is 8mm so a steel stud was required to match the two together. This was screwed into the block with a bit of stud-lock.

Once the stud was firmly in place, the sensor was fitted and held down with a washer and nylok nut. This has to be done up to specific torque - typically 20Nm.

The wiring from the sensor was extended using similar wire, and taken through the engine bay to the scuttle wall, avoiding the hot exhaust manifold and any obvious generators of electrical noise. I found that it was necessary to wire in a 1:1 ratio microphone transformer between the sensor and the microphone. If you're technically minded, it was necessary because the sensor is what is known as a 'balanced feed' (the microphone itself is not connected to earth, which is only used for the screen) and the amplifier input which is unbalanced 'live and earth'. Direct connection without the transformer resulted in a load of hum and little signal (see the following wiring diagram from Shure).

A 3.5mm jack socket was fitted on the scuttle wall and the transformer tie-wrapped alongside to complete the engine bay installation.

A simple extension lead with 3.5mm jack plugs at each end was used to connect to the headphone amplifier.

Using the knock detector

First of all, using this system on the public highway is unsafe, and you are likely to be prosecuted for 'driving without due care and attention' if you're caught (apart from the risk of actually hitting some unfortunate pedestrian who gets in the way). The following test procedures should only be done on quiet private roads. YOU HAVE BEEN TOLD!

Everything was plugged in, switched on and the engine started - at this point I could hear a dreadful clatter and rattle from the engine, and wondered whether it was about to fall apart! This was the way it should sound, but normally I wouldn't hear a quarter of these noises. With the MegaJolt Configurator software up and running, the car was driven at various speeds and loads (e.g. accelerating at various rates from various speeds) until the distinctive sound of knock was heard; at these points the space key was used to mark the MegaJolt log. Once the correct ignition map cell was identified the value was adjusted and the test repeated.

If you are wondering what knock sounds like, try playing this WAV file. You can hear the racket made by the engine, but the knock is the harsh rasp that can be heard at the end of the recording.
Note: this WAV file was originally recorded by 'jaycos' on the PistonHeads forum, and his efforts are duly acknowledged here.