AFRsafety Code Working--Shows Great Promise!

Testing and development of Megasquirt 3

Moderators: jsmcortina, muythaibxr

Post Reply
Tjabo
Master MS/Extra'er
Posts: 846
Joined: Sat Nov 05, 2005 7:36 pm

AFRsafety Code Working--Shows Great Promise!

Post by Tjabo »

Hey all,

I had an opportunity to give it a little try this morning before I had to spend the afternoon training dogs. The little try was VERY interesting though.

First, on the way to buy more spark plugs for tuning, I hit the AFR safety cut going down a ramp onto the freeway. I had it setup as I had mentioned before, check above 110kPa and 2,000rpms, wait for .2secs then kill sparks for .2 seconds. Then kill fuel until TPS below 25%.

When I hit the safety, I didn't really expect to, but with the new wastegate spring I put in yesterday, I knew that part of my VE table wasn't going to be perfect. The AFR safety system worked perfectly to shut off the injectors, but then they wouldn't turn back on. I pulled onto the shoulder to mess with things a bit, and eventually turned the ignition off, then back on and restarted the car.

Figuring that the problem was reasonably understandable, I pushed into the cut one more time, and let it shut the injectors totally off. This time I quickly turned the ignition off and back on, but the injectors wouldn't re-fire. So then I turned the ignition off for a 5-10 second period, and tried again to restart it, which worked.

At that point I figured that I may have messed up the settings, and I figured that the problem likely was that the parameters of turning the injectors back on were probably all "AND" conditions, not "OR" conditions. So before leaving the auto parts, I added in the parameters to turn the injectors back on "Below 100kPa and 5,000rpms."

While getting back onto the freeway I found that there was a condition where I was cruising quite lean, and as the turbo would spool quite quickly I could hit the AFRsafety repeatedly, and let off so that the injectors would re-fire. Part of this may well have to do with the lag time of my wideband, which is an AEM UEGO--documented to have a rather high latency--and the fact that I have the sensor toward the rear half of the exhaust system.

At any rate, the AFRsafety worked very smoothly with the cut, and with turning the injectors back on. I intend to make some adjustments to my settings now to make this a truly useful setup, but I must say that I was kind of shocked because I really had used settings I thought were reasonable for my setup, and I didn't expect to be hitting the AFRsafety so much. I LOVE THIS FEATURE! ! ! ! And I think a lot of people are going to find it useful not just for safety, but also for finding holes in the VE table.

I haven't had time to really pour over the logs yet, but I wanted to get all of this typed out as soon as possible so that I could document the course of events before I begin to forget exactly what happened. If I see other interesting stuff as I go over the logs, I'll post it up.

Thanks James and Ken for creating this bit of geniusness!

Thad
--'98 Dodge Neon ACR Turbo - MS3 beta test car - Sold
--'97 BMW 540i/6spd - Single Front/Top Mount Turbo 550+ HP - MS3+MS3X V3.0 - Sold but ripping in Vegas
--'97 BMW 328i 5.3 L33/TH400 Swapped drift car - MS3+MS3X V3.0 Full Sequential - Turbos And Radiator In the Trunk 9.6@144 on a 1.55 60ft
jsmcortina
Site Admin
Posts: 39621
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: AFRsafety Code Working--Shows Great Promise!

Post by jsmcortina »

Yes, the settings are AND conditions.

What settings did you have to start with when it wouldn't come back to life?

If you have a spare output pin somewhere you could maybe hook up a big light on the dash and increase the kill timeout.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Tjabo
Master MS/Extra'er
Posts: 846
Joined: Sat Nov 05, 2005 7:36 pm

Re: AFRsafety Code Working--Shows Great Promise!

Post by Tjabo »

James,

If this answer isn't sufficient i can type in more detail or capture some screen shots, but the change I made that seemed to make the difference was when the engine wouldn't come back to life I had:

MAP below(%) 0.0
RPM below(rpm) 0.0

When I think it worked, I had changed those two settings to:

MAP below(%) 100
RPM below(rpm) 5,000

Please bear in mind that I haven't fully tested this yet, as I had to jump straight into the bite suit when I got home! :twisted: I plan to go through the logs tonight though, and possibly test some more tomorrow.

