Programmable digital knock filter?

Ecu Hardware Modifications
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 »

Yeah they are summing so it sticks out of the noise a fair bit when both signals are on - was just a resistive combiner from a dual output signal gen, didnt have anything else on hand. At about 200mV above the noise it started to trigger, this is a zoom of the simulated sensor signal...
1Vpp 100cyc 6KHz Burst With 1Vpp Noise Sum.png
1Vpp 100cyc 6KHz Burst With 1Vpp Noise Sum.png (105.52 KiB) Viewed 7178 times
Actually recording a knock sensor would be the way to go as I am sure my simulation is not even close to what it should be like. Will have a play around with some other impulse responses rather than a sine wave.


If you all pay me I will gladly do this full time :lol:
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 »

It only took me a year to get around to making a prototype, but better late than never ;)
knockfilter.jpg
knockfilter.jpg (78.27 KiB) Viewed 6917 times
Initial tests with a downloaded wav recording look very promising, the circuit appears to have no problem at all picking knock from background noise of the same sort of amplitude.
Now to track down some more knock wavs and write a configuration tool.... hopefuly that won't take me another year :oops:
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 »

WOW that's very impressive & dare I say it ground breaking if it is that clear!!!
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 »

Lookin good :punk: Good to see a sucessful test from the wav too.

I have had PCBs sitting on my desk for the last year for these too! Only using a single digi filter IC but using the dual channel mode of it, plugs in to the factory memcal position.
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'm only using a single filter ic, the other one is the mcu.
I like your idea about making it a drop-in replacement for the memcal's filter, this was just a "proof of concept" because ICBF breadboarding it up to test :?
I was really surprised that it worked first go, I wrote a very simple bit of code to load up a hardcoded set of parameters via SPI, fired it up and got instant results.
I thought something must have been wrong, so I changed the gain/bandpass freq etc and got different results, so that convinced me it must be doing it's thing properly ;)

I found some more audio samples at http://theknockbox.com.au/the-knock-box ... ecordings/ which show normal engine sounds and heavy knock at the same rpm etc, and the non-knock samples don't set off my filter but the knock samples do - so very promising.

I'm thinking about incorperating a "self-tune" mode where a loop of a specific engine knock can be played to it, and it will hunt down the best bandpass frequency setting - but I'll work on the basics (like a UI) first I think...
User avatar
Holden202T
Posts: 10311
Joined: Sat Feb 28, 2009 9:05 pm
Location: Tenambit, NSW
Contact:

Re: Programmable digital knock filter?

Post by Holden202T »

i like the idea of this for something like a holden straight 6 :) and by the looks of it your using the alloytec knock sensor ?
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 »

No, I'm using an ebay-special $15 sensor but any broadband sensor should work fine.
I haven't actually hooked the sensor up yet, so far I've been playing back knock recordings through a pc.
The gain is an adjustable parameter fed to the filter ic, so different levels from different sensors can be accomodated (and can be scaled for different RPMs to compensate for louder noise)

With no signal, the analogue output is ~ 20 (10 bit adc so 20/1024) and with normal engine noise it increases to 30-40. Knock seems to show up as 100+ so it stands out.
I've got a very noisy knock sample that seems to cause a little bit of false knock, so still more fine tuning needed.
If anyone feels like hooking their knock sensor up to their laptop's mic line and recording some samples, that would really help me...
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 »

Great posts.
Some questions for festy:

What ECU are you using?
Is the stock knock board internal or external?

If I Understand thinks correctly, you are using a HIP9011 processor. What are you doing to get output with out a trigger signal (INT/~HOLD)?
Does the analog signal follow the input signal (with band pass filtering etc) or is it only available when INT is asserted?

I am hoping to experiment with this concept, do you or VL400 have prototype boards and are you willing to sell one?

Will definetely be keeping an eye on this thread.
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 »

ECU is a Delco 808 (similar to the '165s) - it has provision for a knock filter in the memcal, and can also interface to an external knock filter.
In Australia we only got the internal knock filters, but I think some of the US cars used external ones.

I haven't hooked mine up to an ECU yet, currently it's just flashing a LED when it detects knock, and displaying the ADC values/debug info on a PC via a USB connection.

Yes, I'm using the HIP9011 - but I do have a trigger signal, the board has a PIC that manages the filter IC.
I believe the analogue signal is available during integration, but shouldn't be read outside of /HOLD condition because the internal 200kHz oscillator gets into the signal - the HIP9011's sample and hold circuit only samples in between the oscillator ticks to avoid this so it's not present in the /HOLD output.
Also, the integration time is used as a form of gain control - at low RPM you want a longer INT time to collect more samples, or the output will be very low.
Have a read of AN9770, it explains a few things that the datasheet only touches on.
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 »

You could also use the led output to hook up to an input to an aftermarket ecu, like my wolf, that doesnt have a knock sensor.... Lol
Post Reply