Notices
ECU Flash

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

Thread Tools
 
Search this Thread
 
Old Sep 24, 2008, 09:41 AM
  #16  
EvoM Guru
Thread Starter
iTrader: (50)
 
mrfred's Avatar
 
Join Date: Mar 2006
Location: Tri-Cities, WA // Portland, OR
Posts: 9,675
Received 128 Likes on 96 Posts
I found the problem. The ZT2 AFR vs analog output voltage is nonlinear. See graph below. What a rip. The only way I can get the ECU to provide an accurate AFR reading from the analog out of a ZT2 is to modify my patch. I would have to create a lookup table to convert voltage to AFR. That sucks. Now I understand why ZT prefers for people to use their serial output.

Attached Thumbnails how-to: control closed loop AFR with your wideband O2 system-zt2-afr-vs-analog-out-voltage.gif  
Old Sep 24, 2008, 11:09 AM
  #17  
EvoM Community Team
iTrader: (15)
 
fostytou's Avatar
 
Join Date: Sep 2006
Location: Aurora, IL
Posts: 3,143
Received 6 Likes on 6 Posts
Ouch, that is exactly what I was worried about with the AEM!
(But thankfully it is linear as you see above)

Last edited by fostytou; Sep 24, 2008 at 01:17 PM.
Old Sep 24, 2008, 11:54 AM
  #18  
Evolved Member
iTrader: (26)
 
travman's Avatar
 
Join Date: Oct 2005
Location: Pittsburgh
Posts: 1,712
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by mrfred
I found the problem. The ZT2 AFR vs analog output voltage is nonlinear. See graph below. What a rip. The only way I can get the ECU to provide an accurate AFR reading from the analog out of a ZT2 is to modify my patch. I would have to create a lookup table to convert voltage to AFR. That sucks. Now I understand why ZT prefers for people to use their serial output.

The white wire on ZT2 is analog and is non-linear......The purple wire is also analog and says to be linear, it was on the green sheet that came with my ZT2.

Also the AFR range is said to be 9.5-21.0

I had the white wire hooked up but upon reading the complex formula to use it i went to the prurple wire and hooked it up, but I can't get the formula right - maybe im just dumb but i dont know how to get the correct information from the x/255x10+9.6?

post by jackoftrades from another thread:
https://www.evolutionm.net/forums/sh...1&postcount=55

formula for purple wire:
https://www.evolutionm.net/forums/sh...8&postcount=62

Last edited by travman; Sep 24, 2008 at 12:01 PM.
Old Sep 24, 2008, 12:40 PM
  #19  
Evolving Member
iTrader: (2)
 
Zeitronix's Avatar
 
Join Date: Nov 2005
Posts: 327
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by mrfred
I found the problem. The ZT2 AFR vs analog output voltage is nonlinear. See graph below. What a rip. The only way I can get the ECU to provide an accurate AFR reading from the analog out of a ZT2 is to modify my patch. I would have to create a lookup table to convert voltage to AFR. That sucks. Now I understand why ZT prefers for people to use their serial output.
The Zt-2 has both non linear and linear wideband outputs. We recommend using a serial data because it gives you actual AFR number instead of a voltage level, which needs to be processed further. Even with a linear voltage output, analog signals are prone to electrical noise, ground offsets, D/A and A/D conversion errors. So if there is a digital input available on your logger/gauge/display, use it. This is why all our gauges work off digital data not analog voltages and displays the same numbers.
Old Sep 24, 2008, 01:07 PM
  #20  
Evolved Member
iTrader: (26)
 
travman's Avatar
 
Join Date: Oct 2005
Location: Pittsburgh
Posts: 1,712
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by Zeitronix
The Zt-2 has both non linear and linear wideband outputs. We recommend using a serial data because it gives you actual AFR number instead of a voltage level, which needs to be processed further. Even with a linear voltage output, analog signals are prone to electrical noise, ground offsets, D/A and A/D conversion errors. So if there is a digital input available on your logger/gauge/display, use it. This is why all our gauges work off digital data not analog voltages and displays the same numbers.
Were using the input for controlling the car through the ecu with the wideband......not just logging.
Old Sep 24, 2008, 01:16 PM
  #21  
Evolved Member
iTrader: (26)
 
travman's Avatar
 
Join Date: Oct 2005
Location: Pittsburgh
Posts: 1,712
Likes: 0
Received 0 Likes on 0 Posts
So using this formula (x/255*10+9.6) would it be like this:

(21-9.5) = x

11.5/255*10+9.6 = 0.045098*10+9.6

Which equals: .45098*x+9.6?? or is it 0.045098*10+9.6

Which one for the evoscan formula? and then from here get my ML/BL?


sorry im an idiot with math

Last edited by travman; Sep 24, 2008 at 01:43 PM.
Old Sep 24, 2008, 01:17 PM
  #22  
Evolving Member
iTrader: (2)
 
Zeitronix's Avatar
 
Join Date: Nov 2005
Posts: 327
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by travman
Were using the input for controlling the car through the ecu with the wideband......not just logging.
The same principle.
Old Sep 24, 2008, 01:27 PM
  #23  
Evolved Member
iTrader: (26)
 
travman's Avatar
 
Join Date: Oct 2005
Location: Pittsburgh
Posts: 1,712
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by Zeitronix
The same principle.
Umm how do propose we hook up a digital signal through the ecu? Seems the analog is the only way to use this ecu mod

This mod works well with the LC-1 analog (used it for quite a while and dang near accurate) which I just removed from my car due to the LC-1 not always working well and decided the ZT2 was a better option......I imagine the ZT2 will do this as well just fine, just have to get the calculations right to make it work.

