Page 2 of 2

Re: E85 / Flex fuel logic

Posted: Wed Dec 23, 2020 5:54 am
by YuMe3D
Great thank you..
Will post some pics in the Early part of the new year.

Re: E85 / Flex fuel logic

Posted: Tue Jan 05, 2021 7:58 pm
by mck1117

Re: E85 / Flex fuel logic

Posted: Wed Jan 13, 2021 3:33 am
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.

Re: E85 / Flex fuel logic

Posted: Wed Jan 13, 2021 4:33 am
by AndreyB
Do we have a sample tune and sample log of the sensor actually working? Do we actually log flex fuel? :)

Re: E85 / Flex fuel logic

Posted: Wed Jan 13, 2021 8:29 am
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.

Re: E85 / Flex fuel logic

Posted: Wed Jan 13, 2021 8:30 am
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.

Re: E85 / Flex fuel logic

Posted: Wed Jan 13, 2021 6:32 pm
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?

Re: E85 / Flex fuel logic

Posted: Wed Jan 13, 2021 9:22 pm
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.

Re: E85 / Flex fuel logic

Posted: Sat Sep 04, 2021 11:53 am
by AndreyB
Question: does any rusEFI user have a real flex sensor on a real rusEFI vehicle already wired into a real rusEFI ECU?

Re: E85 / Flex fuel logic

Posted: Sat Sep 04, 2021 1:47 pm
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?

Re: E85 / Flex fuel logic

Posted: Sat Sep 04, 2021 7:03 pm
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.

Re: E85 / Flex fuel logic

Posted: Tue Sep 07, 2021 2:09 am
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.

Re: E85 / Flex fuel logic

Posted: Mon Sep 13, 2021 7:10 pm
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...

Re: E85 / Flex fuel logic

Posted: Tue Sep 14, 2021 4:14 am
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.

Re: E85 / Flex fuel logic

Posted: Tue Sep 28, 2021 5:21 pm
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%

Re: E85 / Flex fuel logic

Posted: Tue Sep 28, 2021 5:22 pm
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!

Re: E85 / Flex fuel logic

Posted: Tue Sep 28, 2021 5:23 pm
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?

Re: E85 / Flex fuel logic

Posted: Tue Sep 28, 2021 5:24 pm
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.

Re: E85 / Flex fuel logic

Posted: Tue Sep 28, 2021 5:25 pm
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

Re: E85 / Flex fuel logic

Posted: Tue Sep 28, 2021 5:26 pm
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

Re: E85 / Flex fuel logic

Posted: Wed Sep 29, 2021 4:53 am
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.

Re: E85 / Flex fuel logic

Posted: Wed Sep 29, 2021 4:59 am
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?

Re: E85 / Flex fuel logic

Posted: Wed Sep 29, 2021 5:09 am
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.

Re: E85 / Flex fuel logic

Posted: Wed Nov 01, 2023 4:32 am
by AndreyB
vodka sensor at least two issues?


Re: E85 / Flex fuel logic

Posted: Wed Nov 01, 2023 5:24 am
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.

Re: E85 / Flex fuel logic

Posted: Wed Nov 01, 2023 12:00 pm
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 22596 times
lowFlexCallbackCounter==flexCallbackCounter not lowFlexCallbackCounter==flexCallbackCounter/2

Re: E85 / Flex fuel logic

Posted: Wed Nov 01, 2023 5:51 pm
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