Notices
ECU Flash

how-to: Log AFR from the LC-1 w/o a serial cable

Thread Tools
 
Search this Thread
 
Old Apr 9, 2008 | 09:51 AM
  #1  
mrfred's Avatar
Thread Starter
EvoM Guru
iTrader: (50)
 
Joined: Mar 2006
Posts: 9,675
Likes: 130
From: Tri-Cities, WA // Portland, OR
how-to: Log AFR from the LC-1 w/o a serial cable

Log AFR data from the LC-1 (or Zeitronix) without a serial cable


Overview

The Innovate LC-1 wideband AFR measurement hardware includes both a serial cable output and a 0-5V analog output for reading the AFR data. The serial out is meant to be connected directly to a computer while the analog out was designed to be fed into an ECU. I never used the serial output, but always thought it would be a PITA. OTOH, reading the analog output via the ECU sounded perfect for the Evo because the data can be logged with EvoScan using the standard MUTIII protocol. A few people before me had already done this, most notably Bez and evo828. The knowledge required to this with USDM Evos was not available though, so with some help from the community, I assembled all the required info. The method I choose was to feed the LC-1 analog output data into the rear O2 ADC input on the ECU. Instructions are below. Please read everything before getting started. Note: ECUFlash is required to accomplish the job.


ECU Pins

Before getting started, be sure that you have a few female ECU pins handy. The pins for Evo 8s are widely available. Jack_of_Trades has posted the part number on this *page*. (You'll need to scroll down a little ways to find the pin part number.) Jack_of_Trades has the only pins available pretty much across the entire world for the Evo 9. You can get the pins from him *here*.


Hardware Modifications

1) Install the LC-1 if it is not already installed. Proper grounding is key for accurate AFR readings when using the analog output #2. Fortunately, proper grounding is pretty easily accomplished on the Evo because the ECU is grounded to multiple locations on the car. The ECU is grounded directly to the driveshaft tunnel just in front and to the right of the shifter assembly. There is a bolt about 5 inches in front of that bolt that attaches the airbag electronics tray to the chassis. The heater ground wire can be installed there. I grounded the analog output ground and system ground separately by drilling a hole into the chassis about two inches below the bolt for the heater ground. Sand off the paint on the chassis before attaching the ground wire lugs.

2) Find the rear O2 pin on your ECU harness, remove it, and tape it back out of the way. Jack_of_Trades has instructions on this *page* (again scroll down) on how to do the removal and install for the Evo 8. Instructions for the Evo 9 are *here*. Pinout diagram for the USDM Evo 8 is *here*. The diagram for the Evo 9 is *here*.

3) Attach the female ECU pin to the analog output #2 wire on the LC-1. Its the brown wire. I strongly suggest soldering and crimping the wire to the pin. Soldering helps insure that the wire will not accidentally be pulled from the pin while its in the ECU plug.

4) Install the pin into the plug.


ROM Modifications

My rear O2 sensor simulator code needs to used. This is needed so that the rear O2 ADC input can be made available for the LC-1 analog input. There are two ways to do this. A) tephra has incorporated this code into his latest v5 ROMs, or B) for people who do not want to run his ROM, there are instructions for applying the rear O2 sim patch to either the 88590015 ROM or the 96940011 ROM. There are no current plans to port it to any other ROMs as tephra already has it in his patched ROMs.

Option A - tephra ROM

1) Get a copy of tephra's v5+ ROM, and move all your altered tables over to the tephra ROM.

2) In ECUFlash, find the MUT12 address in the MUT table. If the MUT table is not listed, then it will have to be added to your ECUFlash definition file. A thread listing the MUT table definition for most ROMs is *here*. Change MUT12 to 8409. (You'll have to enter it as 0x8409.) Save the ROM and upload it to your ECU.

Option B - Apply rear O2 sim patch yourself.

1) Patching instructions for the 88590015 ROM are *here*, and l2r99gst has ported my instructions to the 96940011 ROM *here*.

2) Next, choose a new RAM address for the rear O2 ADC input. For the 88590015 ROM, add the following entry to your "88590015.xml" ECUFlash file:

<table name="Rear O2 (ADC 0A) RAM variable" category="Rear_02" address="c2be" type="1D" level="1" scaling="Hex16"/>

For the 96940011 ROM, add the following entry to your "96940011.xml" ECUFlash file:

<table name="Rear O2 (ADC 0A) RAM variable" category="Rear_02" address="a676" type="1D" level="1" scaling="Hex16"/>

