Vous êtes sur la page 1sur 24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

ClickonourmenubuttonsimmediatelybelowtofindMegaSquirtinformationquickly:
GeneralInfo

MegaSquirt

MicroSquirt

MSgpio

TuningYourMegaSquirtII(orMicroSquirt)Controller
IfyouarenotfamiliarwithtuningEFIsystems,youmightwanttoreviewthematerialinthePrinciplesofTuningpagebeforereading
thisdocument.

TuningTheory
TuninginvolvessettingalltheparametersthattheMegaSquirtII(orMicroSquirt)controllerusestobeoptimalforyournon
pollutioncontrolledengine,injectioncomponents,anddrivingstyle.Theseincludethingslikecoldstartpulsewidthsandacceleration
enrichments.Themostfundamentalparametersareinthe1212volumetricefficiency(VE)table(s),the1212air/fuelratio(AFR)
table(s),andthe1212sparkadvancetable.
Besuretoreadallofthisdocument,andtheconfigurationdocumentBEFOREstartingtotuneyourengine.Notdoingsocancause
damagetoyourengine.Alsoseethecodespecifictuningparameter'sguideforthecodeyouarerunning,suchasthosefor2.905or
3.770
Ingeneral,thisisallmucheasiertounderstandwhenyouareworkingonarunningengine.Tryingtoestimatewhatyourenginewill
specificallyneedbeforehandcanbemoreconfusingthanproductive.Itisworthwhileexercisetounderstandtherequirements,but
alwaysrememberthatultimatelyyouwillrelyonyourseatofthepantsandO2sensor(aswellasdragstriptimes,exhaustgas
temperaturesensors,etc.,etc.,ifyouhavethemavailable)totuneyourengine.
Whentuning:
Donotchangemorethanonethingatatimeandalwaysbeabletogetbacktowhereyoustarted,
Donottrytodrivethecarifyoucannotgetittoidleproperly,fixtheidlefirst,
DonottrytotuneaccelbeforeyouhavetunedtheVE,AFR,andsparktables,
Ifyoureportaproblemtothelist,pleasesupplydetails(andpreferablyadatalog,MSQ,anddetailsabouttheprocessorand
codeversionyouareusing),donotjustsay"itdoesnotwork"youwon'tgetmanyresponses.
Notethatinthismanualweassumeyouarerunninggasoline.However,otherfuelshavedifferentAir/FuelRatio(AFR)requirements.
Belowisachartoftheequivalentair/fuelratiosforseveralalternativefuels:

Air/FuelRatioEquivalents
Lambda Gasoline Propane Methanol Ethanol Diesel

0.70

10.3

11.0

4.5

6.3

10.2

0.75

11.0

11.8

4.9

6.8

10.9

0.80

11.8

12.5

5.2

7.2

11.6

0.85

12.5

13.3

5.5

7.7

12.3

0.90

13.2

14.1

5.8

8.1

13.1

0.95

14.0

14.9

6.1

8.6

13.8

1.00

14.7

15.7

6.5

9.0

14.5

1.05

15.4

16.5

6.8

9.5

15.2

http://www.megamanual.com/ms2/tune.htm#howto

1/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)
1.10

16.2

17.2

7.1

9.9

16.0

1.15

16.9

18.0

7.4

10.4

16.7

1.20

17.6

18.8

7.8

10.8

17.4

1.25

18.4

19.6

8.1

11.3

18.1

1.30

19.1

20.4

8.4

11.7

18.9

TuningSoftware
ThesoftwareapplicationyouusetotuneandconfigureyourMegaSquirtII(orMicroSquirt)iscalledTunerStudioMS+byPhil
Tobin.
Youalsoneedcomputer(ideallyalaptop)andaconventionalserialporttocommunicatewithyourMegaSquirtIIcontroller(oryour
MicroSquirtcontroller).USBwillmaywork,andmanypeoplehavereportedthattheyhavebeensuccessfulusingaUSBserial
adapter.JustaboutanycomputerthatiscapableofrunningJavawillbefastenough,butgetthefastestlaptopcomputeryouthinkis
reasonablypriced.
Thissectionofthemanualdealswithtuningthe'onvehicle'performanceandtuningofyourMegaSquirtII(orMicroSquirt).There
areextensiveinstructionsonconfiguringMegaSquirtII(orMicroSquirt)intheConfiguringMegaSquirtII(orMicroSquirt)
sectionofthismanual.Besuretoreadandunderstandtheconfigurationinformationbeforeattemptingtotuneyourengine.
BeforeStartingYourEngine
Ifyourengineisnewlyassembled,considerrunningitonaknowngoodcarburetorandmechanicaldistributorbeforeattemptingtorun
itonMegaSquirtII(orMicroSquirt).Thiswayyouwonthavetoworryaboutproperruninforthecamshaft,properignitiontiming,
etc.,whiletryingtogetareasonableinitialtuneintoMegaSquirtII(orMicroSquirt).
Beforestarting,makesureto:
Havetwofullychargedfireextinguishersonhand,
Checktheentirefuelsystem,fromthetanktotheinjectorsandback,forleakswhilerunningthefuelpump.DONOTattemptto
starttheengineifthereareANYleakswhatsoever.Fixanyleaksbeforeproceeding.
Checkthatthefuelpressureisappropriateforyoursystem(usuallyabout4245psiforportinjectionwhennotrunning,usually
around1215psiforthrottlebodysystems).
VerifythatyouhavepoweredyourMegaSquirtII(orMicroSquirt)froma+12Vsourcethatwillsupplycurrentwhile
cranking.ManyreportedproblemswiththeirMegaSquirtcontrollerhavebeentracedtopowersourcesthatareconnectedin
runbutnotwhilecranking.Checkyourvehiclewiringdiagramsifyouarenotsure.
Ifyouhaveathrottlebodyinjection(TBI)system,verifythatthereisasmallsquirtoffuel(equaltothe'PrimePulse'specified
inthewarmupwizard)whenMegaSquirtII(orMicroSquirt)ispoweredup(byturningtheignitionkeytorun),andthatno
morefuelisinjecteduntilcrankingstarts.Ifthisisnotthecaseforyoursystem,findoutwhatiswrongandcorrectit.
ConnectyourlaptoptoyourMegaSquirtII(orMicroSquirt)usingaDB9cable,turntheignitiontorun(donotstartit),and
verifythatallthesensorsgivereasonablevalues.TheMAPshouldbeabout100kPa,thecoolantandintakeairtemperatures
shouldbeapproximatelythesameastheoutsideair,andtheTPSshouldreadfrom0to100%asyouopenthethrottle.Note
thatTunerStudioMShasatwostepcalibratingfunctionfortheTPS.
Floodclearmodeistriggeredatathevaluespecifiedinthe'FloodClearThreshold(v)'(TPSWOT)ofthewarmupwizard
(defaultis3.5volts)NOfuelwillbeinjectedabovethispointwhilecranking!.
NotethatyourMegaSquirtIIcontroller'smaximumcrankingpulsewidthis65milliseconds(25millisecondsfortheV1
boards).Thisistohelppreventusersfromhydrolockingtheirengines.Ifyoufeelyouneedmorethan65milliseconds,you
mustmodifythecodetoallowlongerpulsewidths(seetheembeddedcodepageforcodeeditingandcompilingtips).However,
noknownenginecombinationswillrequirethismuchfueltostart.Evenwithareq_fuelof25milliseconds,typicalcrankingpulse
widthsat40Fwillnotnormallybehigherthan15to20milliseconds.Insteadofforcinglongerpulsewidths,youshould
investigateotherfuelsystemandelectricalproblems,suchasthosedescribedabove.
Notethatevenina'piggyback'application,donotsetyourMegaSquirtcontroller'scrankingpulsewidthstozero.Thiswill
causeunpredictablepulsewidthsupto13milliseconds.Instead,setthemto0.1millisecondsinthatapplication.Thisallows
verylittlefueltoflow.
Ifyouarenotentirelysureaboutyourignitionsettings,checkthesupportedlistforthesettingsyoushoulduse:

DistributorPickups
IgnitionTimingAlgorithm
GMHEI
GMDIS
FordEDIS
FordTFI
Bosch0227100124
MSD6A
DirectCoilControl
Ifyourmoduleisn'tonthe'officiallysupported'listyet,you'llneedtounderstandtherelationshipbetweenthetriggeroffset,theinput
capture(fallingorrisingedge),andthesparkout(goinghighorgoinglow).Herearesometipsifyoumoduleisn'tonthatlist:
1.TheMSIIignitionpin(whenconnecteddirecttotheportwiththeIGNJS10jumperinplace)hasaninternal5Voltpullup,but
itisonlycapableof25milliAmpsmaxorso(10milliAmpsissafer).Thismaynotbeenoughcurrentforyourcoil'stransistor,so

http://www.megamanual.com/ms2/tune.htm#howto

2/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)
youmightneedtousetheVB921(orBIP373)highcurrentcircuit(JS10IGBTIN&IGBTOUTIGNjumpers).Thisdoesn'thavea
pullupinplace,toaddoneseestep#65here:

2.Fortheinputcapture,youhavetokeepinmindthattheoptoisolatorinvertsthesignalfromthemodule:

You*could*useeitheredgeIFbotheventarefixedwithrespecttothecrankposition(TDC).Thisistrueforopticalsensors,
andmaybeforHallsensorsaswell.
WithaVRsensor,bothoftheseeventaredefinitelyNOTfixed,onlyoneis(itcorrespondstothe'zerocrossing'),soyouhave
tobesuretogetitright.Seethiswebpageforadetailedexplanation.
3.SparkOutputismuchthesame(triggeringondifferentedgesgivesdifferenttiming),youaretellingyourMegaSquirt
controllerwhichedgeoftheoutputwavetosendasthesparktiming.However,'sparkoutput'alsohasanotherfunction:it
sendsthedwellinfo.Oftenifyougetboththeinputcaptureandsparkoutputwrong,thetimingwillbeclose,butvarywithdwell
(andhencerpm).
IfyourmodulereliesonyourMegaSquirtcontrollertosetthedwell,the'SparkOutput'shouldbesetsothecoildoesNOT
chargewhentheengineisoff.
Youcantestthisbylookingfor:
avoltagedropacrossthecoil(whichmeanscurrentisflowing,whichitshouldn'tbeiftheengineisn'trunning),or
byhookingatestlightinplaceofthecoil(itshouldn'tlightiftheengineisn'trunning).
However,insomecasesthemodule,and/orwiringwillpreventchargingwhentheengineisoff,evenifthesparkoutputis
incorrect.Soknowingwhatsortofsignalthemoduleexpectsisveryhelpful,andthisinfocansometimesbefoundinthe
servicemanual,etc.
4.Failingthat,youcantryissettingthedwellto0.3millisecondswhileidling.Iftheenginerunsroughordies,thesparkoutput
settingislikelycorrect(sincethecoildoesn'thaveenoughcurrenttomakeareasonablespark).Notethatextendedrunning

http://www.megamanual.com/ms2/tune.htm#howto

3/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)
withtheSparkOutputsetincorrectlycanburnoutthecoiland/orthemodule.
5.Then,useatiminglighttocomparethetimingasreportedbyTunerStudioMStothatseenonthetiminglight,afteryouhaveset
thetriggeroffset('Tools/TriggerWizard'inTunerStudioMS).
Theindicatedandobservedadvanceshouldbeverycloseoverawiderangeofrpms(Iusuallytestatidle,~1500rpm,~2000
rpm,and~3000rpm,witha4cylinder,I'dalsocheck~4000rpm).Iftheindicatedandobservedtimingvaluesaren'tthe
sameattheserpms,theneither:
theedgeyouaretriggeringfromisn'tconstantwithrespecttocrankposition,OR
youaretriggeringthemoduleoffthewrongedgeoftheoutsignal(sparkoutputsettingisincorrect,causingthedwellto
becomepartofthetiming).
Notethatifyouchangethe'InputCapture'setting,youMUSTrecalibratethetriggeroffset.

The'easiest'waytodoallofthisisonoscilloscope,butmostpeopledon'thaveoneofthose.Youwillwanttogettheignition
parameterssetfirst,assoonasyougetstarted.
GettheEngineStartedandIdling
Youstart,naturallyenough,bygettingyourenginestarted.(BesureyouhaveconfiguredyourMegaSquirtII(orMicroSquirt)first,
followingtheinstructionsontheConfiguringMegaSquirtII(orMicroSquirt)page.)
Besuretosetyourbasetimingbeforestartingyourcar(ifithasnotbeenpreviouslybeenset).Andverifythatyouhaveenteredthe
basetimingvalueintothe'AdvanceOffset(deg)'fieldofthedialogat'Settings/IgnitionOptions'.
NotethattheprimepulseisNOTmeanttoprovidestartingfuel(itismeanttoclearanyairthatmighthaveleakedintothefuelsystem
whiletheenginewasshutdown).Supplyingfuelforstartingiswhatthecrankingpulsesarefor(astheyarebothrpmandtemperature
dependent,andthusmuchmorelikelytogivethefuelyouneed).Generally,keeptheprimepulseasshortaspossible(typically
around2.0millisecondsisagoodstartingpoint),andtunethestartingusingthecrankingpulsewidthsinstead.
Typically,thefirsttimesomeonetriestostarttheirenginewithMegaSquirtEFIController,itstartsafterabout5minutesof
alternatingvariouscrankingpulsewidthsnumberstogetstarted(ontheEnrichmentspage),andchangingthe:
CrankingPulseWidths:
Thecrankingpulsewidthat40Fshouldbeabout3to5timesthe170Fvalue.
Ifyouoverestimatethecorrectvalues,youWILLfloodtheengine.
Tobegin,setthe40Fcrankingpulsewidthtoabout88%ofyour"upper"req_fuelvalue,andthe170Fcrankingpulse
widthtoabout23%ofyourreq_fuel.Thoseshouldgetyou'intheballpark'forstarting.
Onceyouhavetheenginerunning,youcantunethecrankingpulsewidthswithsmallchanges,movingthemupordown
together,andcheckitoverafewdaysworthofstartsbeforedecidingwhichdirectiontogonext.Rememberthatthe
crankingpulsewidthsneedtobewith~0.5millisecondsoftheoptimalvalueatboth40Fand170F.
Youmovethemupanddowntogether,butnotbythesameamount.Youwanttokeepthecoldcrankingpulse
widthabout3to5timesthehotcrankingpulsewidth.
Forexample,supposeyourreg_fuelwas14.ThenyoumightstartwithacoldcrankingPWof12.3andahot
crankingpulsewidthof4.0.Supposeyoutrythisandseeitistoorich,andyourtemperaturewhenyoutriedit
was40F.Soyouneedtoleanitout(aftermakingsuretheenginehadn'tflooded,inwhichcaseyouwouldhave
tocleantheplugs).Youmighttryreducingyourcoldcrankingpulsewidthby0.8milliseconds,to11.5.Youdon't
wanttoalsoreduceyouhotcrankingpulsewidthby0.8.Youreallywanttoreduceitbytheproportionalamount
youreducedthecoldpulsewidth,whichwouldbe0.8*(4.0/12.3)=0.26=0.3.Soyouwouldreduceitto3.7.
Thismaintainsareasonableratiobetweenthepulsewidths.Youdon'thavetocalculateiteachtimethough,just
adjustthehotnumberbyabout1/3ofthecoldnumber,andyoushouldstay'intheballpark'.Conversely,ifyou
hadtorichenthepulsewidths,youmightadd0.8,and0.3,etc.
Notethatevenina'piggyback'application,donotsetMegaSquirt'scrankingpulsewidthstozero.Thiswillcause
unpredictablepulsewidthsupto13milliseconds.Instead,setthemto0.1millisecondsinthatapplication.Thisallows
verylittlefueltoflow.
Itisveryeasytofloodtheengine,especiallywhencold,withoutrealizingit,andthiscanconfuseyourstarttuningquite
alot.Soit'sbettertostartwithlowpulsewidthsandworkyourwayupinsmallsteps(leancrankingismucheasierto
recoverfrom),
Asyougetclosertooptimalcrankingpulsewidths,youcanadjustjustoneofthehotorcoldpulsewidthsabittofix
particularstartingissuesforexample,ifyouhavehotstartissues,warmtheengineupfully(ideallybydriving,not
idling)thenshutitoffandadjustonlythehotpulsewidthslightlytogetthebeststarting.Youcandothesamewithcold
start,butyoucanonlydoiton'true'coldstarts,whichmeansthat:a)youhavetowaitforacoldday,andb)youonly
getonetestperday(startingitandshuttingitoffrightawaystillwarmsthecombustionchamber,etc,andbasingyour
tuningonthatwillthrowyouoff).
Ifyourenginedoesn'trespondwhilecrankingatall,trydisconnectingtheserialcabletothelaptopfromyour
MegaSquirtcontroller.ThepowersupplyfromthelaptopmayinterferewithyourMegaSquirtcontrollerattimes,
makingtheengineimpossibletostart.Ifyoutrytodatalogacrankingattempt,andthedatalogisblank,oryouare
gettingresets(secLkeepsdroppingbacktozerobeforereaching255),thenyoulikelyneedtodisconnectthelaptop
whilecranking.Youshouldbeabletoreconnectaftertheengineisstarted,andtune/datalognormally,withoutany
issues.
Mostenginesarequitesensitivetothecrankingpulsewidths,soyoumayneedbothpulsewidthstobewithinabout0.5
millisecondstostartwellunderallconditions.
Makesureyouhavepowerwhilecranking,otherwiseyouarestartingonyourprimepulse,andwillgocrazytryingto
tuneit,
Keeptheprimepulseshort,lessthan4.0,andideallyaround2.0,whiletuningthecrankingpulsewidths.
Makesureyouarenotinfloodclearmodewhilecranking,
DatalogyourstartingattemptsusingTunerStudioMS,andstudythemcarefully,youwilllearnalot,
Don'tuseEGOfeedbacktoguideyouoncrankingpulsewidths,itwon'thelpyouatall,andmayconfuseyoualot.
Instead,useyoursubjectivesenseofhowlongittakestheenginetostartatanytemperature(youareseekingto
minimizethis,obviously)
AfterstartEnrichment:Iftheenginetriestostart,butdiesrightaway,youneedtoadjusttheafterstartenrichment.
Generallythisshouldbebetween2545%for100to250cycles,
WarmupEnrichment:Iftheenginestartsbutdiesafteraseveralsecondsorminutes,thenyouneedtoadjustyourwarmup
enrichment.Useupto15%greaterthanthedefaultsifthatseemstohelp.

