Gear-based MPG gauge in MS1extra, why not MS2extra?

All questions about MS2/Microsquirt/Microsquirt module. See also MS2/Extra manuals

Moderators: daxtojeiro, muythaibxr, jsmcortina

Gear-based MPG gauge in MS1extra, why not MS2extra?

Postby djivesp » Thu Apr 02, 2009 3:49 pm

Hi all!
I have just registered and hopefully will have some valuable experience to add to this forum in due course when i have my MS tuned and happy :D .

But for now i have a question.

I hope it is self explanatory in the title.

The page below describes how to add MPG display to MS1-extra and works perfectly as shown in the youtube vid. Seems MS1-extra has a "half-way-there" implementation.
http://ecomodder.com/forum/showthread.php/how-get-instant-fuel-consumption-megasquirt-5474.html

I want to do the same to my MS2-extra code, but MS2-extra doesn't seem to have any references to MPG, and after comparing the 2 ini files and adding the same code to my MS2 ini, i have error codes when starting Megatune.

So is there a way to get this gear-based MPG display for MS2-extra?

Thanks all.
User avatar
djivesp
MS/Extra Newbie
 
Posts: 15
Joined: Thu Apr 02, 2009 3:30 pm

Re: Gear-based MPG gauge in MS1extra, why not MS2extra?

Postby FSG_PB_Patrick » Fri Apr 03, 2009 3:48 am

For that MPG gauge you need the proper interface within MS2, e.g. Variables like Speed,...
Just changing the megatune ini to import variables that are non-existing won't get you anywhere :lol:
And MS1 inis are not compatible with MS2 inis.

Anyways there's a traction control under development. It will be easy to send up a speed value once it's release status.
Patrick
--------------------
Formula Student Cars MS1/MS2:
Suzuki SV650S, Suzuki GSR600K3,
http://msruns.com/viewtopic.php?f=93&t=22782
--------------------
Projects:
Nissan Primera P11 with SR20DE (SR20VE 20V) MS2
FSG_PB_Patrick
Master MS/Extra'er
 
Posts: 601
Joined: Fri Apr 13, 2007 10:50 am
Location: Paderborn, Germany

Re: Gear-based MPG gauge in MS1extra, why not MS2extra?

Postby djivesp » Fri Apr 03, 2009 4:11 am

ok, i see, thanks :)
that sounds good, it seems i'll have to hang on for it.
I've done a little more on it and added the same variables into the ms2 ini, seems they are in the same format. No errors upon start up now and the gauge comes up on the main screen, will start the engine later to see if i get any luck. Unlikely though, since you mention they aren't compatible :(
User avatar
djivesp
MS/Extra Newbie
 
Posts: 15
Joined: Thu Apr 02, 2009 3:30 pm

Re: Gear-based MPG gauge in MS1extra, why not MS2extra?

Postby djivesp » Fri Apr 03, 2009 8:04 am

It works !!! :yeah!:
Basically, you copy and paste the whole MPG calculation section to the MS2 extra ini file so that section looks like the MS1 extra ini.
Then add the variables "divider1", "alternate1", "injOpen1", "fuelADC" with their descriptions, and change the "rpmHiRes" variable name in the last section to just "rpm".
Be aware the variable names are case sensitive.
Then you create the gauge according to instructions on ecomodder once again.

I'm no programmer and to be honest i'm quite surprised that it works, but it works hooray!

I have uploaded the modified ini file if anybody wants to use it :) You probably just need to get rid of the file extension and activate it via Megatune Configurator.
mind you it is tailored to my injector flow rate, 5th gear ratio, final drive and wheel circumference.

heres a pic of it idling. Sorry about the glare (the screen is in my dash lol):

Image

Image
Attachments
megasquirt-ii ini ms2extra mpg.ini
Gear-based MPG working with MS2Extra
(107.04 KiB) Downloaded 29 times
User avatar
djivesp
MS/Extra Newbie
 
Posts: 15
Joined: Thu Apr 02, 2009 3:30 pm

Re: Gear-based MPG gauge in MS1extra, why not MS2extra?

Postby UnaClocker » Tue Feb 23, 2010 9:52 pm

