Programmable digital knock filter?

Ecu Hardware Modifications
User avatar
festy
Posts: 1039
Joined: Sat Apr 30, 2011 6:27 pm
cars: Alfa Romeos
Location: Narellan, NSW

Re: Programmable digital knock filter?

Post by festy »

Absolutely, this isn't just applicable to Delco ECUs.
Jervies
Posts: 199
Joined: Wed Nov 09, 2011 5:35 pm
cars: Vt v6 wiith a gt35/40 turbo e85 399rwkw
Mazda e2000 with a cammed vx ecotec motor
Location: Victoria

Re: Programmable digital knock filter?

Post by Jervies »

Any time youd like to sell 1 or need a test dummy let me know
User avatar
festy
Posts: 1039
Joined: Sat Apr 30, 2011 6:27 pm
cars: Alfa Romeos
Location: Narellan, NSW

Re: Programmable digital knock filter?

Post by festy »

Give me a week or two and I might be looking for some test bunnies ;)
VX L67 Getrag
Posts: 2882
Joined: Sun Aug 02, 2009 9:16 pm
Location: Bayside, Melbourne, Victoria
Contact:

Re: Programmable digital knock filter?

Post by VX L67 Getrag »

Hell's yeah I'd love to be a test bunny!

I know from previous testing myself & another more advanced tuner some sensors react totally different mounted on different motors, so might need to make different sensors with multi plug in cable to suit different applications!
bobworkman
Posts: 3
Joined: Mon Oct 08, 2012 11:43 pm
cars: 28 Ford Roadster 400cid Hilborn stack EFI, 49 Chev PU 350 TPI,
51 Chev pu stock,WV Rabbit convertible.

Re: Programmable digital knock filter?

Post by bobworkman »

I am in Canada so I am familiar with the 165. My original TPI setup came off an 87 firebird so it had a 1619825, a 165 with high speed ALDL. It has an external ESC (knock detector) and MAF. I explored doing an 808 conversion to get MAP but ended up opting for a 1227730.

So you are triggering the HIP9011 from the PIC based on a cycle generated by clock/timer, reading the knock value and displaying it.
What are your plans for ECU implementation? as I understand it, the ECU is looking for an analog signal. With the arrival of the poorer weather I will have more indoor project time so I am intending to set up a Jstim test bench and scope all the signals, both stock and knock sensor chip.

Jervies: there are several threads about this at Megaextra ( http://msextra.com/forums ) a site for the MegaSquirt 3rd aftermarket WECU, however their ECU has a trigger signal tied to the ignition event so this setup will readily work for them.

VXL167: Yes,With the Delco ECUs different motors use different knock sensors tuned to the motors resonant frequency. It gets even more complex as the 87 to 89 cars with 5.7L motors and many newer minivans used a knock sensor tuned to the 2nd resonant frequency. So it is important not only to use the correct sensor, but also to used the matching knock board. The beauty of the HIP9011 (and the TI8101 from Texas Instruments) is that the frequency it centers on is a setable parameter.

I would definetly be interested in your prototype board, or PCB layout I can get one made from as my current setup is based on a breadboard.

Bob
User avatar
festy
Posts: 1039
Joined: Sat Apr 30, 2011 6:27 pm
cars: Alfa Romeos
Location: Narellan, NSW

Re: Programmable digital knock filter?

Post by festy »

bobworkman wrote: So you are triggering the HIP9011 from the PIC based on a cycle generated by clock/timer, reading the knock value and displaying it.
Currently in it's simplest form - yes, but one of my future plans is to implement windowing.
This is a little tricky with an 808 as there's no signal to indicate when a specific cylinder is firing - well, not that I know of at least.
The best (easiest) way of doing this that I can see is to use a spark sensor on my #3 plug lead, and start listening for knock after it fires (4 cyl engine, firing order 1-3-4-2, knock sensor on the back of the block).
I was initially planning on re-purposing my now-defunct distributor to trigger the window, but that wouldn't take advance into account so wouldn't work too well.
Another option would be to install a cam sensor, and in conjunction with the ignition module's tacho pulse calculate when cyl 4 would be about to fire... but that's all getting a bit too involved for now ;)
What are your plans for ECU implementation? as I understand it, the ECU is looking for an analog signal.
My interpretation of VL400's tests is that it's an active low digital signal to indicate knock. Not sure whether it's an analogue or digital port that it goes to, but the signal sure looks digital on page 1 of this thread?
With the Delco ECUs different motors use different knock sensors tuned to the motors resonant frequency. It gets even more complex as the 87 to 89 cars with 5.7L motors and many newer minivans used a knock sensor tuned to the 2nd resonant frequency.
Here's a datasheet for a Delphi "flat response" knock sensor, with a bandwidth covering 1-18kHz, and here's what they call their broadband sensors (which are tuned to a resonant frequency). Interesting use of the term "broadband" ;)
Apparently these have a usable bandwidth of about 1KHz.
A 202 has a approximate knock frequency of 6.2kHz, 3.8 v6 is 5.9kHz, 308 is 5.7kHz and the LS1 is 5.9kHz, so a 6kHz sensor would cover them all. (very rough numbers, VL400 mentioned that the VY v6 ECU uses 6.17kHz)
My Alfa has a knock frequency around 6.8kHz, so would need a different sensor - or a "flat response" sensor like I'm using.
bobworkman
Posts: 3
Joined: Mon Oct 08, 2012 11:43 pm
cars: 28 Ford Roadster 400cid Hilborn stack EFI, 49 Chev PU 350 TPI,
51 Chev pu stock,WV Rabbit convertible.

