how-to: control closed loop AFR with your wideband O2 system
#16
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.
#18
Evolved Member
iTrader: (26)
Join Date: Oct 2005
Location: Pittsburgh
Posts: 1,712
Likes: 0
Received 0 Likes
on
0 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.
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.
#19
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.
#20
Evolved Member
iTrader: (26)
Join Date: Oct 2005
Location: Pittsburgh
Posts: 1,712
Likes: 0
Received 0 Likes
on
0 Posts
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.
#21
Evolved Member
iTrader: (26)
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
(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.
#23
Evolved Member
iTrader: (26)
Join Date: Oct 2005
Location: Pittsburgh
Posts: 1,712
Likes: 0
Received 0 Likes
on
0 Posts
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
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.
#25
Evolved Member
iTrader: (17)
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?
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?
#26
Evolved Member
iTrader: (26)
Join Date: Oct 2005
Location: Pittsburgh
Posts: 1,712
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?
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?
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.
#27
Evolved Member
iTrader: (17)
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.
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.
#28
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.
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.
#29
Evolved Member
iTrader: (17)
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
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
#30
Evolved Member
iTrader: (17)
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)"
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.