DIY Independent Knock Feedback (Knock Ears)

veer90

Lieutenant
Nov 16, 2016
1,000
774
0
West Nyack, NY
Ride
e90 335i 6MT
Here's a quick write-up on how to wire up a spare knock sensor to the block, so your tuner can listen for knock in real time (aka Knock Ears or Det Cans). This is mostly for the built motor peeps experiencing false knock, but could also be helpful for stock motor high power builds with a noisy cylinder 5. Much thanks to @chrisdfv for figuring out the wiring.


Background and Issue:

In 2014 BMS ran into built motor false knock and figured out wiring 100 kOhm trim pots into the knock sensors alleviates the issue. It works, but can be risky if you go too aggressive as it's hardware-level knock signal suppression. If trim pots are being run, the resistance setting would need to be calibrated against real knock. Since the DME is effectively reading permanently desensitized knock sensors, another system separate from the DME is needed for independent knock verification.

A certain "premium" built motor company swears up and down that "our closed deck motors don't false knock". To put it as politely as I can, this is a bald-faced lie. Despite false knock supposedly being a non-issue, this company runs trim pots on their customers' closed deck built motors. Go figure.


You will need:

Steps:

Clean the rear of the spare knock sensor
IMG_20200602_233010_copy.jpg

Strip the knock sensor wiring, there will be 2 inner wires white and black if using an N54 sensor.
IMG_20200602_233019_copy.jpg

Strip one of the 3.5mm cables that's included with the amp. Solder the knock sensor to the 3.5mm jack.
Capture.PNG


At this point it's a good idea to function test. I found striking the knock sensor against a marble coaster would generate the required force to register a noise in the headphones. Any suitably hard surface will work. Set the amplifier to HIGH gain and maximum volume.
IMG_20200603_003303_copy.jpg Screenshot_20200605-225952.png

Finally, remove the alternator wire bracket and bolt sensor to block with a M8x1.25 bolt. If you don't want to remove this bracket, there's also an empty threaded hole next to the bank 2 knock sensor.
Screenshot_20200605-225947.png IMG_20200605_210829_copy.jpg
 

Attachments

  • IMG_20200605_202750_copy.jpg
    IMG_20200605_202750_copy.jpg
    417.9 KB · Views: 119

doublespaces

Administrator
Oct 18, 2016
9,303
4,331
0
AZ
Ride
2009 E93 335i
@AzNdevil has this hooked up as well and was doing something to it digitally I think.

Do you have a recording or can you match up the visualized signal to a datalog?
 
  • Like
Reactions: AzNdevil

AzNdevil

Lieutenant
Staff member
Nov 4, 2016
566
269
0
Hong Kong
@doublespaces now that you mention it, i totally forgot to start a thread about this...

this is a great idea, but you should use shielded cabling for this at least...
IMO, its better just to buy a bosch donut styled wideband knock sensor and grab a ev1 plug and wire it in... no need to cut and splice on the sensor end
since its very close to the engine, it picks up noise into the system very easily

heres my setup
IMG_20190806_015531.jpg


cheapass amplifier
IMG_20190806_011502.jpg


two possible locations to mount the sensor - number 1
IMG_20190807_193712.jpg


\two possible locations to mount the sensor - number 2
IMG_20190807_215957.jpg


DO NOT UNBOLT THIS, ITS A COOLANT DRAIN PLUG FOR THE ENGINE BLCOK, guess how i found out...................
its a good place for an external coolant sensor though...
1591547849365.png


wired it into my car
IMG_20190808_000417.jpg


im dealing with other issues at the moment so i dont have a chance to play with it but IMO it picks up a lot of valvetrain and injector noise
its possible to feed the signal into a notebook and filter out the knock frequencies
there is a software that does this, its called knock monitor basic but they dont sell just the software anymore and i havent looked around for other software that does signal processing on the fly

my original idea was to hook this up directly to my phone and record it or listen to it real time but since i cant control the amount of amplification thats done at the mic level, the recording kept on clipping,,,

IMG_20190812_014922.jpg


attached how our engine sounds like at idle, since it was recorded from my phone's mic in, it clips like crazy at WOT so im not gonna bother posting it
i bought a cheapass usb sound card but i havent played with it much recently...
 

Attachments

  • idle.zip
    2.9 MB · Views: 236
Last edited:

veer90