Can you offer any help on the linear analog output?

This is the formula for the LC-1, I tried it last night with the purple wire linear output and it didnt work, which I wasnt surprised but I had to start somewhere since I couldnt get any real clear cut answers..

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

Last edited by travman; Sep 24, 2008 at 01:51 PM.
Old Sep 24, 2008, 01:59 PM
  #24  
Evolved Member
iTrader: (17)
 
Jack_of_Trades's Avatar
 
Join Date: Jun 2007
Location: Opelika,AL
Posts: 3,523
Likes: 0
Received 2 Likes on 1 Post
Umm, which analog output were you referring to from the ZT-2 MrFred? They have 2 analog outputs, one is linear and one is not. The chart represents the non-linear curve. The purple wire is the LINEAR output. Just clarifying.
Old Sep 24, 2008, 03:37 PM
  #25  
Evolved Member
iTrader: (17)
 
dudical26's Avatar
 
Join Date: Nov 2005
Location: NNJ
Posts: 2,544
Likes: 0
Received 0 Likes on 0 Posts
Sorry for the confusion, I must have posted the wrong information. I am using the purple linear output but the readings still do not seem to be that accurate.

Has anyone with a ZT2 actually got this working? What formula did you use? How close are your readings to digital readings? Where did you ground the ZT2?
Old Sep 24, 2008, 03:55 PM
  #26  
Evolved Member
iTrader: (26)
 
travman's Avatar
 
Join Date: Oct 2005
Location: Pittsburgh
Posts: 1,712
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by dudical26
Sorry for the confusion, I must have posted the wrong information. I am using the purple linear output but the readings still do not seem to be that accurate.

Has anyone with a ZT2 actually got this working? What formula did you use? How close are your readings to digital readings? Where did you ground the ZT2?
According to my ZT2 instructions it shows the following for the purple wire:

AFR=(2xV)+9.6

So does this mean that the AFR Range for the purple analog be 9.6@0v and 19.6@5v? Im really trying here but im just not getting it and like you I can find anyone that can help.....

dudical - how did you use your formula and plug it into evoscan? I see the x/255*10+9.6 but what is x? is that the diff. in range divided by 255 x 10?

I cant even figure how to get to the point of figuring my ML/BL - until I figure out that formula and how it works?

As far as readings even on my LC-1 it was off by a small margin at different places during a log - i never used the analog to tune, just keep an eye on the AFR at times (ball park) and for wideband control - I don't think it needs to be (or can be) perfect to run the car, just close.
Old Sep 24, 2008, 04:59 PM
  #27  
Evolved Member
iTrader: (17)
 
Jack_of_Trades's Avatar
 
Join Date: Jun 2007
Location: Opelika,AL
Posts: 3,523
Likes: 0
Received 2 Likes on 1 Post
Datalog both the USB WB readings and also datalog the analog input (purple wire) with an eval of "x" so we can compare the AFR readings to the bit values. Then we can dial it in.

Travman, you are correct that 0v= 9.6AFR and 5v=19.6AFR. With the ADC inout though, a bit value of 0=9.6AFR and 255=19.6AFR

EDIT:try this....

eval= (((5/255)*x)*2)+9.6
Its basically the same formula as the x/255*10+9.6 formula but written so you can see all of the work. You may need to fudge the values a bit to comprensate for voltage losses in the wiring and connections.

Last edited by Jack_of_Trades; Sep 24, 2008 at 05:16 PM.
Old Sep 24, 2008, 05:37 PM
  #28  
EvoM Guru
Thread Starter
iTrader: (50)
 
mrfred's Avatar
 
Join Date: Mar 2006
Location: Tri-Cities, WA // Portland, OR
Posts: 9,675
Received 128 Likes on 96 Posts
That stirred up some discussion. With the correct info, its clear that the correct formula, as given by J_of_T, is:

10*x/255 + 9.6

If there is a static ground offset, the intercept value (9.6) may need to be adjusted slightly. If there are variable ground offsets, then the ground point needs to be moved to a better location. With the LC-1, it was possible to set the analog out to an arbitary voltage so it was possible to calibrate the analog signal directly to ADC digitial units. There's some discussion on it in the first two pages of this thread:

https://www.evolutionm.net/forums/sh...d.php?t=337823

If something similar can be done with the ZT2, then it would be a good idea to do it.
Old Sep 24, 2008, 05:42 PM
  #29  
Evolved Member
iTrader: (17)
 
dudical26's Avatar
 
Join Date: Nov 2005
Location: NNJ
Posts: 2,544
Likes: 0
Received 0 Likes on 0 Posts
here is a log

there is WidebandEX for external digital logging
WidebandADC which is the analog input being fed into the ADC formula ="((5/255)*x)+9.6"
and there is WidebandRAW - the raw bit value
Attached Files
Old Sep 24, 2008, 05:59 PM
  #30  
Evolved Member
iTrader: (17)
 
Jack_of_Trades's Avatar
 
Join Date: Jun 2007
Location: Opelika,AL
Posts: 3,523
Likes: 0
Received 2 Likes on 1 Post
well your formula is defintiely wrong there. I'll see what I can do with the data though.



EDIT:

This formula will be accurate to roughly within .1 AFR

eval="((x*0.01895)*2)+9.6"


Does anyone know if evoscan formulas can use the 'round' formula that you can use in excel?

This would be the best setup:


eval="ROUND(((x*0.01895)*2)+9.6,1)"

Last edited by Jack_of_Trades; Sep 24, 2008 at 06:34 PM.


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



All times are GMT -7. The time now is 09:50 AM.