I like the big "Oh Crap!" light on the dash idea though, but I really don't think it will be necessary once I get my settings worked out. Until then it will be kind of a handy tuning aid.

Thanks again!

Thad
--'98 Dodge Neon ACR Turbo - MS3 beta test car - Sold
--'97 BMW 540i/6spd - Single Front/Top Mount Turbo 550+ HP - MS3+MS3X V3.0 - Sold but ripping in Vegas
--'97 BMW 328i 5.3 L33/TH400 Swapped drift car - MS3+MS3X V3.0 Full Sequential - Turbos And Radiator In the Trunk 9.6@144 on a 1.55 60ft
Tjabo
Master MS/Extra'er
Posts: 846
Joined: Sat Nov 05, 2005 7:36 pm

Re: AFRsafety Code Working--Shows Great Promise!

Post by Tjabo »

Going over the logs of the second ride with the operational settings, I'm not seeing any indication of the spark cut. Is there anywhere it would show up? SparkAdv is just showing regular timing. . .
--'98 Dodge Neon ACR Turbo - MS3 beta test car - Sold
--'97 BMW 540i/6spd - Single Front/Top Mount Turbo 550+ HP - MS3+MS3X V3.0 - Sold but ripping in Vegas
--'97 BMW 328i 5.3 L33/TH400 Swapped drift car - MS3+MS3X V3.0 Full Sequential - Turbos And Radiator In the Trunk 9.6@144 on a 1.55 60ft
jsmcortina
Site Admin
Posts: 39621
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: AFRsafety Code Working--Shows Great Promise!

Post by jsmcortina »

Spark-cut, not spark retard... I'm not sure if it will show up in a log, but you might see an "indicator" flicker on the TS screen. It worked on the bench.

With rpm and map set to zero, your engine will never recover, unless you drive into a vacuum... If you don't want to use those settings, then set them high as you have done. My reasoning for adding them all, was that if the engine had gone into a "danger zone" then you probably want to get far away from that danger point before allowing it to run again.

However, as with any features - use as you like!

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Tjabo
Master MS/Extra'er
Posts: 846
Joined: Sat Nov 05, 2005 7:36 pm

Re: AFRsafety Code Working--Shows Great Promise!

Post by Tjabo »

Well, I detailed this in my Neon thread in the Hardware Beta Testing forum, but I just wanted to complete this thread a bit by saying here that from what I can tell, the AFRsafety code is perfectly functional, and absolutely useful!

I have had it bonk me a BUNCH of times where I never expected to find out I had problems with my VE map, mostly in transitional areas going into boost. This has forced me to deal with those areas of my map way better than I would have otherwise.

Additionally, this has shown me that the code works SOOOOOO well, that I trust it 100%, whether that is ill-advised for a chunk of Alpha code or not! At this point I feel completely safe in leaning on my water/methanol injection setup a lot, and trusting this code to shut me down if my system messes up from a pump fault, injector nozzle clog, leak, or whatever. It's AWESOME! Thanks again guys! ! !

Thad
--'98 Dodge Neon ACR Turbo - MS3 beta test car - Sold
--'97 BMW 540i/6spd - Single Front/Top Mount Turbo 550+ HP - MS3+MS3X V3.0 - Sold but ripping in Vegas
--'97 BMW 328i 5.3 L33/TH400 Swapped drift car - MS3+MS3X V3.0 Full Sequential - Turbos And Radiator In the Trunk 9.6@144 on a 1.55 60ft
jsmcortina
Site Admin
Posts: 39621
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: AFRsafety Code Working--Shows Great Promise!

Post by jsmcortina »

While thinking about what EGT code to write, I came to wonder about the maxAFR feature - does it _need_ the AFR table or would it be better/easier to have a "leaner by x.x AFR" option?

My thinking being that you should already have set your target AFR in the first table, so why re-enter almost the same number but slightly leaner in the "safety" table?

Any reason this wouldn't work? How do you target and safety tables compare Thad?

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Tjabo
Master MS/Extra'er
Posts: 846
Joined: Sat Nov 05, 2005 7:36 pm

Re: AFRsafety Code Working--Shows Great Promise!