http://www.megamanual.com/ms2/tune.htm#howto

4/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)
VETable:AdjustthevaluesattheidlekPaandrpmtogetittoidle.YouwanttochangetheVEtableentrieswhilewatchingthe
engineMAP(inkPa)totryandlowertheMAPasmuchaspossible.Dothisaftertheenginehaswarmedup.Asyoudothis,the
enginerpmwillrise,andyoumayhavetoadjustthethrottlestoponthethrottlebodytolowertherpmbacktothedesiredidle
speed.OncetheidleVEaretuned,youwillhavetoretunetheafterstartandwarmupenrichments.

CheckthattheIGNLEDonyourMegaSquirtcontroller(theLEDclosesttheDB9serialconnector)flashesonandoffasyoucrankthe
engine.Ifitdoesn't,yourMegaSquirtcontrollereither:
doesnothavepower(possiblyonlywhilecrankingmanyautomotivepowerfeedsaredisabledwhilecranking,makesureyour
12Voltfeedstays'hot'),or
doesnothaveatachsignal(assumingitworkedonthestim).
Youneedtocheckbothoftheseconditionsandfixwhicheverisnotright.
Ifyouhavebeentryingtostartyourengineformorethan15to20minutes,yououghttoinvestigateothersourcesofproblems
beforecontinuingtotrytostarttheengine.
Properlytuned,yourMegaSquirtcontrollerwillstartyourenginequicklyandreliably.Ifyouhavetroublewithstarting,eitherhotor
coldstarts(orboth):
MakesureyouhavesetyourTPSsothatitsvoltageiswellbelowthe'FloodClearthreshold(v)'(TPSWOT)specifiedinthe
warmupwizard.
VerifythattheADCcountincreasesasyouopenthethrottle,otherwiseyouhavetheTPSwiredbackwards.Youshouldrecheck
theTPSrangeeachtimeyouchangetheidlepositionorreassemblethethrottlelinkage.
Verifythatthesourceyouhavechosentosupply+12VoltstoyourMegaSquirtcontrollerwithisreceivingpowerwhile
cranking.Somesourcesgive12VoltsinRUNbutnotCRANK.TheenginewillbeverydifficulttostartifyourMegaSquirt
controllerisconnectedtosuchasource.
Makesuretheinjectorsandfuelpumpalsohavepowerwhilecranking(andinrun,ofcourse).
Makesurethatyouhaveenoughvoltageduringcrankingtoopentheinjectors.Forcoldstarts,youhaveacoldengineanda
coldbatterythatmakehighdemandsonthestartingsystem.Makesureyourbattery/alternator,etc.areuptosnuff,and
putthemonachargerbeforeattemptingtostartifnecessary.
IfyouareusingtheVRtachinputcircuit,youmayhavetoadjusttheR52andR56potentiometersontheV3mainboardifyou
don'tgetanrpmsignalwhilecranking.Youmaybeabletopullthedistributorandspinitinadrilltosetthepots,otherwiseyou
willhavetoexperimentwhilecrankingtheengine.Thepotsettingguideishere:www.megamanual.com/ms2/vradjust.htm.
Verifythatyourfuellinestothefuelpressureregulatoraretherightwayaround.Ifyourfuelispumping,andyourinjectors
areopening,butthesparkplugsaredry,there'snofuel.Sopullasparkplugtohavealook.Iftheyaredry,checkyour
regulatorconnections.
Makesureyourfuelfilter(s)arenotclogged.Eveniftheyarebrandnew,thefuelsystemmayhavetinypiecesofdebrisinit
frombeingopened,andthismightclogthefilter(s)veryquickoncethefuelstartstoflow.
MakesureyourMegaSquirtcontrollerisreceivingatachsignalforstarting.Makeadatalog(Alt+Lthenenter),crankthe
engineafewtimes,andthencheckthatthedatalogshowstherpmisnonzerowhilecranking.IfyourMegaSquirtcontroller
doesn'tseeanrpmsignal,itwillnotstart.
MakesureyourPWMsettingarenotsolowthatyourinjectorsnolongerfullyopenaftercranking.Note,however,thatthecode
disablesPWMduringcranking.ThiswasdonesothatPWMvalues(%andthreshold)couldbeloweredunderrunningconditions.
However,thePWMsetupneedstobesufficientforapoorlychargedbatterythathasjusthadtostartacoldengine,withthe
heater/defrosterrunningfullblast,etc.
Rememberthatthecrankingpulsewidthsneedtobewith~0.5msoftheoptimalvalueatboth40Fand170F.Generally
the40Fcrankingpulsewidthsshouldbeabout3to5timesthe170number.Ifyouoverestimatethecorrectvalues,you
WILLfloodtheengine.
Fortuning,theengineneedstobeitatruecoldstartstate.Thatmeansnotfloodedwhichcaneasilyhappenwhenyou
areplayingwiththenumbers.Ifyoususpectyoumayhavefloodedtheengine,disconnectyourMegaSquirtcontrollerand
cranktheengineforatleastseveralsecondsormore.Keepabatterychargerhandy!
Checktomakesuretheinjectorsareactuallyfiring,sothatyouaresurethereisnotafaultinthewiringcausingyoutorun
withoutafulldeckofinjectors.Thisiseasywiththrottlebodyinjection,justlookatthemwiththeaircleaneroff.Withaport
injectionsystem,seeifyoucansmellgasattheexhaust.
Useatiminglighttoverifythatyouhavespark,andthatitisappropriatelytimed.
Iftheenginetriestostart,butdiesrightaway,youneedtoadjusttheafterstartenrichment.Generallythisshouldbebetween
2030%for100to250cycles.
Iftheenginestartsbutdiesaftermorethanseveralsecondsorminutes,thenyouneedtoadjustyourwarmupenrichment.
Notethattheafterstartenrichment,warmupenrichment,andVEtableallinteract.VEisthe'base'.Warmupenrichment(WUE)
addsapercentagetothebaseVEfuelwhentheenginecoolantisbelowaspecifiedtemperature.Afterstartenrichment(ASE)
addsanotherpercentagetothe'baseVEfuel+Warmupenrichment'forashortperiodafterstarting(typicallylessthan30
seconds).Theafterstartamounttapersfromitsinitialsettingtozerooverthisperiod,soASEhasitsbiggesteffectinthefirst
fewseconds.PleasenotethatifyougetyouASEright,butthemgoontoadjusteitherorbothoftheWUEandVEtables,the
ASEmayneedafurtheradjustment.Similarly,ifyouadjusttheVEtable,theWUEmayneedtobereadjusted.
Checkadatalogofyourcrankingtoverifythatyourcrankingspeedis300rpmorless.Ifitismorethen300rpm(notvery
common,butpossible),firstcheckthatyouarenotgettingignitionsignal"spikes".Ifyouaregettingspikes,thenaddtheDave
capacitor,ortrytheothersolutionsintheignitiontriggeringsectionofthismanual.However,ifyourengineactuallydoescrank
at350rpmorabove,youneedtomakeadjustmentstothecodetocontinuetousethecrankingpulsewidthswhiletheengine
iscranking.ConsulttheMSEFIforumsfordetails.

http://www.megamanual.com/ms2/tune.htm#howto

5/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)
IfyourdashtachometernolongerworksaftersharingwhensharingasignalwithMegaSquirtEFIController,themost
commonsolutionistoaddaresistorwithavaluebetween1Kand100KOhmstothetachinputlinetoMegaSquirt.Thisis
simpleandcheap,andthere'snoswitchingissuesorothercomplications.Somepeopleusea100Kpotasvariableresistor,
tuneituntilitworks,thenreplaceitwithanequivalentresistor.

