[help needed] E85 / Flex fuel logic

It's all about the code!
YuMe3D
Posts: 5
Joined: Tue Sep 15, 2020 8:45 pm

Re: E85 / Flex fuel logic

Post by YuMe3D »

Great thank you..
Will post some pics in the Early part of the new year.
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: E85 / Flex fuel logic

Post by mck1117 »

SHOf429
Posts: 70
Joined: Sun May 24, 2020 11:37 pm

Re: E85 / Flex fuel logic

Post by SHOf429 »

Very excited to see the progress on the flex fuel sensor. Any recommendations/requirements as to which pin to use? I know it has to be configured as open drain with a pull-up.
Josh
94 Ford Taurus SHO
Frankenso in progress
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: E85 / Flex fuel logic

Post by AndreyB »

Do we have a sample tune and sample log of the sensor actually working? Do we actually log flex fuel? :)
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: E85 / Flex fuel logic

Post by mck1117 »

AndreyB wrote:
Wed Jan 13, 2021 4:33 am
Do we have a sample tune and sample log of the sensor actually working? Do we actually log flex fuel? :)
We log it, the channel is called "flex ethanol %" or something like that. You can watch the impact of target afr changing even as target lambda stays constant.

I tested on the bench with a function generator, but to my knowledge nobody has plugged it in to a real sensor yet.
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: E85 / Flex fuel logic

Post by mck1117 »

SHOf429 wrote:
Wed Jan 13, 2021 3:33 am
Very excited to see the progress on the flex fuel sensor. Any recommendations/requirements as to which pin to use? I know it has to be configured as open drain with a pull-up.
On proteus any digital input will work. On MRE, you should be able to use the analog temp inputs or the cam input. Analog volt inputs should work too, but will require an external pullup resistor.
SHOf429
Posts: 70
Joined: Sun May 24, 2020 11:37 pm

Re: E85 / Flex fuel logic

Post by SHOf429 »

mck1117 wrote:
Wed Jan 13, 2021 8:30 am
SHOf429 wrote:
Wed Jan 13, 2021 3:33 am
Very excited to see the progress on the flex fuel sensor. Any recommendations/requirements as to which pin to use? I know it has to be configured as open drain with a pull-up.
On proteus any digital input will work. On MRE, you should be able to use the analog temp inputs or the cam input. Analog volt inputs should work too, but will require an external pullup resistor.
I am setting up a Frankenso 0.5.6 board at this time. Anything special about that board?
Josh
94 Ford Taurus SHO
Frankenso in progress
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: E85 / Flex fuel logic

Post by mck1117 »

SHOf429 wrote:
Wed Jan 13, 2021 6:32 pm
I am setting up a Frankenso 0.5.6 board at this time. Anything special about that board?
In that case, you can use any analog input, provided that you install a pullup resistor on that channel.
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: E85 / Flex fuel logic

Post by AndreyB »

Question: does any rusEFI user have a real flex sensor on a real rusEFI vehicle already wired into a real rusEFI ECU?
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
BeerMoneyMotorsports
Posts: 151
Joined: Thu Jan 14, 2021 10:16 pm

Re: E85 / Flex fuel logic

Post by BeerMoneyMotorsports »

For wiring, the flex sensor is 12v, Gnd and signal. Does the signal circuit need anything external on the H64 that uses the digital input?
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: E85 / Flex fuel logic

Post by mck1117 »

BeerMoneyMotorsports wrote:
Sat Sep 04, 2021 1:47 pm
For wiring, the flex sensor is 12v, Gnd and signal. Does the signal circuit need anything external on the H64 that uses the digital input?
If there's an internal pullup, then no, it doesn't need anything else.
Cadence
contributor
contributor
Posts: 40
Joined: Mon Mar 09, 2020 3:50 pm

Re: E85 / Flex fuel logic

Post by Cadence »

AndreyB wrote:
Sat Sep 04, 2021 11:53 am
Question: does any rusEFI user have a real flex sensor on a real rusEFI vehicle already wired into a real rusEFI ECU?
I just wired one in. Proteus .4 and continental sensor. Car is currently apart for clutch/trans swap. I should have it back together later this week. I could do some testing then.
YuMe3D
Posts: 5
Joined: Tue Sep 15, 2020 8:45 pm

Re: E85 / Flex fuel logic

Post by YuMe3D »

Hi All.
Unfortunately not being a coder (Smacks self in the face :oops: )

In regards to the Flex input from the Sensor.

I am sure that most are aware that the Flex Sensors have the ability to measure the Ethanol % AS WELL as the Temperatureof the fuel flowing through it.

The first, as we know is the Ethanol Content/concentration %, is done by measuring the Frequency from the Sensor. Being a Range from 50Hz to 150Hz (equating to 0% to 100%)...

A frequency output of 200Hz dictates a Fault condition (Which is primarily indicating Methanol Contamination/Damage)

Now regarding the Temperature measurement aspects of the Flex Sensor is where it now gets interesting, And please verify/validate the ability for RUSEFI to do the following on the Sensor Reading input lines.

Temperature is read from exactly the same input signal as Ethanol Content % (remember this is a 50Hz to 150Hz frequency signal) output from the sensor via a PWM (Pulse Width Modulation) of the output signal.
With the following Curve characteristics.

Temp (‘C) _Pulsewidth (ms)
-20 _ 4,697
-10 _ 4,521
10 _ 3,959
20 _ 3,573
40 _ 2,703
80 _ 1,222
100 _ 0,787
130 _ 0,411

So to be able to Read both aspects of the Flex sensor RUSEFI would need to be able to Read the incoming Frequency (which it already is able to do) as well as measure the Pulse Width of the Frequency input..

