Notices
ECU Flash

how-to: control closed loop AFR with your wideband O2 system

Thread Tools
 
Search this Thread
 
Old May 4, 2010 | 12:15 PM
  #226  
Creamo3's Avatar
Evolved Member
iTrader: (48)
 
Joined: May 2003
Posts: 2,078
Likes: 2
From: Chicago
Originally Posted by knochgoon24
What happened to this patch? Will we ever see it implemented as an option under the "Tephra Mods"? Now that 9653... is being used as one of the universal ROM, has any work been done to implement this on that rom?
I too would be interested in being able to log & control cruise AFR's based on my wideband output. What would be involved to get this implemented on the the various V7 roms available?
Reply
Old May 12, 2010 | 03:58 PM
  #227  
3gEclipseTurbo's Avatar
Evolved Member
iTrader: (12)
 
Joined: Aug 2009
Posts: 1,589
Likes: 0
From: ma
Is there a patch for 9417 or 9653 rom yet?
Reply
Old May 12, 2010 | 07:47 PM
  #228  
mrfred's Avatar
Thread Starter
EvoM Guru
iTrader: (50)
 
Joined: Mar 2006
Posts: 9,675
Likes: 132
From: Tri-Cities, WA // Portland, OR
Originally Posted by 3gEclipseTurbo
Is there a patch for 9417 or 9653 rom yet?
Sorry, but nope. There are many ROM mods I've been wanting to do, but job and family have been taking up all my free time for the last six months.
Reply
Old May 12, 2010 | 08:18 PM
  #229  
3gEclipseTurbo's Avatar
Evolved Member
iTrader: (12)
 
Joined: Aug 2009
Posts: 1,589
Likes: 0
From: ma
ANy idea when youll get to them?
Reply
Old May 12, 2010 | 08:24 PM
  #230  
mrfred's Avatar
Thread Starter
EvoM Guru
iTrader: (50)
 
Joined: Mar 2006
Posts: 9,675
Likes: 132
From: Tri-Cities, WA // Portland, OR
Originally Posted by 3gEclipseTurbo
ANy idea when youll get to them?
Its kind of a cool mod to have, but to be honest I don't think that many people are interested in it, so I've got several ROM mods that are higher on the list than this one.
Reply
Old May 12, 2010 | 08:31 PM
  #231  
3gEclipseTurbo's Avatar
Evolved Member
iTrader: (12)
 
Joined: Aug 2009
Posts: 1,589
Likes: 0
From: ma
I need this mod my front o2 sensor is dead. It would be much appreciated.
Reply
Old May 13, 2010 | 08:02 AM
  #232  
logic's Avatar
Evolved Member
iTrader: (2)
 
Joined: Apr 2003
Posts: 1,022
Likes: 7
From: Berkeley, CA
Originally Posted by mrfred
Its kind of a cool mod to have, but to be honest I don't think that many people are interested in it, so I've got several ROM mods that are higher on the list than this one.
*cough*flexfuel*cough*

But seriously, family and work always take priority over random folks on the Internet. Don't worry about it, we'll still be here when you get a little more free time.
Reply
Old May 13, 2010 | 09:14 AM
  #233  
logic's Avatar
Evolved Member
iTrader: (2)
 
Joined: Apr 2003
Posts: 1,022
Likes: 7
From: Berkeley, CA
Actually, since I have a little time on my hands...mrfred, given how long ago you'd done this patch, do you have any concerns about how it was done, now that you've spent more quality time with the fuel routines? Are you still running this yourself?

Looking at the source, the ADC hook at C250 in 8859 looks like it's at A8F8 in 9653, and the AFRMAP hook at 182E4 in 8859 appears to be at 14DB4 in 9653, so this looks like it would be a pretty straightforward port: just a matter of fixing up some addresses.
Reply
Old May 13, 2010 | 11:44 AM
  #234  
3gEclipseTurbo's Avatar
Evolved Member
iTrader: (12)
 
Joined: Aug 2009
Posts: 1,589
Likes: 0
From: ma
Ill try out the patch if you change the addresses.
Reply
Old May 13, 2010 | 11:53 AM
  #235  
