ECUs and Tuning Discuss Engine Management, Tuning, & Programming

DSP based knock sensor

Old 12-03-2009, 01:45 PM
  #1  
Senior Member
Thread Starter
iTrader: (6)
 
TrickerZ's Avatar
 
Join Date: Jul 2007
Location: Cocoa Beach, FL
Posts: 850
Total Cats: 16
Default DSP based knock sensor

So I talked to a couple guys at work and they think it would be pretty easy to create a knock sensor based on a DSP. All we would really need to do is get samples of the noise and knock from a few different cars to write the code. We can make a serial interface for any adjustments that might be necessary and it'll output a trigger whenever it detects knock, so it could be used with a MS or just a light. I'd estimate the cost at like $100-150.

Is this something people would be interested in? What features would make it worthwhile to you? I don't think it would need any other inputs other than the knock sensor/mic to work 100%. I would support the product as well.
TrickerZ is offline  
Old 12-05-2009, 04:47 PM
  #2  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

The algorithm has to consider the crank position, as knock tends to occur in a certain range of crank position, aside from the characteristic sound.

I do have wav files of knock sounds:

Index of /jcuadra/knock

One of the files is at 5% speed - interesting to listen to. It has a characteristic descending pitch sound due to the descending piston (cavity enlarges), and multiple harmonics which are don't have a common denominator (like a gong).

You can view the spectrograph or spectrum vs. time using various free sound visualization software on the web.
JasonC SBB is offline  
Old 12-05-2009, 04:53 PM
  #3  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

BTW this recording is of off-idle tip-in knock. At high RPM and WOT it may be a bit different.
JasonC SBB is offline  
Old 12-05-2009, 05:19 PM
  #4  
Elite Member
 
Laur3ns's Avatar
 
Join Date: Mar 2008
Location: Enschede, NL
Posts: 2,053
Total Cats: 12
Default

Cool effort.
Laur3ns is offline  
Old 12-06-2009, 11:32 AM
  #5  
Senior Member
Thread Starter
iTrader: (6)
 
TrickerZ's Avatar
 
Join Date: Jul 2007
Location: Cocoa Beach, FL
Posts: 850
Total Cats: 16
Default

I'm sure we can program it to take a crank input and that'll have to be setup through the serial interface. I'm trying to make it so you can just attach it and go, though. I don't really think anything other than the mic is needed, but if anyone has info otherwise, please let me know.

I'm thinking it would be possible to create a learning aspect of it where you just run through your RPMs under load (obviously without knock) and it'll create an engine footprint. It could identify an ignition event through the sampling and do analysis based on the time between ignition events (ie, it would figure out RPM based on ignition events). The sensitivity would be adjusted based on where knock would more likely occur (which I'm assuming is closer to ignition and shouldn't be right after ignition).

Listening to that sample, I'm guessing you're revving it and that high frequency ping is the knock? If that's the case, I'm very confident that I can do what I'm saying. It's very easy to program a DSP to catch abnormal frequencies from a sample.

If you have anymore samples, please, let me hear them. I'd like to get as much data as possible, especially from different cars. I have a 1.6L, so I can get all the data I need for a 1.6 from it, but 1.8, bored, and 2.0L or even other cars entirely would be good.

How do they do knock sensing on V or H motors? Is it still just a single sensor? In reality, I could make it take multiple sensors and tell you exactly which cylinder knocked. I think all it would take is to compare the signals between each sensor and choose the one with the higher amplitude.
TrickerZ is offline  
Old 12-06-2009, 01:03 PM
  #6  
Elite Member
 
JasonC SBB's Avatar
 
Join Date: Jul 2005
Posts: 6,420
Total Cats: 84
Default

Knock can and does happen after spark occurs.

V motors typically have 2 sensors.
JasonC SBB is offline  
Old 12-06-2009, 02:30 PM
  #7  
Senior Member
Thread Starter
iTrader: (6)
 
TrickerZ's Avatar
 
Join Date: Jul 2007
Location: Cocoa Beach, FL
Posts: 850
Total Cats: 16
Default

Good to know. I just learned myself a bit more on the subject. I'm not that knowledgeable about knock, which is why I need help figuring out what to look for (I was thinking pre-ignition). It looks like the best thing for me to do is to find the ignition event and look for knock around it. If all knock is easy to hear, then I may not even need to really find the ignition, but it would be easier in determining the changes in frequency by RPM. It seems to me that the factors for changing frequency are load (MAP) and RPM.

What I'm thinking to map the motor noise is to do a pull and then let off the gas and go all the way back down. From that I can create a range of frequency from 0 throttle to 100% and by RPM. I can use that information in a formula and anything within a given tolerance away from that map (and probably correlated to some sort of frequency range table) will be recorded as knock. The part that I'm worried about with that is if overrun is enabled. I may have to say to let the RPM drop with as little throttle as possible without overrun kicking in or to have it turned off if possible.

And this was a pretty cool page: Knock Sensor Sounds
TrickerZ is offline  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
StratoBlue1109
Miata parts for sale/trade
21
09-30-2018 01:09 PM
The Gleas
MEGAsquirt
3
10-01-2015 09:30 AM
brandonbkd
MEGAsquirt
0
09-28-2015 11:52 PM
Greasyman
General Miata Chat
2
09-28-2015 10:44 AM


Thread Tools
Search this Thread
Quick Reply: DSP based knock sensor



All times are GMT -4. The time now is 12:39 PM.