SettingthePWMCriteria
TotunethePWM[pulsewidthmodulation]valuesforyourengine,youneedtoknowwhatkindofinjectorsyouhave:lowimpedance
orhighimpedance.
Ifyouarerunninghighimpedanceinjectors(greaterthan10Ohms),thensetthe:
PWMTimeThresholdto25.4msec,andthe
PWMCurrentLimit(%)to100%.
InessenceyouaredisablingthePWMmode.Thisallowsfullvoltagetotheinjectorsthroughoutthepulsewidths.
Forlowimpedanceinjectors(lessthan3Ohms),youneedtolimitthecurrenttoavoidoverheatingtheinjectors.Todothis,
thereisaperiodoftimethatyouapplyfullbatteryvoltage[peak]current,thenswitchovertoalowercurrentaveraged[hold]
current,i.e.peakandhold.Alternatively,youcanaddresistorsinserieswiththeinjectors.SeetheInjectorsandFuelSupply
sectionofthismanualformoredetails.
TorunlowimpedanceinjectorswiththePWMcurrentlimitmode,youneedtosettwoparametersthe"PWMCurrentLimit
(%)"andthe"PWMTimeThreshold(ms)"bothareontheConstantspage.Thecurrentlimit%isthepercentdutycycle
whenthecurrentlimitisinvoked.Thetimethresholdistheamountoftimefromwhentheinjectorisfirstopeneduntilthe
currentlimitisactivated.
1.Startwith:
PWMTimeThreshold=1.0millisecond,and
PWMCurrentLimit(%)=
30%onaV3orV3.57mainboard(ifyouhavetheactiveflybackcircuitinstalled),oranyMicroSquirt.
30%onaV2.2mainboard(ifyouhavetheseparateflybackboardinstalled).
75%onaV2.2mainboard(ifyoudonothavetheseparateflybackboardinstalled).
2.Onceyougetyourengineidling,thenfirstadjustthePWMdutycycledownin1%incrementsuntilyounoticeachangein
idlequality(besuretohitthe"sendtoECU"buttoneachtimeyouchangethevalue).Thisisthepointwherethecurrent
limitistoomuchandtheinjectorsarenotbeingheldfullyopen.
3.Thenmovethevaluebackup35%(forexample,iftheidlefaltersat45%,thenputinanumberof48%to50%).
4.Moveontoadjustingthetimethreshold.Lowerthetimethresholdby0.1millisecondsatatimeuntiltheidlequality
deteriorates.
5.Thenincreaseit0.3ms.
6.Now,repeatthesesteps(startingat#2).Adjustthedutycycleandtimethresholdalternatelytogettheoptimumvalues
foryoursetup.Youwillconvergeonasetofnumbersthatworkwellforyoursetup.
TheinjectoropeningtimeandPWMtimethresholdshouldbesettoapproximatelythesamevalue.SoadjustthePWMtimethreshold,
andtheopeningtimetogether.However,onceyoustarttotunethe'finetune'theidle,ifyouhavetorevisitthePWMparameters,
changeonlythePWMtimethreshold,butdonotchangetheopeningtime.
ThereasonforthisisthatchangingtheopeningtimealsochangestheAFR,especiallyatlowrpms,soitforcesyoutoalsoretunethe
VEtable.Sounlesstheygettobedifferentbymorethanabout0.5milliseconds,leavetheopeningtimealoneaftertuningtheidleand
cruiseVEs(unlessyourarewillingtoretunethoseareas).
Onthecar,settingthePWMparametersisveryeasytodoandonlytakesafewminutes.Atidletheoverallinjectorpulsewidthsare
smallcomparedtotheirclosetime,sothiswillallowyoutoadjustthevalues.Inotherwords,adjustthePWMcurrentlimitbefore
takingthecaroutonthestreetwhereinjectorpulsewidthsbecomehigh,increasingthepossibilityofoverheatingyourinjectors(and
blowingfuses).
YoumayfindthatyoucanidleataverylowPWM%,buttheenginewillstumbleorcoughifgivenanythrottle.Thiscanbeduetoatoo
lowPWM%especiallyifyourinjectorsarelargeandtheidlepulsewidthisapproximatelyequaltothePWMTimeThreshold.Inthat
caseyoumaybeidlingalmostentirelyonthePWMTimeThreshold.SorevtheengineoccasionallyasyouaretuningthePWM
parameters,toensurethatyouhaven'tgonetoolow.
Also,forsomesetups,aninitialPWMCurrentLimitof30%maybetoolowonaV3mainboard(75%onaV2.2mainboardwithoutthe
flybackboard),sotheywillneedtoincreasethisvaluesameforthetimethreshold.UsePWMtimethresholdvaluesgreaterthan
about1.5to1.7millisecondsonlywithgreatcautionitispossibletoburnoutyourinjectors!
NotethatifyouarerunningtheactiveflybackcircuitandneedPWM%of40%ormoretorunproperly(or80%onaV2.2withthe
standardflybackcircuitbutwithouttheflybackboard),yourflybackcircuitisn'tworkingproperly!Troubleshootthatcircuit
carefullytofindoutwhy.

Resets
WhenyourMegaSquirtcontrollerresets,TunerStudioMSdisplaysa'RESETX'inthelowerrightcorner(whereXisthecumulative
numberofresets(includingrestarts))itwillalsobeep.Resetscancauseanumberofproblemsthatcausetheenginetorunbadly,
includingmessingupthebarocorrectionandenablingafterstartenrichment.Soyoushouldtrytocureanyresetissuesbeforeputting
alotofeffortintotuning.
Resetsgenerallyindicatethatthepowertotheprocessorwasinterrupted.Thiscouldmeanthattheinputpoweractuallywascut,butit
canalsomeanthattherewasapowersurgeintothebackplane(ground),sothattherewasnolongera5vdifferentialbetweenthe
inputsandthegrounds...
Resetsareoftencausedbynoisypowersupplies(usuallythealternator),orpoorgrounds.
First,fixthegrounds,makesureallareperfectanddonotconnecttoareasthataredirty,rustedorpainted.Placethemclose
together.
Tocheckthealternator,youcanshuttheengineoff,removethewiringtothealternator(don'tletitgroundonanything,somewires
mightbehot).Thestarttheengineandseeiftheresetsgoaway.Iftheresetsdisappear,thealternatoristheproblem.

http://www.megamanual.com/ms2/tune.htm#howto

6/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

Youcanfixthealternatorand/oraddacarstereopowerfiltertotheMegaSquirtcontroller's12Vsupply.Thesearecheap(~$5)and
widelyavailable.Theytypicallyhavethreewires:onefromaswitched12Vsource(theoriginalsourcefortheMegaSquirtcontroller),
onetogototheMegaSquirtcontroller(withcleanpower),andagroundwire.
Ignitionnoise,solenoidsturningonoroff,andthatsortofthingcanalsocauseresets.Checkyourharnessroutingtoseeifanyground
orsignalwiresarenearnoisesourcessuchassparkplugwiresorthecoil.Finally,nonresistorsparkplugshavebeenknowntocause
resets.Useresistorplugswheneverpossible.

SettingtheColdStartandWarmUpEnrichments
Ifitiscoldout,youmayhavetofigureoutthecoldstartenrichments/warmupenrichmentsrightawaytokeeptheenginerunning
untilitwarmsup.Ifitisreasonablywarmout,thedefaultvaluesmaybesufficientandyoumaybeableleavethecoldstart
enrichmentsuntilyouhavetheVEtableandotherparametersinareasonablestateoftune.
Duringcrankingmode(definedaswhentheRPMislessthan400),yourMegaSquirtcontrollerproducescrankingpulsewidthsthat
arecalculatedbyalinearinterpolationoftwoendpointvaluesdefinedbytheuser,oneat40Fandoneat170F.thesearesetinthe
warmupwizardunder'Tuning'inTunerStudioMS.TheyarecalledPulsewidthat40F(ms)(CWU)andPulsewidthat170F(ms)
(CWH).
AtypicalsettingforaChevrolet350smallblockV8withaTunedPortInjectionsetupand30lb/hrinjectorsis2.0millisecondsat
170Fand10.0millisecondsat40F.Theoptimalvaluesforyourcombinationarelikelydifferent,thoughgenerallyshouldfollowa
similarpattern.
Duringcranking,MegaSquirtII(orMicroSquirt)injectsonepulseforeveryignitionevent,soforan8cylinderitshootsout8times
for720degreescrankshaft,withallinjectorssquirting.Sowiththeabovevalues,at170degrees,theeffectiveamountoffuelper
cylinderis82=16milliseconds.For40Fitis108=80milliseconds.
Notethatevenina'piggyback'application,donotsetyourMegaSquirtcontroller'scrankingpulsewidthstozero.Thiswillcause
unpredictablepulsewidthsupto13milliseconds.Instead,setthemto0.1millisecondsinthatapplication.Thisallowsverylittlefuelto
flow.
Oncetheenginefiresup(definedbyengineRPMgreaterthan300RPM),theenginegoesintoafterstartenrichment(ASE).Theafter
startenrichmentstartsoutatauserdefinedpercentageenrichmentvalue(typicallyaround20%),andrampsdownto0%afterso
manyignitiontriggerevents,whichisuserdefined(useabout200forthisnumbertostart).Thisisanenrichmentabovethenormal
warmupenrichment,whichistemperaturedependent.
TuningtheIdleControl
MegaSquirtII(orMicroSquirt)cancontroleitheranON/OFFsolenoidstylevalve,andPWMidlevalve,orasteppermotorIAC.The
FIdlevalvehasasinglesetpoint,aPWMvalvecanbesettodifferentspeeds,whileastepperhasanumberofpossibilitiesforadding
air(thusraisingtheidlespeedbydifferingamounts).SeetheIACpageformoreinformationonthesedifferentidlespeedcontrol
devices.

ThesteppermotorIACcanbesettocloseintendiscretestepswithincreasingtemperature.Thesearestoredinanarraycalled
'iacstep_table'inthecode.Youcanenterthecumulativenumberofstepsinthedialogat'Tables/IdleSteps'inTunerStudioMS.
Generally,thedefaultvalueswillbesuitableforinitialtuning,youcanfinetunethemlatertogettheidlespeedyoudesireateach
temperature.Notethatthetotalnumberofsteps(i.e.,the170entry)shouldmatchthe'StartValue'(IACStart)inthe'IdleControl'
dialogunder'Settings'.Thedefaultis160stepsinbothcases.
ThenmakesurethefinalvalueintheIACsteptableis0to10morethanthestartvalue.Notethatthestartvaluerepresents
retraction,andtheIACsteptablevaluesareextensions.
Gettingthestartvaluerightisimportantforconsistentoperation,itcan'tbetoofewatallortoomanybyverymucheitherofthese
willdefinitelyresultininconsistentoperation.
TheIACistemperaturecontrolledinnormalcircumstances,exceptforcrankingandimmediatelyafterastart.Whenyour
MegaSquirtcontrollerispoweredup,thestepperisretractedbythe'startvalue'numberofsteps.Itisthenextendedtothe
'CrankingPosition(steps)'whilecranking.Whencrankingstopsandtheengineisrunning:
Ifthetemperatureisabovethetimebasedafterstart'coldtemperature',thepintleextends(orretracts)tothevalueintheIAC
steptableforthecurrentcoolanttemperature.Itdoesthisoverthe'timetoruntapertime(sec)'.
Ifthetemperatureisbelowthetimebasedafterstart'coldtemperature',thepintleextends(orretracts)tothe'coldposition
(steps)'.Thenthepintleextends(orretracts)tothetimebasedafterstartvalueoverthe'coldtapertime(sec)'.Afterthat,it

http://www.megamanual.com/ms2/tune.htm#howto

7/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)
followsthetimedbasedschemetoreachthecoolantcontrollednumberofstepsfromtheIACtable.

ForsomeIACsteppermotors,youmightneedsomeadjustmentbecausethepowerresistorvaluesmaynotbequitelowenoughfor
yourapplication.Thiswouldcausesporadicproblemsthatmaybeworsenowthattheweatherhasbecomecolder.Toseeifthisisthe
problem,cuttheleadsoffaresistororuseasmallpieceofwireandsolderitacrossthetwopowerresistorsonthebottomofthe
MegaSquirtIIboard.ThesearethetwolargebrownunitsontheBOTTOMoftheboard,ontheendoppositethesideoftheboard
withthe2x3pinheader.Thesehavelargesolderpadsoneachsidejustjumperacrosseachonesoyouget0Ohmsandseeifthis
improvesoperation.Thisisverylikelytobetheproblemforthosewhoseetheproperstepcommandsgiveninsoftwarebut
inconsistentresponsefromthemotor.
TheotherthingtonoteaboutbenchtestingtheIACsteppermotoristhatthereisadesignedindelayinthecommandstothemotorso
itisnotconstantlymoving.Whileitiswarmingupitmakesamove,thenwaitsforasignificanttemperaturechange(theamountyou
enteredinthe'Hysteresis(F)'fieldinTunerStudioMS,thedefaultis5F)aswellasafewsecondsofelapsedtimebeforethenext
changeismade.Soifyourapidlyincreasethecoolantinputonthebench,itcatchesthefirstfewdegreesofchangeandrespondswith
asmallmovement,thenwaitsafewsecondsthenmakesalargemovementbecausebythenyouhavejackedthecoolanttomax.
Thisisnotaprobleminreallife,becausetheenginetakesseveralminutestowarmup.
NotethatonemorethingcancauseinconsistentIACoperation:Iftheintakeairisunheated,andthethrottlebodyisunheated,andthe
temperatureisabitabovefreezingwithhighhumidity,thentheIACpassagecan'iceup'.Thishappensbecausethetemperature
dropsduetothepressuredropacrosstheIACpintle,andthemoistureintheairfreezes(exactlylikecarburetoricing).Thisprevents
theIACfrommoving,sostepsarelostandtheidlestayshigh.
Ifthepassageicesup,butyoudriveforafewmoreminutes,thenrestartthecar,theradiatedengineheatisusuallyenoughtomelt
theice,andtheIACclosescompletely,apparently'fixing'theproblem.Thisusuallywon'thappenmuchbelowfreezing,though(theair
istoodry).
Withtuningoftheabovenumbers,nearlyanyenginecanbetunedtofireimmediately,everytime,justlikeanynewOEMfuelinjected
car.Howeveritmaytakesometrialanderrortoconvergeonthebestnumbers,especiallytheafterstartenrichment,whichneedsto
bejustright,ortheenginewillrunroughorstallimmediatelyafterstarting.
Youcandothisastheenginewarmsbyadjustingthewarmupenrichmentbins,loadingittotheECU,andnotingtheeffectonidle
quality.Itwilltakeseveralstarts{fromacoldsoak}togetthisclosetooptimum.Thenyoucanplayaroundwithrevvingtheenginein
neutralandadjustingthemixtostoichiometric.TuningtothispointiseasyenoughtodowithoutanO2sensorbyadjustingfor
maximumvacuum(lowestMAPkPa)atanygivenrpm.
Notethatifyougetaunevenidlespeeds,inthesensethatsometimeswhenyoustarttheengineyouhaveidlesspeedsthatarehigher
orlowerthanothertimes,youmayhavetoincreaseyourIACStartvalue.ThismaybenecessarytobesuretheIACisalltheway
openunderallstartupconditions.Withaninsufficientnumberofsteps,whetherornottheIACisopenallthewaydependstosome
degreeonwherethestepperisatstartup.Forexample,ifitwasalreadyopen20steps,thenitmightopenalltheway.Ifitwas
completelyclosed,itmightonlyopen160steps(orwhateveryouhavesetasyourStartvalue).Butregardlessofhowmuchitopens,
theidlespeedisdeterminedfromthat'offset'.
Thiscanresultinidlespeedsthataredependentonthestepperpositionatlast'shutdown',ifthe'Startvalue'isnotatleastasmany
stepsasthephysicalrangeofthesteppermotor.ByincreasingtheIACStartvalue,youwillgetconsistentwarmupidlespeeds.When
youincreasetheStartvalue,sayby20steps,youmayhavetoaddthesameamounttotheIACsteptable.However,ifaddingtothe
steptabledecreasestheidlespeedunderallconditions,itprobablymeansyour'Startvalue'wasalreadyallthewayopen.
Notethatyoucanalsosetthecoldadvancevaluestoprovideabetterwarmup,thoughthisisconsidered'finetuning',andthevalues
generallyshouldbeleftaloneuntilyouhavethefuelandsparktabledialledin.

