Tuning with MAF on a 20V 4AGE

All Megasquirt 1 support questions. See also the Documentation

Moderators: jsmcortina, muythaibxr

wrenchdad
Master MS/Extra'er
Posts: 614
Joined: Mon Feb 14, 2005 5:30 am
Location: Natchez, Mississippi

Tuning with MAF on a 20V 4AGE

Post by wrenchdad »

I am not liking the results I have gotten so far on tuning using a MAP sensor on my 20V 4AGE, the cruising MAP reading is in the high 80s, I mean just cracking the throttle to raise the idle 300rpm for the AC compressor changes the idle MAP from 42 to 57Kpa.
SO I am thinking about installing the AFM into the car and seeing how that will be. But as I was doing some bench testing on the afm, I noticed that when wired up per what factory diagrams that I have and what appears as the norm for ground wire color, brown, that the voltages do not go from 0 to 5vdc but they are reversed and go from high to low. The levels are actually from about 4.6 to 0.9 vdc, full closed to full open.

My question will this matter? Its just after reading the site to see how to wire it up it shows it as low going to high, and I didn't know if it matter anywhere else in the code except for the fuel and spark tables.

I have tried wiring it where it will be low going to high and that works also. I am not using anything else in the AFM but just the 0-5vdc signal, no fuel pump switch or temp sensor so I don't see where it would matter if I wired it in reverse. Just need to know which way before I start splicing it in.

Also I have made some baseline maps based on my MAP ones, I took some voltage readings on the bench by feeding the AFM 5vdc from an old computer power supply and looked at the readings at 0,25, 50, 75 and 100 % open on the flapper would this not give me something to at least start from?

thanks for any and all help wd
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Post by muythaibxr »

You could also try my hybrid code... it's a bit old, and based on 029m, but I got it to work fairly well. Unfortunately I lost my settings... but it was pretty easy to tune...

Just set up speed density and stay below about 20-25% throttle, and drive around, then set up alpha-n, and have fun blasting around with it above 20-25% throttle... then turn on my code, and put the alpha-n table in table 3, and set it up to switch to that table above 20% throttle.

I was able to get the best of both worlds with that code.... and much better tunability. It wasn't perfect of course, but it worked.

Also, as far as your cruising MAP goes, you could try advancing ignition a little in those areas... I've been able to cruise on a level surface at around 65-80 kPa without going over 80 by tinkering with ignition advance. I still have tinkering to do with it of course, but I'm just saying that there are ways to make speed-density/alpha-n work pretty well.
superchargingmachine
Experienced MS/Extra'er
Posts: 348
Joined: Tue May 04, 2004 3:46 pm
Location: Illinois, Central

Post by superchargingmachine »

muythaibxr wrote:You could also try my hybrid code... it's a bit old, and based on 029m, but I got it to work fairly well. Unfortunately I lost my settings... but it was pretty easy to tune...

Just set up speed density and stay below about 20-25% throttle, and drive around, then set up alpha-n, and have fun blasting around with it above 20-25% throttle... then turn on my code, and put the alpha-n table in table 3, and set it up to switch to that table above 20% throttle.

I was able to get the best of both worlds with that code.... and much better tunability. It wasn't perfect of course, but it worked.

Also, as far as your cruising MAP goes, you could try advancing ignition a little in those areas... I've been able to cruise on a level surface at around 65-80 kPa without going over 80 by tinkering with ignition advance. I still have tinkering to do with it of course, but I'm just saying that there are ways to make speed-density/alpha-n work pretty well.
I cruise in the 30-40kpa range but even a slight grade and and I move to 80-100kpa. Do you think that I might be able to add some advance between these MAP's and keep the MAP values down? wrenchdad, I'm not sure why you MAP's are soo high mines 4AGTE, under cruise it seems like they should act similarly.
wrenchdad
Master MS/Extra'er
Posts: 614
Joined: Mon Feb 14, 2005 5:30 am
Location: Natchez, Mississippi