mrfred's Avatar
Thread Starter
EvoM Guru
iTrader: (50)
 
Joined: Mar 2006
Posts: 9,675
Likes: 132
From: Tri-Cities, WA // Portland, OR
Originally Posted by logic
Actually, since I have a little time on my hands...mrfred, given how long ago you'd done this patch, do you have any concerns about how it was done, now that you've spent more quality time with the fuel routines? Are you still running this yourself?

Looking at the source, the ADC hook at C250 in 8859 looks like it's at A8F8 in 9653, and the AFRMAP hook at 182E4 in 8859 appears to be at 14DB4 in 9653, so this looks like it would be a pretty straightforward port: just a matter of fixing up some addresses.
FF patch is definitely at the top of my list. I keep thinking I'm going to have the time to do it, and then something else comes up at work.

Yep, I still run the closed loop wideband patch, but have not carefully tested whether it gets me better gas mileage. The closed-loop wideband subroutine is well-written. I wouldn't change a thing with it. Along with the subroutine, some of the original ROM code needs to be modified to make the hook and allow the ECU to read the fuel table even when in closed loop. If you like, I can send you the source code to allow you to make a more informed decision on whether you'd want to port it over to those ROMs.
Reply
Old May 13, 2010 | 01:19 PM
  #236  
logic's Avatar
Evolved Member
iTrader: (2)
 
Joined: Apr 2003
Posts: 1,022
Likes: 7
From: Berkeley, CA
Actually, you already posted the source in the second post of the thread, so I've been going off of that along with a simple diff between 8859 and your modified version. (I think I've finally found a good use-case for my python disassembler: doing quick diffs between stock and modified ROMs. )

I've already found the two main hooks (ADC and AFRMAP, as posted above), I just need to run through any memory addresses you're working with and make note of them. The rest looks like a no-brainer; I'd planned on finishing up porting it to 96530006 this afternoon, but my actual paying job got in the way.

3gEclipseTurbo, I might have something to play with tomorrow or sometime this weekend, if you're feeling up to testing.
Reply
Old May 13, 2010 | 03:08 PM
  #237  
3gEclipseTurbo's Avatar
Evolved Member
iTrader: (12)
 
Joined: Aug 2009
Posts: 1,589
Likes: 0
From: ma
Ya just let me know, my email is thegamefgunit@aol.com.
Reply
Old May 14, 2010 | 06:11 AM
  #238  
pupo's Avatar
Evolving Member
iTrader: (9)
 
Joined: Jan 2008
Posts: 297
Likes: 2
From: Puerto Rico
I would be interested on this also as I have been waiting for this! I have a 2005 evo and would love to control AFR on closed loop. I am still using 96940011 but I will be willing to change to this rom if I can control close loop AFR.

Last edited by pupo; May 14, 2010 at 06:15 AM. Reason: add info.
Reply
Old May 14, 2010 | 08:30 AM
  #239  
acidikjuice's Avatar
Newbie
 
Joined: Apr 2009
Posts: 30
Likes: 0
From: Blacksburg Va (VT)
You can bet I'm going to test this out too! Let me know if you get something worked out. Post it up here or send me a PM too.
Reply
Old May 14, 2010 | 02:28 PM
  #240  
logic's Avatar
Evolved Member
iTrader: (2)
 
Joined: Apr 2003
Posts: 1,022
Likes: 7
From: Berkeley, CA
first cut of 9653 support

Edited 5/20/2010: Uploaded v2, which changed "Cold Engine Closed Loop AFR" to a much more reasonable 14.7.

----

Cool, I actually found a few minutes this afternoon to tackle this.

Here's a completely untested 96530006 patch, based on mrfred's original code. I've run it through a disassembler and it looks correct, but I can't stress this enough: I haven't even loaded this on my own car yet, so if something breaks, you get to keep both pieces. If something goes wrong, turn the car off and flash it back to your old ROM, and post here about what happened.

I tried to take care to avoid collisions, so this should work with at both a stock 96530006, as well as with v5.10 and v7 of tephra's ROMs (including the SD- and DMA-patched versions of v7).