TuningtheVETable(s)

http://www.megamanual.com/ms2/tune.htm#howto

8/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

TheVEtablerepresentsthevolumetricefficiencyandair/fuelratioateachrpmandkPa(0=totalvacuum,100=atmosphere,etc.).
Volumetricefficiencyistheratiooftheamountofairactuallyfillsthecylindertotheamountthatwouldfillthecylinderinastatic
situation.TheVEisusedinthe'fuellingequation'.
ThereareanumberofwaystospecifyVE.YourMegaSquirtcontrollerspecifiesitrelativetothemanifoldabsolutepressureand
includestheAFRintheVEtable.
Thatis:
VE=(actualairmass)/(theoreticalairmass)*AFR stoich /AFR actual
SoforMegaSquirtII(orMicroSquirt),enteringalargerVEinthetablemakesthatpointricher,andasmallernumbermakesthat
pointleaner.
WhentuningtheVEandAFRtables,it'salwaysagoodideatokeepthefuelingequationinmind:
pulsewidth=Req_FuelVE(rpm,kpa)MAPE+Injector_open_time
TosetupthefuelcurvesfortheenginewithMegaSquirtII(orMicroSquirt),youhaveanumberofparameterstoworkwith.The
mostimportantofthesearetheReq_Fuelvalue,the1212Air/FuelRatio(AFR)table,andtheVEtable(1212volumetricefficiency
table).
Youshouldbeaimingtoachieve1213:1air/fuelratiosunderfullthrottle,and1517:1underlightloadsforanaturallyaspirated
engine.Boostedenginemayrequirearichermixtureunderpower.Conventionalwisdom(notalwaysright)suggeststhatyoutunefor
~13.1:1atpeaktorque,and12.5:1atpeakpowerforanaturallyaspiratedengine.Boostedenginescanrunasrichas~10.5:1to
11.0:1underboost.Inallcases,youdon'twanttorunleanathighloadsitcanbeverydestructivetoyourengine.
Theideathatleanmixturesathighloadsburnsholesinpistonsiscorrect,butitisforadifferentreasonthansomepeoplethink.
Theexhaustgasesarealwayshot,todifferentdegrees.However,withaleanmixture,thereisextraoxygenleftoverinthe
combustionproducts(bytheverydefinitionoflean).
Combiningveryhotoxygenwithhotaluminumresultsinthealuminum(thepiston)burning(thealuminumchemicallycombineswith
theleftoveroxygen),justlikeifithadbeenhitwithanoxyacetylenegascuttingtorch!Theburningofthealuminumaddsfurther
heat,andtheprocessgetscatastrophicallydestructiveinahurry.
Thechemicalequationis:
4Al+3O2 2Al2 O3
Notethatatlowloadsthereisn'tenoughheatinthecombustionproductstoraisethepistontemperatureenoughtoinitiateburningof
thealuminum,soleanmixturesatlowloadsaresafe(andsavefuel).
Withrichmixtures,thealuminumcan'tburn(there'snooxygenleftaftercombustion,andit'stoocoolinthechamberbefore
combustion),ithastomeltinstead,andthishardertodo(theendothermicphasechangeabsorbsafairbitofenergy,unlikethe
exothermicburningofaleanmixwhichgivesoffenergy).

http://www.megamanual.com/ms2/tune.htm#howto

9/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

Detonationcanalsobecausedbyleanmixtures,whichisanotherreasontoavoidrunningleanathighloads.It*will*causehuge
spikesinthecylinderpressure(thatisaudibleas'knock'),thatcandamagethepistonsandeventhecylindersbyoverstressingthem
withmechanicalloads.Itmustbeavoidedatallcosts.
Richmixturesburnmoreslowly(becausethere'snotenoughoxygenfortheamountoffuel)thanleanmixtures(forwhichanexcess
ofoxygenensuresquickcombustion),andthiscanresultindetonationastheunburnedportionofthechamberiscompressedand
heatedbythestillcombustingportion.Atlowloads,thecylindercombustionspeedismuchslower(becausetheairfueldensityis
muchlower),makingdetonationlesslikely,soleanmixturesareagainokay.
TostartyoutuningeffortswithMegaSquirtII(orMicroSquirt),youcancalculateaninitialVEtablethathassufficientRPMandkPa
bins,aswellasanestimateoftheVEbasedonyourmaximumtorqueandhorsepowerfigures.Todothis,usetheTables/VE
Tables/Tools/GenerateVETableutilityinTunerStudioMS2.25+.ThiscalculatedVEtablewillneedtobetunedcarefullytoavoid
damagetoyourengine,however.
Withanarrowbandoxygensensor,tuningthefuelmixtureinvolvessettingupaVEtable(s)whichisrich(byincreasingthe
entryintheVEtable(s))athighloadsandrpms,orlean(bydecreasingVEentry)atlowloadsandrpms.
Withawidebandoxygensensor,tuningthefuelmixtureinvolvessettingupa'stoichiometric'VEtable(s),andrichening(by
increasingtheentryintheAFRtable(s))orleaning(bydecreasingAFRentry)ateachpointintheAFRtable.
YoucanalsouseautomaticmixturecorrectiontohelptuneyourVEtable.Readaboutithere:www.megamanual.com/ms2/amc.htm
Note:Exhaustleaks'upstream'oftheoxygensensorwillcausethesensortomisreadtheair/fuelratioandenrichthemixture.Air
injectionsystems,ifupstreamofthesensor,willdothesameundersomeconditions.Makesureyourexhaustmanifoldgaskets,etc.
areingoodshapeandyoursensorsseeonlyexhaustgasbeforeusingtheclosedloopEGOsensorfeedbackfeatureofMegaSquirtII
(orMicroSquirt)!
Decidingexactlywhen(andhowmuch)youshouldrunrichismostlya"seatofthepants"thing.Whentuning,youwillfindtheengine
willsurge(atlowloads)and"coughs"athigherloadsifitisrunlean.AdjusttheAFRatthepointwherethishappenssothethisdoes
notoccur.Checktheplugsfordetonation(tinyblackandwhiteflecks)whentuningathighloadsandrpmsifyoususpectdetonationat
all.Notethatdetonationcanbecausedeither byaleanfuelcondition(VEtoolow)or toomuchsparkadvance(forthefuel).The
simplestwaytodistinguishthesetwoconditionsiswithanoxygensensor.Anarrowbandshouldreadatleast0.8voltsunderfull
throttle,atleastforastartingpointintuningWOT.Therearemoredetailslaterinthissection.
VolumetricEfficiency(VE)entriesinthe1212MegaSquirtII(orMicroSquirt)VEtableareexpressedasapercent(i.e.65
represents65%volumetricefficiency).
ForMegaSquirtII(orMicroSquirt),VE(=percentagecylinderfilling)isrelativetomanifoldpressure,accordingtothefollowing
equation:
massairincylinder=(VExMAPxcylindervolume)/R(constant)xMAT
Somassairincreaseswithboost(MAP),asweallknow,butVE,theefficiencyoftheenginegeometryandvalvetiming,doesnotkeep
rising.Therearemanyreasonsforthis,oneofthemostimportantbeingresidualexhaustgasinthecylinder,whichdisplacestheair
youaretryingtostuffinthere.ThemechanismbywhichEGRentersthecylinderistheintake/exhaustvalveoverlap.Asboost
increases,thiswindowbetweenintakeandexhaustallowsmoreresidualgastoflowbackintothecylinderbecausetheexhaust
backpressurerisesatveryhighboost,andcanbecomegreaterthantheintakepressure.Soinpractice,VEsarenevermuchgreater
thanabout130%.ThereismoreontheMegaSquirtfuellingequationhere:www.megamanual.com/v22manual/mfuel.htm#equation.
YoucansetRPMandMAPsensorvaluesfortablewhereveryouwantthem,buttheymustbeinthesameorderasinthetable
suppliedwiththesoftware.ThesamerpmandkPavaluesareusedforalltablesinMegaSquirtII(orMicroSquirt).
Fornormallyaspiratedengines,valuesabove100kPaareessentiallywasted.Putthemsotheycoverentirerpm/boostrangeofyour
engine.Thatis,youwanttocoverfromyourslowestidlespeedtoyourredline,andfromthekPaatidleordeceleration(whicheveris
lower)tofullthrottle(withboost,ifapplicable).Evenlyspacedvaluesworkwell,butyoumaychoosedifferentvaluestosuityour
combination.
Evenaturbochargedenginecapableof20lbs/inofboostwillgenerallynothaveextremelylargeVEnumbers.Theadditionoffuelfor
boostcomesthroughtheMAPterminthefuelequation:
pulsewidth=Req_FuelVE(rpm,kpa)MAPE+Injector_open_time
Inessence,themassoftheairenteringacylinderiscomputedusingtheidealgaslaw(PV=NRT),wherethepressurepisafunction
ofVEandMAP,thevolumev=cylinderdisplacement,theairtemperaturetisafunctionofE,risthegasconstant.Wearelookingfor
n,themassofinductedair)andthenthatresultiscombinedwithacharacteristicnumberforagiveninjector.
Ifyougettheinjectoropeningtimecorrect,andtheREQ_FUELaccuratelyrepresentstheflowrateofyourinjectors,thentheVE
entrieswillbeclosetotheVEnotedabove.However,ifyouropeningtimeisnotright,oryourREQ_FUELisnot,thenthenumberswill
beskewedbytheamountthevaluesareinerror.Ingeneral,exceptforwhenyouarefirsttryingtogetyourenginestarted,usethe
calculatedvalueforREQ_FUELanddonotchangeit.
Intheory,atstoichiometricmixtures,theVEvaluesat100kPawouldreflectthetorquecurveoftheengineatWOT(ignoringfriction
effects),assumingaconstantAFRlevel.

