[help needed] E85 / Flex fuel logic

It's all about the code!
Post Reply
User avatar
AndreyB
Site Admin
Posts: 10546
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

E85 / Flex fuel logic

Post by AndreyB »

As of Jan 2018 rusEfi has no e85/flex fuel specific logic but a few people have asked. We also have an older topic in Russan https://rusefi.com/forum/viewtopic.php?t=523

Let me go order a GM sensor and see if I can get it working as the first step :)

Sensor logic would be https://github.com/rusefi/rusefi/issues/540

Pin "#1" is the one closer to the connector.
Attachments
flex_sensor.jpg
flex_sensor.jpg (474.86 KiB) Viewed 3106 times
flex_pinout.jpg
flex_pinout.jpg (5.77 KiB) Viewed 3106 times
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
kb1gtt
contributor
contributor
Posts: 3649
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: E85 / Flex fuel logic

Post by kb1gtt »

E85 would be cool. Then I can cram corn cobb's down my gas hole and it runs extra nice. I understand that when you run E85, pop corn comes out the exhaust. So have your salt and butter ready.

Do you have a source of E85 in your neck of the woods? Could you make your own special blend, such that you get enough to test with? Can you simply dump a bunch of ethanol in your gas to make it E85? Also keep in mind that ethanol has a tendency to dry rot older gas lines, and older o-rings in your injectors, etc. If you get around to trying it out, you might want to replace your 0-rings on your injectors, and perhaps other o-rings if you have them.
Welcome to the friendlier side of internet crazy :)

User avatar
AndreyB
Site Admin
Posts: 10546
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: E85 / Flex fuel logic

Post by AndreyB »

My plan is to see something like 10% for my NJ, USA pump gas first in a test container. Where do I get ethanol? Does Home Depot sell ethanol? Too much effort to shop for actual E85 around 07306 too far from corn fields probably? Do not plan any ethanol into actual gas tank yet.

Maybe try with vodka just for fun.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
kb1gtt
contributor
contributor
Posts: 3649
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: E85 / Flex fuel logic

Post by kb1gtt »

Hmmm, that seems easier than expected.
https://www.google.com/search?rlz=1C1AOHY_enUS708US709&biw=1280&bih=685&tbm=shop&ei=p5FmWuKBFYWnggemsaXICw&q=denatured+ethanol&oq=denatured+ethanol&gs_l=psy-ab.3.0.0.188905.190681.0.191728.10.10.0.0.0.0.98.815.10.10.0....0...1c.1.64.psy-ab..0.7.597...0i13k1.0.tN7JvPOn66w

About vodka, watch out for tail gaiters. As well I think distilling your own moon shine would work better. That's how Nascar got started after all. People started proving they have a higher proof because it would get them to the finish line first.
Welcome to the friendlier side of internet crazy :)

ZHoob2004
contributor
contributor
Posts: 149
Joined: Sun Apr 03, 2016 7:11 pm
Location: USA Tucson, AZ 85742

Re: E85 / Flex fuel logic

Post by ZHoob2004 »

https://e85prices.com/e85map

Flex fuel is something I'd be quite interested in, especially for those running boosted setups.

junk3r
kit assembler
Posts: 28
Joined: Mon Feb 26, 2018 3:12 am

Re: E85 / Flex fuel logic

Post by junk3r »

I'm interested in this as well. I have installed a flex fuel sensor in my evo, and have been working on a flex fuel tune.

There is a lot of information on the evo logic here:
http://www.tephra.it/v3/

He has some cool features that i like:
- using two maps and having an adjustable interpolation curve for each map
- there is a warning (check engine light flash) for the ethanol reading changing too fast
- this is really nice when you change fuels at the gas station, when the check engine light stops flashing you know the fuel is mixed within a few
percent
- there are warnings/precations that take advantage of the GM sensor fail/error mode. When the sensor outputs it's 'error state' the ECU starts ignoring the ethanol % readings. I think it also flashes the engine light with the error.

Crazy Striker
kit assembler
Posts: 141
Joined: Wed Aug 08, 2018 6:05 pm
Location: Brest, Britanny, France

Re: E85 / Flex fuel logic

Post by Crazy Striker »

Hi everyone !

Sorry to revive this, but are some still interested by Flexfuel logic ? In the future I plan to run on E85 as soon as the supercharger pushes boost in my engine.
I think the first step would be to implement a flexfuel sensor control.
The GM type sensor is frequency related, so using the frequency MAP logic (/firmware/controllers/sensors/map.cpp) it would not be so hard to implement it.
Can I help you in any way with this, or do you have more urgent needs ?

Have a nice day

CrazyStriker

User avatar
AndreyB
Site Admin
Posts: 10546
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: E85 / Flex fuel logic

Post by AndreyB »

can you write code? a github pull request or just a patch file would be helpful. its not just the sensor, its probably more code once sensor works?
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