Re: Programmable digital knock filter?

Post by bobworkman »

Festy wrote:
I was initially planning on re-purposing my now-defunct distributor to trigger the window
So what are you using to trigger the spark. My 165 uses a distributor reference pulse as a pseudo cam indicator and the ECU calculates the actual spark timing from that.
Even so I am not sure how to relate that to actual spark window at all RPM, and if that is what is needed. Looking at Schematics and source code the ECU seems to count the number of "pulses" coming from the knock board in a 61usec window so maybe just a constant loop of INT/~HOLD sending output to ECU would be good enough.
My interpretation of VL400's tests is that it's an active low digital signal to indicate knock. Not sure whether it's an analogue or digital port that it goes to, but the signal sure looks digital on page 1 of this thread?
I agree I had not looked closely at those pics. I do know that the info is loaded from an (counter) address mapped to the chip the knock signal goes to as a 16 bit value.

As we are talking oranges and grapefruit when it comes to engines and displacement your values vs engine size means little to me.
It is the bore of the cylinder that determines knock frequency. A V8 5.7L and a V6 4.3L here have the same bore and therefore the same knock frequency.

Knock frequency (in Khz) = 900/ (pi x cylinder radius in mm) or 1800/(pi x diameter in mm)

a usefull chart can be found athttp://www.vems.hu/wiki/index.php?page= ... nDetection

and another article can be found at http://autospeed.com/cms/title_DIY-Deto ... ticle.html

This page shows some ineresting data on several knock sensors http://www.deviantmethods.com/bigmoose/pages/knock.htm
and this link has several sound recordings that VL400 could feed into the knock board for comparison.
http://theknockbox.com.au/the-knock-box ... ecordings/
User avatar
festy
Posts: 1039
Joined: Sat Apr 30, 2011 6:27 pm
cars: Alfa Romeos
Location: Narellan, NSW

Re: Programmable digital knock filter?

Post by festy »

I found this board sitting in a box yesterday, so thought I'd see about getting it working properly.
A few hours debugging it and I think it's pretty close now.

Here's a frequency analysis of the input signal (the knock sensor recording) showing the knock between 5kHz and 6kHz.
freq.png
freq.png (11.88 KiB) Viewed 7539 times
Here's the knock audio (top) and the filter's output (bottom):
knock_in_out.png
knock_in_out.png (18.05 KiB) Viewed 7539 times
This test didn't have the filter gain or timings optimised, so better results could be achieved with some tuning.
Although the audio waveform looks much louder during the knocks, playing it through a speaker the only difference I can hear is the "ping ping" noises over the top of the background...



And here's another one, with the knock frequency set to 3.7Khz (i.e. way off the knock center frequency) - it picked up a bit of knock but not too much.
That pic convinced me that the filter is taking the settings I'm passing it:
knock_in_out_off_freq.png
knock_in_out_off_freq.png (15.09 KiB) Viewed 7539 times
User avatar
festy
Posts: 1039
Joined: Sat Apr 30, 2011 6:27 pm
cars: Alfa Romeos
Location: Narellan, NSW

Re: Programmable digital knock filter?

Post by festy »

And here's a few different filter frequencies/gains/integration timings being tried - I haven't got the traces all lined up in sync (ms paint is hopeless) but you get the idea...
knock_tuning.png
knock_tuning.png (42.3 KiB) Viewed 7530 times
Trying the different settings is done from the GUI, so it only takes a few seconds to try each setting out:
gui.png
gui.png (28.39 KiB) Viewed 7530 times
Update:
I increased the analogue output detection threshold which gives the filter more freedom, and it becomes less touchy about center frequencies etc.
It only took a couple of settings adjustments to get a decent detection of a new audio sample:
more_knock.png
more_knock.png (19.76 KiB) Viewed 7516 times
User avatar
VL400
Posts: 4991
Joined: Sun Mar 01, 2009 2:54 pm
cars: VL Calais and Toyota Landcruiser. Plus some toys :)
Location: Perth, WA
Contact:

Re: Programmable digital knock filter?

Post by VL400 »

Looking really good :thumbup:
Post Reply