TuningtheAFRTable(s)
Air/FuelRatio(AFR)entriesinthe1212MegaSquirtIIAFRtableareexpressedasaratioofairtofuelbyvolume(forexample
14.7:1representsachemicallycorrect("stoichiometric")ratioforgasoline.Aratioof~16.5:1givesgoodfueleconomyatlowengine
speedsandloads,whilearatioof~12.5:1givesmaximumpowerathighloadsandrpms.Theseentriesareusedtoonlytoadjustthe
oxygensensortargetvoltage,andonlyifyouhaveawidebandsensor.
MegaSquirtII(orMicroSquirt)usesoneortwo1212AirFuelRatio(AFR)tablesfortuning.MegaSquirtII(orMicroSquirt)
usestheAFRtableindifferentways,dependingontheEGOfeedbackoptionyouhaveselected:

http://www.megamanual.com/ms2/tune.htm#howto

10/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

Ifyoudon'thaveanoxygensensorinstalled,choose'Disabled'underEGOSensorTypeinTunerStudioMS,andthenyou
MegaSquirtII(orMicroSquirt)controllerwillnotusethenumbersintheAFRtabletoadjusttheVEtablenumbers(asshown
above)whencalculatingthepulsewidths.Thereisnofeedback.
Ifyouhaveenabledanarrowbandoxygensensor,choose'Narrowband'underEGOSensorTypeinTunerStudioMS,and
youMegaSquirtIIcontrollerwilltrytoadjusttheamountiffuelinjected,uptothelimitsyouspecify,togivetheoxygen
sensorvoltagespecifiedinthetuningsoftware.TheAFRtableisnotused,insteadasingleVOLTOXTargetisused.
Ifyouhaveawidebandoxygensensor&controller,choose'SingleWideband'underSettings/EGOControlin
TunerStudioMS,andbeSUREtogotoTools/CalibrateAFRTableandselectyourcontrollertype.ThenyourMegaSquirtII
controllerwilladjusttheamountoffuelinjectedbasedontheAFRtableuntilthewidebandcontrollerreportsavoltage
correspondingtotheair/fuelratiointheappropriatecelloftheAFRtable.
IMPORTANTNOTE:DoNOTburntables('CalibrateAFRTable'or'CalibrateThermistorTables')onarunningengine.
EvenidleisNOTallowed,becausethesetablesONLYexistinflash,soonceatableiserased,thereisnothingbut
garbageinthereuntilitisreprogrammed,onewordatatime.Untilthatreprogrammingiscomplete(itcantakea
fewseconds),operatingtheengineisunsafe.
NotetheEGOfeedbackdoesnotoperateifanyofthefollowingaretrue:
1.YourMegaSquirtII(orMicroSquirt)controllerhasnotbeenreceivinganactivetachsignalfor30seconds,
2.ThecoolanttemperaturesensorhasnotreachedtheActiveAboveCoolantTemp()(EgoTemp),
3.TheTPSisabovethe'ActiveBelowTPS(v)'setting,and
4.TheMAPsensorreadingisabovethe'ActiveBelowMAP(kPa)'setting,and
5.Eitherorbothofthe'ControllerStepSize'(EgoStep)or'ControllerAuthority(%)'(EgoLimit)arezero.
Thesearesetinthe'Settings/EGOControl'dialog.Inparticular,unlessyour'ActiveBelowMAP'ishigherthanyourbaroreading,you
willnotgenerateEGOfeedbackonthestimulatorwithoutapplyingavacuumtotheMAPsensor.
Ifyoudonothaveawidebandsensorinstalled,youcancalculatedtheVEvaluerequiredtoproduceanyotherAFR:

newVE%=oldVE%(stoich(14.7)/desiredAFR)
Forexample,ifyouhaveastoichiometricmixture(NB02=0.50volts)with65%VEatacertainRPMandkPa,thentoleanthemixto
16.0:1youneed:

65%(14.7/16.0)=60%
Torichenan80%VEentryto12.5:1fromstoichiometric:

80%(14.7/12.5)=94%
However,youcannotusethenarrowbandsignaltodetermineastoichiometricratioathighenginespeedsandloadsthiswill
damagedyourengineifyoutry!Awidebandsensorandcontrollercanbeusedundertheseconditionsforfeedbackcontrol.
Withwidebandsensors,simplysetthedesiredAFR(andtype),andadjusttheVEtabletominimizetheEGOcorrectionatallengine
speedsandloads.
Withanarrowbandsensor,youhavemoreworktodo.Havesomeoneridewithyouandbringupthetuningpage.Seewherethedot
hangsaroundwhenyouareundermoderateloadthisiswhereyouneedtofocusontuning.Lateryouwilltrytoestimatethehigher

http://www.megamanual.com/ms2/tune.htm#howto

11/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

loadnumbersfromthoseyoudetermineunderlesserloads.
Usetheuparrow+shifttorichentheVEvaluesenrich(withincreasedVEnumber)thefourcornersaroundwherethedotisgive
eachcornerfiveuparrowshifts,andseeifthishelps.BesuretoturnonEGOcorrection,andthentuneusingtheEGOcorrection
gaugeratherthantheEGOvoltagegauge.Ifcorrectionisbelow100%,thenraiseVEtoraisecorrectionandsoon.
Youcanalsodatalogtheengineparameters(includingO2volts)andinspecttheresultingfiletoseewheretheVEneedstoberaised
orloweredaccordingtotheMAP,rpm,andAFR(ifyouhaveawidebandO2sensor).

TuningtheSparkTable
Sparkadvancereferstothepositionatwhichthesparkoccursinthecrankshaft'srevolution.Itismeasuredindegreesbeforetop
deadcenterBTDC(whenthepistonisatitshighest).Thesparkoccursbeforethepistonreachesthetopofthecylinderbecausethe
fueltakessometimetoburn,andwewantitwellunderwayatmaximumcompression.Lowercylinder(andmanifold)pressuresresult
inslowerburning,solowMAPkPavalueshavehighersparkadvancenumbersinthetable.However,becausetheburntimeis
relativelyconstantforagivenpressure,thetimingmustbeadvancedindegreesasenginespeed(rpm)rises.

ForMegaSquirtII(asformostotherignitionsystems),thetotalignitionadvanceisbasedonthreetypesofadvance:

Totaladvance=initialadvance+RPMbasedadvance+vacuumadvance
Inparticular,MegaSquirtII(orMicroSquirt)usesthreefactorstodeterminethetotaladvance(calledadv_deg).
1.Thefirstistherelevantvaluefromthe(rpmxkPatable),calledign_table(rpm,kPa).
2.Thesecondistheadvanceoffset(adv_offset),roughlyequivalenttotheinitialtiming.
3.AndthefinalvaluethatMegaSquirtII(orMicroSquirt)uses,notpresentintheaboveequation,isthecold_adv_deg,which
isa1x10tablebasedonenginecoolanttemperature(clt).Acoolerengineislesssusceptibletodetonation,soitcanusemore
advance,andthusmakemorepowerandbemoreefficient.
SowithMegaSquirtII(orMicroSquirt),theadvanceequationbecomes:

adv_deg=adv_offset+ign_table(rpm,kpa)+cold_adv_deg
Inthecode,alloftheseadvancefactorsareintenthsofadegree(1/10),andallarepositiveonly.Allignitionparametersareincrank
degreesasopposedtodistributordegrees.
Beforetuningyouradvancetable,besuretouseatiminglighttoverifythatyour'triggeroffset'iscalibrated.ChangingtheTrigger
OffsetinTunerStudioMSwillnotchangethedisplayedadvance,instead,itchangestheactualadvanceasseenwithatiminglight.Your
goalistomakethesetwomatch.
Todothis,getyourenginewarmedup(otherwisethetimingmovesasthetemperatureincreases)andidling,thenuseatiminglight
toverifytobecertainyouractualadvanceasshownbyatiminglightequalsyourtheadvancedisplayontheadvancegaugein
TunerStudioMS.(26.3inthiscase).(NotethatpositivenumbersdenoteBTDC,andnegativenumbersdenoteafterTDC.)

http://www.megamanual.com/ms2/tune.htm#howto

12/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

Intheaboveillustration,youwantthe'big'displayednumber26.3tomatchthenumberthetiminglightgivesyou.Youmakeit
matchbyadjustingthesmallnumber8.0upordown(usingthe+/buttonsortypingitin).
Sointheaboveexample,wewouldn'tknowhowtoadjustit,becausewearemissingthetiminglightinfo.Butifthetiminglight
showed28.3degrees,wewouldchangethetriggerangleto10.0.Thistakes2degreesoutofthetiming(becauseMSIIonlyadds
26.310=16.3degrees,insteadof26.38=18.3degrees),andthebignumbershouldmatchthetiminglight,soyourtriggeroffset
iscorrect.
Notethatyoucanalsomakethebignumberandtiminglightmatchbyrotatingthedistributor.Thishastheadvantageofallowingyou
tospecifythetriggeroffsetdirectlytoyourdesiredvalue,andstillhavethecorrecttiming.Ifyouchoosethismethod,yourotatethe
distributoruntilthetiminglightvalue(whichchangeswithdistributorrotation)matchesthebignumber(whichdoesn'tchange).Then
yourtriggeroffsetiscorrectlycalibrated,andsettoyourchosenvalue.
Thetriggeroffsetvaluecantheoreticallybesetanywherephysically,however,sinceitmaybeusedforcrankingand'faultmode'
timing(GM7pinHEI),itisbesttosetitatareasonablenumberforidle,say~8BTDC(orwhateverisrecommendedbythemodule's
manufacturer).Checkthiswithatiminglight.Togetthetriggeroffsettothisvalue,youmayhavetorotateyourdistributorormove
yourcrankshaftVRsensor.
Thetriggeroffsetisaquickwaytomovetheentiretablearound.Thiscouldhelpinforexampledynotuningifyouwantedtoseein
onerunwhatretardingeverywheredidtoyou,thenstartmovingthingsaroundaccordingtothehorsepowercurvecomparedto
baselinewith0offset.
Tosetthesparkadvancetable,youshouldtrytounderstandwhatyourengineneedsinthefollowingareas:
1.totaladvanceatWOT:shouldbefrom~24to~40dependingonyourboresizeandcombustionchambercharacteristics.
Olderdesignengines(i.e.pushrods,domedpistons,etc.),andthosewithlargebores(bigblocks,etc.)needmoreadvance,
about36to38.Newerdesigns(4valve/cylinder,swirlportengines,etc.),andsmallbores,generallyrequireless,about28to
32.Enginesthathavealotofmilesonthemrequirelessaswell,becauseofoilleakageintothechamber.Loweroctanefuel
alsorequireslessadvance(itburnsmorequickly),soifyouarerunning87octane,useafewdegreeslesstotaladvancethanif
youarerunning94octane.
2.initialadvance(adv_offset+ign_table(idle)):thisistheroughequivalentoftheold'idleadvancewiththevacuumline
disconnected'figure.InMegaSquirtII(orMicroSquirt),itistheadvanceatthelowestrpmbinandaMAPvalueof100kPa.
Largerinitialadvancenumbersproduceaslightlymorefuelefficientidle,butmaymaketheidleunstableandresultinhigher
emissions(thisiswhymostenginesusethenovacuumadvanceatidle).Toomuchinitialadvancecanalsomaketheengine
hardtostart.Generally,keeptheinitialadvanceat6to10.
3.RPMbasedadvance:Generallyforaperformanceengine,youwanttheadvancetobe'allin'by3000rpm.SoforagivenMAP
(say100kPa)thesparkadvanceshouldrisefromtheinitialvaluetothemaximumbyabout3000rpm.Yourparticularsettings
willdependonyourMAPandRPMbins.
4.vacuum(MAP)advance:astheloadontheengineisreduced,thefuelburnsmoreslowlyandmoreadvanceisrequired.This
meansthatyoushouldhavetheadvanceincreaseforagivenrpmastheMAPvaluedecreasesinkPa.So,forexample,ifyou
have32advanceat4000rpmand100kPa,youmighthave40advanceat4000rpmand50kPa.Youcanmakethe
interveningvaluesevenlyspacedtobeginwith,andtunethemlater.Youcanexperimentbyusingupto10to20more
advanceatthelowestkPabinscomparedtothehighestkPabins.
Forexample,mostsmallblockChevroletV8engineslikeabout32to38degreestotaladvanceatwideopenthrottle(WOT),
dependingontheheads,compressionratio,andfuelused.NotethatyouareaimingtohavetheRPMbasedadvance(analogousto
centrifugaladvanceonanoldstyledistributor)comeinattherightraterelativetoengineRPM.Typically,youwantit"allin"byabout
28003200RPMsforastreetperformancemotor.AdditionaladvanceabovethisRPMpointisn'tneededbecauseincreasedcombustion
chamberturbulenceresultsinfasterburntimes.NotethatgettingtheadvanceinsoonerdoesNOTbuildpeakHP,butitdoesbuildlow
rpmtorque.
Notethattheoptimumamountoftotaladvanceisnotnecessarilythemostthatdoesn'tdetonate.Forexample,withamoderncylinder
headdesign,youmightgetmaximumpowerat32,butmightnotexperienceanydetonationuntil3840.Howeveryouwillstillwant
theadvancetocomeinasquicklyaspossible(withoutknocking)upto32.
Theexceptiontomaximizingthetotaladvanceistheinitialadvancetheengineuseswhencranking.Higherinitialadvancewill
generatebetter'offidle'response(especiallywithanautomatictransmission),butcancausehardstarting,tothepointofphysically
breakingthestarter.Somesourcesrecommendupto14to20ofinitialadvanceforperformanceengines.However,ifyouhave
installedyourMegaSquirtII(orMicroSquirt)controlleronahighcompression,largedisplacementenginethatalreadyputsan
additionalstrainonthestarter,limityourinitialadvanceto46,thenhavetheadvancecomeinrapidlyafter600to800rpm.

http://www.megamanual.com/ms2/tune.htm#howto

13/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

YoumightbetemptedtobecleverandsetthehighkPa/lowrpmbins(bottomright)to0,sothatthestartingwouldbeeasy,andthe
crankingbypasssignalwillnotbeneeded.However,youneedtoconsidertwothings:
1.onemighthavetousethecrankingbypass,themodulemaynotworkotherwise,and
2.theenginereallymaynotwanttotransitionsmoothlyfromcrankingtostartingunlessthehighkPa/lowrpmbinsareatleast8
to10.
Totunethesparktable,youwillneeddrivethecarandlistenfordetonation.Ifyouhearany(orbetteryet,ifadatalogshowsany
feedbackfromtheknocksensor)reducetheadvanceatthesparkadvancetablepointwherethedetonationoccurred.Startatlow
enginespeedsandlowengineloads,andworktowardshigherspeeds/loadsprogressively.Alwayskeepthesparktablesmoothby
adjustingtheneighboring'cells',ordriveabilitymaysuffer.
Letuponthethrottleimmediatelyifyouheartherattlesofdetonation.Thenremoveandinspectyoursparkplugs.Lookforevidence
ofdetonationontheporcelinnoseofthesparkplugthatsurroundsthecenterelectrode.Detonationwillshowas"saltandpepper",
whichistinyflecksofcarbonand/oraluminumthatindicatedetonationhasoccurred.
Ifthereareno'rattles',andnosaltandpepper,youcanincreasetheadvancebyafewdegrees,andrepeat.Checkthespark
plugsaftereachdrive.Asyoucontinuetoincreaseadvance,youwilleventuallyeitherheardetonation(letoffthegasimmediately!)or
youwillslowdown.Atthispoint,decreasetheadvanceatthatpointofthesparkadvancetable,increasetheVEatthesamepointin
theVEtable,orusehigherqualityfuel.Donotcontinuetooperateanenginethatshowssignsofdetonation,evenifitisbrief.
Ifyouexperiencedetonationinyourengine,theneither:
Yourmixtureistoolean.IncreasethenumbersintheVEtableatthepointtheenginedetonates(orincreasetheReq_Fuelifthe
detonationoccursatallpoints).Alsomakesureyourfuelpumpisoperatingwell.Itmaybesupplyingenoughfuelatidle,but
notsupplyingenoughwhenthedemandrises.Usetheoxygensensorreadingstodetermineifyouarelean,
Youhaveoilleakageintothecombustionchamber(checktheplugsforsignsofoil).Thiscouldcomepasttheringsorseals
(possiblyworn,orfromsomethingthatwasforgottenduringassembly,orthereareblockeddrainbackpassagesinthehead,
ortheringshavebeendamagedbydetonationoroverrevving),a'leaky'PVCsystem,orfromapoorintakemanifoldgasket
sealallowingoilintotherunners(onpushrodVengines),
Yoursparkadvancemaycomeintoofarand/ortoofast.Editthesparkadvancetabletolowertherateatwhichadvanceis
added.Youmayalsoneedtolimitthetotaladvance.Mostengineswillnotrequiremorethan~36(possiblymoreforaflathead
design,oralargeopenchamber,largepistondomedesign).Newercylinderheaddesignsand4valve/cylindersheads
generallydon'trequirealotofadvance,
Youhavesparkplugsthataretoohot(getarangeortwocolder),ortheyareincorrectlytorqued(iftheyareloose,theyover
heatbecauseofpoorthermalcontactwiththehead),
Yourthermostatistoohot(youcantryaslowasa160Fthermostatforstreetuse),
Youfanisnotworkingproperly.Useanelectricfanthatcomesonat175F(Manystockelectricfansdon'tcomeonuntil210F
to220F).Verifythatyourfancomesonattheappropriatetemperature(ifelectric)andthatthefrontoftheradiatorisclearof
debris,or
Youmayhavealotofairtrappedinthecoolingsystem(drillthreeorfour1/8"holesinthethermostat'sflange(notthe
manifoldorhousing,ontheactualthermostatitself)tohelpbleedthecoolingsystemwhileyoufillit).

SettingtheAccelerationEnrichments
Inadditiontothe'regular'accelerationenrichments,alsochecktheXTauenrichments.
MegaSquirtII(orMicroSquirt)hasblendedMAPdot/TPSdotabilitiesforaccelerationenrichment.Youcanselecttheproportionof
eachusingthesliderinthe'Tuning/Acceleration'dialoginTunerStudioMS(thevariableiscalledTps_acc_wghtinthecode).Ifyou
choose100%,yougetaccelenrichmentbasedonTPSonly,ifyouchoose0%,yougetaccelenrichmentbasedonMAPonly.Ofcourse
youcansetittoanyintegerbetweenthese(99%,98%,97%,...3%,2%,1%,etc.)andget'blended'accelenrichment.
Thedefaultvaluesareagoodplacetostart(especiallyifyourreq_fuelissomewherebetween10and20milliseconds).(Toconvert
v/s(usedwitholderversionsofTunerStudioMS)to%/s,assumethat0%=0Voltsand100%=5Volts(whichisn'tquitetrue,butitisa
start),then1.0v/s=20%/s,etc.)
ThevaluesontheupperrightaretheTPSbasedvalues(asnotedbytheheadingabovethem),thoseontheupperleftaretheMAP
basedvalues.
ThetwoverticalcolumnsshowthecurrentTPSdotandMAPdotvalues,withtherecentpeaks'telltaled'inred.
Largervaluesinthe"Value(ms)"entriesincreasetheamountofaccelenrichment.Smallervaluesdecreasetheamountofaccel
enrichment.
ThesliderchoosesthepercentageofMAPversusTPS,somewherebetween30%and60%isgoodformostinstallations.Some
installationsmayneedtousevaluesoutsidethisrangetosolvespecificissues.
MegaSquirtII(orMicroSquirt)alsohasuserconfigurableacceltapertuning:

http://www.megamanual.com/ms2/tune.htm#howto

14/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

Theacceltimeistimeduringwhichthefullaccelenrichmentisaddedtotheinjectorpulsewidth(insecondsnotmilliseconds).The
acceltapertimeallowsyoutohavetheaccelenrichmenttaperfromthesetvaluetotheendpulsewidthgradually,ratherthanhaving
theaccelenrichmentendabruptly.
Eachoftheseaccelenrichmentsschemeshasitsownthreshold(theratebelowwhichnoaccelenrichmentisapplied).ForMAPdotthis
istheMAPdotThreshold(kPa/s)(MapThresh),forTPSdotitistheTPSdotthreshold(v/s)(TpsThresh).
Bywatchingthebargraphsintheaccelwizard,youcanseehowmuchnoisethereisintherespectivesensorsignals.trytosetyou
threshold(s)abovetheselevelstoavoidunwantedaccelenrichment,whichcanmakeyouenginerunverypoorly.

AfteryouhavetheVEtabledialedin,thenstartadjustingtheaccelerationenrichment.Youmaywanttotryashortaccelerationshot
time(like0.2seconds)andincreasetheaccelenrichmentbins.
Ifthecardoesnotbuckunderacceleration,youareclosetocorrectsettings.Ifitbucksandstumbles,thenitisgoingtooleanand
youneedtorichenthatpartofthetable.Beforetuningdecel[oraccel],makesureyouhaveyourVEtableclosetocorrectfirst!One
waytodothisistogettheVEtablesetupbysettingtheTPSdotthresholdsettingveryhigh(250kpa/secor250%/s,somethinglike
that)sothatTPSenrich/enleanneverkicksin.Then,(insteadystate)setupVEtable.
Toadjusttheaccelbins,startwiththemhigh,thenreducethelowestbinvalueby0.1millisecondsatatimeuntiltheenginestumbles
orcoughsundergentleopeningofthethrottle.Ifitneverstumbles,increasetherateatwhichyouopenthethrottleandtryagain.Ifit
stumblesevenwiththeabovevalues,doublethemandtryagain.
Thenrepeatwiththenexthigherbinandslightlyfasterthrottlemovement.Continuewitheachhigherbinandmoreaggressivethrottle
applicationuntilallthebinaresatisfactory.
TheDecelfuelamount(%)(TPSDQ)enrichmentcanbeusedtoimprovetheeconomyofyourvehicle.Itreducestheamountoffuel
injectedwhentheTPS(and/orMAP)aredecreasing.Adecelfuelamountsettingof100%meansnocut.1%meansreducethepulse

http://www.megamanual.com/ms2/tune.htm#howto

15/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

widthby99%,to1%ofwhatitnormallywouldbe.Notethatdecel'enrichment'isONLYappliedabove1500rpm.

TuningforEconomy
Togetmaximumfueleconomy,youshouldaimto:
Operatetheenginetorunasslowlyasyoucan,i.e.,shiftearly,installahighwaygear,overdrivetransmission,etc.(hencethe
proliferationofoverdrivetransmissionsinthelast15years).
RunasteadystateAir/Fuelratio(AFR)ofabout16.0:1to16.5:1.
Minimizealltheaccelerationenrichments(butdon'tallowmisfires).
DrivetomaintainthelowestMAPkPa(highestvacuum)thatyoupossiblycan.
Keepthetireswellinflated.
Removeexcessweightfromthevehicle(toolboxes,etc.).
Idlenomorethanabsolutelynecessary,anddon'tletthevehiclewarmupbyidling.Startit,andgetmovingitwillwarmup
asyoudrive.
Makesuretheignitionandfuelsystemsoperateperfectly,anddoatuneupifyouhaven'tforawhile.
Tuningtheengineformaximumeconomywithawidebandoxygensensorisrelativelyeasy.SetyourcruiseareasoftheAFRtableto
aleanvalue,say16.5:1.Ifyougetsurging(whichindicatesaleanmisfire)decreasetheAFRentries(sayto16.2:1)andtryagain.A
lean'surge'thatfeelslikesomeoneispushingthecarforwards,thenpullingitbackwardswhileyouhaveaconstantacceleratorpedal
position.Generally,thisisasignthatyouaretoolean.
Ifyoudon'tgetanysurging,increasetheAFRvaluesabit(sayto16.8:1)untilyouseesignsofsurging,thendecreaseitbyabout
0.3:1to0.5:1.IfyourEGOLimit(%)issufficient(giventhestateoftuneofyourVEtable),youshouldbegettinggoodeconomy.
Withanarrowband,it'sabittoughertosetitformaximumeconomy.YoucanadjusttheVEtable,buttheEGOcorrectiontriesto
bringitbacktoastoichiometricAFR.
Youcouldraiseyour'EGOActiveAboveRPM'tojustaboveyourcruiserpm,butdependingonwherethatis,itmightnotbeallthat
workable.
Abettermethod,ifyouhaveanarrowbandoxygensensor,is:
first,gettheVEtabletunedwithstoichiometricvaluesaroundthe'cruise'rpm(s)andkPa(s).
thenrecalculatetheVEnumbersaroundyourcruiserpmandkPato16.5:1minus5%.Forexample,ifyouhadavalueof56%
(atstoich.AFR),youwouldreplaceitwith:
newVE={56%(14.716.5)}5%=45%
thensettheEGOLimit(%)to5%.
DothisforallthevaluesintheVEtableyouactuallycruiseat,butnotthehigherrpm,higherloadareasoftheVEtable.
ThatkeepstheEGOat16.5:1atcruise,butletsyousetitanywhereelseintherestofthetable.

TuningandEmissions
MegaSquirtandMicroSquirtcontrollersareexperimentaldevicesintendedforeducationalandresearchpurposes.
MegaSquirtandMicroSquirtcontrollersarenotforsaleoruseonpollutioncontrolledvehicles.Checkthelawsthatapply
inyourlocalitytodetermineifusingaMegaSquirtorMicroSquirtcontrollerislegalforyourapplication.
Automotiveemissionsoccurinseveralforms:
1.Tailpipeemissions:Thisiswhatmostpeoplethinkofas'vehicleemissions'theproductsofburningfuelinthevehicle'sengine,
emittedfromthevehicle'sexhaustsystem.Themajorpollutantsinclude:
a.UnburnedHydrocarbons(HC):Unburnedhydrocarbonemissionsresultwhenfuelmoleculesintheenginedonotburn
orburnonlypartially.Oftenthisistheresultofignitionmisfires,lowcompression,oilleakagepasttheringsorvalves,or
excessivelyrichmixtures(orconversely,leanmixturesthataretooleantoignite,resultinginaleanmisfireand*all*
ofthefuelpassesthroughasunburnedHC!).Hydrocarbons,oncereleasedintotheatmosphere,reactinthepresenceof
nitrogenoxidesandsunlighttoformgroundlevelozone(O 3),amajorcomponentofsmog(seebelowfordetails).
b.Nitrogenoxides(NOx):Nitrogenoxides(technically'mononitrogenoxides':NOandNO2 )aregeneratedwhen
normallyinertnitrogenintheairreactswithoxygenunderthehightemperatureandpressureconditionsinsidethe
engine.Theseareexacerbatedbyanythingthatraisesthecombustiontemperatureandpressureortheavailabilityof
freeoxygen:highercompressionratios,leanmixtures,retardedignitiontiming,raisedboost,etc.Nitrogenoxides(NO x),
likehydrocarbons,areprecursorstotheformationofozone(O 3).Theyalsobreakdownintheatmospheretoformnitric
acid(HNO 3)whichcontributestotheformationofacidrain.
c.Carbonmonoxide(CO):Carbonmonoxideisaproductofincompletecombustionandoccurswhencarboninthefuelis
partiallyoxidizedratherthanfullyoxidizedtocarbondioxide(CO 2).Itismostlikelytooccurwithexcessivelyrich
mixtures.Carbonmonoxidereducestheflowofoxygeninthebloodstreamandasaresultisparticularlydangerousto
peoplewithheartdisease.
d.Carbondioxide(CO2 ):Emissionsofcarbondioxideareanincreasingconcernasitsroleinglobalwarmingasa
greenhousegashasbecomemoreapparentinrecentyears.
2.Evaporativeemissions:Theseareproducedbytheevaporationofrawfuel,andcanbeasignificantcontributortourbansmog,
sincetheheavierhydrocarbonmoleculesstayclosetogroundlevelratherthandissipatingintotheupperatmosphere.Fuelcan
evaporatefromavehicleinanumberofways:
a.Gastankventing:asthetemperaturerisesfromcoolerovernighttemperaturestotheheatofmidday(plusany
additionalradiantheatfromtheexhaustsystem,etc.)thegasoline'svaporpressureincreasesaswell,increasingthe
pressureinsidethefueltankbyseveralpoundspersquareinchaboveatmosphericpressure.Asomepointthispressure
mustberelieved,andbeforeemissionscontrolitwassimplyventedintotheatmosphereasunburnedhydrocarbon
emissions(HC).Now,however,thisfunctionisoftenunderthecontroloftheECU,andiscarefullymanaged.Suchgases
maybetrappedincharcoalcanisterandfedtotheengine'sintakesystematappropriatetimes,forexample.

http://www.megamanual.com/ms2/tune.htm#howto

16/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)
b.Runninglosses:theescapeofgasolinevapors(unburnedhydrocarbons)fromthehotengine,suchaswhentheengine
isshutoff,andresidualfuelremainingintheintaketractevaporatesandcanescapeintotheatmosphereifitisn't
carefullyplannedandmanaged.
c.Refuellinglosses:cancreatealotofhydrocarbonvaporemission(HC).Theemptyspaceinsideavehicle'stankis
filledwithhydrocarbongases,andasthetankisfilled,thesegasesareforcedoutintotheatmosphere.Inaddition,there
islossfromfurtherevaporationasthefueltankisopenedforrefuelling,andfuelspillage.
3.Lifecycleemissions:Theseareproducedasadirectresultoftheactivitiesassociatedwiththemanufacture,maintenance,and
disposaloftheautomobile.Lifecycleemissionsincludesuchitemsas:
a.Manufacturingpowersupplyrequirementsmeanthattheremaybeemissionsfromthepowergeneratingsource(coal
firedplant,etc.).Theseincludethepowerrequirestorunplants,aswellasthepowerrequiredtosmeltthemetalsused,
etc.
b.Volatilesolventsusedanumberofstagesinthemanufacturingprocess(painting,plasticsmanufacturing,cleaning,etc.).
c.Outgassingofsyntheticmaterialsutilizedtoreduceweightandsimplifymanufacturing(suchas'lostfoam'casting
processes,etc.).
d.Maintenancerequirementssuchasoilandfilterchanges,batteryreplacement,repaintingwhennecessary(including
collisiondamage),etc.
e.Disposalrequirementsincludingcontaminatedlubricants,airconditioningrefrigerant,tires,heavyorrareearthmetals,
andlandfillspacerequirements.

Traditionally,gasolineisacomplexmixtureofhydrocarbons(moleculesmadeupofhydrogenatomsonachainofcarbonatoms)of
theformCH.Itmighthavetraceamountsofnitrogenaswell.Oxygenwasnothistoricallyapartofthestructure(thoughisoften
includednow,moreonthisbelow!).Theaverageratioofcarbontohydrogeninthegasolinehydrocarbonmixisaround8carbon
atomsto18hydrogenatoms,i.e.C8H18.Bytheway,C8H18istheformulafor'octane'('oct'implies'8'),andisthebasisofthe'octane
rating'forknock.
Asimplifiedchemicalequationforperfectgasoline/aircombustion(theratiooffueltoairrequiredforperfectcombustionisknownas
stoichiometric(pronounced'stoyekeeometric')is:
C8 H18 +12.5O2 8CO2 +9H2 O
Theoxygen(O 2)isconsumedfromtheintakeair.Nitrogen(N2)isalsopresentintheatmosphericair,butideallydoesnotparticipate
inanyreactions(itisquiteinertatlowtemperatures).Notethatthecombustionproductsarecarbondioxide(CO 2)andwater(H2O),if
thecombustionis'perfect'.

However,intherealworld,notallthefuelburns:
somefuelishiddenintherelativelycoolandshieldedcrevicevolumesofthecombustionchambersuchasjustabovethetop
ring,
someportionofthefuelnearesttherelativelycoolcombustionchambersurfacesare'quenched'beforeburning,and
someofthegasolinedoesnothaveoxygenavailableduringtheveryshortcombustionperiodforanumberofreasons
especiallyifthemixtureisrich.
Theresultisunburnedhydrocarbon(HC)emissions(whichcanalsorefertohydrocarbonsthatareonlypartiallyburned).
Aswell,theheatofcombustionmaycausethenormallyinertnitrogen(N2)thatcomposes~80%oftheintakeairtobreakdownand
combinewithoxygen,resultinginoxidesofnitrogenemissions(NO x)singlenitrogenatomswithoneormoreoxygenatoms
attached.(Notethisisdifferentfromnitrousoxide,whichisN2O,i.e.twonitrogenatomsareattachedtooneoxygenatom.)NO xis
especiallylikelytobeproducedifthecombustiontemperatureishigh(highcompression,etc.)andifthemixtureislean(because
thereisexcessoxygenremainingevenafterburningallthefuel).
Finally,someofthefuelwon'tbeabletocombinecompletelywithoxygen(whichmaybelocallyconsumedwithinthecombustion
chamberespeciallyifthemixtureisrich),andtheresultiscarbonmonoxide(CO)emissions.
Sothe'realworld'chemicalequationforgasolinecombustionlooksmorelike:
C8 H18 +~12.5O2 +?N2 <8CO2 +<9H2 O+?HC+?NOx+?CO+?H2
Thenumbersontherighthandside(theproductsofcombustion)varyconsiderablywithoperatingconditions,amultitudeofdesign
factors,andfueling/ignitionstrategies.

http://www.megamanual.com/ms2/tune.htm#howto

17/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

Thereisageneralrelationshipbetweentheair/fuelratioandtheregulatedtailpipeemissionsputoutbyagivenenginedesign:

http://www.megamanual.com/ms2/tune.htm#howto

18/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

WhatisSmog?
Smog(atermoriginatinginEnglandfromthedayswhencoalandpeatfiredheatingcreatedathickmixtureof
smokeandfog"smog"!)isanaccumulationofozoneandvolatileorganiccompounds(calledVOC)suchas
peroxyacetylnitrate(PAN).Thesearereferredtoas'secondarypollutants',becausetheyareformedbythe
reactionofprecursorpollutantsemittedbyburningfossilfuels,suchasnitrogenoxidesandhydrocarbons.The
energyfromsunlightmakesthesmogformingreactionspossible.Theresultisphotochemicalsmog,thebrown
hazeintheskythatisespeciallyprevalentonhotsunnydays.
Toformphotochemicalsmog,threemainingredientsareneeded:nitrogenoxides(NO x),hydrocarbons(HC),and
energyfromthesunintheformofultravioletlight(whichwewilldenoteash=Etheenergyofaphoton).
Intheatmosphere,thenitricoxideresultingfromgasolinecombustioncombineswithatmosphericmolecular
oxygentoformnitrogendioxide(NO 2)withinafewhours.
2NO+O2 2NO2
Nitrogendioxide(NO 2)absorbssunlightenergyandsplitstoformnitricoxideandatomicoxygen:
NO2 +hNO+O
Then,insunlight,theatomicoxygen(O)combineswithmolecularoxygengas(O 2)toformozone(O 3):
O+O2 +hO3
Iftherewerenootherprecursorspresent,ozoneandnitricoxidewouldthenreacttoformnitrogendioxideand
molecularoxygen:
O3 +NOhNO2 +O2
Thislastreactioncanproceedineitherdirection,dependingontemperatureandtheamountofsunlight.Ifthere
isalotofsunlightandthetemperatureishigh,theequationmovestoproducetheproductsontheleft,andmore
ozoneisproduced.

http://www.megamanual.com/ms2/tune.htm#howto

19/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)
However,enginesalsoemithydrocarbons(HC)aswellasoxidesofnitrogen.Hydrocarbons(HC)aretheother
mainprecursorformingphotochemicalsmog(besidesNO x).Whenhydrocarbonsarepresent,nitricoxide(NO)
preferentiallyreactswiththeminsteadofreactingwiththeozone.Thisreactioncanproduceavarietyoftoxic
products,suchasavolatilecompound(VOC)knownasPAN(peroxyacetylnitrate),CH3COOONO 2.(Organic
compoundsareallchemicalcompoundscontainingcarbonhydrogen(CH)bondsofcovalentcharacter.TheU.S.
EnvironmentalProtectionAgencydefinesaVOCasanyorganiccompoundthatparticipatesinaphotoreaction.)
ThereactionsofNO Xandunburnedhydrocarbons(HC)are:
NO+HCCH3 COOONO2 andvariousothervolatileorganiccompounds
NO2 +HCCH3 COOONO2 andvariousothervolatileorganiccompounds
Theresultisthattherearetwoproblemscreatedbythereactionofthetailpipepollutantsintheatmosphere:
Considerablequantitiesofvolatilereactiveorganiccompounds,likePAN,aregenerateddirectlythatresult
inthesmogyouseeandthehealthproblemsitcreates,and
Whenthenitricoxide(NO)reactswithhydrocarbons,itisnotavailabletoreactwithozonetobreakitback
downtomolecularoxygen.Asadirectresult,ozonemayaccumulatetodamaginglevels.
Theeffectsresultingfromexposuretophotochemicalsmograngefromirritationsoftherespiratorytract(suchas
coughingandwheezingandbreathingdiscomfort)andsmallbiochemicalorphysiologicalchanges,tosevere
breathingdifficulties,markedlyreducedlungcapacityandefficiency,andaggravationofexistingrespiratoryand
cardiovascularconditions.
Ozoneaffectslungfunctioninginavarietyofways,causinginflammationintherespiratorytractanddamageto
lungtissue,contributingtoreducedinhalationcapacityandlungfunction.
Studiesshowthereisnosafelevelofsmog.Damaginghealtheffectsfromexposuretosmogcanbecausedby
exposuretolargeconcentrationsoverashorttimespan,orbychronicexposuretosmallamountsoverlong
periodsoftime.
Inadditiontotheeffectonhumanhealth,ozonecankillplantcells,reduceplantgrowth,andmakeplantsmore
susceptibletodamagefromothercauses.Oxidantssuchasozonecanalsocorrodeanddegrademanycommon
materialssuchasrubber,nylon,fabric,andpaint.
AcidRain
Inadditiontosmog,automotiveemissionscancontributetoacidrain.Intheair,nitricoxide(NO)isoxidizedto
nitrogendioxide(NO 2),whichinturnreactswithwaterintheairtogivenitricacid(HNO 3).Thisaciddissociatesin
watertoyieldhydrogenionsandnitrateions(NO 3)i.e.,acidrain!

