Knock detection

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Knock detection

Post by jsmcortina »

I was having a look at the existing knock detection code the other day and noticed something that seemed just plain wrong.

It appears that the code is checking the knock input pin every time around the mainloop (up to 2000 times per second) and if the pin is set then it increments the knock counter and retards the timing.
This doesn't seem right at all.
- a short input pulse could perhaps be missed
- one single long input pulse can be counted as thousands of knock events completely retarding the timing.

Seems that a better method would be to sample the pin only when we expect a signal, latch it if one occurs and increment the knock count only once per cylinder.

I've not (yet) used the knock control, so I don't know if this ties up with actual observation.

James

(NB. intentionally posted in MS2 dev then moved to MS3 dev)
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Matt Cramer
Super MS/Extra'er
Posts: 17499
Joined: Thu Apr 16, 2009 8:08 pm

Re: Knock detection

Post by Matt Cramer »

The MS1/Extra knock circuit is designed to send a 0.4 second pulse when it gets even the shortest knock signal. Now I see why it's so long.
Matt Cramer -1966 Dodge Dart slant six running on MS3X
prof315
Super MS/Extra'er
Posts: 3760
Joined: Sun Jan 18, 2009 3:13 am
Location: Melbourne, FL

Re: Knock detection

Post by prof315 »

jsmcortina wrote:Seems that a better method would be to sample the pin only when we expect a signal, latch it if one occurs and increment the knock count only once per cylinder.

James

(NB. intentionally posted in MS2 dev then moved to MS3 dev)
I'm pretty sure that that is how the OEMs do it. I know GM does something like that on engines that have a knock sensor(s)

Jeff
Linfert Performance/321 Motorsports
SCCA 2019 SM National Champion Crew Chief
SCCA 2023 FP National Champion Tuner/electrical engineer
100s of MS systems built installed and tuned
Support the developers!
elaw
Super MS/Extra'er
Posts: 2926
Joined: Fri Oct 16, 2009 6:20 am
Location: Wilmington, MA

Re: Knock detection

Post by elaw »

jsmcortina wrote:Seems that a better method would be to sample the pin only when we expect a signal, latch it if one occurs and increment the knock count only once per cylinder.
Of course only a heartbeat away from that would be something *extra* cool, which would be storing a separate knock-retard number per cylinder! :mrgreen:
Eric Law
1990 Audi 80 quattro with AAN turbo engine: happily running on MS3+MS3X
2012 Audi A4 quattro, desperately in need of tweaking

Be alert! America needs more lerts.
bubba2533
Experienced MS/Extra'er
Posts: 342
Joined: Wed Jan 28, 2009 6:12 pm

Re: Knock detection

Post by bubba2533 »

elaw wrote:
jsmcortina wrote:Seems that a better method would be to sample the pin only when we expect a signal, latch it if one occurs and increment the knock count only once per cylinder.
Of course only a heartbeat away from that would be something *extra* cool, which would be storing a separate knock-retard number per cylinder! :mrgreen:
Individual cylinder knock detection! Now that's a feature.
97 Subaru Impreza 2.2L - MS3 w/ MS3/x
UnaClocker
Super MS/Extra'er
Posts: 1933
Joined: Fri May 07, 2004 12:59 pm
Location: Tacoma, WA
Contact:

Re: Knock detection

Post by UnaClocker »

Chrysler had it in 85.. We should be able to have it.. ;) I remember reading numerous reports about the knock sense never working right. Has this always been broken like this (in MS2 and now MS3)? It'll be great to have a system that works better. I've never bothered with it because I've never seen someone report real success with the thing, just a lot of reports of epic failure. The way you describe what the code would do sounds pretty close to what I remember people saying about the knock code.. It reports way too much knock..
Brian
'84 Dodge Rampage
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Knock detection

Post by jsmcortina »

