Analog Applications Journal

Automotive

How to set-up a knock-sensor signalconditioning system
By Yvette Tran

Automotive System Applications Engineer

Introduction

Today’s engines are designed to minimize emissions andmaximize power as well as fuel economy. This can beachieved 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 tothe cylinder walls and burns it smoothly at a particularrate. Deviations from normal combustion, such as igniting
too soon, can cause engine knock and, in extreme cases,
result in permanent engine damage. Other causes ofengine knock include using the wrong octane gasoline ordefective ignition components.

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 knocksensor signal-­conditioning system.

Basics of engine knockEngine knock, or detonation, is uncontrolled ignition ofpockets of air and fuel mixture in a cylinder in addition to
the pocket initiated by the spark plug. Engine knock cangreatly 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 andfuel 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 fuelmixture then pushes the piston down with the greatest
force, resulting in the maximum torque applied to thecrankshaft for each cycle.

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 tothe engine control module. The module interprets theknock signal to control timing and improve engine efficiency. Knock sensors typically are mounted on the engine
block (Figure 1).

Figure 1. Knock sensor mounted to an engine block

Texas Instruments

5

AAJ 3Q 2014

Analog Applications Journal

Automotive

Figure 2. TPIC8101 block diagram with coefficients

Coefficient descriptions:
VIN = Amplitude of input
voltage peak
VOUT = Output voltageAIN = Input amplifier gain
setting
AP = Programmable gain
setting
ABP = Gain of bandpass
filterAINT = Gain of integratortINT = Integration timefrom 0.5 ms to 10 ms
AOUT = Output buffer gain
tC = Programmable integrator time constant
VRESET = Reset voltage
from which the integration operationstarts

Vref
Input Amplifiers
CH1P

VDD /2

TPIC8101++

CH1N

VIN CH1FB(AIN) CH2P

Mux
SAR
10-Bit ADC
fs = 200 kHz

3rd Order AAF+<1:10>CH2N
CH2FB
ProgrammableGain

Programmable
Band-Pass
Filter (fBP)

AP

ABP

R2S
10-Bit ADC
fs = 200 kHz

VDD

GND

Rectifier

Programmable
Integrator

τCAINT

AOUT
SPI
Test Mode
DSP Control+OUT SDO SDI SCLK CS TEST INT/HOLD XIN

XOUTtINTVOUT
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 outputsof 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-todigital converter (ADC) prior to the programmable gainstage. The gain stage feeds the signal to a programmablebandpass 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 thenintegrated based on a programmed time constant and integration time period. At the start of each knock window, theintegrator 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.

Figure 3. Detail of interface to input amplifiers
A IN = R2/R1
R2
VIN(2 Channels)

C

CH1N–

R1

Knock
Sensor
1+

CH1P
Vref+

CH2P

CH2FB

R1
KnockSensor
2

CH1FBC–
CH2N

R2A IN = R2/R1
AIN = 1 is the TP1C8101
default setting

Texas Instruments

6AAJ 3Q 2014

Analog Applications Journal

AutomotiveInternal blocks

To begin derivation, the output voltage is defined as:

The operation of the signal-conditioner interface is definedby its transfer function:t
VOUT = VIN × A IN × A P × A BP × A INT × INT × A OUT + VRESETVOUT = VIN × A P ×

8 tINT×+ 0.125
π τC

(2)

τC

Let the amplitude of VIN be equal to:(1)

VIN = sin ( A × t ) × VINThis equation is based off of the internal blocks of the signal conditioner. The equation’s component values are thenprogrammed into the device by the graphical user interface (GUI) through a serial peripheral interface (SPI) port.

(3)πAlso, let: tINT =and B = ,fBP
AN

(4)

where fBP is the filter center frequency and N is the number of cycles.
1.
(5)
Therefore, A = p × fBP and B =fBP

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

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.
VOUT = N × ∫01/ f VIN × sin ( π × fBP × t ) dt × A IN × A P × A BP × A INT ×
BPVOUT = N ×1

