Page 1 of 2
Flex Fuel Gauges for MegaTune
Posted: Wed Jul 05, 2006 6:19 am
by 63Vette
Has anyone coded a fuel composition gauge based on the GM sensor's PWM (50 - 150 Hz) signal?
Yesterday we got our 79 CJ5 to run flex fuel, and I can say first-hand that MegaSquirt is very impressive. The Jeep never ran this well with its old carb. Now it performs like a late model, fuel injected car, whether on gasoline, E85, or somewhere in between.
Thanks in advance for help!
Evan
Posted: Wed Jul 05, 2006 8:06 am
by Bernard Fife
Has anyone coded a fuel composition gauge based on the GM sensor's PWM (50 - 150 Hz) signal?
63Vette,
This is a very good idea. Unfortunately, I just had a quick look and I don't see that MegaSquirt returns either the fuel sensor frequency or the fuel composition, and without these we can't make a gauge.
However, I suspect we can convince Al to add these to the variables passed back to MegaSquirt, then it will be easy to make gauges (I will add them to the default INI files).
Al is out of town (and out of range of internet access) this week, but I'll remind him about this next week.
And that's cool that the Jeep runs so well, by the way!
Lance.
Posted: Wed Jul 05, 2006 8:42 am
by Bernard Fife
Evan,
I just had a closer look, and it appears the E85 fuel correction is in the variables (it just wasn't in the first place I looked).
The variable is:
Code: Select all
fuelCorrection = scalar, S16, 68, "%", 1.000, 0.0 ; Percent alcohol in fuel.
To make a guage, add the following line to the
[GaugeConfigurations]:
Code: Select all
e85Gauge = fuelCorrection,"E85 Fuel Correction", "%", 100, 200, 99, 99, 164, 170, 0, 0
To add the value to your datalogs, add the following line to the
[Datalog] section of the ini file:
Code: Select all
entry = fuelCorrection, "E85", int, "%d"
If you let me kow what code you are using, I can make the modifications to the INI file and post it here.
If you could test this and confirm that it works as esxpected, that would be great (I will also test it on the bench when I get a chance).
Lance.
Posted: Wed Jul 05, 2006 8:53 am
by Bernard Fife
Evan,
I have made a few correction to the gauge configuration above, which displays the fuel correction (generally between 100% and 163%).
It works on the bench, I have just tried it.
It's possible to work backwards to get the fuel composition, I'll have a look at that when I get a chance.
Lance.
Posted: Wed Jul 05, 2006 9:06 am
by Bernard Fife
Evan,
For the fuel composition gauge add:
[GaugeConfigurations]:
Code: Select all
ethanolGas = fuelComposition, "Ethanol Percentage","%", 0, 100, -1, -1, 85, 101, 0, 0
[OutputChannels]:
Code: Select all
fuelComposition = { (fuelCorrection - 100)*1.587 }, % ; works with default sensor values
[Datalog]:
Code: Select all
entry = fuelComposition, "Ethanol%", int, "%d"
Lance.
Posted: Wed Jul 05, 2006 9:25 am
by Bernard Fife
Here are the INI files for code versions 2.3 and 2.6. These changes will be carried forward on future INI files.
Posted: Wed Jul 05, 2006 9:32 am
by Bernard Fife
Evan,
I meant to mention (and you probably already know) you can add these gauges to your front page using the instructions here:
http://www.megamanual.com/megatune.htm#installgauge
or you can right-cick on any gauge at time MegaTune is running and select either of the ethanol gauges to replace the one you have clicked on.
Lance.
Posted: Wed Jul 05, 2006 3:41 pm
by 63Vette
Wow, Lance, you have been busy. Thanks for your efforts! I will test the code mods soon (hopefully tomorrow) and will get back to you right away as to the results.
I recently built a 14:1 small block for my Corvette so it's super important that I'm mindful of the ethanol percentage when I fill up. I have access to E98 (for those unfamiliar with this term, its basically straight ethanol with a tad of gasoline mandated by Uncle Sam so we're not tempted to drink it) so I can raise the alcohol percentage if detonation becomes an issue after a "bad tank" (my last tank of E85 was actually "E65"). A return line to the tank after the pressure regulator also means that I can circulate fuel and get a reading without firing off the engine. That's the plan at least...
Thanks again,
Evan
Posted: Wed Jul 05, 2006 4:14 pm
by 78Spit1500Fed
This is why these forums are so helpful.
Lance, you are a god. (Not THE god of course... well, maybe. Are you?)
-Brian
Posted: Wed Jul 05, 2006 4:52 pm
by Bernard Fife
Evan,
Yeah, I wish we had even E85 around here - it'll come eventually, I suppose (maybe in time for the turbos I plan for my car!)
Lance, you are a god.
No, not even close!

I'm certainly not much of an electrical engineer, I'm no computer programmer, and the main thing I have going for me (like a LOT of people here) is an excess of curiosity!
Lance.