(Solved) Knock cyl #2 - should work?

General support questions and announcements for MS3. See also MS3 manuals.

Moderators: jsmcortina, muythaibxr

Post Reply
MolsonB
Helpful MS/Extra'er
Posts: 76
Joined: Sun Aug 16, 2015 8:47 pm

(Solved) Knock cyl #2 - should work?

Post by MolsonB »

I am bench testing for a Rotary RX8. I added 2 knock sensors to each rotary housing (Aka cylinder) to the MS3 Knock Module Kit. I'm simulating the required freq using an Arduino, and getting the expected results for Knock Input, Knock Cyl#1, and Knock retard. But I'm not getting anything for Knock Cyl #2. Using the oscilloscope, I can confirm the same wave freq is getting to the knock chip for Cyl1 and Cyl2.
Tried searching on here but there isn't too much info on the knock stuff.

Shameless plug... Haltech handles the knock screens very nicely. Really cool options on finding your engines freq and gains.
https://www.youtube.com/watch?v=jUUPcNPGm3k
Attachments
Capture Knock.JPG
Capture Knock.JPG (221.03 KiB) Viewed 1003 times
Last edited by MolsonB on Thu Jan 25, 2018 11:39 pm, edited 1 time in total.
Matt Cramer
Super MS/Extra'er
Posts: 17507
Joined: Thu Apr 16, 2009 8:08 pm

Re: Knock cyl #2 - should work?

Post by Matt Cramer »

:msq:
Matt Cramer -1966 Dodge Dart slant six running on MS3X
vw_chuck
Master MS/Extra'er
Posts: 633
Joined: Wed Dec 11, 2013 1:16 pm

Re: Knock cyl #2 - should work?

Post by vw_chuck »

I have the same issue. The second knock sensor does not work in knock control. Only sensor 1 works and when you set it on 2 sensors it is looking at knock energy on sensor 1 which will cause false knock readings or worst case not see knock at all.
vw_chuck
Master MS/Extra'er
Posts: 633
Joined: Wed Dec 11, 2013 1:16 pm

Re: Knock cyl #2 - should work?

Post by vw_chuck »

MolsonB
Helpful MS/Extra'er
Posts: 76
Joined: Sun Aug 16, 2015 8:47 pm

Re: Knock cyl #2 - should work?

Post by MolsonB »

vw_chuck wrote:Here is a link to my post.
http://www.msextra.com/forums/viewtopic ... 37#p512916
Hey Chuck (if that's your real name. lol), I'm experiencing the same thing as you. Since I'm still bench testing, I can send it the correct freq and monitor. Confirming the channel 1 and 2 is getting the same wave freq.

Matt, I attached the MSQ but didn't see a need for datalogs. Knock cyl#2 just stays at zero. Running 1.5.1 release.
I found the datasheet for the knock sensor TPIC8101 chip and the SPI commands. Will play around today with scope and try to verify the transmissions, also digging into the ms3 code to see if I find anything that pops out.
Attachments
rx8.msq
(275.24 KiB) Downloaded 22 times
MolsonB
Helpful MS/Extra'er
Posts: 76
Joined: Sun Aug 16, 2015 8:47 pm

Re: Knock cyl #2 - should work?

Post by MolsonB »

Based on the scope, it's only asking for channel one.
Looking in the source code, I can't tell if knock_chan is being set.

ms3_ign.c

Code: Select all

if (ram5.knock_conf & 0x80) {
     x = ram4.fire[next_knock_start_event.evnum] - 1;
} else {
     x = 0;
}
knock_chan = ram5.knock_sens[x] & 0x01;

ms3_ign.c

Code: Select all

   
} else if (knock_state == 21) {
    if (!(SPI0SR & 0x80)) {
        return;
    }
    (void)SPI0SR;
    (void)SPI0DRL; // first byte back is nothing */
    SPI0DRL = 0xe0 | knock_chan;
    knock_state++;

vw_chuck
Master MS/Extra'er
Posts: 633
Joined: Wed Dec 11, 2013 1:16 pm

Re: Knock cyl #2 - should work?

Post by vw_chuck »

There has been multiple guys complaining about knock control as it has some bugs. It appears it would take a re-write of code in this area to actually get it working correctly and it seems this effort has not been prioritized to the top or possibly not at all.
jsmcortina
Site Admin
Posts: 39613
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Knock cyl #2 - should work?

Post by jsmcortina »

MolsonB wrote:Looking in the source code, I can't tell if knock_chan is being set.

ms3_ign.c

Code: Select all

knock_chan = ram5.knock_sens[x] & 0x01;
That's it being set right there.

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".
vw_chuck
Master MS/Extra'er
Posts: 633
Joined: Wed Dec 11, 2013 1:16 pm

Re: Knock cyl #2 - should work?

Post by vw_chuck »

We have all done continuity or probed it with a scope and the sensor 2 signal is getting to the knock chip so why is it not making it to the ECU if the code it calling for it?
MolsonB
Helpful MS/Extra'er
Posts: 76
Joined: Sun Aug 16, 2015 8:47 pm

Re: Knock cyl #2 - should work?

Post by MolsonB »

jsmcortina wrote:
MolsonB wrote:Looking in the source code, I can't tell if knock_chan is being set.

ms3_ign.c

Code: Select all

knock_chan = ram5.knock_sens[x] & 0x01;
That's it being set right there.

James
lol I know that's the part in the code, I just meant I can't debug any further to tell if my tune settings are effectively setting "x" or not. MPlab I think I can simulate C code, and try to debug it that way. Sadly I can't until March now, onto another project.

Code: Select all

if (ram5.knock_conf & 0x80) {
     x = ram4.fire[next_knock_start_event.evnum] - 1;
} else {
     x = 0;
}
vw_chuck
Master MS/Extra'er
Posts: 633
Joined: Wed Dec 11, 2013 1:16 pm

Re: Knock cyl #2 - should work?

Post by vw_chuck »

Ah the all too often sound of tumbleweeds and silence......
KaPower
Master MS/Extra'er
Posts: 501
Joined: Wed Dec 22, 2004 9:43 pm
Location: Bonney Lake, Wa

Re: Knock cyl #2 - should work?

Post by KaPower »

vw_chuck wrote:Ah the all too often sound of tumbleweeds and silence......
I know right? Not trying to steal this thread, hopefully just adding to it. :)