Lieutenant
Nov 16, 2016
1,000
774
0
West Nyack, NY
Ride
e90 335i 6MT
Thanks for the recording. I'm hearing something similar from my closed deck motor I'll try to get a recording too at some point.
 
  • Like
Reactions: AzNdevil

AzNdevil

Lieutenant
Staff member
Nov 4, 2016
566
269
0
Hong Kong
Thanks for the recording. I'm hearing something similar from my closed deck motor I'll try to get a recording too at some point.

good to know 👍 👍 im glad someone went and created something similar so i have another person to talk to about this on n54
since we have the hardware side of this done, next step would be to figure out how to put this signal to a good use

yes we can listen to it and see if it knocks but...ideally it would be better to feed it into a computer or a sound processing chip so it alerts us when it recognizes knocks... in other words, its can become a recreation of Knock Monitor (software based) or something like a plex knock monitor (hardware based)

there are sound processing chips designed for monitoring knock (eg. tpic8101)
the megasquirt guys use this
i found a Schematic on how to wire up the signal processing side of things, bought a few chips to play around with but...havent got around to it

the chip monitoring parameters are configurable and pretty much the same as how our DME filters out the knock from the knock sensor inputs

or...an easy way out would be to do something like this
 
Last edited:

veer90

Lieutenant
Nov 16, 2016
1,000
774
0
West Nyack, NY
Ride
e90 335i 6MT
Got the audio setup figured out today. I tried logging WOT but unfortunately the audio is screwy. The following clip is moderate acceleration from a stop to ~60 mph.

Blasting past other cars at 100+ with headphones on is definitely a funny feeling, probably gonna hit the dyno for this type of stuff in the future.

 

Attachments

  • 200608_1955.csv
    138.3 KB · Views: 62

kulixo

Lurker
May 26, 2020
15
3
0
I tried this aswell since I'm experiencing lots of timing corrections even on low timing.
I'm running an extra stock sensor through a shielded cable into a soundcard/notebook.

It works great, but I'm having a hard time analyzing the samples.
The samples are attached if anyone is interested in how it sounds or have any advice.
All files are the same sample, but there are 0.5 speed versions and processed versions where I removed everything outside of 5-7k hz.

And here is the log: https://datazap.me/u/kulixo/1-2?log=0&data=2-20

EDIT:

I watched this video:
and learned that it could be easier to focus on the higher harmonics. Attached a new sample with filter between 12-15k and also a little extra boost at 13.5k which should be the knock frequence for this engine.
 

Attachments

  • knock test.zip
    1.5 MB · Views: 72
  • high_freq.zip
    366.1 KB · Views: 48
Last edited:

AzNdevil

Lieutenant
Staff member
Nov 4, 2016
566
269
0
Hong Kong
a glimpse on bmw describes how their knock sensing works
https://www.newtis.info/tisv2/a/en/...ngine-electronics-mevd/knock-control/F7vgEPds

these are the knock frequencies the dme filters for, this is just one of the parameters the knock detection chip uses...

if anyones interested in how knock detection works, go google: tpic8101
not sure which chipset our car uses but the parameters are very similar to what i see in the dme
all i can say is, i cant wrap my head around this stuff and i dont have time to dig deeper

1593632793314.png
 

AzNdevil

Lieutenant
Staff member
Nov 4, 2016
566
269
0
Hong Kong
I tried this aswell since I'm experiencing lots of timing corrections even on low timing.
I'm running an extra stock sensor through a shielded cable into a soundcard/notebook.

It works great, but I'm having a hard time analyzing the samples.
The samples are attached if anyone is interested in how it sounds or have any advice.
All files are the same sample, but there are 0.5 speed versions and processed versions where I removed everything outside of 5-7k hz.

And here is the log: https://datazap.me/u/kulixo/1-2?log=0&data=2-20

EDIT:

I watched this video:
and learned that it could be easier to focus on the higher harmonics. Attached a new sample with filter between 12-15k and also a little extra boost at 13.5k which should be the knock frequence for this engine.

samples sound similar to what we have, better record it in wav though since mp3 is lossless
in order to programmatically catch the knocks, the frequencies needs filtered (low and high cut) and we catch the points where its above a certain decibel
at least this is how knock monitor does it
 

kulixo

Lurker
May 26, 2020
15
3
0
samples sound similar to what we have, better record it in wav though since mp3 is lossless
in order to programmatically catch the knocks, the frequencies needs filtered (low and high cut) and we catch the points where its above a certain decibel
at least this is how knock monitor does it

