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

Programmable digital knock filter?

Post by festy »

I'm looking into the possibillity of making a universal replacement knock filter module using a digital filter, with programmable frequency/gain characteristics - the idea being something like you hook it up to a pc and select your engine profile using a gui, with the option of tweaking some specific parameters. The one filter would suit anything from a mini to a big block just by changing the profile. The actual knock sensor used would be a generic flat response device.
Ideally i'd like to make a drop-in replacement for the gm ones on the memcal rather than an external device.
But I'm having trouble finding information on the filter boards, does anyone have any details on the pinouts or signal levels?
I'm hoping the filters get some form of rpm feedback from the ecu so a gain vs rpm map can be implemented on them to compensate for the noise floor increase?
And is windowing done by the ecu with the standard setup?
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 »

Sounds like a fun project, there are specific ICs for this, the HIP9010 and HIP9011 are two but are extremely hard to get hold of and fairly old now. Am sure there are newer versions, but it could easily be done on a micro now. The early knock filtering is not windowed AFAIK but from VS on it def is. The later models are fully configurable for all params including freq response :thumbup: The early board is a bandpass filter with a digital output connected to a counter on the ECU, it sums up the total knock duration between code loops. The later is all interrupt driven for the windowing and can do knock retard on a per cyl basis.
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 »

HIP9011 is what I'm intending to use, I looked around for newer designs but the only other chip I could find was TI's tpic8101 - which seems to be identical to Intersil's. I weighed up a DSP design, but the HIP9011 appears to be such a neat solution - just set the parameters via the SPI bus, and read the knock result on either the analog or digital outputs so no point reinventing the wheel when there's a purpose made chip.
You're right about them being hard to get hold of these days - that's why when I finally tracked down a supplier I bought a rather large quantity ;)

My idea is to implement pretty much the same circuit that's in their AN, and add a baby pic to the board as the SPI master.
A windows frontend would handle the conversion of engine bore to bandpass frequency plus the rpm vs gain curve etc, and pass the configuration bit values to the pic via rs232. The pic would write these to eeprom, and update the HIP9011's registers - so you could tweak it while the engine is running to fine tune.

If I added a spark sensor I could implement windowing on the pic - but that would mean external connections to the module, so not in scope at this point.
Whether it works out or not, I should learn a thing or two in the process :study:

I don't suppose you have a scope capture of the filter's output during knock? Is it active low?
Does it hold the output steady during knock, or pulse per event? My guess would be hold?
User avatar
antus
Site Admin
Posts: 8237
Joined: Sat Feb 28, 2009 8:34 pm
cars: TX Gemini 2L Twincam
TX Gemini SR20 18psi
Datsun 1200 Ute
Subaru Blitzen '06 EZ30 4th gen, 3.0R Spec B
Contact:

Re: Programmable digital knock filter?

Post by antus »

Good luck, this would be greatly useful for those of us with '808s on non buick v6 engines! I'll take 5... heh.
Have you read the FAQ? For lots of information and links to significant threads see here: http://pcmhacking.net/forums/viewtopic.php?f=7&t=1396
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 »

festy wrote:I don't suppose you have a scope capture of the filter's output during knock? Is it active low?
Does it hold the output steady during knock, or pulse per event? My guess would be hold?
I tried to get something but it was not making much sense :wtf: VY V6 uses 6.17KHz and a Q of 4.5, so setup a sweep gen on a V6 and V8 memcal in an '808 to simulate a knock sensor and try and get a freq response. The sweep test didnt give the expected results - a 10 second sweep at 1Vp-p from 1KHz to 25KHz does not trigger the output, nor does a steady 5-6KHz 1Vp-p signal. But .. using burst mode and injecting 100 cycles at 6KHz does. So must not be a simple BPF.

These were all done on a V6 memcal, blue is simulated knock sensor and yellow the output of the knock filter board (inside the ECU it inverts this signal before feeding a counter) ..

Lowest freq to trigger
1Vpp 100cyc Burst Low.jpg
1Vpp 100cyc Burst Low.jpg (123.51 KiB) Viewed 16182 times
Highest freq
1Vpp 100cyc Burst High.jpg
1Vpp 100cyc Burst High.jpg (116.55 KiB) Viewed 16182 times

Made more sense but freq range was too high, so prob over driving the BPF, changed to 500mV and injected 100cycles..

Lowest freq to trigger
0.5Vpp 100cyc Burst Low.jpg
0.5Vpp 100cyc Burst Low.jpg (124.17 KiB) Viewed 16182 times
Highest freq
0.5Vpp 100cyc Burst High.jpg
0.5Vpp 100cyc Burst High.jpg (127.84 KiB) Viewed 16182 times


And changing to 25cycles changes the response again

Lowest freq to trigger
0.5Vpp 25cyc Burst Low.jpg
0.5Vpp 25cyc Burst Low.jpg (117.19 KiB) Viewed 16182 times
Highest freq
0.5Vpp 25cyc Burst High.jpg
0.5Vpp 25cyc Burst High.jpg (119.35 KiB) Viewed 16182 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 »

Thanks so much for getting those for me, it gives me plenty to get started with :thumbup:
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 »

No probs, but while its all setup should have V8 too I guess...

100cycle Low Freq
0.5Vpp 100cyc Burst Low V8.png
0.5Vpp 100cyc Burst Low V8.png (54.76 KiB) Viewed 16176 times
100cycle High Freq
0.5Vpp 100cyc Burst High V8.png
0.5Vpp 100cyc Burst High V8.png (43.68 KiB) Viewed 16176 times
25cycle Low Freq
0.5Vpp 25cyc Burst Low V8.png
0.5Vpp 25cyc Burst Low V8.png (41.92 KiB) Viewed 16176 times
25cycle High Freq
0.5Vpp 25cyc Burst High V8.png
0.5Vpp 25cyc Burst High V8.png (39.84 KiB) Viewed 16176 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 »

Are you able to test with an off-frequency signal of the same amplitude, while pulsing the 6khz signal?
Just wondering whether the knock still gets detected when it's at/below the background noise level, or if that's why knock stops getting detected at higher rpm on these.

I'm sure you've got the right toys for testing that.... I certainly don't :oops:
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 »

Like noise injected at the same time?

1V p-p for both signals, 100cycle burst at 6KHz and noise on the other.
Green = Burst Signal
Pink = Noise
Blue = Combined
Yellow = Knock output
1Vpp 100cyc 6KHz Burst With 1Vpp Noise.png
1Vpp 100cyc 6KHz Burst With 1Vpp Noise.png (111.51 KiB) Viewed 16169 times
1Vpp 100cyc 6KHz Burst With 1Vpp Noise Zoom.png
1Vpp 100cyc 6KHz Burst With 1Vpp Noise Zoom.png (111.03 KiB) Viewed 16169 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 »

Again I thank you - and those are very pretty pictures, I'll be staring at them a fair bit in the coming day/weeks I think ;)
The knock signal was still well above the noise floor if I'm reading those correctly - because the waves that lined up with the noise summed the amplitude?
I might have to try and record the output of a knock sensor and use that as the signal for testing, because I can't think of any way to simulate a proper real world knock event mixed in with background engine noise better than what you've done today.
Thanks again for all the detail, the forum should pay you more :thumbup:
Post Reply