τC× A OUT + VRESET(6)1
11/f
× VIN ×  − cos ( π × fBP × t )0 BP  dt × A IN × A P × A BP × A INT ×× A OUT + VRESET
π × fBPτC(7)11× VIN ×  − cos ( π ) + 1 dt × A IN × A P × A BP × A INT ×× A OUT + VRESET
π × fBPτC(8)tINT × VIN
1× [1 + 1]dt × A IN × A P × A BP × A INT ×× A OUT + VRESETπτC(9)VINt× 2 × A IN × A P × A BP × A INT × INT × A OUT + VRESETπτC(10)Substitute for N:
VOUT = ( tINT × fBP ) ×
VOUT =VOUT =Let AINT = 2, AIN = AOUT = 1, VRESET = 0.125, and2×
A BP =(ω − ω )2C22ωc × ωQBPω +  ωC ×Q 2,(11)BPwhere 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:
VOUT =VINt
× 2 × A P × 2 × 2 × INT + 0.125,
πτC

(12)

where VIN is entered as a peak value.
Therefore, the final solution is Equation 1:
VOUT = VIN × A P ×

Texas Instruments

78 tINT×+ 0.125
π τC

AAJ 3Q 2014

Analog Applications Journal

Automotive

Application example

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

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

4.5 V = 150 mV × A P ×

Requirements

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

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)

How to program coefficients
After the coefficients have been calculated, they need to
be entered into the GUI. The following paragraph is anoverview of the data values that would be entered with theGUI software for the TIDA-00152 reference design (SeeReference 1).
For fC, Table 1 show that the closest bandpass frequency to 7.3 kHz is 7.27 kHz, which corresponds to adecimal value of 42 and a hex value of 2A. For AP, theclosest value to 0.38 in Table 1 is 0.381, which corresponds to a decimal value of 34 and a hex value of 22. FortC, the closest value to 106 μs in Table 1 is 100 μs, whichcorresponds to a decimal value of 10 and a hex value of 0A.

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

τC =tINT
3 ms== 106 µs
2 × π × VOUT 2 × π × 4.5 V

8 3 ms
×+ 0.125 → A P = 0.38 (14)π 100 µs(13)Table 1. Part of SPI look up table from page 10 in the TPIC8101 datasheet

τCAP

DECIMAL
VALUE (D4…D0)

INTEGRATOR TIMECONSTANT(µSEC)

BAND-PASSFREQUENCY
(kHz)

040

145

2

Texas Instruments

APGAIN

DECIMAL VALUE(D5…D0)

BAND-PASSFREQUENCY
(kHz)

1.22

232

4.95

1.26

1.882

33

5.12

0.4

50

1.31

1.778

34

5.29

0.381

355

1.35

1.684

35

5.48

0.364

460

1.4

1.6

36

5.68

0.348

565

1.45

1.523

37

5.9

0.333

670

1.51

1.455

38

6.12

0.32

775

1.57

1.391

39

6.37

0.308

880

1.63

1.333

40

6.64

0.296

990

1.71

1.28

41

6.94

0.286

10100

1.78

1.231

42

7.27

0.276

11110

1.87

1.185

43

7.63

0.267

12120

1.96

1.143

44

8.02

0.258

8GAIN
0.421

AAJ 3Q 2014

Analog Applications Journal

AutomotiveFigure 4. GUI values

Enter in 6 MHz for the oscillator frequency and 1 for thenumber 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.

Figure 5. Example waveform

VIN = 300 mVpp , 7270 kHz (200 mV/div)

Conclusion

INT, 3 ms(5 V/div)

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 theengine control module.

4.48 V
Output(2 V/div)

References
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: www.ti.com/3q14-tida00152

Time (1 ms/div)

Related Web sites
TPIC8101 product folder:
www.ti.com/3q14-tpic8101
TPIC8101 EVM User’s Guide:
www.ti.com/3q14-tidu287
TPIC8101 Datasheet:www.ti.com/3q14-SLIS110
Subscribe to the AAJ:
www.ti.com/subscribe-aaj

Texas Instruments

9AAJ 3Q 2014

Analog Applications Journal

TI Worldwide Technical SupportInternetTI Semiconductor Product Information CenterHome Page
support.ti.com

TI E2E™ Community Home Pagee2e.ti.com

Product Information Centers
Americas Phone+1(512) 434-1560

BrazilPhone

0800-891-2616

MexicoPhone

0800-670-7544

FaxInternet/Email+1(972) 927-6377
support.ti.com/sc/pic/americas.htm

Europe, Middle East, and Africa
Phone
European Free Call		International
Russian Support

00800-ASK-TEXAS(00800 275 83927)+49 (0) 8161 80 2121
+7 (4) 95 98 10 701	Note: The European Free Call (Toll Free) number is not active inall countries. If you have technical difficulty calling the free callnumber, please use the international number above.
FaxInternetDirect Email+(49) (0) 8161 80 2045
www.ti.com/asktexas
asktexas@ti.com