Then launch ECUFlash, open the 1D table, and change the value to 8408. (You'll need to enter it as 0x8408.)

3) Next, in ECUFlash, find the MUT12 address in the MUT table. If the MUT table is not listed, then it will have to be added to your ECUFlash definition file. A thread listing the MUT table definition for most ROMs is *here*. Change MUT12 to 8409. (Again, you'll have to enter it as 0x8409.) Save the ROM and upload it to your ECU.


Setting up EvoScan

Add the following entry to your EvoScan (2.1) "Data.xml" file:

<DataListItem DataLog="Y" Color="" Display="Wideband AFR" LogReference="WideBand" RequestID="12" Eval="0.05859*x+7.35" Unit="AFR" MetricEval="" MetricUnit="" ResponseBytes="1" GaugeMin="0" GaugeMax="22" ChartMin="0" ChartMax="22" ScalingFactor="1" Notes="" Priority="1" Visible="false" />

If the stock LC-1 settings for the analog output #2 are being used, everything is ready to go. If you to change the AFR range represented by 0-5V to get better resolution, then you'll need to update the scaling formula in the EvoScan definition. For instance, if a range of 9.0 to 17.0 is used, then the scaling formula would be:

(17.0-9.0)/255*x + 9.0 = 0.03137*x + 9.0

That's it.

Last edited by mrfred; May 31, 2008 at 10:09 AM.
The following users liked this post:
Hiram6g74 (Jan 13, 2017)
Old Apr 9, 2008 | 12:26 PM
  #2  
bnice01's Avatar
Evolved Member
iTrader: (4)
 
Joined: May 2007
Posts: 688
Likes: 0
From: Hurlburt Field, FL
as usually nice write up mrfred. WOOT WOOT

today I am going to install my old ngk wideband since it has an analog output with it and the turboxsI run currently doesnt. So I will give that a try, once the analog wires come in. (yes I will update my evoscan formula LOL)
Old Apr 9, 2008 | 04:46 PM
  #3  
tephra's Avatar
EvoM Guru
iTrader: (6)
 
Joined: Mar 2007
Posts: 9,486
Likes: 66
From: Melbourne, Australia
nice!

have you verified that 5v == 255? just a thought
Old Apr 9, 2008 | 04:53 PM
  #4  
mrfred's Avatar
Thread Starter
EvoM Guru
iTrader: (50)
 
Joined: Mar 2006
Posts: 9,675
Likes: 130
From: Tri-Cities, WA // Portland, OR
Originally Posted by tephra
nice!

have you verified that 5v == 255? just a thought
Implicitly, yes. I logged the channel during power up, and the AFR held at 7.35 during LC-1 warmup, and then when it transitioned to operational mode, the AFR held momentarily at 22.27. I didn't run a known voltage into the ADC input though. If you want to verify explicitly, that would be good.
Old Apr 9, 2008 | 06:25 PM
  #5  
tephra's Avatar
EvoM Guru
iTrader: (6)
 
Joined: Mar 2007
Posts: 9,486
Likes: 66
From: Melbourne, Australia
ok so I set the voltage in LMProgrammer and recorded the raw byte output in evoscan:

Code:
LC1-Setting	RawByte
5.0v		254
4.0v		203
2.499v		126
1.499v		75
1.0v		49
0.499v		24
0.0v		0
From this you can:
a) see that 5v is 254 NOT 255
b) the lower the voltage the more error there is if you use the formula "x*5/255"

ps - you should always double check the input in LMProgrammer by firing it up again and checking the new AFR settings, 9 = 8.98, 17 = 16.99 etc etc

Last edited by tephra; Apr 9, 2008 at 06:30 PM.
Old Apr 10, 2008 | 12:00 PM
  #6  
fas-n-furyus's Avatar
Newbie
iTrader: (1)
 
Joined: Dec 2006
Posts: 63
Likes: 0
From: in my car
guys,

I have a jdm evo9 and I'm using the 88570008 rom. My car does not use a rear O2 sensor, But I'm using a USDM 3" exhaust and it has the bung for the rear O2, in which I have mounted my LC1 sensor.

What would be the required changes if any for me to use the 88570008 rom to log the AFR in evoscan.

i'm a nooob so any assistance would be greatly appreciated.
Old Apr 10, 2008 | 06:23 PM
  #7  
tephra's Avatar
EvoM Guru
iTrader: (6)
 
Joined: Mar 2007
Posts: 9,486
Likes: 66
From: Melbourne, Australia
you can probably assume that the same ECU pin is used and just wire up your LC1 analogue to that pin.
Old Apr 11, 2008 | 11:28 AM
  #8  
fas-n-furyus's Avatar
Newbie
iTrader: (1)
 
Joined: Dec 2006
Posts: 63
Likes: 0
From: in my car
how do i modify my 88570008 rom to have the rear O2 ADC input available?
Old Apr 11, 2008 | 11:56 AM
  #9  
mrfred's Avatar
Thread Starter
EvoM Guru
iTrader: (50)
 