Post by wrenchdad »

muythaibxr

Thanks for the idea, where can I get a copy of your hybrid code? On the MSnS-E site? What do you mean by "set up alpha-n"? Do you mean switch over to that type of measurement in the ini file and then do some more AutoTuning in the areas you discribed, above 20-25%?

superchargingmachine

I think my map may still be high because I am still running rich, I have done some tuning with AutoTune and it has helped but it is still high.

I was just thinking that seeing I am running the stock air box and filter and do not plan on removing it that maybe for driveablity that using the AFM would be a better option, but I am willing to try something else, rather not make the changes to the wiring and intake if I can get it to drive right and get good gas mileage too, hoping for mileage in the mid 30s, this is my daily driver and I have a 120mile round trip to work everyday.

On another subject, have either of you had to fix your exhaust flex joints? Mine may be leaking, I need to remove the heat shield and take a look, I hear a leak and its either there or where my exhaust pipe connects to the downpipe. Just wondering if the two small flexes could be taken out and one larger one put downstream instead.

thanks for the input, wd
superchargingmachine
Experienced MS/Extra'er
Posts: 348
Joined: Tue May 04, 2004 3:46 pm
Location: Illinois, Central

Post by superchargingmachine »

Are you running a WB O2, they help a lot. I kept leaning out my tragetAFR table in the 40kpa-80kpa range from 2800-4400RPM a little at a time. Then I would run Autotune a while and let it do it's thing. I run 15.8-16:1 AFR during cruise and on the highway get around 32-34MPG.

The other thing that really smoothed things out was Mapdot accel.

The Hi-res code which gives 3 decimal place control over injector PW also will smooth things out a final little bit. Most people only move to it because of large injectors and idle issues. I run 42lb/hr(440cc/min) injectors.

I wouldn't think you would need an AFM to get good drvieability and gas mileage.

My exhaust is all custom I run a 2.5"diaX4"long flex so I think you can change things around to suit what you like.

If you like I can send my VE table tonight when I get home. It would just be for reference tho since it goes to 240kpa now:-)
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Post by muythaibxr »

superchargingmachine:

wrenchdad is running open ITBs, and so am I... so neither of us will ever be able to cruise at 30-40 kPa unless we're going down a hill trying to decelerate a bit.

wrenchdad:

autotuning with ITBs is nearly impossible, especially if you have your map set up right.

You should have like 4 or 5 bins going from 30 kPa to 70kPa, at least 2 bins from 80-90, and 5 bins from 90-100 kPa... or something similar. Having this kind of setup makes autotune harder to use, since you have to tune below 90 kPa first, then above with different autotune settings.

The hires code has not helped smooth things out that much for me, but did make accel enrichments a bit more responsive.

I can send you a copy of my hybrid code later when I get home....

by set up alpha-n, I mean change it both in the megasquirt settings, and the ini file... tune with it (not autotune, I recommend setting up an afr table and using megalogviewer to tune).

megalogviewer just uses your datalog, and your msq (the afr table specifically), and does some analysis to retune your VE table. So far it works great for me.

I don't have a flex joint on my exhaust, I'm driving an ae86 (rwd) which has no flex-joints.

Ken
superchargingmachine
Experienced MS/Extra'er
Posts: 348
Joined: Tue May 04, 2004 3:46 pm
Location: Illinois, Central

Post by superchargingmachine »

muythaibxr

Missed the ITB's. So are the ITB's boxed in so that you could run and AFM. Not familiar with the 20V, I have only seen one once, I think.
wrenchdad
Master MS/Extra'er
Posts: 614
Joined: Mon Feb 14, 2005 5:30 am
Location: Natchez, Mississippi

Post by wrenchdad »

Ken

I not running open ITBs but the stock air box setup, so what should I see for MAP at cruise, 60s or 70s? once I get it tuned of course. I just got Megalogviewer up and running on my laptop, figured out the startup error I was getting, no java. Reviewed my last tuning run and saw cruising O2s in the 11s and 10s which is pig rich.
Right now I have DrHess' last tables and that is what I did Autotune from and it dropped some of the bins down a pretty good bit, just up to the 4K range, haven't been pushing it yet, its a fresh rebuild.

