DSP based knock sensor - Miata Turbo Forum - Boost cars, acquire cats.

Welcome to Miataturbo.net   Members
 


ECUs and Tuning Discuss Engine Management, Tuning, & Programming

Reply
 
 
 
LinkBack Thread Tools Search this Thread
Old 12-03-2009, 02:45 PM   #1
Senior Member
Thread Starter
iTrader: (6)
 
Join Date: Jul 2007
Location: Cocoa Beach, FL
Posts: 808
Total Cats: 3
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   Reply With Quote
Old 12-05-2009, 05:47 PM   #2
Elite Member
 
Join Date: Jul 2005
Posts: 6,454
Total Cats: 80
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   Reply With Quote
Old 12-05-2009, 05:53 PM   #3
Elite Member
 
Join Date: Jul 2005
Posts: 6,454
Total Cats: 80
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   Reply With Quote
Old 12-05-2009, 06:19 PM   #4
Elite AbsurdFlow Member
 
Laur3ns's Avatar
 
Join Date: Mar 2008
Location: Enschede, NL
Posts: 2,058
Total Cats: 11
Default

Cool effort.
Laur3ns is offline   Reply With Quote
Old 12-06-2009, 12:32 PM   #5
Senior Member
Thread Starter
iTrader: (6)
 
Join Date: Jul 2007
Location: Cocoa Beach, FL
Posts: 808
Total Cats: 3
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   Reply With Quote
Old 12-06-2009, 02:03 PM   #6
Elite Member
 
Join Date: Jul 2005
Posts: 6,454
Total Cats: 80
Default

Knock can and does happen after spark occurs.

V motors typically have 2 sensors.
JasonC SBB is offline   Reply With Quote
Old 12-06-2009, 03:30 PM   #7
Senior Member
Thread Starter
iTrader: (6)
 
Join Date: Jul 2007
Location: Cocoa Beach, FL
Posts: 808
Total Cats: 3
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   Reply With Quote
 
 
Reply

Related Topics
Thread Thread Starter Forum Replies Last Post
My solution for Oiltemp and Oilpressure input into Megasuirt (MS3) Zaphod MEGAsquirt 41 01-24-2016 01:25 PM
Back to Stock Part Out!! Turbo Parts, MS2 Enhanced 01-05, Suspension, and MOAR! StratoBlue1109 Miata parts for sale/trade 16 10-02-2015 10:39 AM
Time to start learning and play with tuning The Gleas MEGAsquirt 3 10-01-2015 10:30 AM
In need of base map for stock 1997 brandonbkd MEGAsquirt 0 09-29-2015 12:52 AM
Got bad Crank Angle Sensor and Random Misfire codes, but runs fine. Greasyman General Miata Chat 2 09-28-2015 11:44 AM


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 09:07 PM.