Page 1 of 1

thoughts about 34-2 3 cam Toyota wheel

Posted: Tue May 05, 2020 12:23 am
by porelmundo
I was taking a look at was already written for the trigger_toyota and trying to understand the logic behind.

Code: Select all

void initialize2jzGE3_34(TriggerWaveform *s) {
	setToothedWheelConfiguration(s, 36, 2, FOUR_STROKE_CRANK_SENSOR);

	s->initialize(FOUR_STROKE_CAM_SENSOR);

	float camD = 720 / 6; // 120

	float crankAngle = 20; // skipping two teeth

	for (int i = 0; i < 10; i++) {
		s->addEvent2(crankAngle + 5, T_SECONDARY, TV_RISE, -1, 721);
		s->addEvent2(crankAngle + 9.9, T_SECONDARY, TV_FALL, -1, 721); // 120
		crankAngle += 10;
	} // 2 + 10

	float camAngle = 0;
	camAngle += camD;
	s->addEvent2(camAngle, T_PRIMARY, TV_RISE, -1, 721); // 120

	for (int i = 0; i < 12; i++) {
		s->addEvent2(crankAngle + 5, T_SECONDARY, TV_RISE, -1, 721);
		s->addEvent2(crankAngle + 9.9, T_SECONDARY, TV_FALL, -1, 721); // 120
		crankAngle += 10;
	} // 2 + 22


	camAngle += camD;
	s->addEvent2(camAngle, T_PRIMARY, TV_FALL, -1, 721); // 240

	for (int i = 0; i < 12; i++) {
		s->addEvent2(crankAngle + 5, T_SECONDARY, TV_RISE, -1, 721);
		s->addEvent2(crankAngle + 9.9, T_SECONDARY, TV_FALL, -1, 721); // 120
		crankAngle += 10;
	} // 2 + 34

	camAngle += camD;
	s->addEvent2(camAngle, T_PRIMARY, TV_RISE, -1, 721); // 360

	crankAngle += 20; // skipping two teeth one more time
	for (int i = 0; i < 10; i++) {
		s->addEvent2(crankAngle + 5, T_SECONDARY, TV_RISE, -1, 721);
		s->addEvent2(crankAngle + 9.9, T_SECONDARY, TV_FALL, -1, 721); // 120
		crankAngle += 10;
	} // 2 + 10

	camAngle += camD;
	s->addEvent2(camAngle, T_PRIMARY, TV_FALL, -1, 721); // 480

	for (int i = 0; i < 12; i++) {
		s->addEvent2(crankAngle + 5, T_SECONDARY, TV_RISE, -1, 721);
		s->addEvent2(crankAngle + 9.9, T_SECONDARY, TV_FALL, -1, 721); // 120
		crankAngle += 10;
	} // 2 + 22

	camAngle += camD;
	s->addEvent2(camAngle, T_PRIMARY, TV_RISE, -1, 721); // 600


	for (int i = 0; i < 12; i++) {
		s->addEvent2(crankAngle + 5, T_SECONDARY, TV_RISE, -1, 721);
		s->addEvent2(crankAngle + 9.9, T_SECONDARY, TV_FALL, -1, 721); // 120
		crankAngle += 10;
	} // 2 + 32
	camAngle += camD;
	s->addEvent2(camAngle, T_PRIMARY, TV_FALL, -1, 721); // 720

	s->isSynchronizationNeeded = false;
The problem that i see is that the "float camD = 720 / 6; // 120" where dosnt make seance, I dont know if its just for capturing the 1st or 3rd cycle no matter which come first. The crank just go twice the speed of the cam so it should see events every 240 degrees not 120.
engineidle-camcrank-signals.png
My idea to make this decoded (dont laugh i'm not a programer):

if ((crankAngle == 0) II (crankAngle == 12) II (crankAngle == 24)) {
eventcount = 0;}
else if ((crankAngle == 10) && eventcount) { goto startsync }
else if ((crankAngle == 22) && eventcount) { goto startsync }
else if ((crankAngle == 34) && eventcount) { goto startsync }

// Sync process

if ((crankAngle == 0) || (crankAngle == 46) || (crankAngle == 24)) {
eventcount = 0;
} else if (((crankAngle == 56) && (!eventcount))
|| ((crankAngle == 34) && (!eventcount)))

_______________________________________________________

I think that the key here will be that 34 tooth if you can reset and star count after see 34, next cycle will be my TDC 1st.
First TDC cycle have a tooth on 22 and second TDC have a tooth on 10 and 34, you almost no need to use the second tdc.
Can be sync on cranking and after start you can switch to your crank wheel completely and if you loose sync you can switch to waste spark and start
the cycle again. will be nice to have a indicator in tuner studio for half sync and full sync. The vvti will relays only on the 22 tooth for cam facing.

Please Comment, I appreciate you support.

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Tue May 05, 2020 2:12 am
by AndreyB
Current initialize2jzGE3_34 looks to be FUBAR.
Please remind us if we have VVT here or not really?

Within rusEFI current trigger implementation this would be normal 36/2 or 34-2 skipped tooth crank + custom 2jz VVT logic of locating one of the three cam tooth closest to crankshaft skipped tooth.

At the moment this new custom 2jz cam mode exists only in my head, looks like about 2 hours of coding. Please post a video of this engine running rusEFI in wasted mode on 34-2 and I will get you the new custom cam mode :)

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Tue May 05, 2020 2:38 am
by porelmundo
At the moment this new custom 2jz cam mode exists only in my head, looks like about 2 hours of coding. Please post a video of this engine running rusEFI in wasted mode on 34-2 and I will get you the new custom cam mode
I will send you the video this week. happy to know that is doable.
Thank you

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Tue May 05, 2020 3:09 am
by AndreyB
porelmundo wrote:
Tue May 05, 2020 2:38 am
I will send you the video this week.
https://w2.countingdownto.com/2979133

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Fri May 08, 2020 11:57 pm
by porelmundo
Ok it's running, although need some work, provably have to change all VR crank sensor wiring, but its start and idle good.
Please remind us if we have VVT here or not really?
Yes the engine is VVTI. 2JZ-GTTE VVTI

And this is the video:
IMG_6727_HEVC.MOV
Thank you.

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Sat May 09, 2020 1:46 am
by AndreyB
Sweet! Now I need to make progress on my side of the deal :)

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Sat May 09, 2020 2:54 am
by mck1117
porelmundo wrote:
Fri May 08, 2020 11:57 pm
Ok it's running, although need some work, provably have to change all VR crank sensor wiring, but its start and idle good.
Please remind us if we have VVT here or not really?
Yes the engine is VVTI. 2JZ-GTTE VVTI