SO instead of Autotune, I should just datalog and then run the viewer and then what? Where is this retune option? I'll take another look, only used it once.

Another question on the datalogs, what are the ports a,b,c and d? What do these numbers mean? Also I seem to have trouble starting, if it dies after the first attempt, it doesn't turn over very smooth, its like the timing is too far advanced, looking at the table, I see where Hess has the lowest bin at 17 degrees, which is 600rpm @ 20kpa, I know I am not at 20Kpa so where would this bin come into play, downhill coasting, perhaps?
Just wondering if something changes from first key turnon start to second attempt which I am not turning the key to off and resetting the MS?

Well need to find my exhaust leak thanks again, wd
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Post by muythaibxr »

wrenchdad wrote:Ken

I not running open ITBs but the stock air box setup, so what should I see for MAP at cruise, 60s or 70s? once I get it tuned of course. I just got Megalogviewer up and running on my laptop, figured out the startup error I was getting, no java. Reviewed my last tuning run and saw cruising O2s in the 11s and 10s which is pig rich.
Right now I have DrHess' last tables and that is what I did Autotune from and it dropped some of the bins down a pretty good bit, just up to the 4K range, haven't been pushing it yet, its a fresh rebuild.
I would expect cruise to be between 70 and 90 kPa depending on whether you're going uphill, downhill or are on a level surface.

Hess isn't using a wideband last I heard, so I'm not surprised that he's running really rich.

As far as ignition advance goes, I'm going to tinker with mine between 3000 and 3800 rpms, as mine is a bit sluggish there, and I know I can cope with more advance at 80 kPa and higher.
SO instead of Autotune, I should just datalog and then run the viewer and then what? Where is this retune option? I'll take another look, only used it once.
There is a "VE Analyzer" that you can use. But you have to make sure that all your O2 settings are right both in megalogviewer and in megatune's settings.ini

It only exists in later versions of megalogviewer.
Another question on the datalogs, what are the ports a,b,c and d? What do these numbers mean?
These are output channels on the processor... they really don't mean much of anything by themselves... you can split apart the numbers into individual bits to figure out which cpu pins are on or off if you want though.
Also I seem to have trouble starting, if it dies after the first attempt, it doesn't turn over very smooth, its like the timing is too far advanced, looking at the table, I see where Hess has the lowest bin at 17 degrees, which is 600rpm @ 20kpa, I know I am not at 20Kpa so where would this bin come into play, downhill coasting, perhaps?
Just wondering if something changes from first key turnon start to second attempt which I am not turning the key to off and resetting the MS?

Well need to find my exhaust leak thanks again, wd
the hard starting could be a bug in the firmware... Sometimes my first start is a little rough when in older firmware revisions it wasn't rough. I have not looked for the problem in the firmware though. If it's rough, I just tap the gas... I haven't bothered to fix it because I plan on switching to the ms2 to test ms2/extra soon.

You might be able to tune it out by adjusting your afterstart enrichment, or by using the first-start enrichment.

The 20 kPa bin is really just for coasting downhill.

Ken
wrenchdad
Master MS/Extra'er
Posts: 614
Joined: Mon Feb 14, 2005 5:30 am
Location: Natchez, Mississippi

Post by wrenchdad »

Thanks Ken!

I got the exhaust leak fix, driving it to work for its first real road trip in the morning. Much to try and still much to do. I am thinking about using the shift light output to get me a premissive to turn on a relay that will be wired in series with a solenoid that would put clean air into the vacuum log thru one of the small vacuum ports for AC idleup.
Can you tell me how the shift light output switches? Is it on between the rpm settings? It would help me know if I can use this output for what I want to try.