To the coding Gurus out there... Nudge Nudge Wink Wink...
neongreen
Posts: 44
Joined: Fri Apr 10, 2020 12:17 pm

Re: E85 / Flex fuel logic

Post by neongreen »

AndreyB wrote:
Sat Sep 04, 2021 11:53 am
Question: does any rusEFI user have a real flex sensor on a real rusEFI vehicle already wired into a real rusEFI ECU?
I have one in a vehicle, and could easily connect the signal to RusEFI. Engine is destroyed, but I could still run fuel through the sensor and check it.
1962 Ford Falcon 5.0L V8 / T5
Cadence
contributor
contributor
Posts: 40
Joined: Mon Mar 09, 2020 3:50 pm

Re: E85 / Flex fuel logic

Post by Cadence »

AndreyB wrote:
Sat Sep 04, 2021 11:53 am
Question: does any rusEFI user have a real flex sensor on a real rusEFI vehicle already wired into a real rusEFI ECU?
I finally have mine up and showing a percentage.

Just regular fuel in it right now is showing 10.5%
Attachments
7757DDD1-8C8D-40C2-B218-8E692E0EDFB9.png
7757DDD1-8C8D-40C2-B218-8E692E0EDFB9.png (117.65 KiB) Viewed 25189 times
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: E85 / Flex fuel logic

Post by mck1117 »

Cadence wrote:
Tue Sep 28, 2021 5:21 pm
Just regular fuel in it right now is showing 10.5%
Assuming you're in the US with normal E10 in the car, sounds like it works!
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: E85 / Flex fuel logic

Post by AndreyB »

Congrats on being the winner of "first real value" and thank you for reporting your results!

Those sensors do they report only ethanol content or is there another data point reported by duty cycle?
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: E85 / Flex fuel logic

Post by mck1117 »

AndreyB wrote:
Tue Sep 28, 2021 5:23 pm
Those sensors do they report only ethanol content or is there another data point reported by duty cycle?
As mentioned above, the frequency indicates E content, and the duty cycle indicates fuel temperature. We ignore the temperature right now and only look at the E content, but could add fuel temperature sensing & compensation.
Cadence
contributor
contributor
Posts: 40
Joined: Mon Mar 09, 2020 3:50 pm

Re: E85 / Flex fuel logic

Post by Cadence »

mck1117 wrote:
Tue Sep 28, 2021 5:22 pm
Cadence wrote:
Tue Sep 28, 2021 5:21 pm
Just regular fuel in it right now is showing 10.5%
Assuming you're in the US with normal E10 in the car, sounds like it works!
Yes I’m in Kentucky, Erich Popp on Slack. This is with proteus .4 and the smaller continental sensor
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: E85 / Flex fuel logic

Post by mck1117 »

Cadence wrote:
Tue Sep 28, 2021 5:25 pm
Yes I’m in Kentucky, Erich Popp on Slack. This is with proteus .4 and the smaller continental sensor
sweeeeeeeet
neongreen
Posts: 44
Joined: Fri Apr 10, 2020 12:17 pm

Re: E85 / Flex fuel logic

Post by neongreen »

Well dang, I guess I'm a few hours late to the party...
What are the odds we get two in one day.

Image


I'm also using the GM/Conti sensor. Not on a running vehicle mind you, but fuel running through the system it reads a value.
1962 Ford Falcon 5.0L V8 / T5
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: E85 / Flex fuel logic

Post by mck1117 »

neongreen wrote:
Wed Sep 29, 2021 4:53 am
Well dang, I guess I'm a few hours late to the party...
What are the odds we get two in one day.
It's funny how that happens, isn't it?

Were you actually changing something to change the E content, or is there a bunch of noise somehow?
neongreen
Posts: 44
Joined: Fri Apr 10, 2020 12:17 pm

Re: E85 / Flex fuel logic

Post by neongreen »

mck1117 wrote:
Wed Sep 29, 2021 4:59 am
Were you actually changing something to change the E content, or is there a bunch of noise somehow?
As mentioned on slack, not changing fuel at all, just low fuel level and multiple key on/key offs (see battery voltage switching between 5-12v). So it may have seen some air bubbles and voltage swings causing some funkiness. In any case it seems the sensor is reading.
1962 Ford Falcon 5.0L V8 / T5
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: E85 / Flex fuel logic

Post by AndreyB »

vodka sensor at least two issues?

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: E85 / Flex fuel logic

Post by mck1117 »

Unfortunately it's an ethanol vs. hydrocarbon sensor, not an ethanol vs. water sensor. Water or methanol contamination make it read off scale.
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: E85 / Flex fuel logic

Post by AndreyB »

mck1117 wrote:
Wed Nov 01, 2023 5:24 am
Water or methanol contamination make it read off scale.
Ohh :( Still have the second problem
image.png
image.png (75.86 KiB) Viewed 18412 times
lowFlexCallbackCounter==flexCallbackCounter not lowFlexCallbackCounter==flexCallbackCounter/2
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: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: E85 / Flex fuel logic

Post by AndreyB »

AndreyB wrote:
Wed Nov 01, 2023 12:00 pm
lowFlexCallbackCounter==flexCallbackCounter not lowFlexCallbackCounter==flexCallbackCounter/2
Well that was a fun one! It's a case of https://en.wikipedia.org/wiki/Variable_shadowing

https://github.com/rusefi/rusefi/commit/fd308425a81b15ba05ecc30adc87f4aa697b60b6 and proper consequence is https://github.com/rusefi/rusefi/commit/dd7a49a00deb380cecb853ab2083fa6554cd60b6
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