Weird RPM jumps and "Gap xxxx" in trigger logger - RPM doubles, caused by CAM

It's all about the code!
Post Reply
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Weird RPM jumps and "Gap xxxx" in trigger logger - RPM doubles, caused by CAM

Post by tmbryhn »

Tried to do some more testing today on the Bug.

I'm having some strange problems with what appears as trigger issues. When I'm revving the engine slightly, it skips instantaneously to a way higher RPM level and oscillates like that until I let go of the accelerator. It feels like a hardcut rpm limit, but that's set to 7500.

I've uploaded the log and current tune here:
https://www.rusefi.com/online/?vehicleName=Aurora&user_id=1083&sorts[uploadedMsq]=-1&sorts[uploadedLog]=-1

I also tried to upload the trigger log file, but that didn't work, so here it is:
2022-04-29_15.25.20.csv
(688.04 KiB) Downloaded 98 times
Last edited by tmbryhn on Fri Apr 29, 2022 3:33 pm, edited 1 time in total.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Weird RPM jumps and "Gap xxxx" in trigger logger

Post by AndreyB »

Good news you absolutely definitely do not have main 36/1 trigger decoding issues.

Bad news you have a problem with CAM signal - it gets random events and that throws your engine phase off which doubles your RPM.

I've noticed that you have a VR cam which is pretty unusual for OEM. How OEM is your wiring, sensor and shielding? Any photos of cam setup? Please clarify how is your VR wired and shielded by whom :)
image.png
image.png (36.92 KiB) Viewed 4110 times
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Weird RPM jumps and "Gap xxxx" in trigger logger

Post by mck1117 »

Do you need the cam sensor at all? May be more reliable to just run wasted spark instead and ignore the cam sensor completely. Your crank sensor looks perfect. What's the cam drive like on this engine? Do you have any control over the relative phase between the cam sensor and the cam? (try turning it 90 degrees).
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Weird RPM jumps and "Gap xxxx" in trigger logger

Post by tmbryhn »

Awesome! Thanks for the swift reply! I definitely have some improvement on reading logs on RusEFi as opposed to MS3 :lol:
Nice to see that the crank input was fine - I've never had trigger miss problems on the MS3 setup, so it had me a bit shaky there for a while.

The cam sensor is a custom design for the the VW aircooled engine using a Bosch distributor:
FB_IMG_1589220816645.jpg
FB_IMG_1589220816645.jpg (60.15 KiB) Viewed 4073 times
This has worked flawlessly on my MS3 setup for around two years, but then again, MS3 only looks for the cam signal once on non-VVT setups for phase detection, and then completely ignores it as long as the crank trigger stays in sync. The moment you have a trigger miss on the main crank trigger input, the ECU obviously changes to wasted spark/alternative injection and starts looking for the cam signal again. (We've been having that talk before in another thread).

It's worth mentioning that I didn't have this problem on a previous RusEFi firmware version, and that the engine hardware and harness has remained completely untouched for the last two years. The harness incorporates properly shielded twisted pair on both VR sensors.

This leaves me with two questions:
1: Have you made a change that has the firmware checking for the cam signal at all times?
2: Could there be a way to incorporate cam signal on a non-VVT setup similar to the MS strategy?

I'm not gonna rule out that the magnetic setup is sub-optimal, and also that the VR polarity could be re-checked to make sure it swings positive before negative for proper zero-crossing detection.
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Weird RPM jumps and "Gap xxxx" in trigger logger

Post by tmbryhn »

mck1117 wrote:
Fri Apr 29, 2022 9:49 pm
Do you need the cam sensor at all? May be more reliable to just run wasted spark instead and ignore the cam sensor completely. Your crank sensor looks perfect. What's the cam drive like on this engine? Do you have any control over the relative phase between the cam sensor and the cam? (try turning it 90 degrees).
I'm running 850cc injectors on the primary side, and would really like to keep them fully sequential, also for optimal injector timing reasons.
Wasted spark is fine in itself, but having an unfortunate misfire on overlap could potentially compromise my 3D printed manifolds due to severe intake pressure spikes... :lol:
IMG_20200626_223257.jpg
IMG_20200626_223257.jpg (3.49 MiB) Viewed 4073 times
As for the cam drive, it's a distributor drive gear connected to the crankshaft that runs the distributor, and I can turn it 360 degrees, so changing the phase slightly might work? It's far from very precise mechanically speaking, but when you in principle only need one pulse per engine cycle to recognize phase and timing critical operations otherwise are based on the crank input, I'd recon it'd be sufficient.
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Weird RPM jumps and "Gap xxxx" in trigger logger

Post by tmbryhn »

Tested a similar setup on another VW yesterday, and we got the same problems with the ratio messages in the trigger logger.
Played around with some settings under "advanced trigger":
- Changing the VVT sync edge from falling to rising (correct for VR sensor through the MAX9926)
- Tried "noise filtering"

Nothing made a change.

Gonna try to scope the raw VR input signal and the MAX9926 output to the MCU to see if there's something fishy going on there.
Regardless, it would've been very helpful to have an option for "initial phase detection, then ignore cam input" kind of strategy for non-VVT setups.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Weird RPM jumps and "Gap xxxx" in trigger logger - RPM doubles, caused by CAM

Post by AndreyB »

Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Weird RPM jumps and "Gap xxxx" in trigger logger - RPM doubles, caused by CAM

Post by mck1117 »

Hey @tmbryhn, I've added an option in the advanced trigger page to ignore the cam sensor above some RPM. Give that a try with it set to maybe 1200 in your case?
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Weird RPM jumps and "Gap xxxx" in trigger logger - RPM doubles, caused by CAM

Post by tmbryhn »

Awesome. Just downloaded the latest FW snapshop. Looks good. I'll give it a go.

To be clear on this new implementation:
Assume I set upper RPM limit for continuous cam signal reading = 1200.
If the ECU gets a primary trigger error @ RPM > 1200 and thus need to re-establish sync; will it do so by temporarily resuming cam input reading until it gets a valid pulse, and then move on to ignore the cam input once full sync & phase is successfully re-established similar to the Megasquirt trigger strategy previously mentioned?
tmbryhn
Posts: 169
Joined: Wed Feb 12, 2020 2:40 am
Location: Norway

Re: Weird RPM jumps and "Gap xxxx" in trigger logger - RPM doubles, caused by CAM

Post by tmbryhn »

@mck1117: Could you confirm if my last reply is true or false?
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: Weird RPM jumps and "Gap xxxx" in trigger logger - RPM doubles, caused by CAM

Post by mck1117 »

In case of loss of sync it would require dropping RPM back down below the threshold to re-sync with the cam. Once back below the max sync rpm, it'll consider the cam input again, and get back to full sync. The point of that setting is to deal with a cam sensor that provides bogus information when spinning too fast - you wouldn't want to resync when spinning fast even if sync is lost, instead waiting for the engine to slow until you resync.
Post Reply