I'm seeing a few things that don't seem to work correctly. Also seeing many needed features for the knock control system. Knock control has always been neglected with all of the Megasquirt projects for as long as I can remember though...

The knock "Retard Fine Step" seems to advance the timing after the knock "Retard Course Step" applies the initial timing retard. The "advance Step Size" under Recovery is I believe "supposed" to control this? Also seen in this data log is the awesomeness of full knock retard during decel right before fuel cut fuel cut.

Perhaps ignoring knock during the engine state of "Decel" would be a good feature?

Features like load based knock threshold, and ignoring certain cylinders at certain rpm/load points or even a rpm/load based per cylinder threshold map would be handy. I have weird resonance at certain rpm and load points with all 4 of my cylinders (forged piston engine with loose clearances).
Attachments
False Knock during Decel (10btdc to 10ATDC wondow).png
False Knock during Decel (10btdc to 10ATDC wondow).png (243.04 KiB) Viewed 829 times
Knock Input Table 16x16.png
Knock Input Table 16x16.png (266.28 KiB) Viewed 829 times
vw_chuck
Master MS/Extra'er
Posts: 633
Joined: Wed Dec 11, 2013 1:16 pm

Re: Knock cyl #2 - should work?

Post by vw_chuck »

My guess is they don't want to open this can of worms.
jsmcortina
Site Admin
Posts: 39613
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: Knock cyl #2 - should work?

Post by jsmcortina »

I'm not sure there's anything to open. I re-tested knock and both sensors work ok and can be assigned to a particular cylinder.

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".
MolsonB
Helpful MS/Extra'er
Posts: 76
Joined: Sun Aug 16, 2015 8:47 pm

Re: Knock cyl #2 - should work?

Post by MolsonB »

Did you check with my tune file? Is there something I set wrong with the Mazda Rx8 engine that wouldn't request the knock channel 2?
Sadly I can't test this till March now.
jsmcortina wrote:I'm not sure there's anything to open. I re-tested knock and both sensors work ok and can be assigned to a particular cylinder.

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

Re: Knock cyl #2 - should work?

Post by jsmcortina »

Ha! Easy one. Your "Firing Order" setting is incorrect. It should be 1,2 not 1,3.

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".
MolsonB
Helpful MS/Extra'er
Posts: 76
Joined: Sun Aug 16, 2015 8:47 pm

Re: Knock cyl #2 - should work?

Post by MolsonB »

DOH. I did have a 'todo' note, to understand the firing order as I wasn't sure what to put there. Thank you and Thank you again.

Well the good thing to take away from this is, I got to learn the Knock datasheet & SPI signals and use my scope more.
jsmcortina wrote:Ha! Easy one. Your "Firing Order" setting is incorrect. It should be 1,2 not 1,3.

James
vw_chuck
Master MS/Extra'er
Posts: 633
Joined: Wed Dec 11, 2013 1:16 pm

Re: (Solved) Knock cyl #2 - should work?

Post by vw_chuck »

James what do you mean by firing order? I thought those settings have nothing to do with firing order. You tell which cylinder has which knock sensor on it. Is it based on firing order?
MolsonB
Helpful MS/Extra'er
Posts: 76
Joined: Sun Aug 16, 2015 8:47 pm

Re: (Solved) Knock cyl #2 - should work?

Post by MolsonB »

vw_chuck wrote:James what do you mean by firing order? I thought those settings have nothing to do with firing order. You tell which cylinder has which knock sensor on it. Is it based on firing order?
He means I fundamentally had my settings off in 'Engine and Sequential Settings'. With a rotary, I only have 2 cylinders. But my firing order A. B. was set to the default 1, 3. Firing order C. D. is greyed out with 4, 2. Since the rotaries have two spark plugs per cylinder, I thought that would fire coils 1 & 2 in group A, then 3 & 4 in group B. But I was wrong in that assumption, you are telling the cylinder firing order, not the coil firing order. Little different with Rotaries. There should be an error in TunerStudios that your firing order can't be higher then number of cylinders. (Or I'm the only dumb one making that mistake)

In the Knock Sensor Parameters, you are just telling what knock sensor (1 or 2), belongs to what side of the block. Since my 'next firing event' was set to 3, it would skip cyl 2 and not ask for the knock signal channel 2.
Attachments
Capture.JPG
Capture.JPG (52.74 KiB) Viewed 774 times
Post Reply