3NO2 +H2 O2HNO3 +NO


Acidraintriggersanumberofinorganicandbiochemicalreactionswithharmfuleffectsontheenvironment:
Manylakeshavebecomesoacidicthatfishandothercreaturescannotliveinthem,
Degradationofsoilmineralsbyacidrainproducesmetalionsthatarethenwashedawayintherunoff:
Toxicions,suchasAl3+,arereleasedintothewatersupply,harmingeverythinginthewaterand
alllifethatdependsonthewater(fordrinking,etc.).
Importantminerals,suchasCa 2+,areleachedfromthesoil,whichcandeprivetreesand
agriculturalcropsofessentialmineralsneededforlifeandhealthygrowth.
Atmosphericacidityistransportedoverlongdistancesbywindcurrents,soacidraineffectscanbehave
effectsfarfromwherepollutantswasoriginallygenerated.

Acatalyticconvertercanfurtherreducetailpipeemissionssubstantiallybelowwhattheengineitselfproduces.Thiseliminatesthem
frombeingabletobecometheprecursorstophotochemicalsmogintheatmosphere.A3waycatalyticconverterwillsupportthe
followingchemicalreactionsintheexhaustgasstream:
Reductionofnitrogenoxides(NO x)tonitrogen(N2)andoxygen(O 2):
2NON2 +O2
and
2NO2 N2 +2O2
thesecanbecombinedas
2NOXN2 +XO2
where
(1X2)
Oxidationofcarbonmonoxide(CO)tocarbondioxide(CO 2):
2CO+O2 2CO2
Oxidationofunburnthydrocarbons(HC)tocarbondioxide(CO 2)andwater(H2O):
2CXHY+(2X+Y/2)O2 2XCO2 +YH2 O
ThenetresultisthatNO x,CO,andHCarereduced(whileCO 2andH2Oareincreasedsomewhat).