I just had my DAW setup for exporting in MP3 for some reason, but the source files are .wav.
This is all really interesting. I have an ardunio micro controller laying which could probably be programmed to analyze the sound input.
However it would be difficult without actual samples with knock events to analyze, and I don't really want to force it in my engine.
I guess there are solutions for this already, so it might be dumb to reinvent the wheel.

If anyone knows about some standalone windows software for analying knock then that would be a great start. But the best solution would be something which can be kept in the car permanent and warn somehow.

EDIT: I just realized you already mentioned knock monitor. This seems to be what I'm looking for. However, it's a bit pricey.
If I could just figure out the technique to catch the knock events with my microcontroller it would be way cheaper. And it could be connected to a red diod/alert speaker or some display.
 
Last edited:

AzNdevil

Lieutenant
Staff member
Nov 4, 2016
566
269
0
Hong Kong
I just had my DAW setup for exporting in MP3 for some reason, but the source files are .wav.
This is all really interesting. I have an ardunio micro controller laying which could probably be programmed to analyze the sound input.
However it would be difficult without actual samples with knock events to analyze, and I don't really want to force it in my engine.
I guess there are solutions for this already, so it might be dumb to reinvent the wheel.

If anyone knows about some standalone windows software for analying knock then that would be a great start. But the best solution would be something which can be kept in the car permanent and warn somehow.

EDIT: I just realized you already mentioned knock monitor. This seems to be what I'm looking for. However, it's a bit pricey.
If I could just figure out the technique to catch the knock events with my microcontroller it would be way cheaper. And it could be connected to a red diod/alert speaker or some display.

for me i was able to force it by running a desensitized knock table + ots stage 2 mhd map
it knocks even in idle...........

read my 5th post, i outlined all the solutions i can think of...
a - knock monitor (they dont sell just the software anymore, if you know how to write programs its pretty doable, there are open sourced libraries based on this and knock monitor is using it as well)
b - some controller + knock detection chip (second link in my 5th post, doable with an arduino, i can give you the parameters off our dme if you want to fiddle with it)
c - some controller + voltage sampling (sample sketch is in the last link in my 5th post, most likely requires some editing for our use)

now that i come to think of it, since we have two possible locations to mount knock sensors, its probably better to pick up another set of knock sensors for our car, order the male plug and pin it to a shielded 3 core (left/right/gruond) cable, feed it into an amplifier and it will be pretty much what our dme sees
 

ajm8127

Specialist
Jul 16, 2020
69
135
0
PA - US
Ride
2007 E90 335i
This is pretty cool.

You generally want to have the amplifier as close to the high impedance source (knock sensor) as possible, at least the first stage (low noise amplifier if possible). The signals are very small coming from the sensor. If noise gets in before the amplifier what is amplified will be the small signal plus the noise. Keeping the cable between the sensor and the amp as short as possible (and shielded at one end) will help to maximize the signal to noise ratio because it limits the noise. Not sure if it is necessary in this application, but I figured I'd mention it.

From there you can apply a band pass filter and an additional amplification. Search around for band pass filter circuits built using op amps.

That TI chip is super interesting. You'd need to hook it to a microcontroller to make it work, however. The SPI interface controls which channel is selected and controls the internal DSP. From some of the posts above about clipping at high RPM, it seems like a controller would need to monitor RPM and scale back the programmable amplifier as the engine speed increased. I think the integration window would change as the RPMs increased, but I am not exactly sure. It looks like the Eval Kit comes with everything you'd need: https://www.ti.com/tool/TPIC8101EVM

Anything you build to automatically detect knock is going to need to know RPM. It was mentioned above how the audio clips at higher RPMs. I suspect a chip like the TI chip would adjust the programmable gain amplifier to reduce the signal magnitude as RPM increased. The Knock Monitor device also shows a rising threshold as RPM increases. Perhaps just turn the gain down some if it is clipping at high RPM if you can't dynamically adjust the gain. Of course it will be less sensitive at low RPM, but that's the trade off.

I wonder if you could take an RPM signal and low pass filter it to create a DC voltage that could be scaled and then compared to the filtered, amplified output of the knock sensor.

Honestly, I think the human ear is an amazing sensor. Using the knock sensor and some amplification and filtering I think your ear is really powerful in this application, especially because knock events are already picked up by the sensor in the audio range.