How to set-up a knock-sensor signal-conditioning system

How to set-up a knock-sensor signal-conditioning system
Technology News |
Engine knock occurs in engine cylinders because of improper ignition timing or faulty components. Modern cars incorporate knock-sensor systems for engines to minimize knocking, which can maximize engine lifetime, increase power, and improve fuel efficiency. This article discusses engine knock basics and how to set up a knock-sensor signal-conditioning system.
By eeNews Europe


Basics of engine knock

Engine knock, or detonation, is uncontrolled ignition of pockets of air and fuel mixture in a cylinder in addition to the pocket initiated by the spark plug. Engine knock can greatly increase cylinder pressure, damage engine components, and cause a pinging sound.

In normal combustion, an internal-combustion engine burns the air and fuel mixture in a controlled fashion. Combustion should start a few crankshaft degrees prior to the piston passing the top dead center. This timing advance is necessary because it takes time for the air and fuel mixture to fully burn and it varies with engine speed and load. If timed correctly, maximum cylinder pressure occurs a few crankshaft degrees after the piston passes the top dead center. The completely ignited air and fuel mixture then pushes the piston down with the greatest force, resulting in the maximum torque applied to the crankshaft for each cycle.

Today’s engines are designed to minimize emissions and maximize power as well as fuel economy. This can be achieved by optimizing the ignition spark timing to maximize the torque. With this timing control, the spark plug ignites the air and fuel mixture from the ignition point to the cylinder walls and burns it smoothly at a particular rate. Deviations from normal combustion, such as igniting too soon, can cause engine knock and, in extreme cases, result in permanent engine damage. Other causes of engine knock include using the wrong octane gasoline or defective ignition components.

Signal-conditioner interface

Modern cars have a knock-sensor system to detect engine knock for each cylinder during a specified time after top dead center called the knock window. A typical system consists of a piezoelectric sense element and signal conditioner. The sensor detects vibrations and the signal conditioner processes the signal and sends a voltage signal to the engine control module. The module interprets the knock signal to control timing and improve engine efficiency. Knock sensors typically are mounted on the engine block (Figure 1).

Coefficient descriptions:

VIN = Amplitude of input voltage peak

VO = Output voltage

AIN = Input amplifier gain setting

AP = Programmable gain setting

ABP = Gain of bandpass filter

AINT = Gain of integrator

TINT = Integration time from 0.5 ms to 10 ms

AOUT = Output buffer gain

τC = Programmable integrator time constant

VRESET = Reset voltage from which the integration operation starts

The simplified diagram in Figure 2 shows the TPIC8101 dual-channel, highly-integrated, signal-conditioner interface from Texas Instruments that can be connected between the knock-sensing element and engine control module. The two internal wide-band amplifiers (Figure 3) provide interface to the piezoelectric sensors. The outputs of the amplifiers feed a channel-select mux switch (Figure 2), followed by a third-order anti-aliasing filter (AAF).

The signal is then converted using an analog-to-digital converter (ADC) prior to the programmable gain stage. The gain stage feeds the signal to a programmable bandpass filter to process the particular frequency component associated with the engine and knock sensor. The output of the bandpass filter is full-wave rectified and then integrated based on a programmed time constant and integration time period. At the start of each knock window, the integrator output is reset. The integrated signal is converted to an analog format with a digital-to-analog (DAC), but can be connected directly to a microprocessor. The processor reads the data and adjusts the spark-ignition timing to reduce knock while optimizing fuel efficiency relative to load and engine RPM.

Internal blocks

The operation of the signal-conditioner interface is defined by its transfer function:


This equation is based off of the internal blocks of the signal conditioner. The equation’s component values are then programmed into the device by the graphical user interface (GUI) through a serial peripheral interface (SPI) port.

Derivation of transfer function

The following steps outline how Equation 1 was derived from the functional blocks in Figure 2.

To begin derivation, the output voltage is defined as:


Let the amplitude of VIN be equal to:


Also, let:


where fBP is the filter center frequency and N is the number of cycles.



The integrator operation is performed N times from 0 to B. This will cover the positive side of the input. Full-wave rectification is compensated later through the other gain coefficients. Substitute VIN and integrate from 0 to 1/fBP.

(for full resolution click here)

where QBP is a Q factor that characterizes a resonator’s bandwidth relative to its center frequency.

Evaluate at the center frequency, w = wC. Therefore, ABP = 2. Plug in all values for AINT, AIN, AOUT, ABP, VRESET to get:


where VIN is entered as a peak value.

Therefore, the final solution is Equation 1:

Application example

Next are the steps necessary to set up the signal conditioner.


The required known values are VIN, oscillation frequency, tINT, and VOUT. For this example, the know values are:

• VIN = 7.3 kHz, 300 mVPP (knock sensor specification)

• Oscillator = 6 MHz (microprocessor clock specification)

• Knock window (tINT)= 3 ms (system specification)

• VOUT = 4.5 V (microprocessor interface specification)

Calculating remaining coefficients

Now that AINT, AOUT, ABP, VRESET are set, the remaining coefficients need to be calculated:

• Programmable gain (AP)

• Integration time constant (tC)

• Input amplifier gain (AIN): Set AIN = 1


With known values, Equation 1 can now be solved for AP:


Note that the 100-μs value for tC reflects a minor adjustment required to program the value as indicated in the following discussion.

How to program coefficients

After the coefficients have been calculated, they need to be entered into the GUI. The following paragraph is an overview of the data values that would be entered with the GUI software for the TIDA-00152 reference design (See

Reference 1). For fC, Table 1 shows that the closest bandpass frequency to 7.3 kHz is 7.27 kHz, which corresponds to a decimal value of 42 and a hex value of 2A. For AP, the closest value to 0.38 in Table 1 is 0.381, which corresponds to a decimal value of 34 and a hex value of 22. For tC, the closest value to 106 μs in Table 1 is 100 μs, which corresponds to a decimal value of 10 and a hex value of 0A.

Enter in 6 MHz for the oscillator frequency and 1 for the number of channels. GUI values should look like those in

Figure 4.

Following the previous steps should result in the waveform in Figure 5. For more waveforms with different degrees of amplitude modulation, see the TIDA-00152 reference design test data in Reference 1.


Engine knock control is necessary for optimal engine performance and for protecting the engine. The dual-channel input and advanced signal conditioning of the TPIC8101 knock-sensor interface reduces the processing load on the engine control module.

About the author:

Yvette Tran is Automotive System Applications Engineer at Texas Instruments.


1. TIDA-00152 reference design for Automotive Acoustic Knock-Sensor Interface. Includes links to schematic/ block diagram, test data, design files, and bill of materials. Available:

Related Web sites

TPIC8101 product folder:

TPIC8101 EVM User’s Guide:

TPIC8101 Datasheet:

Subscribe to the AAJ:

Linked Articles
eeNews Automotive