Post by Tjabo »

That is a GREAT idea James! Mine are currently about 1 AFR to .5 AFR apart in the relevant areas. Less margin in the higher boost areas. (current .MSQ attached)

I'll give this some more thought and get back to you. I see no reason your idea couldn't work, or at least it's worth trying if you were willing to write the code!

By the way, I smashed a deer with my wife's minivan, so I've been having to rely on the Neon while her van is in the body shop. I hope to get back to playing with it more after her van is out and I can get my Bimmer back from her for daily driving. . .

Thanks,

Thad
--'98 Dodge Neon ACR Turbo - MS3 beta test car - Sold
--'97 BMW 540i/6spd - Single Front/Top Mount Turbo 550+ HP - MS3+MS3X V3.0 - Sold but ripping in Vegas
--'97 BMW 328i 5.3 L33/TH400 Swapped drift car - MS3+MS3X V3.0 Full Sequential - Turbos And Radiator In the Trunk 9.6@144 on a 1.55 60ft
jsmcortina
Site Admin
Posts: 39621
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: AFRsafety Code Working--Shows Great Promise!

Post by jsmcortina »

Any thoughts on changing this a little so the AFRsafety table becomes a table of AFR differences e.g. you fill it with +0.5 +1.0 +0.3 etc. values?
The second (confusing) table switch AFRsafety table could then be deleted.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Tjabo
Master MS/Extra'er
Posts: 846
Joined: Sat Nov 05, 2005 7:36 pm

Re: AFRsafety Code Working--Shows Great Promise!

Post by Tjabo »

James,

I think that would work fine. After considering this for a while now, I think that the strategy you described here would be good, in that it would still allow for varying degrees of adherence to the AFR target at different kPa levels.

The reason I mention that is that I have noticed the transitional areas tend to be the areas where I bump into the AFR safety cut most often, and I haven't figured out for sure yet whether those areas are truly the most variable, that's where my tune is the worst, or if there is something happening there related to an inaccuracy in the wideband.

What I DO know is that those areas (low boost) are the most forgiving in terms of marginal AFRs, so I can allow a wider margin in those areas than I can at high boost, kind of like what you used as example numbers probably.

And hey, there's one way to find our for sure whether there are any unanticipated drawbacks. If you code it, I'll run the crap out of it! :twisted:

Thad
--'98 Dodge Neon ACR Turbo - MS3 beta test car - Sold
--'97 BMW 540i/6spd - Single Front/Top Mount Turbo 550+ HP - MS3+MS3X V3.0 - Sold but ripping in Vegas
--'97 BMW 328i 5.3 L33/TH400 Swapped drift car - MS3+MS3X V3.0 Full Sequential - Turbos And Radiator In the Trunk 9.6@144 on a 1.55 60ft
jsmcortina
Site Admin
Posts: 39621
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: AFRsafety Code Working--Shows Great Promise!

Post by jsmcortina »

OK, will be added to the TODO list.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
Tjabo
Master MS/Extra'er
Posts: 846
Joined: Sat Nov 05, 2005 7:36 pm

Re: AFRsafety Code Working--Shows Great Promise!

Post by Tjabo »

James,

It appears your new AFRsafety strategy works well. It so happened I wasn't logging ( :evil: ), but I had put some of the fancy "German Castrol" Syntec 0w-30 in, and went out to do a bit of oil warming so I could check my oil pressure at full temp. Maybe the "GC" actually does something other than give lower oil pressure than Rotella T, because I hit the AFR cut for the first time in days. Maybe the turbo spooled a little earlier than normal and found me a little hole in my VE map.

I'll try to flesh out the testing over the next few days. (And then I'll probably put the Rotella back in until it gets really cold out.)

Thad
--'98 Dodge Neon ACR Turbo - MS3 beta test car - Sold
--'97 BMW 540i/6spd - Single Front/Top Mount Turbo 550+ HP - MS3+MS3X V3.0 - Sold but ripping in Vegas
--'97 BMW 328i 5.3 L33/TH400 Swapped drift car - MS3+MS3X V3.0 Full Sequential - Turbos And Radiator In the Trunk 9.6@144 on a 1.55 60ft
Post Reply