And this is the video:
IMG_6727_HEVC.MOV

Thank you.
Is that a Proteus v0.3 I spy?

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Sat May 09, 2020 3:10 am
by porelmundo
Is that a Proteus v0.3 I spy?
Yes it is, i was expecting to comment on your post once it was running and do my test but under the circumstances the video spoil my built.
if is anything i can help you just let me know (hardware side or testing)

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Sat May 09, 2020 5:28 am
by mck1117
porelmundo wrote:
Sat May 09, 2020 3:10 am
Is that a Proteus v0.3 I spy?
Yes it is, i was expecting to comment on your post once it was running and do my test but under the circumstances the video spoil my built.
if is anything i can help you just let me know (hardware side or testing)
That means our first starts on 0.3 were within hours of each other - awesome!

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Sun May 10, 2020 6:39 am
by AndreyB
Made some progress today, I have a working prototype. I will wrap up my testing hopefully tomorrow and we will need to try on real vehicle.

Do we know range of VVT motion on this vehicle?

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Sun May 10, 2020 2:55 pm
by porelmundo
Do we know range of VVT motion on this vehicle?
Range is 60 degrees. and if i dont forgot and if is apply here (i dont know) the minimum sensor angle is 70 and the maximum is 130
those are good news, ready for testing here.

Thank you

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Mon May 11, 2020 5:49 am
by AndreyB
2JZ is maybe ready.

Toyota 2JZ has three cam tooth. We pick one of these three tooth to synchronize based on the expected angle position of the event.

Please run latest build in 36/2 crank wheel mode with VVT, while using VVT debug_mode. Please record a log at the highest possible frequency.

We would be looking at Debug->Event Position gauge to see what values of position we have for three tooth (I expect three different values)

Once we have the value picked we need to give it a range for tests you can configure detection window using FSIO settings #15 and #16. VVT has nothing to do with FSIO it was just easiest for me to use those temporary. Once we decide on good values I will probably hard-code them.

Actual VVT pid is in "Advanced->Aux Pid #1"
FSIO settings is in Advanced->FSIO Outputs

A very rough tune example https://rusefi.com/online/view.php?msq=7 at least all the settings are set there.

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Mon May 11, 2020 7:19 pm
by porelmundo
Working on that, Thanks

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Mon May 11, 2020 7:33 pm
by AndreyB
just realized it would be in sync and out of sync angle for each tooth depending on cranking luck.

please save composite log to file as well

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Tue May 12, 2020 3:15 pm
by porelmundo
Hi, yesterday I replace the trigger shielded cables that was glitching now i have solid signals.
try the test firmware with multiple combinations with no luck but i'm not 100% sure that i'm making this right.
im testing on what it say dev 2jz/ 3/34 simulator and activate my cam on sync/vvti input.
my advance trigger is in 2GZ?
What i have is a bunch of events but no start, almost but no start.

Also i have some issues with some warnings like boost duty that i dont exactly know what it means but the big problem that i have with 36-2 start is that it dosnt pass 3400 rpm, as soon as it hits some boost it just start to miss something, i though that was related to dwell but is not. I will change spark plugs and see if that cure the condition, i didnt want to bother with this at this time but is having me thinking. here is the tune anyway.

Thank you for your support
2jzvvti.msq

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Tue May 12, 2020 3:36 pm
by AndreyB
Step 1: get car running on wasted spark, completely ignore VVT sensor and actuator.

We need to gather data at this point. In order to gather data we need a running engine. A way to start your engine is wasted mode maybe with two wire mode.