Joined: Mar 2006
Posts: 9,675
Likes: 130
From: Tri-Cities, WA // Portland, OR
Someone will have to take a look at your ROM.
Old Apr 11, 2008 | 03:32 PM
  #10  
fas-n-furyus's Avatar
Newbie
iTrader: (1)
 
Joined: Dec 2006
Posts: 63
Likes: 0
From: in my car
Originally Posted by mrfred
Someone will have to take a look at your ROM.
i have being using tephra's NLTS+Valet+KnockCel rom found here
https://www.evolutionm.net/forums/sh...d.php?t=297825

But when i try to add the MUT table to tephra's rom i get the following error in ecuflash when i try to open the bin file;

parse error at line 351, column 121:
no error occured


i can add the MUT tables to the 88570008 rom found here
https://www.evolutionm.net/forums/sh...&highlight=xml

I can add the MUT table to this rom, but i'm seeing 4 MUT tables is this correct?
Old Apr 12, 2008 | 06:30 PM
  #11  
dan l's Avatar
Account Disabled
iTrader: (3)
 
Joined: Apr 2006
Posts: 1,029
Likes: 0
From: USA
I've been doing this since last fall on my DSM. The only difference is that I modified the code so that I spit the 0-5v signal straight to the front O2 sensor (the only sensor on a 1g DSM) and modified the code so that the high/low switching points for stoich are 2.5 volts instead of .5 volts.

Anyways one important thing that I learned is that you will no doubt have a grounding loop issue. Maybe it was mentioned, but I did not see it. Anyways calibrate the LC1 to spit out 0 volts at all times and then fire up evoscan. Does evoscan report 0 volts? Ok now make the LC1 spit out 5 volts at all times, does evoscan spit out 5 volts? Do the same for 2.5 volts.

For me a few hundredths of a volt is quite a huge AFR discrepancy. I just thought I'd point it out. Thanks for the work mrfred.
Old Apr 12, 2008 | 10:14 PM
  #12  
mrfred's Avatar
Thread Starter
EvoM Guru
iTrader: (50)
 
Joined: Mar 2006
Posts: 9,675
Likes: 130
From: Tri-Cities, WA // Portland, OR
Originally Posted by dan l
I've been doing this since last fall on my DSM. The only difference is that I modified the code so that I spit the 0-5v signal straight to the front O2 sensor (the only sensor on a 1g DSM) and modified the code so that the high/low switching points for stoich are 2.5 volts instead of .5 volts.

Anyways one important thing that I learned is that you will no doubt have a grounding loop issue. Maybe it was mentioned, but I did not see it. Anyways calibrate the LC1 to spit out 0 volts at all times and then fire up evoscan. Does evoscan report 0 volts? Ok now make the LC1 spit out 5 volts at all times, does evoscan spit out 5 volts? Do the same for 2.5 volts.

For me a few hundredths of a volt is quite a huge AFR discrepancy. I just thought I'd point it out. Thanks for the work mrfred.
I was kinda curious about this too, so I checked it out across the entire voltage range. There is a consistent offset between the predicted ADC value and the actual ADC value of about 3. Its roughly equivalent to 0.05 V. For an AFR range of 9:1 to 18:1, this is equivalent to about consistent 0.1 AFR which is very reasonable. Since it is consistent, it can even be eliminated by adjusting the formula in EvoScan.

Last edited by mrfred; Apr 12, 2008 at 10:26 PM.
Old Apr 12, 2008 | 10:35 PM
  #13  
tephra's Avatar
EvoM Guru
iTrader: (6)
 
Joined: Mar 2007
Posts: 9,486
Likes: 66
From: Melbourne, Australia
did you look at my post above?

it seemed that the error was greater the closer to 0v the ADC got.
Old Apr 13, 2008 | 09:56 AM
  #14  
dan l's Avatar
Account Disabled
iTrader: (3)
 
Joined: Apr 2006
Posts: 1,029
Likes: 0
From: USA
Yes the error typically is not linear with respect to voltage output. Welcome to the world of analog ground loops. This is why I prefer the digital input from the devices as my *accurate* way of logging when fine tuning it. I will then use the analog input from the LC1 for "quick and dirty" logging. IE: when your at the track and just need to fire up the logger and measure a few things just to make sure you are in the ballpark or to spot big issues.

I'm seeing about a quarter AFR point when logging my DSM and I have the LC1 grounded directly to the metal case of my ECU!!!!
Old Apr 13, 2008 | 04:18 PM
  #15  
mrfred's Avatar
Thread Starter
EvoM Guru
iTrader: (50)
 
Joined: Mar 2006
Posts: 9,675
Likes: 130
From: Tri-Cities, WA // Portland, OR
Here is what I'm seeing. Its just a systematic offset.

Attached Thumbnails how-to: Log AFR from the LC-1 w/o a serial cable-adc-offset.gif  



All times are GMT -7. The time now is 10:15 PM.