UnaClocker wrote:The way you describe what the code would do sounds pretty close to what I remember people saying about the knock code.. It reports way too much knock..
I'd be interested to hear some first hand feedback on that.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Keithg
Super MS/Extra'er
Posts: 2413
Joined: Sun Mar 06, 2005 9:15 am
Location: Chicago, IL, USA
Contact:

Re: Knock detection

Post by Keithg »

UnaClocker wrote:Chrysler had it in 85.. We should be able to have it.. ;) I remember reading numerous reports about the knock sense never working right. Has this always been broken like this (in MS2 and now MS3)? It'll be great to have a system that works better. I've never bothered with it because I've never seen someone report real success with the thing, just a lot of reports of epic failure. The way you describe what the code would do sounds pretty close to what I remember people saying about the knock code.. It reports way too much knock..
The knock code seems to work well for me. I have been using it for 2 years, I think. First in MS2 and now in MS3. I use a Saab APC box for the knock sensor/conditioner and it gives me a ground when it sees knock. I used it to tweak my WOT fuel and spark. I have no complaints and it seems to be 'similar' to what the original system would report from Saab (before I modified it)

KeithG
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Knock detection

Post by jsmcortina »

From what I saw in the code I was rather expecting a single knock input pulse to pull out nearly all of the timing in a very short period of time - do you see that ?

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Keithg
Super MS/Extra'er
Posts: 2413
Joined: Sun Mar 06, 2005 9:15 am
Location: Chicago, IL, USA
Contact:

Re: Knock detection

Post by Keithg »

jsmcortina wrote:From what I saw in the code I was rather expecting a single knock input pulse to pull out nearly all of the timing in a very short period of time - do you see that ?

James
Hmmm. I will have to make some changes and log it to see what it is doing. It has been so long ago that I tuned it. I am running fuel and spark pretty conservatively, so as to not experience knock at this time. Also, I always run Premium fuel.

Keith
Tjabo
Master MS/Extra'er
Posts: 846
Joined: Sat Nov 05, 2005 7:36 pm

Re: Knock detection

Post by Tjabo »

This would open up a whole new world of possibilities if we got it to work right/well. I'm paying attention! :shock:

And BTW, when messing with my "electronic det cans," I've found that the broadband detonation sensors give out a signal that is nice for the ears to distinguish knock, but only when the ambient noise level is relatively low. I.e. NOT when the open WG dump pipe is wailing...

Conversely, the Chrysler version "tuned" knock sensor is pretty much like a continuous unintelligible screech no matter what. Maybe there is a specific frequency produced when the a "knock frequency" event occurs, but not that I was able to find. I've got to admit though, I couldn't take it for long, so maybe I just didn't give it a good chance.

Thad
--'98 Dodge Neon ACR Turbo - MS3 beta test car - Sold
--'97 BMW 540i/6spd - Single Front/Top Mount Turbo 550+ HP - MS3+MS3X V3.0 - Sold but ripping in Vegas
--'97 BMW 328i 5.3 L33/TH400 Swapped drift car - MS3+MS3X V3.0 Full Sequential - Turbos And Radiator In the Trunk 9.6@144 on a 1.55 60ft
davcol
Experienced MS/Extra'er
Posts: 160
Joined: Tue Dec 22, 2009 6:12 pm

Re: Knock detection

Post by davcol »

jsmcortina wrote:From what I saw in the code I was rather expecting a single knock input pulse to pull out nearly all of the timing in a very short period of time - do you see that ?

James
thats exactly what i have been experiencing with my knock sensing system , the default setting was 10 degrees and upon the first knock recorded MS pull all 10 degrees at once because of that i have to lower the settings to 4 degrees inorder not to have a draggie feel from it.
i am not an expert but i don't feel that this is work right and because of that i have made a lot of complaint to viatrak saying that the unit i bought was too sensitve and it was pull too much timing all at once.
this would be a really break through if this was to be corrected. :yeah!:
m2 extra v3.57 3sgte full sequential injection V1.1A P&H Board
full sequential spark low current c.o.p.
holset turbocharger
Paul_VR6
Super MS/Extra'er
Posts: 1978
Joined: Wed Apr 15, 2009 11:31 am
Location: Oxford, PA
Contact:

Re: Knock detection

Post by Paul_VR6 »

I have experienced multiple "did not work well" with ms1 and ms2 both with knocksense as well as the "extra" circuit. I could never keep things from detecting what was mechanical noise. The false triggers always seemed to retard a lot as well, which made it pretty useless.

Multiple channel sensing, with software filters and windowing could make it worth trying again.
-Paul
1992 Corrado SLC 3.6 VR6 11.38@120 - MS3 Pro Ultimate - Microsquirt I/O - Can EGT - Racepak IQ3s
kptuned.com - Megasquirting the World! Megasquirt Sales, Service, Tuning and More!
Image
a73camaro
Experienced MS/Extra'er
Posts: 231
Joined: Fri Oct 08, 2004 6:44 am
Location: Dillon, CO

Re: Knock detection

Post by a73camaro »

The knock sensor that I designed worked OK, but there were some limitations.
MSII v3.0, Extra 3.0.3s
davcol
Experienced MS/Extra'er
Posts: 160
Joined: Tue Dec 22, 2009 6:12 pm

Re: Knock detection

Post by davcol »

So will there be any improvement to this feature? i am hoping.

Why is that upon first knock all the max. timing is used and not increments of the set value in the table, i have to reduce the max. timing to 4 degrees.
m2 extra v3.57 3sgte full sequential injection V1.1A P&H Board
full sequential spark low current c.o.p.
holset turbocharger
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Knock detection

Post by jsmcortina »

davcol wrote:Why is that upon first knock all the max. timing is used and not increments of the set value in the table
For the reason I mentioned in the first post. The timing is reduced in steps, but it seems these steps are applied maybe one thousand times per second, so it appears that the timing is all taken out in one go.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Keithg
Super MS/Extra'er
Posts: 2413
Joined: Sun Mar 06, 2005 9:15 am
Location: Chicago, IL, USA
Contact:

Re: Knock detection

Post by Keithg »

James,

That may be what I experienced as well, I do not remember. I do not run 'on the edge' like that and added fuel to keep knock at bay. It sounds like an 'unintended' bug was added that did not take into account the number of times the loop runs. I can pull a bit of fuel from my map and test this out if you want a guinea pig.

Keith
savagerocco
Master MS/Extra'er
Posts: 756
Joined: Thu Oct 20, 2005 11:09 am
Location: Ogden UT USA
Contact:

Re: Knock detection

Post by savagerocco »

I noticed this as well, i attributed it to an improperly tuned sensor for my application. Once it was enabled, it pulled a lot of timing, even into negative numbers.
Brent Savage
life behind the zion curtain
90 audi RS2 20VTQ 6sp MS3, MSX COP and Sequential and now MAF
87 Scirocco 2.0 ABA 16v EIP tubular cast MSII COP
86 Audi 4K20VTQ MSII
90 Audi 90 sedan 3.6l DOHC V8TT (project car)
89 VW cabbie (bitch basket) 2.0 ABA Turbo MSII
gurov
Super MS/Extra'er
Posts: 1059
Joined: Sun Jun 01, 2008 11:54 pm

Re: Knock detection

Post by gurov »

one will have to pry my j&s boxes from my cold dead hands.

duplication of THAT would save a boatload of money per install.
2020 BMW X3M - bm3 - stage1
1994 Supra - ms3pnp pro - j&s
davcol
Experienced MS/Extra'er
Posts: 160
Joined: Tue Dec 22, 2009 6:12 pm

Re: Knock detection

Post by davcol »

So will there any fix for this feature in the new release that as been working on? hoping :D
m2 extra v3.57 3sgte full sequential injection V1.1A P&H Board
full sequential spark low current c.o.p.
holset turbocharger
Post Reply