Crazy Striker
kit assembler
Posts: 141
Joined: Wed Aug 08, 2018 6:05 pm
Location: Brest, Britanny, France

Re: E85 / Flex fuel logic

Post by Crazy Striker »

Sure, I've programmed in C++ before and done a bit of Object programming, but I'm not very used to git and just made it work this afternoon.
I've compiled the firmware for the first time too.
I could not find a "tree" of the code structure on which I could work.
Does someone have that ?

Thanks

DonaldBecker
Posts: 32
Joined: Mon Aug 19, 2019 10:40 pm
Location: Los Gatos CA USA

Re: E85 / Flex fuel logic

Post by DonaldBecker »

A quick bit of research suggests the GM, Ford and most other FF sensors are similar

They have three pins, 12V power, ground and signal.

The nominal use is with a 12V polarity protected battery supply (main relay output). They appear to have an internal linear regulator and microcontroller that does all of the sensor-specific interpretation.
The output is an open collector digital signal. The ECU pulls up to 3.3V - 12V (usually 5V) with a 1.5 Kohm or greater resistor (usually 5 Kohm), or a current source.

The signal is PWM encoded, with a frequency of 50Hz to 150Hz indicating the percentage of alcohol in the fuel and the pulse width indicating the fuel temperature.

It's has been reported that most ECUs don't use the fuel temperature (pulse width) information. Some people claim that the FF sensor is mounted close to the engine so that it can report the best current estimate of mixture, but the mixture shouldn't change quickly enough for that to matter. It's likely that it's solely for wiring convenience.

What I haven't been able to figure out is what the FF sensor actually does that a wideband exhaust sensor couldn't do better. For an OEM it might let them avoid a previously-expensive wideband system, avoid raising long-term-fuel-trim errors, and perhaps optimize the power vs emissions if they know e85 is being used.

mck1117
running engine in first post
running engine in first post
Posts: 459
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: E85 / Flex fuel logic

Post by mck1117 »

DonaldBecker wrote:
Mon Nov 11, 2019 9:02 pm
What I haven't been able to figure out is what the FF sensor actually does that a wideband exhaust sensor couldn't do better. For an OEM it might let them avoid a previously-expensive wideband system, avoid raising long-term-fuel-trim errors, and perhaps optimize the power vs emissions if they know e85 is being used.
That's exactly what some newer vehicles do (use the wideband instead of ethanol sensor). If there's a large change in LTFT, they throw a code. If there's a large change in LTFT just after the fuel level went up significantly, it means you increased/decreased the ethanol content in the tank.

User avatar
AndreyB
Site Admin
Posts: 10546
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: E85 / Flex fuel logic

Post by AndreyB »