Download a patched 96530006 here (you don't actually flash this to your car; you only copy stuff from it): http://evoecu.logic.net/mirror/patch...oop_AFR-v2.hex

Add this XML to 96530006.xml in your rommetadata directory:
PHP Code:
<scaling name="AFR16" units="AFR" toexpr="14.7*128/x" frexpr="14.7*128/x" format="%.1f" min="8" max="20" inc="0.1" storagetype="uint16" endian="big"/>
<scaling name="mLinverse" units="1/mL" toexpr="x/8" frexpr="x*8" format="%.1f" min="0" max="100" inc="0.1" storagetype="uint16" endian="big"/>

<table name="Closed Loop Wideband On/Off" category="Front/Rear_02" address="7FC0" type="1D" level="1" scaling="uint8"/>
<table name="Cold Engine Closed Loop AFR" category="Front/Rear_02" address="7FC2" type="1D" level="1" scaling="AFR16"/>
<table name="Min Coolant Temp To Use AFR Table" category="Front/Rear_02" address="7FC4" type="1D" level="1" scaling="Temp"/>
<table name="Wideband AFR Correlation 1/mL Value" category="Front/Rear_02" address="7FC6" type="1D" level="1" scaling="mLinverse"/>
<table name="Wideband AFR Correlation bL/mL Value" category="Front/Rear_02" address="7FC8" type="1D" level="1" scaling="uint16"/>
<table name="AFR Table Multiplier High Word" category="Front/Rear_02" address="7FCC" type="1D" level="1" scaling="Hex16"/>
<table name="AFR Table Multiplier Low Word" category="Front/Rear_02" address="7FCE" type="1D" level="1" scaling="Hex16"/>
<table name="Front O2 (ADC 04) RAM variable" category="Front/Rear_02" address="AA0E" type="1D" level="1" scaling="Hex16"/>
<table name="Rear O2 (ADC 0A) RAM variable" category="Front/Rear_02" address="AA0A" type="1D" level="1" scaling="Hex16"/>
<table name="MUT12 Value (To Read Wideband)" category="Front/Rear_02" address="3624A" type="1D" level="1" scaling="Hex16"/>
<table name="MUT19 Value (To Read Front O2 ADC)" category="Front/Rear_02" address="36266" type="1D" level="1" scaling="Hex16"/>

<table name="ADC Value Mod Hook" category="Front/Rear_02" address="A8F8" type="3D" level="1" scaling="Hex16">
    <table name="Code" type="Static X Axis" elements="1" scaling="Hex16">
        <data>Hex16</data>
    </table>
    <table name="Address" type="Static Y Axis" elements="10">
        <data>A8F8</data>
        <data>A8FA</data>
        <data>A8FC</data>
        <data>A8FE</data>
        <data>A900</data>
        <data>A902</data>
        <data>A904</data>
        <data>A906</data>
        <data>A908</data>
        <data>A90A</data>
    </table>
</table>

<table name="Hook For Closed Loop Pulse Control Hex" category="Front/Rear_02" address="14DB4" type="3D" level="1" scaling="Hex16">
    <table name="Code" type="Static X Axis" elements="1">
        <data>Hex16</data>
    </table>
    <table name="Address" type="Static Y Axis" elements="8">
        <data>14DB4</data>
        <data>14DB6</data>
        <data>14DB8</data>
        <data>14DBA</data>
        <data>14DBC</data>
        <data>14DBE</data>
        <data>14DC0</data>
        <data>14DC2</data>
    </table>
</table>

<table name="Front/Rear 02 Sim Subroutine Part 1" category="Front/Rear_02" address="36980" type="3D" level="1" scaling="Hex16">
    <table name="Code" type="Static X Axis" elements="1" scaling="Hex16">
        <data>Hex16</data>
    </table>
    <table name="Address" type="Static Y Axis" elements="40">
        <data>36980</data>
        <data>36982</data>
        <data>36984</data>
        <data>36986</data>
        <data>36988</data>
        <data>3698A</data>
        <data>3698C</data>
        <data>3698E</data>
        <data>36990</data>
        <data>36992</data>
        <data>36994</data>
        <data>36996</data>
        <data>36998</data>
        <data>3699A</data>
        <data>3699C</data>
        <data>3699E</data>
        <data>369A0</data>
        <data>369A2</data>
        <data>369A4</data>
        <data>369A6</data>
        <data>369A8</data>
        <data>369AA</data>
        <data>369AC</data>
        <data>369AE</data>
        <data>369B0</data>
        <data>369B2</data>
        <data>369B4</data>
        <data>369B6</data>
        <data>369B8</data>
        <data>369BA</data>
        <data>369BC</data>
        <data>369BE</data>
        <data>369C0</data>
        <data>369C2</data>
        <data>369C4</data>
        <data>369C6</data>
        <data>369C8</data>
        <data>369CA</data>
        <data>369CC</data>
        <data>369CE</data>
    </table>
</table>

<table name="Front/Rear 02 Sim Subroutine Part 2" category="Front/Rear_02" address="369D0" type="3D" level="1" scaling="Hex16">
    <table name="Code" type="Static X Axis" elements="1">
        <data>Hex16</data>
    </table>
    <table name="Address" type="Static Y Axis" elements="40">
        <data>369D0</data>
        <data>369D2</data>
        <data>369D4</data>
        <data>369D6</data>
        <data>369D8</data>
        <data>369DA</data>
        <data>369DC</data>
        <data>369DE</data>
        <data>369E0</data>
        <data>369E2</data>
        <data>369E4</data>
        <data>369E6</data>
        <data>369E8</data>
        <data>369EA</data>
        <data>369EC</data>
        <data>369EE</data>
        <data>369F0</data>
        <data>369F2</data>
        <data>369F4</data>
        <data>369F6</data>
        <data>369F8</data>
        <data>369FA</data>
        <data>369FC</data>
        <data>369FE</data>
        <data>36A00</data>
        <data>36A02</data>
        <data>36A04</data>
        <data>36A06</data>
        <data>36A08</data>
        <data>36A0A</data>
        <data>36A0C</data>
        <data>36A0E</data>
        <data>36A10</data>
        <data>36A12</data>
        <data>36A14</data>
        <data>36A16</data>
        <data>36A18</data>
        <data>36A1A</data>
        <data>36A1C</data>
        <data>36A1E</data>
    </table>
</table>

<table name="Front/Rear 02 Sim Subroutine Part 3" category="Front/Rear_02" address="36A20" type="3D" level="1" scaling="Hex16">
    <table name="Code" type="Static X Axis" elements="1">
        <data>Hex16</data>
    </table>
    <table name="Address" type="Static Y Axis" elements="18">
        <data>36A20</data>
        <data>36A22</data>
        <data>36A24</data>
        <data>36A26</data>
        <data>36A28</data>
        <data>36A2A</data>
        <data>36A2C</data>
        <data>36A2E</data>
        <data>36A30</data>
        <data>36A32</data>
        <data>36A34</data>
        <data>36A36</data>
        <data>36A38</data>
        <data>36A3A</data>
        <data>36A3C</data>
        <data>36A3E</data>
        <data>36A40</data>
        <data>36A42</data>
    </table>
</table>

<table name="Closed Loop Fuel Pulse Control Subroutine" category="Front/Rear_02" address="36A44" type="3D" level="1" scaling="Hex16">
    <table name="Code" type="Static X Axis" elements="1">
        <data>Hex16</data>
    </table>
    <table name="Address" type="Static Y Axis" elements="16">
        <data>36A44</data>
        <data>36A46</data>
        <data>36A48</data>
        <data>36A4A</data>
        <data>36A4C</data>
        <data>36A4E</data>
        <data>36A50</data>
        <data>36A52</data>
        <data>36A54</data>
        <data>36A56</data>
        <data>36A58</data>
        <data>36A5A</data>
        <data>36A5C</data>
        <data>36A5E</data>
        <data>36A60</data>
        <data>36A62</data>
    </table>
</table> 
All the rest of mrfred's instructions apply, including EvoScan changes.

(For the geeks: I used FFFF8906 and FFFF890A for rear/front O2 RAM locations, as they appeared to be unused. Any other differences should just be accounting for different RAM and ROM locations in 9653, and most should be obvious from the XML.)

Last edited by logic; May 20, 2010 at 07:35 AM.
Reply



All times are GMT -7. The time now is 10:37 AM.