Seems your file is no longer available for download.. I'd love to see what all you changed to get it in there.
Brian
'88 Dodge Omni with an '03 2.4L turbo motor - MS2-Extra - GPIO based trans controller
My latest Project Blog
'90 Dodge Caravan - 2.0L 16v DOHC Turbo - MegaSquirt III sequential - JBPerf IO/Extender CAN board!
UnaClocker
Super MS/Extra'er
 
Posts: 1337
Joined: Fri May 07, 2004 12:59 pm
Location: Olalla, WA

Re: Gear-based MPG gauge in MS1extra, why not MS2extra?

Postby djivesp » Wed Feb 24, 2010 2:55 am

Oh no, disaster :o Mine has stopped working after I changed computers, so seems I'll have to figure it out all over again :roll:
Will post it up again when I do so!
User avatar
djivesp
MS/Extra Newbie
 
Posts: 15
Joined: Thu Apr 02, 2009 3:30 pm

Re: Gear-based MPG gauge in MS1extra, why not MS2extra?

Postby UnaClocker » Wed Feb 24, 2010 9:14 am

I've got a VSS signal coming in from my IO-Extender, so I'll be making some changes to the original equation. I'd like to get it working in TunerStudio's custom.ini file so that it survives firmware updates.. I update my firmware all the time..
Brian
'88 Dodge Omni with an '03 2.4L turbo motor - MS2-Extra - GPIO based trans controller
My latest Project Blog
'90 Dodge Caravan - 2.0L 16v DOHC Turbo - MegaSquirt III sequential - JBPerf IO/Extender CAN board!
UnaClocker
Super MS/Extra'er
 
Posts: 1337
Joined: Fri May 07, 2004 12:59 pm
Location: Olalla, WA

Re: Gear-based MPG gauge in MS1extra, why not MS2extra?

Postby UnaClocker » Wed Feb 24, 2010 5:53 pm

Code: Select all
[OutputChannels]
   fuelCC = { 2168 } ; Enter the total flow for all your injectors here in cc/Min
;****************************************************************************
;   squirtmul = { divider1 < 2 ? 2 : divider1 < 3 ? 1 : divider1 < 5 ? 0.5 : divider1 < 9 ? 0.25 : divider1 < 17 ? 0.125 : 1 }
    squirts   = { (rpm100 * .5) / 0.6                                  } ; How many squirts per Sec
OpenWidth = { injOpen1 * 0.1 }                                            ; Pulse width for injector opening time
   CCpHr     = { pulseWidth1 < 1 ? 1 : (fuelCC/60) * ((pulseWidth1 - OpenWidth)/1000) * squirts * 3600                                      }; cc / hr
     gph       = {  CCpHr / 3785                                            }  ; Gallons / Hr
    mph       = { (gpiopwmin3 == 65535) ? 0 : (84375 / gpiopwmin3   ) }
    mpg       = { mph < 1 ? 0 : mph / gph                }  ; Miles / Gallon
;*****************************************************************************

Ok, so the above got it working for me. I commented out the squirtmul line because I'm using sequential.. I have squirts set to 1, and actually end up with 4.. So I manually set the .5 setting I needed.. My MPH calculation is coming in from Jean's IO-Extender connected via CAN. The MPG numbers I'm getting seem to be pretty realistic.. I'm actually using the default fuelCC number. It seemed to be pretty close to exactly what my injectors should be flowing. And since I'm not 100% certain what they flow, I left it alone.
The only problem I'm having right now is OverRun Fuel Cut.. When the PW goes to 0, the MPG goes to something just over 2million.. While that's technically true.. When I'm not consuming fuel, my MPG is infinite.. But it's annoying.. I'm going to play with finding a way to not let it go over 150 or so (I get 150mpg when coasting down hill at an idle..)
Brian
'88 Dodge Omni with an '03 2.4L turbo motor - MS2-Extra - GPIO based trans controller
My latest Project Blog
'90 Dodge Caravan - 2.0L 16v DOHC Turbo - MegaSquirt III sequential - JBPerf IO/Extender CAN board!
UnaClocker
Super MS/Extra'er
 
Posts: 1337
Joined: Fri May 07, 2004 12:59 pm
Location: Olalla, WA


Return to MS2/Extra, MS2, Microsquirt and Microsquirt module support

Who is online

Users browsing this forum: No registered users and 1 guest