Flex Fuel Gauges for MegaTune

This forum is for discussion of MicroSquirt (TM) from Bowling and Grippo. The MicroSquirt information site is at www.usEasyDocs.com
Forum rules
Read the manual to see if your question is answered there before posting. If you have questions about MS1/Extra or MS2/Extra or other non-B&G code configuration or tuning, please post them at http://www.msextra.com The full forum rules are here: Forum Rules, be sure to read them all regularly.
63Vette
MegaSquirt Newbie
Posts: 5
Joined: Sun Apr 09, 2006 7:06 am

Flex Fuel Gauges for MegaTune

Post 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
Bernard Fife
Super Squirter
Posts: 1009
Joined: Mon Feb 16, 2004 3:15 pm

Post 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.
Bernard Fife
Super Squirter
Posts: 1009
Joined: Mon Feb 16, 2004 3:15 pm

Post 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.
Last edited by Bernard Fife on Wed Jul 05, 2006 9:08 am, edited 2 times in total.
Bernard Fife
Super Squirter
Posts: 1009
Joined: Mon Feb 16, 2004 3:15 pm

Post 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.
Bernard Fife
Super Squirter
Posts: 1009
Joined: Mon Feb 16, 2004 3:15 pm

Post 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.
Bernard Fife
Super Squirter
Posts: 1009
Joined: Mon Feb 16, 2004 3:15 pm

Post 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.
Bernard Fife
Super Squirter
Posts: 1009
Joined: Mon Feb 16, 2004 3:15 pm

Post 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.
63Vette
MegaSquirt Newbie
Posts: 5
Joined: Sun Apr 09, 2006 7:06 am

Post 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
78Spit1500Fed
Site Admin
Posts: 90
Joined: Thu Jul 29, 2004 4:36 am
Location: Terre Haute, Indiana
Contact:

Post by 78Spit1500Fed »

:shock:

This is why these forums are so helpful.

Lance, you are a god. (Not THE god of course... well, maybe. Are you?)

-Brian
Image
Bernard Fife
Super Squirter
Posts: 1009
Joined: Mon Feb 16, 2004 3:15 pm

Post 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! :shock: 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.
Post Reply