Crazy Striker wrote:
Mon Nov 11, 2019 5:20 pm
I could not find a "tree" of the code structure on which I could work.
Does someone have that ?
Not 100% sure what you mean :( Please elaborate at https://rusefi.com/forum/viewtopic.php?f=5&t=9 or https://rusefi.com/forum/viewtopic.php?f=5&t=10 or maybe let's chat at Slack see https://rusefi.com/forum/viewtopic.php?f=13&t=1198
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

neongreen
Posts: 22
Joined: Fri Apr 10, 2020 12:17 pm

Re: E85 / Flex fuel logic

Post by neongreen »

Is this project dead? I don't know how to use Github, but I can write basic code (matlab & arduino) and have a basic understanding of teh GM Flex Fuel sensor (also have one installed on my Falcon right now). The logic could be very simple, just a fuel multiplier and spark adder. Of course eventually you'd want table blending, but it could be good to get a simple version up and running first.
1962 Ford Falcon 5.0L V8 / T5

User avatar
AndreyB
Site Admin
Posts: 10546
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: E85 / Flex fuel logic

Post by AndreyB »

This project is in deep hibernation. I have a flex sensor (unless I've lost it) I'd say first step is really getting a sensor wired into rusEfi and someone confirming that sensor works. I am probably available to write some code but too little time for any hands-on experimentation.

Please consider learning a bit about github.

Also we spend too much time on Slack chat see https://rusefi.com/forum/viewtopic.php?f=13&t=1198
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

neongreen
Posts: 22
Joined: Fri Apr 10, 2020 12:17 pm

Re: E85 / Flex fuel logic

Post by neongreen »

Ok, that sounds like something I could help with eventually, once I get some hardware. I'm a terribly slow coder, but could definitely provide an outline of what the code would need to do in this case. I'll let you know once I get hardware, and I'll try to figure out how GitHub works.
1962 Ford Falcon 5.0L V8 / T5

User avatar
AndreyB
Site Admin
Posts: 10546
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: E85 / Flex fuel logic

Post by AndreyB »

AndreyB wrote:
Fri Apr 10, 2020 6:05 pm
I have a flex sensor (unless I've lost it)
Important update: my flex sensor is not lost, I've seen it today! First post now has a picture of it :)
That concludes the status update.

Not planning to work on any flex code in the foreseeable future but would love to review pull requests.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

neongreen
Posts: 22
Joined: Fri Apr 10, 2020 12:17 pm

Re: E85 / Flex fuel logic

Post by neongreen »

Not planning to work on any flex code in the foreseeable future but would love to review pull requests.
I'll see if I can put something together. It'll be a very basic fuel compensation strategy for now.
1962 Ford Falcon 5.0L V8 / T5

User avatar
AndreyB
Site Admin
Posts: 10546
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: E85 / Flex fuel logic

Post by AndreyB »

neongreen wrote:
Tue Apr 28, 2020 2:19 pm
it'll be a very basic fuel compensation strategy for now.
first step is sensor logic and a gauge of fuel composition. There is slack talk of this at https://app.slack.com/client/T4NJHQ8QZ/CJTJ9CFJR/thread/
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

mk e
Posts: 148
Joined: Tue Dec 06, 2016 7:32 pm

Re: E85 / Flex fuel logic

Post by mk e »

It should as simple as:
Read fuel sensor
Interpolated between E10 and E85 tuning

There shouldn't be any more to it that that I don't think?

It my setup I use the stoich value and mass flow so I won't use 2 tuning tables, I'd use use the stoich values to calculate required fuel volume and get the injector time from that.
Again pretty straightforward....don't make it hard.

neongreen
Posts: 22
Joined: Fri Apr 10, 2020 12:17 pm

Re: E85 / Flex fuel logic

Post by neongreen »

Is the concern about how to actually read the sensor?
1962 Ford Falcon 5.0L V8 / T5

User avatar
AndreyB
Site Admin
Posts: 10546
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: E85 / Flex fuel logic

Post by AndreyB »

neongreen wrote:
Wed Apr 29, 2020 11:50 pm
Is the concern about how to actually read the sensor?
On the one hand, it's not complicated to actually read the sensor. On the other hand, there are only ~five software developers who made code changes in the last three months and each and every of these software developers had not yet implemented the software change necessary.

I would not call this a concern but... there must be a term for this?
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

mck1117
running engine in first post
running engine in first post
Posts: 459
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: E85 / Flex fuel logic

Post by mck1117 »

mk e wrote:
Wed Apr 29, 2020 10:39 pm
It should as simple as:
Read fuel sensor
Interpolated between E10 and E85 tuning
That's the plan.

Today:
  • Hardcoded stoichiometric AFR
  • Hardcoded fuel density
With E sensor:
  • Stoichiometric AFR as a function of ethanol content
  • Fuel density as a function of ethanol content and fuel temperature (these sensors do both)

mk e
Posts: 148
Joined: Tue Dec 06, 2016 7:32 pm

Re: E85 / Flex fuel logic

Post by mk e »

winner winner chicken dinner. :)

Abricos
contributor
contributor
Posts: 783
Joined: Mon Aug 18, 2014 12:32 am

Re: E85 / Flex fuel logic

Post by Abricos »

mk e wrote:
Sun May 03, 2020 1:45 am
winner winner chicken dinner. :)
I think he no play PUBG ...

mck1117
running engine in first post
running engine in first post
Posts: 459
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

Re: E85 / Flex fuel logic

Post by mck1117 »

Abricos wrote:
Sun May 03, 2020 7:25 pm
I think he no play PUBG ...
oh, I've certainly played pubg (remember, I work in gaming?)

mk e
Posts: 148
Joined: Tue Dec 06, 2016 7:32 pm

Re: E85 / Flex fuel logic

Post by mk e »

Abricos wrote:
Sun May 03, 2020 7:25 pm
mk e wrote:
Sun May 03, 2020 1:45 am
winner winner chicken dinner. :)
I think he no play PUBG ...
You caught me, I don't play any games...they all bore the shit out of me, I just can't for the life of me understand the point of them. I make things that are real when I have time...today I'm working on retaining wall then a patio, killing time until the lockdown ends and I can take my crank to the shop and get back to the engine rebuild. No time for games......

Abricos
contributor
contributor
Posts: 783
Joined: Mon Aug 18, 2014 12:32 am

Re: E85 / Flex fuel logic

Post by Abricos »

Continental Ethanol Content Sensor / Flex Fuel Sensor Kit Part # SNSR-25032
Screenshot_20200713-082426.jpg
Screenshot_20200713-082426.jpg (644.83 KiB) Viewed 513 times
https://www.bmotorsports.com/shop/product_info.php/cPath/129_479/products_id/3408?osCsid=rmmhj8iirftg46s1ft791vm894

OrchardPerformance
contributor
contributor
Posts: 202
Joined: Tue Jul 24, 2018 8:55 pm

Re: E85 / Flex fuel logic

Post by OrchardPerformance »

Just a general FYI, I am working on the framework for implementation and what code I am able to write so that it will only need integration from someone that knows the firmware better.

Post Reply