# How does a knock sensor work

**URL:** <https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260>\
**Category:** Factual Questions\
**Created:** [October 14, 2013, 10:31pm UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260 "2013-10-14T22:31:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inigo\_Montoya](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/inigo_montoya/32/124_2.png) [@Inigo\_Montoya](https://boards.straightdope.com/u/Inigo_Montoya)\
**Post date:** [October 14, 2013, 10:31pm UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/1 "2013-10-14T22:31:56Z")

</div>

Scenario: high-compression engine needs higher octane fuel to prevent the fuel-air mix from combusting spontaneously due to pressurization–to make it wait for the car’s spark to ‘tell’ it to ignite.

So you put a lower octane fuel in the engine and you get this premature combustion (detonation! it’s as bad as it sounds) and the engine naturally runs like poop. In anticipation of people mis-fueling their cars, engine makers devised a knock sensor that (I think) detects a pattern of detonation, figures out you’re burning the wrong fuel, and makes some adjustments to minimize engine damage and poor performance.

What adjustments, exactly? less fuel & more air in the mix?

---

<div class="post-metadata">

**Author:** ![am77494](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@am77494](https://boards.straightdope.com/u/am77494)\
**Post date:** [October 14, 2013, 10:54pm UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/2 "2013-10-14T22:54:32Z")

</div>

Knocking can be caused by a variety of causes.

I am not an expert, but within a certain range the car’s computer will try to retard the sparks if it detects knocking.

---

<div class="post-metadata">

**Author:** ![zwede](https://avatars.discourse-cdn.com/v4/letter/z/ac91a4/32.png) [@zwede](https://boards.straightdope.com/u/zwede)\
**Post date:** [October 14, 2013, 11:33pm UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/3 "2013-10-14T23:33:42Z")

</div>

Couple of misunderstandings in your post.

A knock sensor does not help against pre-ignition. Luckily what you will have in your scenario (high compression engine with low octane fuel) is not pre-ignition, as that will destroy an engine in seconds.

In your scenario you will have “spark-knock”, aka “pinging”. It occurs after the spark plug ignites the fuel. The pressure in the chamber raises rapidly and the fuel/air mix in a different part of the chamber spontaneously ignites causing a second flame front.

The two flame fronts colliding causes a super sonic shock wave that rings the engine block making the characteristic pinging noise.

Spark knock is not terrible for an engine although can cause damage if it is going on for a long time.

The ringing of the block tends to be in a fairly narrow frequency range, right above 6KHz. The knock sensor is nothing but a piezo-electric microphone coupled with a bandpass filter that removes everything but the 6KHz tone.

When the car’s computer gets a signal from the knock sensor it retards the timing (making it happen later). The later spark decreases the peak chamber pressure as more of the combustion event happens after the piston has reached top-dead-center, and has started going down again (effectively making the chamber “larger”).

Since the peak pressure is lower, the lower octane fuel does not self-ignite anymore and the pinging stops.

But since the ignition timing is later, more of the combustion energy is wasted on the down stroke and power output and fuel economy suffers.

---

<div class="post-metadata">

**Author:** ![Inigo\_Montoya](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/inigo_montoya/32/124_2.png) [@Inigo\_Montoya](https://boards.straightdope.com/u/Inigo_Montoya)\
**Post date:** [October 15, 2013, 12:49am UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/4 "2013-10-15T00:49:29Z")

</div>

Thank you–about time I larned me sumthin. So would there be a knock sensor in a system with a mechanical distributor? In my 92 Golf, for instance, the distributor is geared to the crank shaft and I can’t see how the spark could get retarded without manually turning the distributor.

---

<div class="post-metadata">

**Author:** ![zwede](https://avatars.discourse-cdn.com/v4/letter/z/ac91a4/32.png) [@zwede](https://boards.straightdope.com/u/zwede)\
**Post date:** [October 15, 2013, 1:05am UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/5 "2013-10-15T01:05:21Z")

</div>

Yes, an engine with a distributor can have also have a knock sensor. By 1992 most cars had knock sensors.

The distributor rotor is turned by the crank or camshaft, but the computer still tells the coil when to fire.

The traditional ignition system had a pickup in the distributor that generated a signal slightly before the spark needed to be generated. The pickup signal went into the computer that delayed it a specific time, thus deciding the spark advance. If the knock sensor indicated pinging, the computer just delayed the spark a little further.

---

<div class="post-metadata">

**Author:** ![GreasyJack](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@GreasyJack](https://boards.straightdope.com/u/GreasyJack)\
**Post date:** [October 15, 2013, 1:05am UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/6 "2013-10-15T01:05:49Z")

</div>

> [@The Great Sun Jester](#):
>
> Thank you–about time I larned me sumthin. So would there be a knock sensor in a system with a mechanical distributor? In my 92 Golf, for instance, the distributor is geared to the crank shaft and I can’t see how the spark could get retarded without manually turning the distributor.

There’s a fairly wide arc where the rotor makes contact with each terminal and so the computer can adjust when it actually fires the coil within that arc to change the timing.

---

<div class="post-metadata">

**Author:** ![Gary\_T](https://avatars.discourse-cdn.com/v4/letter/g/3ec8ea/32.png) [@Gary\_T](https://boards.straightdope.com/u/Gary_T)\
**Post date:** [October 15, 2013, 1:16am UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/7 "2013-10-15T01:16:11Z")

</div>

> [@The Great Sun Jester](#):
>
> Thank you–about time I larned me sumthin. So would there be a knock sensor in a system with a mechanical distributor? In my 92 Golf, for instance, the distributor is geared to the crank shaft and I can’t see how the spark could get retarded without manually turning the distributor.

It’s done electronically through the ignition control module. Your Golf does have a knock sensor.

In an older system that used points (a mechanical switch) rather than having electronic ignition (using a magnetic or optical switch), the only feasible way to retard ignition timing as a running adjustment was with a vacuum retard capsule. Some vehicles did have this to reduce NO2 emissions.

---

<div class="post-metadata">

**Author:** ![Inigo\_Montoya](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/inigo_montoya/32/124_2.png) [@Inigo\_Montoya](https://boards.straightdope.com/u/Inigo_Montoya)\
**Post date:** [October 15, 2013, 1:22am UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/8 "2013-10-15T01:22:33Z")

</div>

> [@Gary\_T](#):
>
> Your Golf does have a knock sensor.

If that’s the case, mine ist verfukken because I put 85 in it and it would stall on deceleration (unless I set it to idle at like 15-2000) and pinged like a glockenspiel. Having recently done a fair bit of motorwerken recently I thought I’d done something terribly wrong. Then I gassed up with 91 (because the fuel cap cover had a bunch of German and a ‘91’ printed on a sticker) and now it runs great. Been pondering knock sensors and such ever since.

---

<div class="post-metadata">

**Author:** ![GreasyJack](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@GreasyJack](https://boards.straightdope.com/u/GreasyJack)\
**Post date:** [October 15, 2013, 1:49am UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/9 "2013-10-15T01:49:00Z")

</div>

> [@The Great Sun Jester](#):
>
> because the fuel cap cover had a bunch of German and a ‘91’ printed on a sticker)

Does it say RON on it too? 91 RON is the same as 87 in R+M/2 which is what we use in the US. This has lead to much confusion over the years since only recently have zeee Germans felt the need to print different octane requirement stickers for countries that use the different octane method. Anyways, I _think_ your car only requires regular gas, since only the turbo Golfs required premium and I don’t think they sold any stateside in '92.

---

<div class="post-metadata">

**Author:** ![Machine\_Elf](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Machine\_Elf](https://boards.straightdope.com/u/Machine_Elf)\
**Post date:** [October 15, 2013, 2:22pm UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/10 "2013-10-15T14:22:17Z")

</div>

> [@zwede](#):
>
> In your scenario you will have “spark-knock”, aka “pinging”. It occurs after the spark plug ignites the fuel. The pressure in the chamber raises rapidly and the fuel/air mix in a different part of the chamber spontaneously ignites causing a second flame front.
> 
> The two flame fronts colliding causes a super sonic shock wave that rings the engine block making the characteristic pinging noise.

This is not entirely accurate. You’re describing autoignition (the spontaneous initiation of a flame front in a location other than the spark plug, typically by a hot spot on the combustion chamber surface), but to create the shock wave that the knock sensor senses, you need detonation.

Whereas normal combustion (deflagration) progresses at subsonic speeds and is triggered by a thermal front, detonation progresses at supersonic speeds and is triggered by a shock wave. The difference is aptly demonstrated with some kinds of high explosives: you can toss them in a campfire and they will deflagrate slowly and safely like a log, but if you hit them with a shock wave from a blasting cap, they will detonate with their full rated explosive force.

The transition from deflagration to detonation in an engine happens at elevated temperatures and pressures. Detonation may even happen without hot-spot ignition elsewhere. There is a time factor as well, since it takes a few milliseconds for the chemistry to work: for given peak pressure/temperature conditions, you may get knock at low RPM but not at high RPM. Autoignition experiments in rapid-compression test machines have shown this: squeeze a combustible mixture to autoignition pressures/temperatures, and there’s a delay of a few milliseconds before combustion actually happens. So even if you’re squeezing the hell out of the unburned gases in the combustion chamber, if you can deflagrate it quickly, before it transitions to detonation, things will be fine. In that sense, engines will small cylinders are at an advantage: a 3-liter V6 will detonate under operating conditions where a 3-liter V10 won’t have any problems. The problem in large-bore engines can be solved in some cases by adding a second spark plug elsewhere in the combustion chamber to help get combustion done faster, before knock can set in. Note that this also aids efficiency, by getting more of the combustion done near TDC.

---

<div class="post-metadata">

**Author:** ![sailor](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sailor](https://boards.straightdope.com/u/sailor)\
**Post date:** [October 15, 2013, 3:30pm UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/11 "2013-10-15T15:30:20Z")

</div>

- Knock, knock

- Who’s there?

- Knocking gasoline

- Knocking gasoline who?

- Delay the ignition you moron!

- Oh, Ok.

[exeunts]

---

<div class="post-metadata">

**Author:** ![zwede](https://avatars.discourse-cdn.com/v4/letter/z/ac91a4/32.png) [@zwede](https://boards.straightdope.com/u/zwede)\
**Post date:** [October 15, 2013, 8:57pm UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/12 "2013-10-15T20:57:58Z")

</div>

Machine Elf: So would it be correct to say that detonation is when a fuel/air mix that is undergoing combustion is exposed to excessive pressure & temp to where the sub-sonic flame front goes super-sonic?

I think that’s the gist I extracted. 🙂

I always thought pinging required a second flame front, so ignorance fought. Thanks.

---

<div class="post-metadata">

**Author:** ![JerrySTL](https://avatars.discourse-cdn.com/v4/letter/j/e274bd/32.png) [@JerrySTL](https://boards.straightdope.com/u/JerrySTL)\
**Post date:** [October 15, 2013, 9:15pm UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/13 "2013-10-15T21:15:08Z")

</div>

Knock sensors aren’t only on high compression engines. They can be found on engines that use regular unleaded gasoline also.

Nissan made a V-6 in the '90s which was used on their Maximas, Quests, Mercury Villagers, and other vehicles. It frequently set off a OBDII code (P0325) for the knock sensor. Mechanics would swap out the sensor for about $800. Unfortunately a knock sensor code would mean that something was pinging or knocking on the engine - NOT that the sensor was bad.

---

<div class="post-metadata">

**Author:** ![Don\_t\_Panic](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/don_t_panic/32/398_2.png) [@Don\_t\_Panic](https://boards.straightdope.com/u/Don_t_Panic)\
**Post date:** [October 15, 2013, 9:39pm UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/14 "2013-10-15T21:39:25Z")

</div>

> [@sailor](#):
>
> - Knock, knock
> 
> - Who’s there?
> 
> - Knocking gasoline
> 
> - Knocking gasoline who?
> 
> - Delay the ignition you moron!
> 
> - Oh, Ok.
> 
> [exeunts]

-Knock, knock.  
-Who’s there?  
-Sensor.  
-Sensor who?  
-Sensor not doing anything, ya mind keeping an eye on the ignition timing?

---

<div class="post-metadata">

**Author:** ![Inigo\_Montoya](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/inigo_montoya/32/124_2.png) [@Inigo\_Montoya](https://boards.straightdope.com/u/Inigo_Montoya)\
**Post date:** [October 15, 2013, 9:48pm UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/15 "2013-10-15T21:48:52Z")

</div>

> [@GreasyJack](#):
>
> Does it say RON on it too? 91 RON is the same as 87 in R+M/2 which is what we use in the US.

It does indeed say RON. So I guess I can use mid-grade and get away with it (Here in the stratosphere gas comes in 85 - 87- 91). But since through Science I have observed in this car: 85 = crap performance, and 91 = smoozengehen I think I can spring the extra nickel/gallon for 91 over 87.

But great info so far, thanks to all! I don’t feel so bad about being ignernt, sounds like there’s actually a lot more to the music of the cylinders than you’d think.

---

<div class="post-metadata">

**Author:** ![MikeG](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/mikeg/32/4329_2.png) [@MikeG](https://boards.straightdope.com/u/MikeG)\
**Post date:** [October 15, 2013, 11:11pm UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/16 "2013-10-15T23:11:36Z")

</div>

Funny timing. I just replaced the knock sensor in my 318i. What a pain in the ass!

---

<div class="post-metadata">

**Author:** ![Machine\_Elf](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Machine\_Elf](https://boards.straightdope.com/u/Machine_Elf)\
**Post date:** [October 16, 2013, 11:53am UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/17 "2013-10-16T11:53:42Z")

</div>

> [@zwede](#):
>
> Machine Elf: So would it be correct to say that detonation is when a fuel/air mix that is undergoing combustion is exposed to excessive pressure & temp to where the sub-sonic flame front goes super-sonic?
> 
> I think that’s the gist I extracted. 🙂

That’s pretty much it. The key difference is in what’s driving the flame front - heat (deflagration), or mechanical shock (detonation).  
[/QUOTE]

---

<div class="post-metadata">

**Author:** ![SpeedwayRyan](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@SpeedwayRyan](https://boards.straightdope.com/u/SpeedwayRyan)\
**Post date:** [October 16, 2013, 1:11pm UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/18 "2013-10-16T13:11:49Z")

</div>

> [@MikeG](#):
>
> Funny timing.

(rimshot)

---

<div class="post-metadata">

**Author:** ![Machine\_Elf](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Machine\_Elf](https://boards.straightdope.com/u/Machine_Elf)\
**Post date:** [October 17, 2013, 2:52am UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/19 "2013-10-17T02:52:31Z")

</div>

> [@JerrySTL](#):
>
> Nissan made a V-6 in the '90s which was used on their Maximas, Quests, Mercury Villagers, and other vehicles. It frequently set off a OBDII code (P0325) for the knock sensor. Mechanics would swap out the sensor for about $800. Unfortunately a knock sensor code would mean that something was pinging or knocking on the engine - NOT that the sensor was bad.

Early knock sensors had crummy filtering on them, and they could be inadvertently spoofed by all kinds of stuff. A friend had a car from that era with a loose heat shield on the exhaust; the rattling of heat shield triggered the knock sensor on a continuous basis, resulting in perpetual maximum spark retard and craptastic fuel economy. Took him a while to figure out what the problem was.

---

<div class="post-metadata">

**Author:** ![Rick](https://avatars.discourse-cdn.com/v4/letter/r/9f8e36/32.png) [@Rick](https://boards.straightdope.com/u/Rick)\
**Post date:** [October 17, 2013, 3:34am UTC](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260/20 "2013-10-17T03:34:35Z")

</div>

> [@JerrySTL](#):
>
> Knock sensors aren’t only on high compression engines. They can be found on engines that use regular unleaded gasoline also.
> 
> Nissan made a V-6 in the '90s which was used on their Maximas, Quests, Mercury Villagers, and other vehicles. It frequently set off a OBDII code (P0325) for the knock sensor. Mechanics would swap out the sensor for about $800. Unfortunately a knock sensor code would mean that something was pinging or knocking on the engine - NOT that the sensor was bad.

A knock does not set a code, a code is set for an electrical malfunction, not excessive knocking.

As was mentioned the knock sensor is a microphone. All engine make noise. If the noise in the particular frequency of a knock is detected just after a spark event, and it is loud enough, it is considered a knock by the control unit.  
For Bosch and Denso systems it works like this:  
Cylinder X fires  
Control unit looks at the sensor signal from knock sensor (if more than one, looks at the one closest to the cylinder)  
Control units decides that yes, cylinder knocked.  
On the next time cylinder X is due to fire the timing on that cylinder is retarded 3 degrees from the timing map  
cylinder X fires  
(assume cylinder knocks again)  
The next spark event is retarded 3 degrees again.  
Lather rinse repeat until one of the following occurs:  
Cylinder X stops knocking at which time after a while (a few thousand revolutions give or take) the control until will start advancing the timing about .3 degrees per firing event. This continues until the engine starts knocking or the timing is at the ignition map.  
Engine moves to a different place in the load/speed range, in which case the values from the previous range are stored as a starting point for the next time the engine is in that load/speed range.  
Ignition is turned off, values are stored for the next drive.

So you have cylinder selective (all cylinders can be firing at a different timing values) adaptive (adapts for crappy fuel) knock control.

[Next page](https://boards.straightdope.com/t/how-does-a-knock-sensor-work/671260.md?page=2)