http://www.megamanual.com/ms2/tune.htm#howto

20/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

However,thecatalyticconverterrequiresanearstoichiometricmixturetoformaximumefficiency,becauseitonlyasalimitedability
tostoreoxygen.Ifthemixtureistoorich,therewon'tbeenoughoxygentooxidizetheunburnedhydrocarbonandcarbonmonoxide.
Ifthemixtureistoolean,theoxidesofnitrogenwon'tbecompletelyreduced.('Oxidation'isachemistrytermmeaningtoaddoxygen
toamolecule,'reduction'isachemistrytermmeantoremoveoxygenfromamolecule)
Thecatalyticconvertermustalsoreachits'lightoff'temperature(around400to600F)beforeitwillcatalyzeanyoftheabove
reactionssogettingithotquicklyisveryimportanttoreducing'startup'emissions.Thisoftenmeansabitofatradeofffor
example,retardedtimingandarichermixturetomaximizetheheatintheexhaustgaseswhilewarmingup.(Manufacturershavebe
searchingforamethodtostoreconverterheatonshutdown(theoperatingtemperaturemayreach1200to1600F)soitcanbeused
toheattheconverteronstartupanumberofmethodshavebeenproposed,butnonehavebeenimplementedinproductionvehicles
atthetimethisiswritten,toourknowledge.)
Thenarrowbandoxygensensorsareverysensitivetotheexhaustgasesthatresultfromastoichiometricmixture.Richerthan
stoichiometric(byaslittleas0.2:1AFR!)andtheygiveasignalnear1Volt.Leanerthanstoich.andtheygiveasignalnear0volts.
Theresultisthatthenarrowbandsensormakesagood'switch'totellthefuelsystemtoaddorsubtractfueltomeettherequirements
ofthecatalyticconverterforminimalemissions.
Forresearchandeducationalpurposes,properlytuningyourengineforminimalemissionsusingaMegaSquirtEFIcontroller
generallyrequiresexpensivetestequipment.However,asaroughinitialplanforsucharesearchprogram,youcan:
Makesureyourignitionsystemisinperfectworkingcondition,aswellasanynormalemissionsrelatedmaintenance
items.Atuneup(distributorcap,rotor,wires,sparkplugs,PCV,EGR,etc.)isagoodideabeforeemissionstesting.Ignition
misfireswillgreatlyincreasetheunburnedhydrocarbon(HC)emissions,whilereducingNO xandCOemissions(andruiningfuel
economy),
Makesureyourengineisequippedwithafunctional3waycatalyticconverter(s)ifpossible,
SetyourEGOSwitchPointto0.450voltsforanarrowbandsensor,stoichiometricforawidebandsensor(2.500voltsfor
theDIYWBO 2forexample).Thisprovidesforrealtimestoichiometricmixturecontrolforachemically'perfect'mixture.Note
thatforemissionscontrolpurposes,anarrowbandsensormaybeabetterchoicethanawidebandsensor.Thisisbecausethe
narrowbandsensorisnotaffectedbycalibrationissues,itnotaffectedasmuchbychangingexhaustgaspressureand
temperature,andhasamuchstepperresponsecurveneartheswitchpoint.
Retardyourignitiontimingbysomewhatafewdegrees(thiscreatesahotterexhaustgasmixturethatprolongstheburnand
alsohelpsthecatalyticconverterstooperateatpeakefficiency).ItwillincreaseNO xsomewhat,however,
Increaseyouridlespeedslightlyiftheengineidleswellat750rpm,butstumblesabitifsetlower,setittoabout850900
rpm,thisincreasesthemixturespeed,andthustheuniformityandvaporization,
Ifyouhaveanadjustableelectricfan,increasethefan'ON'temperaturetoabout200Fto215F.Theincreasedtemperature
increasescylindertocylindermixtureuniformity,promotesvaporizationofthefuelforamorecompleteburn,andcanreduce
frictionsomewhat,
Ifyouhaveanoiled'lifetime'airfilter,replaceitwithaplainpaperfilterfortesting(theoilinthefiltermightbedrawnintothe
intakeairmixture,andcandriveupHCemissions),
Makesureyourvehicleisfullywarmedupbeforetesting.Coldenginesrequirerichmixtures(becausethegasolineisslower
tovaporizewhencold),andcombustionefficiencyisdecreasedbythecoolcombustionchambersurfaces.Aswell,neitherthe
oxygensensornorthecatalyticconverterworkuntiltheyarewarmedup.TheO2sensorwilloftenhaveabuiltinheating
element(thatwillnormallyheatthesensortooperatingconditionin30secondsorless),butthecatalyticconverterdoesnot
haveaheatingelementandreliesonhotexhaustgasestowarmitenoughmakeitfunctional.
Addsomealcohol(eitheroxygenatedblendsofgasoline,oraseparatesourceofmethanol/ethanol)toyourfueltank.This
helpsbyintroducingadditionaloxygenintothecombustionprocess.Gasolinehasnooxygenatomsinitscomposition
rememberitisahydrocarbon.
Alcoholshaveoneoxygenatom,andareoftheformCHOH(wheretypically=2+1).Forexample,ethanol:C2H5OH,
methanol:CH3OH.Theadditionaloxygenhelpsensureamorecompleteburnofthegasoline,andloweredCOemissions.For
testingtheemissionsresponsetoethanolormethanol,youmightstartwith5%addedethanolormethanol(Howevernotethat
addingethanol,andespeciallymethanol,hastheeffectof'leaningout'themixture.Themoreyouadd,themoreyouwill
effectivelyleanthemixture).
GasolinedistributorsaresometimesrequiredbytheEPAtoblendcertainamountsofalcohol(ethanol)intogasolineinwinter
monthsinareasthathavehighcarbonmonoxideemissions.Thesemixesaregenerally5%to10%ethanolandtherest
gasoline,andarecalled'oxygenatedblends'.Insomeregions,gasolinehassomeethanolinitallyearround.Thereismoreon
ethanolblendshere:www.megamanual.com/flexfuel.htm
Hereisanexampleofhowafewchangesaffectedoneengine:
Baseline