JapanFaxInternational
Domestic+81-3-3344-5317
0120-81-0036

Internet/EmailInternational
Domestic

support.ti.com/sc/pic/japan.htm
www.tij.co.jp/pic© 2014 Texas Instruments Incorporated. All rights reserved.

Asia
Phone
Toll-Free Number		Note: Toll-free numbers may not support
mobile and IP phones.		 Australia
1-800-999-084		 China
800-820-8682		 Hong Kong
800-96-5941		 India
000-800-100-8888		 Indonesia
001-803-8861-1006		 Korea
080-551-2804		 Malaysia
1-800-80-3973		 New Zealand
0800-446-934		 Philippines
1-800-765-7404		 Singapore
800-886-1028		 Taiwan
0800-006800		 Thailand
001-800-886-0010
International+86-21-23073444
Fax+86-21-23073686
Email	tiasia@ti.com or ti-china@ti.com
Internet
support.ti.com/sc/pic/asia.htm
Important Notice: The products and services of Texas Instruments
Incorporated and its subsidiaries described herein are sold subject to TI’s
standard terms and conditions of sale. Customers are advised to obtain themost current and complete information about TI products and services
before placing orders. TI assumes no liability for applications assistance,
customer’s applications or product designs, software performance, orinfringement of patents. The publication of information regarding any othercompany’s products or services does not constitute TI’s approval, warrantyor endorsement thereof.
A021014

E2E and OMAP are trademarks and DLP is a registered trademark of Texas
Instruments. All other trademarks are the ­property of their respective owners.

SLYT580

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and otherchanges to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latest
issue. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current andcomplete. All semiconductor products (also referred to herein as “components”) are sold subject to TI’s terms and conditions of salesupplied at the time of order acknowledgment.
TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI’s termsand conditions of sale of semiconductor products. Testing and other quality control techniques are used to the extent TI deems necessary
to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarily
performed.
TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products andapplications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provide
adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, orother intellectual property right relating to any combination, machine, or process in which TI components or services are used. Information
published by TI regarding third-party products or services does not constitute a license to use such products or services or a warranty orendorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of thethird party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of significant portions of TI information in TI data books or data sheets is permissible only if reproduction is without alterationand is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altereddocumentation. Information of third parties may be subject to additional restrictions.
Resale of TI components or services with statements different from or beyond the parameters stated by TI for that component or service
voids all express and any implied warranties for the associated TI component or service and is an unfair and deceptive business practice.
TI is not responsible or liable for any such statements.
Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements
concerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or support
that may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards whichanticipate dangerous consequences of failures, monitor failures and their consequences, lessen the likelihood of failures that might cause
harm and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the useof any TI components in safety-critical applications.
In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is tohelp enable customers to design and create their own end-product solutions that meet applicable functional safety standards andrequirements. Nonetheless, such components are subject to these terms.
No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the parties
have executed a special agreement specifically governing such use.
Only those TI components which TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use inmilitary/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components
which have not been so designated is solely at the Buyer's risk, and that Buyer is solely responsible for compliance with all legal andregulatory requirements in connection with such use.
TI has specifically designated certain components as meeting ISO/TS16949 requirements, mainly for automotive use. In any case of use ofnon-designated products, TI will not be responsible for any failure to meet ISO/TS16949.
Products

Applications

Audio

www.ti.com/audio

Automotive and Transportation

www.ti.com/automotive

Amplifiers

amplifier.ti.com

Communications and Telecom

www.ti.com/communications

Data Converters

dataconverter.ti.com

Computers and Peripherals

www.ti.com/computers

DLP® Products

www.dlp.com

Consumer Electronics

www.ti.com/consumer-apps

DSP

dsp.ti.com

Energy and Lighting

www.ti.com/energy

Clocks and Timers

www.ti.com/clocks

Industrial

www.ti.com/industrial

Interfaceinterface.ti.com

Medicalwww.ti.com/medical

Logic

logic.ti.com

Security

www.ti.com/security

Power Mgmt

power.ti.com

Space, Avionics and Defense

www.ti.com/space-avionics-defense

Microcontrollers

microcontroller.ti.com

Video and Imaging

www.ti.com/video

RFID

www.ti-rfid.com

OMAP Applications Processors

www.ti.com/omapTI E2E Community

e2e.ti.com

Wireless Connectivity

www.ti.com/wirelessconnectivity
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2014, Texas Instruments Incorporated