Click on our menu buttons immediately below to find MegaSquirt® information quickly:

Knock Sensing System for MegaSquirt-II

Note: the knock sensing feedback system has been tested on the bench, but not in a vehicle. Do not use this system except for experimental purposes. Test your setting on the bench first.

Spark knock is the sound of abnormal combustion in an engine. Once combustion in a spark-ignition internal combustion engine is initiated by a spark, the flame front is designed to spread from the spark plug and travel across the combustion chamber rapidly and smoothly. As the flame front propagates across the chamber, the remaining unburnt air-fuel mixture can ignite spontaneously (auto-ignites) before the flame front arrives, due to the increasing pressure and temperature in the combustion chamber. When this occurs, there is a sudden jump in the pressure in the cylinder. This causes in the characteristic knocking or pinging sound. Knocking results from ignition timing that is too advanced for the fuel octane rating and operating conditions at that moment.

A knock sensor can be used in conjunction with electronic spark control to optimize the ignition advance for the fuel being used. One limiting factor in ignition timing control is 'knocking', which is uncontrolled burning of the fuel in the combustion chamber. This can be affected by intake air temperature, coolant temperature, engine age and condition, air/fuel ratios, air density, altitude and humidity, among others.

The knock sensing system is a closed loop system design to allow the optimum amount of advance while avoiding engine damaging knocking.

The knock sensor is tuned to a specify frequency, like a tuning fork. When this frequency is applied to the sensor (through its connection to the engine), a piezoelectric crystal inside the sensor generates a small voltage (~1 volt), much like a microphone. As an example, some Corvette knock sensors (GM PN 1997562, 1997699, OR Standard Motor Products KS45, KS46, KS49, or KS117) have a design frequency of 5200 hertz, and they produce a signal between 4800 rpm and 5600 rpm.

The sensor should be mounted near the top of the engine block, as close to the center as practical. Do not mount it close to noisy components such as the fuel pump or cam shaft lifters. Mounting the knock sensor in the cylinder head is not a good idea because of valve train noise.

Finding a suitable location of the sensor is crucial. Wherever possible, use the location specified by the manufacturer for that engine family. Bear in mind that knock sensing is not a magic bullet. If the compression ratio, boost pressure, or oil contamination is too high for your fuel quality, either knock will occur or you will lose power by having to retard timing to prevent it. Sustained severe knocking (detonation) WILL destroy your engine, sometimes within a few seconds.

Ideally, you will be able to find a suitable threaded hole in your block to which you can mount the sensor. If not, an alternative is to drill and tap the block, or thread a steel adapter to accommodate the sensor on one end and a stub with the thread to match those in an existing pre­tapped boss in your block. Note that it may be necessary to change the sensor location if you cannot isolate engine noise while allowing MegaSquirt-II to identify knock.

If you choose to drill and tap your block, choose a thick area of the block with a boss that is at least ¾" (19 mm) thick. Drill a ½" (13mm) hole. The hole should be 0.500" to 0.625" (13 mm to 16 mm) deep. Make absolutely sure that it is safe to drill a hole this size - YOU CAN RUIN YOUR ENGINE'S BLOCK WITH A POORLY PLACED HOLE!

The GM knock sensors have a 3/8" NPT thread. Tap the hole with a 9/16" UNF starter tap. Go in 4 turns of the tap to begin with, clean out the chips and try the sensor for fit. Keep tapping one turn at a time until the sensor threads in 4 to 5 turns with hand pressure. Stop tapping when the sensor will screw into the hole 6 to 7 threads with a wrench. Note that the thread on the knock sensor is a tapered thread.

Above approximately 5000 rpm, however, this knock may be masked by mechanical noise. MegaSquirt-II's tuning software allows you to set an upper rpm limit on the knock sensor feedback.

On the Corvette L83/L98/LT1/LT4 engines, this sensor is usually screwed (with a specified torque value) into the coolant drain hole near the center of the block side, just above the oil pan rail. This location has been chosen as optimum for this sensor and engine family. On the LS1 engine, the sensors (there are two) are located in the center valley on top of the engine.

A conditioning module is also required, such as GM's Electronic Spark Control (ESC) module (PN 16022621, 16052401), see above. These are also available as Standard Motor Products LXE6, LXE7, and LXE9. These are very common in recycling yards, they were used all virtually all GM vehicles from the mid-1980s to the late 1990s. You should match the sensor and module by application to ensure they will work together properly.

Note that you can get a KnockSenseMS kit designed to work with MegaSquirt® from this site.

Wiring the Knock Sensor and Module

The ESC module sends a voltage signal (8 to 10 volts) when NO knock is detected by the knock sensor. If knock occurs, this signal is pulled low.

This signal is fed to MegaSquirt-II by connecting the module output to an unused DB37 pin, and connecting that pin to JS4 (which goes to the 40-pin socket pin #30, then to PAD07 on CPU pin #34). However you need to reduce the module signal voltage since it is too high for the processor port directly. You can use the proto area on the V3 main board, a 1K Ohm resistor (1/4 or 1/8 watt), and a 4.7 Volt Zener 1W diode (Digi-Key 1N4732ADICT-ND, 36¢) to do this, as shown below:

You can use other through holes in the proto area, these are shown only as an example.

However the knock signal by itself is not sufficient for detonation feedback ignition timing control MegaSquirt-II. You need code that responds to a 'knock' signal by retarding the timing. For MegaSquirt-II, this means using version 2.6 or higher code.

Knock Sensor Settings

MegaSquirt® and MicroSquirt® controllers are experimental devices intended for educational purposes.
MegaSquirt® and MicroSquirt® controllers are not for sale or use on pollution controlled vehicles. Check the laws that apply in your locality to determine if using a MegaSquirt® or MicroSquirt® controller is legal for your application.
©2006 Al Grippo and Bruce Bowling - All rights reserved. MegaSquirt® and MicroSquirt® are registered trademarks.