Mazda MX-6 Forum banner

1 - 20 of 32 Posts

·
Premium Member
Joined
·
11,480 Posts
Discussion Starter #1 (Edited)
Had someone ask me to throw this together. Figured it would be pretty straightforward.

Auto tune on a Megasquirt comes pre programmed, auto-tune to only tune to 14.7 AFR and only under vacuum. If you want to use the autotune feature of your MS then you need to do a few alterations to set it up with your wideband.

If you have your MS running on the wideband already you can start from here.

1) Go into your C:\Program Files\MegaSquirt\car1\mtCfg\custom.ini

Then, determine which processor your MS is running. In my case its MS_1 so, Im going to go under #if MS_I and change some settings seen here.




I will go over the red dots top to bottom

If MS_1 then run the following parameters

1) turn autotune on

2) leave corrector at egoCorrection

3) Set your low and high RPM limits that you want it to tune
4) Set your low and high kPa limits that you want it to tune
5) Set your low and high VE limits that you want it to tune

6, 7) Set your sensitivity by detrmining how close RPM and kPa must be to a vertex before it will tune

8) Set how often you will allow it to tune a point on your VE table
9) Set the gain that you will allow it to tune by (.5 = It moves by a half percent each time it makes a change)
10) Set the window that you will allow it to tune (5 = up to 5% before it will not tune in one direction any more)


So save the custom.ini and exit.

2) Go to your Megatune program. Go More Settings > Lambda AFR Settings

Turn 8X8 AFR Taget on for VE table 1 (or whatever VE table you wish to use.)




After you do that, you will notice under More Settings > AFR Targets for VE Table 1 is now avalible.

Once you are in there, You need to cross refrence a Voltage/AFR in the documentation that came with your wideband unit.

You will then enter values into the table so that above 100Kpa you will be tuning twords a 11.5-12 AFR, and below 100 Kpa you will be tuning to a 14.7 (but you need to input the correct voltage for the Target VE table.)

Here is a table that I threw together By crossrefrencing the analog voltages with the gasoline AFR.

.39 V ~ 10.75 AFR
.47 V ~ 10.95 AFR
.63 V ~ 11.25 AFR
.71 V ~ 11.4 AFR
.78 V ~ 11.56 AFR
2.25 V ~ 14.5 AFR

So you can see im going to be tuning twords a 14.5 in vacuum at all RPMS, and tuning in the 11's under boost (a little richer under high boost / high rpm)




You can then go to Tuning > Ve Table 1 Then Tools > Autotune

The red dot will now chase the green dot around and tune to the target AFR you have set it to. It will only do so much tuning (depending on the parameters you entered in your custom.ini). Every so often you will want to go File > Burn to ECU so it resets the autotune variables and it will continue tuning.


You may have to do some final tweaking after the autotune, but you should be pretty set :)

Let me know if you have questions, I will add to this how to if needed.
 

·
Registered
Joined
·
1,822 Posts
great write up!!:tup:
 

·
Premium Member
Joined
·
11,480 Posts
Discussion Starter #4
:( :confused: :shrug:
Maybe ill pay you to come get mine started... lol..

good write up though, im glad your understanding it all... I feel like i lost alot of interest in the MS after attempting to build my own..
No Charge ;)

Its really not that hard to understand. But then again, I am a programmer, and work with structured text so I know what everything in the custom.ini is doing :)

But yeah, I would be glad to come help you get yours up and running.
 

·
The Full Dong
Joined
·
2,595 Posts
Just to add to this...

At a lot of places you don't need to run 14.7:1. Highway cruise you want to run ~15.5:1 for MPG sake. Any more rich than that is a waste really. In theory, you could run even leaner (watch EGT) since most of us don't have a cat. Too lean and you would melt it.

As for tuning while under load, you might want to change the limits IN boost, which is the two boxes in the top of the "LAMDA SENSOR TARGETS" window. You don't want the MS to inadvertly overshoot something and run excessivly rich or lean while running in closed loop.

I know the "lumpiness" variable is there, but that is only for autotune. If you are running an EGO authority of say 10% or more, if something goes askew, MS could end up "autocorrecting" you way lean.
 

·
Premium Member
Joined
·
11,480 Posts
Discussion Starter #8 (Edited)
Good addition radar :) I will modify my table to accomodate :)

The only reason those 2 boxes are not filled in is because I was building this table on a blank MSQ...

On my msq those 2 boxes are set at

Change EGO limit above (KPa) 255
Change EGO limit to (+-) 5

I do beleive I want to change that first setting to 100 KPa.
 

·
Registered
Joined
·
993 Posts
will this work for the 2.2v i know you have the 3.somthing v ?
 

·
The Full Dong
Joined
·
2,595 Posts
It isn't dependent on MS hardware, its all software. Since all megasquirts have a 0-5v input for o2 readings, this will work with all of them.
 

·
Registered
Joined
·
993 Posts
ok thanks radar
 

·
Premium Member
Joined
·
11,480 Posts
Discussion Starter #15
AFAIK you want EGO correction off while tuning regardless so you can see the true effects of what your changes in VE made to the AFR. I would assume that autotune turned on would tune in open and closed loop modes.

Radar can give you a straightforward answer :shrug:
 

·
The Full Dong
Joined
·
2,595 Posts
Take some advil?
 

·
Registered
Joined
·
12,045 Posts
I hadn't noticed that the latest MSnS-E allows for AutoTune while in open loop. Previously there would have to be special things done (not simply turning a flag on) to get it to work when in open loop. :shrug:
 

·
The Full Dong
Joined
·
2,595 Posts
I hadn't noticed that the latest MSnS-E allows for AutoTune while in open loop. Previously there would have to be special things done (not simply turning a flag on) to get it to work when in open loop. :shrug:
I'm with you Jeff. To my knowledge, it doesn't do any "autotune function" while in open loop because the autotune corrector needs EGO correction to be effective.

When you are running target AFR, you can run closed loop 100% of the time. Combine that with the autotune features and you can tune the entire ve table with autotune (within reason and skill of the user). Remember, autotune just works of the EGO correction percentage and the targetAFR is constantly alterting that.

Basically, if you want to use autotune for the entire VE table, build your corresponding TargetAFR table and set it to stay in closed loop. Then setup your autotune variables and drive.

Keep tabs on everything. You don't want any overcorrecting going on.

There is a pretty good read in the megamanual regarding Autotune as well here:

http://www.megamanual.com/megatune.htm#autotune
 

·
Registered
Joined
·
12,045 Posts
It's too bad they don't build it in so you can do AutoTune in open loop as well. The changes required aren't much with MT as it sits to make it work in open loop. That'd save you from changing any of the other settings (EGO, then open loop menu).
 
1 - 20 of 32 Posts
Top