Sorry for so many questions and thanks you for all you do.
wd
superchargingmachine
Experienced MS/Extra'er
Posts: 348
Joined: Tue May 04, 2004 3:46 pm
Location: Illinois, Central

Post by superchargingmachine »

It is pretty easy to build and use one of the output circuits.

I use one for TVIS control. You can set the ON parameter(RPM, MAP, Etc..) and OFF parameter as well as a hysterysis value. You can also have the output inverted.
wrenchdad
Master MS/Extra'er
Posts: 614
Joined: Mon Feb 14, 2005 5:30 am
Location: Natchez, Mississippi

Post by wrenchdad »

Ken,

Thinking about trying that hybrid code so if you get a chance send me a copy. Would it would with the 29q2 that I am running or would I have to find a different s19 file?

So if I understand this two VE tables thing, I would be able to spread out the kpas on the Speed Density table to better cover the low end and then set up the other table to the higher kpa readings OR do they both have to start on the very bottom of the kpa curve. I know they would have to overlap some where but I was thinking it would be somewhere in the 70-80s range. Correct me if I am wrong.

superchargingmachine

I think I am using that output for my VVT control, just looking for one that is only one at say about 1300rpm and below to use for AC idle up permissive that way it would be off when I am cruising and not letting the extra air into the vacuum log for the four throttles.

later wd
superchargingmachine
Experienced MS/Extra'er
Posts: 348
Joined: Tue May 04, 2004 3:46 pm
Location: Illinois, Central

Post by superchargingmachine »

I don't now your setup exactly but there are up to 4 programable outputs available with MSnS-e. Let me now what you are using now and I can try and point you to the next availble output.

So how did the drive to work go?
wrenchdad
Master MS/Extra'er
Posts: 614
Joined: Mon Feb 14, 2005 5:30 am
Location: Natchez, Mississippi

Post by wrenchdad »

superchargingmachine

I don't have my output list with me right now but I think that outputs 3 and 4 are available. Which do you think would work the best to be on from say 600 to 1300 and off everywhere else?

thanks wd
superchargingmachine
Experienced MS/Extra'er
Posts: 348
Joined: Tue May 04, 2004 3:46 pm
Location: Illinois, Central

Post by superchargingmachine »

It seems like the shift lie might be your best option off of LED18 it will give you an on and off RPM lie you are looing for. Outputs 3 & 4 are somewhat limited.

I don't now how familiar you are with older Toyota's but TVIS is a variable port intake controlled off of a vacuum solenoid. It seems like the same type of on/off solenoid would work for your valve. I use the 2N2222/1Kresistor/4N40001 circuit shown in the V2.2 Output schematics. It's pretty simple if you get the transistor legs right.
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Post by muythaibxr »

wrenchdad wrote:Ken,

Thinking about trying that hybrid code so if you get a chance send me a copy. Would it would with the 29q2 that I am running or would I have to find a different s19 file?
I'll zip it up later and post it, it's a new firmware, meaning a new .s19 (which you'll want to change the .inc files for, and recompile, or use easytherm on it). It'll also include the msns-extra.ini which you'll need to put wherever you put it the last time.
So if I understand this two VE tables thing, I would be able to spread out the kpas on the Speed Density table to better cover the low end and then set up the other table to the higher kpa readings OR do they both have to start on the very bottom of the kpa curve. I know they would have to overlap some where but I was thinking it would be somewhere in the 70-80s range. Correct me if I am wrong.
You could do that, but the real purpose is to allow you to run alpha-n on the second table. Running speed density for both tables won't really help you very much.

What I suggest doing is staying below 20ish percent throttle position, and tuning speed density there... just use the table set up in the manner I told you before.

Then set up another msq with alpha-n, and tune that table above 20ish percent throttle.

Then put the alpha-n map in your original msq file using the table export/import feature in megatune... then set the settings up to switch around either 96 kPa, or 20% throttle.
suberimakuri
Master MS/Extra'er
Posts: 632
Joined: Sun May 02, 2004 2:16 pm
Location: Auckland, NZ
Contact:

Post by suberimakuri »

wrenchad: If you want to see what a SD fuel vex table for ITB's can look like check out the ones on our website in my signature.
Under the tech section.

A-N tuning for ITB's is way nicer when under load. SD is way nicer for cruising.. below 80-85 as Ken said above.

Cheers,
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Post by muythaibxr »

Karl_Skewes wrote:wrenchad: If you want to see what a SD fuel vex table for ITB's can look like check out the ones on our website in my signature.
Under the tech section.

A-N tuning for ITB's is way nicer when under load. SD is way nicer for cruising.. below 80-85 as Ken said above.

Cheers,
Actually, I said change above 94-96 kPa, but only because at least on my table, 94-96 kPa is still only around 20-25% throttle position depending on whether I'm going up a hill or not. I could probably get that down by tuning my cruising ignition better... My ignition table still looks pretty standard... with only a 2 bins between 90 and 100 kPa. I think if I split it up the way I did my fuel table so that I have 5 bins between 90 and 100 kPa, and left the actual timing the way it is now (meaning I bring in advance a lot faster as load drops through the 90's) I could probably be in the 80's all the time for cruise.

