Ford TFI PIP decoding

It's all about the code!
Post Reply
wstefan20
Posts: 111
Joined: Thu Dec 10, 2020 4:00 pm
Github Username: wstefan20

Ford TFI PIP decoding

Post by wstefan20 »

Hello all. I am finishing up a plug and play for my buddy's 86 foxbody mustang 5.0. I am fairly new to rusefi and would like direction on how to add a trigger for this vehicle.

My background is mainly in simple MSP430 microcontroller setups, and I'm decent at coding in C, (not as great in C++ but with enough Googling I'm passable), but I've never been a part of a project this large so I have no idea where to start, but I'm willing to try and learn if given the opportunity.

The PIP signal from the TFI module that utilizes a hall sensor and wheel. The rising edge of PIP is the indication of 10 degrees before TDC, and the thinner tooth is cylinder #1, with one tooth per cylinder.

If there was just a tooth missing, I'd be able to just specify custom wheel in tuner studio, but in this case I'm assuming I'll need to calculate the delta between the rising and falling edge to determine cylinder 1 and calculate the angle from there to generate SPOUT.

This is by far the best post I've seen detailing the operation far better then I can:

https://fordsix.com/threads/understanding-standard-and-signature-pip-thick-film-ignition.81515/

At face value it doesn't look like implementing this will be all that difficult if I knew where to start. Thanks in advance for any help provided.
User avatar
AndreyB
Site Admin
Posts: 14328
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Ford TFI PIP decoding

Post by AndreyB »

Source code is the answer unfortunately. Adding new trigger into rusEFI is a series of 7 trivial steps but describing it is harder than actual doing.

It's easier for me to just add it than to explain :( Do I understand it right that we have 8 tooth, 7 tooth are wider and one is a bit narrower?
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
User avatar
AndreyB
Site Admin
Posts: 14328
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Ford TFI PIP decoding

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
User avatar
AndreyB
Site Admin
Posts: 14328
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Ford TFI PIP decoding

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
wstefan20
Posts: 111
Joined: Thu Dec 10, 2020 4:00 pm
Github Username: wstefan20

Re: Ford TFI PIP decoding

Post by wstefan20 »

AndreyB wrote:
Sun Sep 12, 2021 3:10 am
Source code is the answer unfortunately. Adding new trigger into rusEFI is a series of 7 trivial steps but describing it is harder than actual doing.

It's easier for me to just add it than to explain :( Do I understand it right that we have 8 tooth, 7 tooth are wider and one is a bit narrower?
I figured as much! And yes. One tooth is narrower and indicates cylinder 1. Rising edge is 10 degrees before TDC.

I'll look over the code anyhow and see if I can make sense of it, but I completely understand if it's easier for you to do it yourself. :D
wstefan20
Posts: 111
Joined: Thu Dec 10, 2020 4:00 pm
Github Username: wstefan20

Re: Ford TFI PIP decoding

Post by wstefan20 »

Hm. You're right. Looks pretty straight forward so far. You just make the declarations so that Java would be able to create the new option and declared the appropriate variables and functions to call. Structure is a bit different then I'm used to, but doesn't look too alien.

I'm assuming from here I (or you if you prefer) need to fill in the function configureFordPip()?
User avatar
AndreyB
Site Admin
Posts: 14328
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Ford TFI PIP decoding

Post by AndreyB »

image.png
image.png (40.81 KiB) Viewed 5657 times
that's the most valuable part
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
User avatar
AndreyB
Site Admin
Posts: 14328
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Ford TFI PIP decoding

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
wstefan20
Posts: 111
Joined: Thu Dec 10, 2020 4:00 pm
Github Username: wstefan20

Re: Ford TFI PIP decoding

Post by wstefan20 »

AndreyB wrote:
Sun Sep 12, 2021 3:41 pm
image.png that's the most valuable part
Thanks for the help! I'm just trying to wrap my head around what's going on here. Hopefully I can help someone in the future! :D

I couldn't find the declaration for setTriggerSynchronizationGap() or how that works or is calculated, but I'm assuming it is the gap between signals and you are sensing both the rising and falling edges for synchronization, thus why there are two different gaps.

Second, is the getCylinderDuration() output the time from cylinder 1 to cylinder 1, and then int oneCylinder is the duration of each cylinder since it's divided by 8?

The event angles are what is really tripping up my understanding. I'm sure the logic is easy here, but I'm pretty dense sometimes. :lol:

Lastly, once you commit the changes are there any further steps I need to take? I'm not sure how to incorporate the changes in firmware on tunerstudio or rusefi console? I'm sure it's super easy.
User avatar
AndreyB
Site Admin
Posts: 14328
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Ford TFI PIP decoding

Post by AndreyB »

I believe that everything is ready to go just make sure to download snapshot/nightly build not release

I am not 100% sure about TDC offset so you definitely want to have a timing gun.

Image
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
wstefan20
Posts: 111
Joined: Thu Dec 10, 2020 4:00 pm
Github Username: wstefan20

Re: Ford TFI PIP decoding

Post by wstefan20 »

AndreyB wrote:
Sun Sep 12, 2021 6:35 pm
Image
This is a cool visualization here! Am I missing some feature in console or tuner studio to view this stuff?
AndreyB wrote:
Sun Sep 12, 2021 6:35 pm
I am not 100% sure about TDC offset so you definitely want to have a timing gun.
Good advice. From my knowledge the timing light fires on spark of cylinder 1, so to verify timing, would I disable fuel, set ignition to 0 degrees in tuner studio and then rotate the distributor until it aligned with 0? My apologies if this is incorrect as my engine theory is a bit lacking.

Thank you again!
User avatar
AndreyB
Site Admin
Posts: 14328
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Ford TFI PIP decoding

Post by AndreyB »

wstefan20 wrote:
Sun Sep 12, 2021 6:57 pm

This is a cool visualization here! Am I missing some feature in console or tuner studio to view this stuff?
Bottom part should match engine sniffer. The wheel view is not used on rusEFI console (yet, should be used one day) for now those are all at https://github.com/rusefi/rusefi/wiki/All-Supported-Triggers
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
Post Reply