Knock detection
Moderators: jsmcortina, muythaibxr
-
- Site Admin
- Posts: 39585
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Knock detection
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)
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".
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".
-
- Super MS/Extra'er
- Posts: 17499
- Joined: Thu Apr 16, 2009 8:08 pm
Re: Knock detection
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
Re: Knock detection
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)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)
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!
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!
Re: Knock detection
Of course only a heartbeat away from that would be something *extra* cool, which would be storing a separate knock-retard number per cylinder!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.
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.
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.
Re: Knock detection
Individual cylinder knock detection! Now that's a feature.elaw wrote:Of course only a heartbeat away from that would be something *extra* cool, which would be storing a separate knock-retard number per cylinder!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.
97 Subaru Impreza 2.2L - MS3 w/ MS3/x
-
- Super MS/Extra'er
- Posts: 1933
- Joined: Fri May 07, 2004 12:59 pm
- Location: Tacoma, WA
- Contact:
Re: Knock detection
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
'84 Dodge Rampage
-
- Site Admin
- Posts: 39585
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: Knock detection
I'd be interested to hear some first hand feedback on that.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..
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".
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".
-
- Super MS/Extra'er
- Posts: 2413
- Joined: Sun Mar 06, 2005 9:15 am
- Location: Chicago, IL, USA
- Contact:
Re: Knock detection
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)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..
KeithG
-
- Site Admin
- Posts: 39585
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: Knock detection
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
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".
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".
-
- Super MS/Extra'er
- Posts: 2413
- Joined: Sun Mar 06, 2005 9:15 am
- Location: Chicago, IL, USA
- Contact:
Re: Knock detection
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.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
Keith
Re: Knock detection
This would open up a whole new world of possibilities if we got it to work right/well. I'm paying attention!
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
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
--'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
Re: Knock detection
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.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
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.
m2 extra v3.57 3sgte full sequential injection V1.1A P&H Board
full sequential spark low current c.o.p.
holset turbocharger
full sequential spark low current c.o.p.
holset turbocharger
-
- Super MS/Extra'er
- Posts: 1978
- Joined: Wed Apr 15, 2009 11:31 am
- Location: Oxford, PA
- Contact:
Re: Knock detection
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.
Multiple channel sensing, with software filters and windowing could make it worth trying again.
Re: Knock detection
The knock sensor that I designed worked OK, but there were some limitations.
MSII v3.0, Extra 3.0.3s
Re: Knock detection
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.
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
full sequential spark low current c.o.p.
holset turbocharger
-
- Site Admin
- Posts: 39585
- Joined: Mon May 03, 2004 1:34 am
- Location: Birmingham, UK
- Contact:
Re: Knock detection
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.davcol wrote:Why is that upon first knock all the max. timing is used and not increments of the set value in the table
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".
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".
-
- Super MS/Extra'er
- Posts: 2413
- Joined: Sun Mar 06, 2005 9:15 am
- Location: Chicago, IL, USA
- Contact:
Re: Knock detection
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
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
-
- Master MS/Extra'er
- Posts: 756
- Joined: Thu Oct 20, 2005 11:09 am
- Location: Ogden UT USA
- Contact:
Re: Knock detection
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
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
Re: Knock detection
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.
duplication of THAT would save a boatload of money per install.
2020 BMW X3M - bm3 - stage1
1994 Supra - ms3pnp pro - j&s
1994 Supra - ms3pnp pro - j&s
Re: Knock detection
So will there any fix for this feature in the new release that as been working on? hoping
m2 extra v3.57 3sgte full sequential injection V1.1A P&H Board
full sequential spark low current c.o.p.
holset turbocharger
full sequential spark low current c.o.p.
holset turbocharger