I am interested in the normal logs and composite logs when you have latest firmware running with wasted. Maybe a phone call or Slack chat would help. Today is a busy day so probably not today :( Poke me on Slack and we will start coordinating good time.

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Tue May 12, 2020 3:59 pm
by porelmundo
Poke me on Slack and we will start coordinating good time.
I will do that

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Tue May 12, 2020 4:04 pm
by porelmundo
36/2 it start nice and idle perfect, with vvti, event position trow high numbers and stay there
Here a data log of the trigger:
2020-05-12_11.37.03.csv
i think is doing something :P

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Tue May 12, 2020 4:16 pm
by AndreyB
Thank you for composite logs!
I am interested in the normal logs and composite logs when you have latest firmware running with wasted.
Please provide normal logs as well.

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Tue May 12, 2020 11:20 pm
by AndreyB
No SecLevel in that composite log, i.e. no cam signals? Could be HW issue could be FW issue could be anything :)

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Fri May 15, 2020 7:49 pm
by porelmundo
After struggling the other day trying to make my engine rev all the way and dealing with a bunch of stuff (New spark plugs, igniter, some wiring, coils)
I find out that my timing belt jump two tooth and yesterday morning i pull out the engine and do a mayor rebuild cos is been abused on my last drag event. I start it yesterday night and is revving all the way up, actually very impressive with the rusefi than my previous ECU on that engine, it is scares me how better and fast rev up.
No SecLevel in that composite log, i.e. no cam signals? Could be HW issue could be FW issue could be anything
Well, I take another fresh one and is the same result. but i test the HW and is working properly, wiring is new cos i rewire it this week and test it, dont know if can be bad sensor, maybe do some more test.
Im including what i have until now,

trigger event video
SIMG_6798_HEVC.MOV


Trigger Logger, again, dont know where goes the cam
trg2020-05-15_15.09.51.csv
Data log
2020-05-15_15.11.14.csv

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Fri May 15, 2020 8:07 pm
by AndreyB
porelmundo wrote:
Fri May 15, 2020 7:49 pm
I start it yesterday night and is revving all the way up, actually very impressive with the rusefi than my previous ECU on that engine, it is scares me how better and fast rev up.
I know I am going off on a tangent but that's just too interesting. What previous ECU? Are you sure it's not the engine rebuild or tune difference? Can you grab more data? that would be a cool comparison data point probably worth a separate thread.


Looking into your data, there is definitely some useful info there.

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Fri May 15, 2020 8:31 pm
by porelmundo
Change VR1 for VR2 and change it to single tooth and i have revs.
this how it looks on MS
MStrigger2020-05-15_16.19.58.csv

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Fri May 15, 2020 8:34 pm
by porelmundo
Shoot cus im down for anything at this point, it start and run good after rebuild and on MS3 its working :lol:

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Fri May 15, 2020 8:37 pm
by AndreyB
The binary log file has amazing data: it shows that your three tooth are happening at 175 degree, 415 degree and 655 degree.

Based on that, please open FSIO Outputs and set Set#15 and Set#16 to magic values 130 and 220 (that's your 175 degrees minus and plus 45 range) - with these settings your current firmware as is should start synchronizing VVT position statistically at half of your cranking attempts (i.e. try to start six times - I would hope that three times your VVT Position gauge would show 175).

This "half of your cranking attempts" is fixed now in firmware 20200515.
Composite logger is not showing cam sensor, that's a defect in the code - also fixed now.

Please wait 2 hours from now and new version 20200515 would be build. Update to latest and firmware in two hours and at that point once you set settings expected behavior would be for your VVT position gauge to start showing value around 175.

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Fri May 15, 2020 11:28 pm
by porelmundo
Ok this is what i got now, on the data log seams that is working.
2020-05-15_18.56.21.csv
trigger log
2020-05-15_18.57.28.mlg.csv
data log

i thin we are close, vvt event position max out , what i can see is just the timing number perhaps

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Sat May 16, 2020 1:14 am
by AndreyB
Your log now shows constant 1138 degree VVT position. I've just made a code change to make sure that VVT position is displayed in the 0 to 720 range.

I think it works. You have VVT position gauge working now, you just need to tune VVT actuator and set target table - see sample VVT tune for details.
Also you can play with VVT offset to get VVT gauge where you want it to be.

Let me know if you have open questions?

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Sat May 16, 2020 1:34 am
by AndreyB
AndreyB wrote:
Sat May 16, 2020 1:14 am
I've just made a code change to make sure that VVT position is displayed in the 0 to 720 range.
I am taking this back. Actually please use vvtOffset to get this VVT position where you want it to be.

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Mon May 18, 2020 10:57 pm
by porelmundo
I'm happy to report, that it's working. and is working good. i still playing with the best parameters for stability and collecting data for future development. Numbers are completely far from the miata example, further test need to be done before report.
Thank you for the support.

Re: thoughts about 34-2 3 cam Toyota wheel

Posted: Tue May 19, 2020 12:18 am
by AndreyB
:ugeek: glad to her! please provide logs and share tune once it looks good