The firmware I added this code to is here:

http://www.zealengineering.com/~culverk/029m_mod.zip

Ken
wrenchdad
Master MS/Extra'er
Posts: 614
Joined: Mon Feb 14, 2005 5:30 am
Location: Natchez, Mississippi

Post by wrenchdad »

Guys,

Thanks for the information, I ran a log thru the viewer last night and got some better bin numbers and loaded it into the MS this morning for the drive into work. The O2 readings were in the low 14s most of the time, I need to work on the AE settings seeing it go a lean until the map readings go up into the higher bins where the numbers are higher. I also need to add more fuel in the cold startups because the bins in the tables are now lower.
But I am seeing the map readings coming down now that its running leaner, its trying to stay in the lower 80s most of the flat land cruising.

Ken
Sorry, I didn't say it right, I was meaning to say use the table 1 for speed ddensity and the two table for AN but didn't put it in there. Just wanted to understand what KPAs to scale the tables too. And thanks for the files, I will try them out as soon as I can. I would be able to use part of the table that I am running on now, correct? For the SD table that is? Would I be able to spread out the KPAs some and just leave, say, the top three rows for the cross over bins into the AN table?

I getting there but couldn't do it without ya'lls help! Thanks again guys!
later wd
muythaibxr
Site Admin
Posts: 8230
Joined: Thu Oct 14, 2004 12:48 pm

Post by muythaibxr »

wrenchdad wrote:Guys,

Thanks for the information, I ran a log thru the viewer last night and got some better bin numbers and loaded it into the MS this morning for the drive into work. The O2 readings were in the low 14s most of the time, I need to work on the AE settings seeing it go a lean until the map readings go up into the higher bins where the numbers are higher. I also need to add more fuel in the cold startups because the bins in the tables are now lower.
But I am seeing the map readings coming down now that its running leaner, its trying to stay in the lower 80s most of the flat land cruising.

Ken
Sorry, I didn't say it right, I was meaning to say use the table 1 for speed ddensity and the two table for AN but didn't put it in there. Just wanted to understand what KPAs to scale the tables too. And thanks for the files, I will try them out as soon as I can. I would be able to use part of the table that I am running on now, correct? For the SD table that is? Would I be able to spread out the KPAs some and just leave, say, the top three rows for the cross over bins into the AN table?

I getting there but couldn't do it without ya'lls help! Thanks again guys!
later wd
I would say use the SD table as-is... don't change it or spread anything out, because most likely, depending on how you set up the switchover, you'll see MAPs in the high 90's still (assuming you switch over using TPS instead of MAP for the switch point).

Also, due to switch-point hysteresis, you should keep a full alpha-n table as well in case you ever get "on the line" somewhere between SD and alpha-n, it won't switch back and forth.

Ken
Post Reply