Timing
Retarded10

Timing
Advanced10

Mixture
richened

Mixture
leaned

HC

1.00

0.78

1.14

1.39

0.88

CO

14.5

11.6

13.0

81.0

9.8

NOx

2.91

1.89

5.18

0.71

3.03

O2
Notusuallytested

22.3

19.8

23.8

17.4

25.4

CO2
Notusuallytested

305

307

298

246

310

Youcanseethatretardingthetimingandleaningthemixtureslightlygivesthebestpossiblecompromise,increasingonlytheNO x
slightlyamongtheregulatedemissions.(Theabovewaswithoutacatalyticconverter.Withaconverter,emissionswouldhavebeen
bestatastoichiometricmixtureandthetimingretardedsomewhat.)

TuningIssues
Ifyouhaveaverylongdurationcaminyourmotor,anditidlespoorly,youmightbeabletogetittoidlebetterthroughcarefultuning
withMegaSquirtII(orMicroSquirt).Oftenaroughidlemaybecausedbytooleanair/fuelratios.Thisisreallyismoreofacam
issuethanafuelingissue.Theexhaustvalveisheldopenlaterintotheintakestrokeandtheintakeopensearlierneartheendofthe

http://www.megamanual.com/ms2/tune.htm#howto

21/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

exhauststroke.Atlowspeedsandrelativelyhighintakevacuumyougetmoreexhaustcontaminationofthefreshair/fuelcharge.As
yougetmorecontaminationoftheair/fuelchargeyoutypicallyneedarichermixturetogetittoigniteandburnproperly.
Thismeansyouprobablycannotrunastoichiometric[chemicallycorrect]mixtureof14.7:1withalongdurationcamatidle.Youneed
torunricher.SoyoutuneyouridletoachievethelowestMAPreadingatyourchosenidlerpm.
MakesureyouarenotallowingEGOcorrectionatidleifyouhaveaverylongdurationcam!Itwillbetryingtocorrectyour
mixturebacktoalousyidle.SosettheEGOActiveAboveRPMtoafewhundredRPMaboveyouridlespeed.Thiswillensurethat
MegaSquirtII(orMicroSquirt)doesnottrytoleanthemixturebacktostoichiometrictocompensateforyouradjustments.Ifyou
haveawidebandO2sensor,youcansimplysettheAFRtablevaluetogiveyouthelowestMAPreading(maximumvacuum)atidle.
AnothertipyoucantryifyouhavealargeoverlapcamistopinchofftheMAPhoseslightlywhiletheengineisidling,andseeifthe
idlequalityimproves.Ifso,thentryarestrictionintheMAPvacuumline.Peoplehavereportedsuccessusinga0.040"(1mm)MIG
welderjetandasmallplasticfuelfilterinthevacuumlinetoMegaSquirtII.(PlacethefilterclosesttoMegaSquirtII,therestriction
closesttotheengine).ThishastheeffectofdampingthevacuumpulsationtheMAPsensorsees.Youwillhavetoexperimentwith
restrictorsizestoseewhatworksforyoursystem.
Afewmorethingstotry:
1)CheckyourVEtableentriesneartheidlepointiftheRPMorMAPfluctuate,thenyoucangetrollingidles,etc.Youmayhaveto
movesomeofthebinsaroundtobrackettheidleRPM/MAPregion,andkeepflatVEvalueswithinthis.
2)Ifyourunlowimpedanceinjectors,youneedtotuneyourPWMcurrentlimit.Startwith30%(onaV3mainboard)or75%PWM
(V2.2mainboard)and1.0millisecondtimethreshold.Onceyougetidling,thenfirstadjustthePWMdutycycledownuntilyounoticea
changeinidlequality,thenmovethevaluebackup35%.Dothesamewiththetimethreshold.Onthecaritisveryeasytodoand
onlytakesafewminutes.And,atidle,theoverallinjectorpulsewidthsaresmallcomparedtotheirclosetime,sothiswillallowyouto
adjustthevalues.Inotherwords,adjustthePWMcurrentlimitbeforetakingthecaroutonthestreetwhereinjectorpulsewidths
becomehigh.
Yourenginewillidleatacertainvacuum.ItmighthelponastreetusemotorontheVEmaptousealowerpointforstartingMAPthan
idlevacuum.Forexampleyoucanhaveyourssetat20eventhoughyouidleat27orso.Thisallowsyoutorunlessfuelonoverrun
decelerationandcoastevents(notjustforasecondliketheTPSwilldo).Thisallowsyouasavingof34MPGonaveragedrivingand
youmightbeabletorunmoreadvancedtimingunderthisvacuum.
Ontheotherhand,youmaywanttodotheopposite.YoucanincreasetheVEvaluesjusttotheleftandaboveidle.Youcanmake
themreallyrich[saydoubletheidleVEvalue,tokeepthecarfromstalling.Thisseemstoworkreallywell,iftheenginestartsto
stumble,thePWgoesupanditrecovers.
ByworkingwiththeRPMandMAPbins,youshouldbeabletoworkoutasetofvaluesthatletsyourunleanatcruiseanddecel
[wheretheRPMisaboveidle,andMAPbelowidle],butrichwhenstalling[RPMbelowidle].
Onthewarmupenrichmentspage,thewarmupenrichmentonlygoesto160F.The160Fbinvalueoftheenrichment(which
shouldideallybe100%)isusedatalltemperaturesabove160F.
ThesystemcompensatesautomaticallyforanyamountofidlesolenoidbypassairbecauseoftheeffectithasontheMAPvalue[i.e.
thevacuuminthemanifoldisloweredbythebypassair,thisissensedbytheManifoldAbsolutePressuresensor,andtheprocessor
decidestoinjectmorefuel.Theeffectisexactlythesameasifyouhadcrackedopenthethrottleabit.Thefuelgoesaroundthe
throttleplates,whicharenevertrulyclosed.Theyaresetattheopeningrequiredfortheslowestthrottlespeeddesiredfortheengine
underoptimalconditions,whichleaveplentyofroomforthefueltogetby.Thefastidleairthenaddstothisbaselineamountofairto
raisetheidlespeed.Insomecircumstances,youmaywanttorunwithoutoxygensensorfeedback,calledopenloop.Thebest
wayofforcingMegaSquirtII(orMicroSquirt)torunopenloopistochangetheO2sensorstepto0[zero]ontheenrichments
page.ItwillstilllogtheO2voltage,butnotdoanythingaboutit.
Withtheversion1.000(andhigher)codetheMegaSquirtII(orMicroSquirt)fuelpumpoutputisprogrammedwithaprimingpulse
optiontoshutofftheunitincaseofanenginestall,etc.Itturnsonthepumpimmediatelywhenthepowerisappliedandshutsitoff2
secondslateriftheengineisnotrunning.IfyousetthewidthofprimingpulseinMegaSquirtII(orMicroSquirt)tozero,thenthe
systemdefaultstonotturningonthepumpuntilthefirsttachpulse.Ifthisfieldisnonzero,thenwhenthekeyisturnedon,the
injectorswillfireoncewithadurationspecifiedbytheprimingpulsefield,andthepumpisalsoactivated,andwillstayonfortwo
secondsifthereisnotachactivity,orforaslongastheretachactivityplustwoseconds.Whenyoustartcranking,thepumpcomes
on,andtimesouttwosecondsafterthelastpulseonthetachsignal.
OnstartupMegaSquirtII(orMicroSquirt)recordstheambientbarometricpressure.ThebarometercorrectionmultipliertoVE
increasesaspressuredecreases(ifsetinTunerStudioMS).Ifittheambientbaropressureislow(highaltitude)thealgorithmadds
fuel.ThisismostlybecauseatagivenMAP,theenginewillflowmoreairwithlessexhaustbackpressureandthereforeneedsmore
fuelathigheraltitudes.OncerunningtheMAPsensordeterminesfuelbasedonyouVEtableentrieswhicharethenscaledbythebaro
correctionrecordedatstartup.ThecorrectionvaluesusedbyMegaSquirtIIcamefromacodedisassemblyofa1990CorvetteECU.
IfyourTunerStudioMSdisplaysunusualvaluesforthebarometerontheruntimedisplay,76kPa,forexample,youmayberesetting
whilerunning.TunerStudioMShasacheckthatdetectsmostresetsbywatchingthesecondsvalue.Ifthesecondsgoestozerofrom
anyvalueotherthan255,thenitsignalsaresetwithanaudiblebeepandsetsacountervisibleonthelowerrightcornerofthe
screen,whereitnormallysays"connected".
Aswell,youcancheckthedatalogsecondscountmakesureitcountsupto255,andthenrollsovertozeroandcontinuesagainand
again.Ifyougetshortercounts(likesay56thenarollover)thentheprocessorisresetting.Notethatmostofthetimeonthecaryou
willnotnoticethattheresethasoccurredbecauseithappenssofast.Whathappenswhentheenginehasarunningreset(whenthe
engineisrunningandtheprocessorresets),thenitgrabsthebarometernearthebeginningoftheMegaSquirtII(orMicroSquirt)
processorbootprocedure.Iftheengineisrunning,thenitwillgrabenginevacuumandusethisforbarometer.
FornormaloperationtheprocessorcomesupsofastthatithasgrabbedtheMAPvaluebeforetheenginehasachancetostart
cranking,muchlessrunning.

Datalogging
DataloggingallowsyoutocreatearunningrecordoftheMegaSquirtII(orMicroSquirt)realtimevariables.Onceyouhave
enableddatalogging(byclickingontheDatalogmenuitemontheFilelist),TunerStudioMSpollstheMegaSquirtII(or
MicroSquirt)controllerwhenanyofthefrontpage,runtimedisplayortuningpageareactive,andwritesthisdatatoafile.Thefile

http://www.megamanual.com/ms2/tune.htm#howto

22/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

hasacommaseparatedvalueformatanddefaultstohavinganextensionof".msl"(or".xls",soMicrosoftExcelwillopenthem
automaticallyifyouhaveExcelinstalledonyoursystem).
ToviewMegaSquirtII(orMicroSquirt)datalogs,youcanusePhilTobbin'sexcellentMegaLogViewer.MegaLogViewersupports:
Scalechange,upto8xzoom
Playbackfrom1/8speedto8xspeed
OverlayedGraphs
WidebandO2AFRcalculations
CalculatedFieldsRPM/Sec,Vacuum,Boost,PW1
MassAirFlowmapping
CustomFormulaswithfreehandmath
SaveGraphtoJpegforeasypostingtoweb
Customizablecolors,gaugesandUIfeatures.
Userfriendlyinterfacethatsavesallsettingsandenablesnavigationbykeyboard,buttonsandmouse.
Seeingyourdatalogsgraphedcangiveyouaveryclearideaofhowyourelectronicfuelinjectionisworking,andmakeitmucheasier
tospotproblems.GetMegaLogViewerhere

Notethatthedatalogincludesan'EngineBit'field.Thisbitwilltellyouiftheenginewasaccelerating,warmingup,etc.,andcanbe
usedtosortunsuitabledatalines(becauseO2correctionisnotactiveunderacceleration,warmup,etc.)fromthefile.
Theenginebithas7binarybits.Therightmostbitrepresentsrunning.Itis1ifreadytorun,zeroifnotready,so000001=1or
000000=0.Thenextrightmostvalueisforcranking,000010=2ifcranking.Thefieldsare:

http://www.megamanual.com/ms2/tune.htm#howto

BinaryBit

Decimal

Meaning

000000X

Ready

00000X0

Cranking

0000X00

StartUpenrich

000X000

WarmUpenrich

00X0000

16

TPSaccelenrich

0X00000

32

Decelenlean

X000000

64

MAPaccelenrich

23/24

27/9/2016

TuningYourMegaSquirtII(orMicroSquirt)

NotethattheonlysuitablevalueforreadingnarrowbandO2sensorvaluesiswhentheenginebitisequalto1(i.e.runningandno
enrichments).
LastUpdated:09/27/201619:02:16

MegaSquirt andMicroSquirtcontrollersareexperimentaldevicesintendedforeducationalpurposes.
MegaSquirt andMicroSquirtcontrollersarenotforsaleoruseonpollutioncontrolledvehicles.Checkthelawsthatapplyinyourlocalitytodetermineifusinga
MegaSquirt orMicroSquirtcontrollerislegalforyourapplication.
2004,2011BruceBowlingandAlGrippo.Allrightsreserved.MegaSquirt andMicroSquirtareregisteredtrademarks.Thisdocumentissolelyforthesupportof
MegaSquirt boardsfromBowlingandGrippo.

http://www.megamanual.com/ms2/tune.htm#howto

24/24