PDA

View Full Version : Turbonator LM Code - Wideband Discussion



Frank
07-01-2008, 02:26 PM
Jeff C and I were discussing things along this line in an email conversation. Basically, we were wondering if the cal could be tweaked to read the analog wideband output (0-5v). If we could find the constant that sets the toggle point, and adjust it so that it's toggle point would be 2.5 v (for stoic) or like 2.8v (for 15.4 or so). I'm not sure if the linear map of a wideband will help by being more sensitive, meaning car strays less from desired afr, or if it will cause all sorts of crazy behavior because it's too sensitive.

I know that lc-1's can be setup to fool the ecu based upon the simulated narroband output, but that's no good for the techedge and zietronics folks.

that would be hella cool. i was wondering the same thing recently.

MiniMopar
07-01-2008, 02:31 PM
Jeff C and I were discussing things along this line in an email conversation. Basically, we were wondering if the cal could be tweaked to read the analog wideband output (0-5v). If we could find the constant that sets the toggle point, and adjust it so that it's toggle point would be 2.5 v (for stoic) or like 2.8v (for 15.4 or so). I'm not sure if the linear map of a wideband will help by being more sensitive, meaning car strays less from desired afr, or if it will cause all sorts of crazy behavior because it's too sensitive.

I know that lc-1's can be setup to fool the ecu based upon the simulated narroband output, but that's no good for the techedge and zietronics folks.

It should be a simple matter to condition the WB encoded value through a bell-curve table to get the desired behavior. Then you can just slide the bell one way or the other to move the stoich point.

Still if you only wanted to nudge it a tad, it seems like the NB should suffice even if it is being used slightly out of spec.

ShelGame
07-01-2008, 02:41 PM
Jeff C and I were discussing things along this line in an email conversation. Basically, we were wondering if the cal could be tweaked to read the analog wideband output (0-5v). If we could find the constant that sets the toggle point, and adjust it so that it's toggle point would be 2.5 v (for stoic) or like 2.8v (for 15.4 or so). I'm not sure if the linear map of a wideband will help by being more sensitive, meaning car strays less from desired afr, or if it will cause all sorts of crazy behavior because it's too sensitive.

I know that lc-1's can be setup to fool the ecu based upon the simulated narroband output, but that's no good for the techedge and zietronics folks.

It's possible to create a transfer function in the code to 'convert' the WB signal to emualte a NB signal just like the LC-1 does. I wrote the code for it a while back, but I've never tried it. Not sure I even still have the code snippet. I'll have to look. I didn't have a correction for stoic, but it would be possible to add one.

Frank
07-01-2008, 02:44 PM
It's possible to create a transfer function in the code to 'convert' the WB signal to emualte a NB signal just like the LC-1 does. I wrote the code for it a while back, but I've never tried it. Not sure I even still have the code snippet. I'll have to look. I didn't have a correction for stoic, but it would be possible to add one.

Well isn't there a O2 voltage to AF table or code that can be changed to match the WB O2 voltage to AF from our devices? I have a NB signal out, but it doesn't serve alot of purpose.


Frank

MiniMopar
07-01-2008, 02:59 PM
Well isn't there a O2 voltage to AF table or code that can be changed to match the WB O2 voltage to AF from our devices? I have a NB signal out, but it doesn't serve alot of purpose.

I think the concern is that the WB signal is fairly linear over the range (completely linear if you use a corrected output of your gauge), while the NB signal has very steep slope around stoich but is very flat outside of that.

Aries_Turbo
07-01-2008, 03:53 PM
I know that lc-1's can be setup to fool the ecu based upon the simulated narroband output, but that's no good for the techedge and zietronics folks.

techedge can be reprogrammed to emit a false signal.

Brian

Frank
07-01-2008, 04:31 PM
I think the concern is that the WB signal is fairly linear over the range (completely linear if you use a corrected output of your gauge), while the NB signal has very steep slope around stoich but is very flat outside of that.

Oh I understand that. My point is that, the LM or any computer, should somewhere have a table that equates the NB voltage to an AF. If we re-write that table to equate WB voltage to AF, we should be good. Of course this is just theory.

MiniMopar
07-01-2008, 04:37 PM
Oh I understand that. My point is that, the LM or any computer, should somewhere have a table that equates the NB voltage to an AF. If we re-write that table to equate WB voltage to AF, we should be good. Of course this is just theory.

OK, yeah. I don't think there is an actual table for that. At least not in the LM code. There should be a constant or two marking the position of the "neutral zone" boundaries, but the behavior beyond that is implicit in the autocal values. What I mean is that because the voltage-per-AF-ratio changes so quickly in a NB sensor around the neutral zone compared to the WB, the mixture may end up bouncing much further than it should around stoich. At least that is how I understand it.

But yeah, as Brian mentioned the TE NB output is tweakable and I intend to take advantage of that fact (at some point). :D

risen
07-01-2008, 05:30 PM
techedge can be reprogrammed to emit a false signal.

Brian

me = techedge n00b.

I'm still sort of interested in how the very linear output of the wideband would act with normal 02 routines. .34 v is around 1 afr on the standard innovate scale. So .5v is around 1.5 afr, and that's the normal sweep of my o2. I'm wondering if the additional accuracy would help things any, but looking at it from a raw math (albeit, back of the envelope) standpoint, it doesn't seem any better.

I was also wondering how hard it would be to gut the o2 routines and make them seek a target afr instead of the toggling and kicks setup. This way you could set a value and just have it seek that value using something like the WG routines.

MiniMopar
07-01-2008, 05:46 PM
I was also wondering how hard it would be to gut the o2 routines and make them seek a target afr instead of the toggling and kicks setup. This way you could set a value and just have it seek that value using something like the WG routines.

The toggling is mainly an emissions thing as I understand it. It's needed to keep the cat happy/healthy. Some oscillation is inevitable in a complicated system with feedback, so they just turned it into something useful I guess.

Frank
07-01-2008, 06:06 PM
OK, yeah. I don't think there is an actual table for that. At least not in the LM code. There should be a constant or two marking the position of the "neutral zone" boundaries, but the behavior beyond that is implicit in the autocal values. What I mean is that because the voltage-per-AF-ratio changes so quickly in a NB sensor around the neutral zone compared to the WB, the mixture may end up bouncing much further than it should around stoich. At least that is how I understand it.


So you are saying the system tends to seek an O2 voltage, not an AF? If that is the case, then translating those boundaries and cells would just be as much as scaling them for the new voltage values within the wideband linear curve.

MiniMopar
07-01-2008, 06:09 PM
So you are saying the system tends to seek an O2 voltage, not an AF? If that is the case, then translating those boundaries and cells would just be as much as scaling them for the new voltage values within the wideband linear curve.

I think that is what Rob is suggesting, but I think those values are deltas from some current voltage to some target voltage. Or perhaps I have no idea what I am talking about.

risen
07-01-2008, 06:10 PM
The toggling is mainly an emissions thing as I understand it. It's needed to keep the cat happy/healthy. Some oscillation is inevitable in a complicated system with feedback, so they just turned it into something useful I guess.

<sarcasam> What's a cat? </sarcasam> :eyebrows:

CT emissions are every 2 years for cars newer than 25 years. I'm sure you can see where I'm going with this. 2 more trips and the CSX is done. 1 more trip and the glh-t is done.

I believe that cats "hold" o2 from when the engine was lean, and release it when rich so the toggling gives them o2 to hold. That was the 3rd grade explanation I found last time I wondered how one works.

I understand that you can never get rid of all oscillation, but with a 5v a/d converter and a linear w/b output, I bet you could get it within +/- .2 or .3 afr.

MiniMopar
07-01-2008, 06:14 PM
I understand that you can never get rid of all oscillation, but with a 5v a/d converter and a linear w/b output, I bet you could get it within +/- .2 or .3 afr.

Should be very doable, especially if the base fuel is dialed-in well.

ShelGame
07-01-2008, 09:18 PM
I think that is what Rob is suggesting, but I think those values are deltas from some current voltage to some target voltage. Or perhaps I have no idea what I am talking about.

My understanding (not that it's 100% correct) is that the 'kicks' are timer counts allowed before the A/F is corrected the opposite direction. So, if the a/f is going leaner, it's allowed to go lean until the timer matches the 'lean' kicks value, then it richens the mixture up until it reaches the 'rich' kicks value. This is what causes the toggling effect. So, if you increase the 'lean' kicks value (or decrease the rich kicks value), you move the middle of the range to the lean side. Of course, you need to do it for the correct cells (or maybe all the cells).

Frank
07-01-2008, 09:26 PM
My understanding (not that it's 100% correct) is that the 'kicks' are timer counts allowed before the A/F is corrected the opposite direction. So, if the a/f is going leaner, it's allowed to go lean until the timer matches the 'lean' kicks value, then it richens the mixture up until it reaches the 'rich' kicks value. This is what causes the toggling effect. So, if you increase the 'lean' kicks value (or decrease the rich kicks value), you move the middle of the range to the lean side. Of course, you need to do it for the correct cells (or maybe all the cells).

So is there a table that equates o2 voltage to a/f? Or does it kick based on voltage values, not a/f.

Aries_Turbo
07-01-2008, 11:12 PM
its just voltage frank, im pretty sure.

Brian

risen
07-01-2008, 11:22 PM
So is there a table that equates o2 voltage to a/f? Or does it kick based on voltage values, not a/f.

I don't think it uses a/f directly. I think it just looks to see whether or not the o2 voltage is above or below .5v (which would be 14.7) . I haven't read any of the o2 code, but based upon what Rob says above:

if o2 volts > .5v wait until timer is counted down, then richen mixture
if o2 volts < .5v wait until time is counted down, then lean mixture out

ShelGame
07-02-2008, 06:51 AM
So is there a table that equates o2 voltage to a/f? Or does it kick based on voltage values, not a/f.


Voltage.

Frank
07-02-2008, 08:04 AM
Voltage.

gotcha.

So what would it take for us to remap the current parameters to look at the new voltages instead of using a transfer function, which unfortunely I think doesn't do much more then our NB outputs from our WB kits. I would love to see us target the new voltage and be able to tighten up the bouncing, etc.

Frank
07-02-2008, 08:53 AM
; *****************************************
; For each cell, the first number is "rich", the second is "lean".
; If the O2 sensor is returning a lean value, "rich" kicks are added.
; If the O2 sensor is returning a rich value, "lean" kicks are added.
;
; KICK - (factor * 512) - 512 (unsigned number)
; eg: $19 - 1.05 * 512 - 512 - 5%
; *****************************************
; KICKS
; Rich, Lean
chem 4 n O2PrimaryRampKickCell0 x 0 65535 y Y 0 255 out PRIRMP Kick_Cell0_PrimaryRamp
db $1a, $04 ; Cell 0


Rob,
Can you help me out with this code? I guess I don't understand that math up there. I understand that the rich kick is $1a while the lean kick is $04. What I don't understand is the whole match and what that relates to. The example doesn't make much scense to me.

Thanks,
Frank


PS> If you use the code tags, you can keep the formats and spacing, etc.

Frank
07-02-2008, 10:06 AM
I think this should be changed...


CheckIfO2SensorDataIsValid:
lda RawO2Sensor ; load a with memory contents
cmpa O2TLMH_O2HighLimitDelayedClosedLoop ; compare a with memory contents (data is 1f)
bhs L1257 ; branch if greater or equal
cmpa O2TLML_O2LowLimitDelayedClosedLoop ; compare a with memory contents (data is 0f)
bhs L1253 ; branch if greater or equal
; O2 sensor has now traveled outside of the .35 to .55 volt range, which means
; it is likely returning real data.

to



; O2 sensor has not traveled outside of the .35 to .55 volt range, which means
; it is likely returning real data.

ShelGame
07-02-2008, 10:53 AM
I think this should be changed...


CheckIfO2SensorDataIsValid:
lda RawO2Sensor ; load a with memory contents
cmpa O2TLMH_O2HighLimitDelayedClosedLoop ; compare a with memory contents (data is 1f)
bhs L1257 ; branch if greater or equal
cmpa O2TLML_O2LowLimitDelayedClosedLoop ; compare a with memory contents (data is 0f)
bhs L1253 ; branch if greater or equal
; O2 sensor has now traveled outside of the .35 to .55 volt range, which means
; it is likely returning real data.

to



; O2 sensor has not traveled outside of the .35 to .55 volt range, which means
; it is likely returning real data.

I think you're probably right on that.

As to the math - no I don't really get it either. I don't know where the 'factor' comes from. And, I don't know what the significance of the 5% is (I guess it's 5% rich or lean?). I didn't write that, it's from the origianl BB60 source (Geoff).

My understanding of how the systems works may not be exactly correct. But, I do know that shifting the kicks toward the lean side will make the engine run leaner in closed loop (and vice-versa to the rich side).

Frank
07-02-2008, 02:29 PM
Ok, I think I figured it out....

The code snipt below is the amount to change by...



; *****************************************
; For each cell, the first number is "rich", the second is "lean".
; If the O2 sensor is returning a lean value, "rich" kicks are added.
; If the O2 sensor is returning a rich value, "lean" kicks are added.
;
; KICK - (factor * 512) - 512 (unsigned number)
; eg: $19 - 1.05 * 512 - 512 - 5%
; *****************************************
; KICKS
; Rich, Lean
chem 4 n O2PrimaryRampKickCell0 x 0 65535 y Y 0 255 out PRIRMP Kick_Cell0_PrimaryRamp
db $1a, $04 ; Cell 0


What I missed was key wording that says, if lean, then hit it with the rich kicks. If it is rich, then hit it with lean kicks. What that really says, that if it is below 0.35 volts (lean), as determined elsewhere in the code, then to hit it with $04 which is to make it push towards 0.55 volts (rich). If it is rich, then use $1A.

So it looks like you can adjust the O2 voltage limits in the code here...


O2HSWP_O2HighLimitForRampSwitching:
chem 3 n O2HighLimitForRampSwitching O2 0 255 none Y 0 255 out O2HSWP Compared_with_raw_O2_sensor_signal_to_determine_to ggle._$19_stock._O2_sensor_range_is_$00_to_$2f
chem2 byte O2HSWP "Compared with Raw O2 signal for switching toggles. This is the high limit"
db $19
O2LSWP_O2LowLimitForRampSwitching:
chem 3 n O2LowLimitForRampSwitching O2 0 255 none Y 0 255 out O2LSWP Compared_with_raw_O2_sensor_signal_to_determine_to ggle._$18_stock._O2_sensor_range_is_$00_to_$2f
chem2 byte O2LSWP "Compared with Raw O2 signal for switching toggles. This is the low limit"
db $18
; *****************************************
O2TLMH_O2HighLimitDelayedClosedLoop:
chem 3 n O2HighLimitDelayedClosedLoop O2 0 255 none Y 0 255 out O2TLMH O2_Sensor_High_Limit_for_delayed_switch_to_closed_ loop._$1f_stock._O2_sensor_range_is_$00_to_$2f
chem2 byte O2TLMH "Compared with Raw O2 signal for Delayed switch to Closed Loop"
db $1f
O2TLML_O2LowLimitDelayedClosedLoop:
chem 3 n O2LowLimitDelayedClosedLoop O2 0 255 none Y 0 255 out O2TLML O2_Sensor_Low_Limit_for_delayed_switch_to_closed_l oop._$0f_stock._O2_sensor_range_is_$00_to_$2f
chem2 byte O2TLML "Compared with Raw O2 signal for Delayed switch to Closed Loop"
db $0f
; *****************************************
O2MIDH_O2HighLimitForMidLevelDetermination:
chem 3 n O2HighLimitForMidLevelDetermination O2 0 255 none Y 0 255 out O2MIDH O2_Sensor_High_Limit_for_In-Middle_determination._$1c_stock._O2_sensor_range_i s_$00_to_$2f
chem2 byte O2MIDH "Compared with Raw O2 signal for In-Middle determination"
db $1c
O2MIDL_O2LowLimitForMidLevelDetermination:
chem 3 n O2LowLimitForMidLevelDetermination O2 0 255 none Y 0 255 out O2MIDL O2_Sensor_Low_Limit_for_In-Middle_determination._$12_stock._O2_sensor_range_i s_$00_to_$2f
chem2 byte O2MIDL "Compared with Raw O2 signal for In-Middle determination"
db $12

I think we would have to determine what the values like $1C or $12 relate too, but if I am right, they would just need to be scaled for the equivelent wideband voltages.

If that works, then we should be able to tighten up the ramp switching limits since rich and lean conditions are more clearly defined. By adjusting those, we won't need to touch the cells too much. We may have to reduce the kick sizes to ensure that you could fail at meeting the center of the rich/lean so that autocal would still work.

However there are some clitches. We would still need to use the NB out of our WB setups. So that we dont have to change the 'greater than' or 'less than' logics in the code. What we would need to do is modify the NB out to be the inverse of the WB. This would be because the A/D for the O2 sensor is more then likely not setup for the voltage levels of the WB out. In addition, the A/F to voltage is in the wrong direction.

So all in all, modify the NB out to be the inverse of the WB out. Modify the O2 limit values and then see how much you can tighten the kick and auto cal values.


OR I COULD BE CRAZY!

cordes
07-02-2008, 02:49 PM
So perhaps we could just bump up all of the limits and it would then raise the target voltage (and therefore AF) but the autocal would still seek the midrange like it should, just at a higher AF?

Frank
07-02-2008, 03:06 PM
So perhaps we could just bump up all of the limits and it would then raise the target voltage (and therefore AF) but the autocal would still seek the midrange like it should, just at a higher AF?

From the looks of it, nothing really seeks anything. It looks like, according to the code explination, that when rich is hit, to decrease fuel in until lean is hit, then to increase fuel until rich is hit. The amount to decrease is defined by the kick value. If it doesn't hit the rich or lean condition by the time it reaches the limits, then it adjusts the autocal cells.

Frank
07-02-2008, 04:50 PM
Figured out what those values are.... well an approximate. I used the standard NB lookup. That gives you a reference....


hex dec volts a/f
19 25 0.44 14.60
18 24 0.42 14.62

1F 31 0.54 14.51
0F 15 0.26 14.77

1C 28 0.49 14.56
12 18 0.32 14.71

risen
07-02-2008, 04:51 PM
Ok, I think I figured it out....

The code snipt below is the amount to change by...



; *****************************************
; For each cell, the first number is "rich", the second is "lean".
; If the O2 sensor is returning a lean value, "rich" kicks are added.
; If the O2 sensor is returning a rich value, "lean" kicks are added.
;
; KICK - (factor * 512) - 512 (unsigned number)
; eg: $19 - 1.05 * 512 - 512 - 5%
; *****************************************
; KICKS
; Rich, Lean
chem 4 n O2PrimaryRampKickCell0 x 0 65535 y Y 0 255 out PRIRMP Kick_Cell0_PrimaryRamp
db $1a, $04 ; Cell 0


What I missed was key wording that says, if lean, then hit it with the rich kicks. If it is rich, then hit it with lean kicks. What that really says, that if it is below 0.35 volts (lean), as determined elsewhere in the code, then to hit it with $04 which is to make it push towards 0.55 volts (rich). If it is rich, then use $1A.

So it looks like you can adjust the O2 voltage limits in the code here...


O2HSWP_O2HighLimitForRampSwitching:
chem 3 n O2HighLimitForRampSwitching O2 0 255 none Y 0 255 out O2HSWP Compared_with_raw_O2_sensor_signal_to_determine_to ggle._$19_stock._O2_sensor_range_is_$00_to_$2f
chem2 byte O2HSWP "Compared with Raw O2 signal for switching toggles. This is the high limit"
db $19
O2LSWP_O2LowLimitForRampSwitching:
chem 3 n O2LowLimitForRampSwitching O2 0 255 none Y 0 255 out O2LSWP Compared_with_raw_O2_sensor_signal_to_determine_to ggle._$18_stock._O2_sensor_range_is_$00_to_$2f
chem2 byte O2LSWP "Compared with Raw O2 signal for switching toggles. This is the low limit"
db $18
; *****************************************
O2TLMH_O2HighLimitDelayedClosedLoop:
chem 3 n O2HighLimitDelayedClosedLoop O2 0 255 none Y 0 255 out O2TLMH O2_Sensor_High_Limit_for_delayed_switch_to_closed_ loop._$1f_stock._O2_sensor_range_is_$00_to_$2f
chem2 byte O2TLMH "Compared with Raw O2 signal for Delayed switch to Closed Loop"
db $1f
O2TLML_O2LowLimitDelayedClosedLoop:
chem 3 n O2LowLimitDelayedClosedLoop O2 0 255 none Y 0 255 out O2TLML O2_Sensor_Low_Limit_for_delayed_switch_to_closed_l oop._$0f_stock._O2_sensor_range_is_$00_to_$2f
chem2 byte O2TLML "Compared with Raw O2 signal for Delayed switch to Closed Loop"
db $0f
; *****************************************
O2MIDH_O2HighLimitForMidLevelDetermination:
chem 3 n O2HighLimitForMidLevelDetermination O2 0 255 none Y 0 255 out O2MIDH O2_Sensor_High_Limit_for_In-Middle_determination._$1c_stock._O2_sensor_range_i s_$00_to_$2f
chem2 byte O2MIDH "Compared with Raw O2 signal for In-Middle determination"
db $1c
O2MIDL_O2LowLimitForMidLevelDetermination:
chem 3 n O2LowLimitForMidLevelDetermination O2 0 255 none Y 0 255 out O2MIDL O2_Sensor_Low_Limit_for_In-Middle_determination._$12_stock._O2_sensor_range_i s_$00_to_$2f
chem2 byte O2MIDL "Compared with Raw O2 signal for In-Middle determination"
db $12

I think we would have to determine what the values like $1C or $12 relate too, but if I am right, they would just need to be scaled for the equivelent wideband voltages.

If that works, then we should be able to tighten up the ramp switching limits since rich and lean conditions are more clearly defined. By adjusting those, we won't need to touch the cells too much. We may have to reduce the kick sizes to ensure that you could fail at meeting the center of the rich/lean so that autocal would still work.

However there are some clitches. We would still need to use the NB out of our WB setups. So that we dont have to change the 'greater than' or 'less than' logics in the code. What we would need to do is modify the NB out to be the inverse of the WB. This would be because the A/D for the O2 sensor is more then likely not setup for the voltage levels of the WB out. In addition, the A/F to voltage is in the wrong direction.

So all in all, modify the NB out to be the inverse of the WB out. Modify the O2 limit values and then see how much you can tighten the kick and auto cal values.


OR I COULD BE CRAZY!

I'm pretty sure that the a/d converters in the LM are all the same 0-5v 8 bit a/d converters. The values are compared to the o2 sensor volts based upon the output from a/d converter. That's the reason the max is 2f (1v = 0x33 slightly larger than 0x2f). If the mid points, and max/min points are all able to be set like that we may only need to scale the size of the kicks so that it's enough of a correction.

Frank
07-02-2008, 05:06 PM
I'm pretty sure that the a/d converters in the LM are all the same 0-5v 8 bit a/d converters. The values are compared to the o2 sensor volts based upon the output from a/d converter. That's the reason the max is 2f (1v = 0x33 slightly larger than 0x2f). If the mid points, and max/min points are all able to be set like that we may only need to scale the size of the kicks so that it's enough of a correction.

If we setup our NB out to be linear where 1-volts @ 9-a/f and 0-volts @ 19-a/f, then all we have to do is scale the max/mins to the new voltages and then mess with the kicks. Pretty simple. I may do this on Saturday.

risen
07-02-2008, 05:46 PM
If we setup our NB out to be linear where 1-volts @ 9-a/f and 0-volts @ 19-a/f, then all we have to do is scale the max/mins to the new voltages and then mess with the kicks. Pretty simple. I may do this on Saturday.

I'd be a bit concerned about the minimum granularity of the a/d converter. You may get huge toggles using that wide a sweep. Insetad of .1 volt being a few fractions of an afr on a narrowband, it's now closer to a full afr. Try it and let us know how it works. Or maybe try like 0v = 13a/f and 1v=16 af. (or some variation that puts 14.7 in the middle).

Once I get some other wiring work done on my car I'm going to try and revamp the max/min limits so you can use the whole 0-5v sweep and see how that goes.

Frank
07-02-2008, 07:14 PM
I'd be a bit concerned about the minimum granularity of the a/d converter. You may get huge toggles using that wide a sweep. Insetad of .1 volt being a few fractions of an afr on a narrowband, it's now closer to a full afr. Try it and let us know how it works. Or maybe try like 0v = 13a/f and 1v=16 af. (or some variation that puts 14.7 in the middle).

Once I get some other wiring work done on my car I'm going to try and revamp the max/min limits so you can use the whole 0-5v sweep and see how that goes.

Well I guess it won't be that much work to do it full up right. I can use the WB out. But the problem is that my WB out is 0v @ 9af and 5v @ 19af. That means I need to change all of the greater then and less then statements. I guess that is not that hard. I will do it that way so I get the best 0-5v setup and maximize all of the 8-bits assigned to that A/D.

risen
07-02-2008, 08:51 PM
Well I guess it won't be that much work to do it full up right. I can use the WB out. But the problem is that my WB out is 0v @ 9af and 5v @ 19af. That means I need to change all of the greater then and less then statements. I guess that is not that hard. I will do it that way so I get the best 0-5v setup and maximize all of the 8-bits assigned to that A/D.

I thought one of your previous posts had the mid-points in it. Shouldn't it just be a matter of straddling those around 0x80 or 2.5V? I'm going to read the code later on, so I stop with all this conjecture.

MiniMopar
07-03-2008, 12:43 AM
Catching up on this thread. Frank, I think you translated that code comment correctly. I was not able to wrap my head around it either until now...assuming it was trying to be correct in the first place. If the kicks are indeed timer values then I understand how you could use them to make the "average" mixture a little leaner or richer.

The stock cal is probably setup to handle a fair amount of variance in the sensor output. Tolerances in the wiring and the sensor and so forth need to be taken into account. The WB output should be more accurate, so you should be able to narrow the "neutral zone".

All that said, it just seems easier to feed the LM a conditioned WB signal using a tool that was meant for the job.

Frank
07-03-2008, 10:51 AM
Catching up on this thread. Frank, I think you translated that code comment correctly. I was not able to wrap my head around it either until now...assuming it was trying to be correct in the first place. If the kicks are indeed timer values then I understand how you could use them to make the "average" mixture a little leaner or richer.

The stock cal is probably setup to handle a fair amount of variance in the sensor output. Tolerances in the wiring and the sensor and so forth need to be taken into account. The WB output should be more accurate, so you should be able to narrow the "neutral zone".

All that said, it just seems easier to feed the LM a conditioned WB signal using a tool that was meant for the job.


Russ,
I finished the code. It is untested, but I am confident that it will work if you want to give it a try. Attached is the Turbonator V6 code that has been modified to accept the Techedge WB as the new O2 input. I documented all changes to the code. It was pretty straight forward suprisingly enough!!!

I also made changes to the chem code so that DCAL will treat those values literally as AFR since it is a nice linear curve unlike stock NB. I will eventually make it so it will be pretty in Chem2. Below are my additions and code snipets.

----------------------

Added...


; | FLK - Added/Changed code |
; | |
; | FLK01) Multiple changes have been made in this section. The first is all of|
; | the max O2 sensor ranges have been changed from $2F to $FF since the|
; | analog input is actually 0v to 5v. |
; | Since the Techedge WB output is linear, I have made a change to the |
; | table to show actual A/F target. The modifier is from hex to volts |
; | is volts = hex_to_dec * 0.01961. The modifier from volts to AFR is |
; | AFR = (volts * 2) + 9. |
; | I have also rescaled the original hex values to nb volts to nb afr |
; | curve and then used the formulas above to the nex hex values. |
; | FLK02) Reversed the branch if lower and branch if greater statements since |
; | the techedge output is lower voltage for richer afr unlike stock. |
; | *There are 4 instances of this change. |
; | |
; | Note 1) Search for the change identifier, i.e. FLK01 to find the changes. |
; | |
; | Note 2) Below is how I scaled the NB sensor values to WB sensor values. |
; | hex dec nb volts afr wb volts dec hex |
; | 19 25 0.49 14.56 2.78 142 8E |
; | 18 24 0.47 14.59 2.80 143 8F |
; | 1F 31 0.61 14.40 2.70 138 8A |
; | 0F 15 0.29 14.75 2.88 147 93 |
; | 1C 28 0.55 14.50 2.75 140 8C |
; | 12 18 0.35 14.70 2.85 145 91 |
; | |
; | Note 3) THIS IS FOR TECHEDGE WIDEBAND UNITS ONLY AT THIS TIME. |


----------------------

Original...


; *****************************************
; For detecting toggles
; *****************************************
O2HSWP_O2HighLimitForRampSwitching:
chem 3 n O2HighLimitForRampSwitching O2 0 255 none Y 0 255 out O2HSWP Compared_with_raw_O2_sensor_signal_to_determine_to ggle._$19_stock._O2_sensor_range_is_$00_to_$2f
chem2 byte O2HSWP "Compared with Raw O2 signal for switching toggles. This is the high limit"
db $19
O2LSWP_O2LowLimitForRampSwitching:
chem 3 n O2LowLimitForRampSwitching O2 0 255 none Y 0 255 out O2LSWP Compared_with_raw_O2_sensor_signal_to_determine_to ggle._$18_stock._O2_sensor_range_is_$00_to_$2f
chem2 byte O2LSWP "Compared with Raw O2 signal for switching toggles. This is the low limit"
db $18
; *****************************************
O2TLMH_O2HighLimitDelayedClosedLoop:
chem 3 n O2HighLimitDelayedClosedLoop O2 0 255 none Y 0 255 out O2TLMH O2_Sensor_High_Limit_for_delayed_switch_to_closed_ loop._$1f_stock._O2_sensor_range_is_$00_to_$2f
chem2 byte O2TLMH "Compared with Raw O2 signal for Delayed switch to Closed Loop"
db $1f
O2TLML_O2LowLimitDelayedClosedLoop:
chem 3 n O2LowLimitDelayedClosedLoop O2 0 255 none Y 0 255 out O2TLML O2_Sensor_Low_Limit_for_delayed_switch_to_closed_l oop._$0f_stock._O2_sensor_range_is_$00_to_$2f
chem2 byte O2TLML "Compared with Raw O2 signal for Delayed switch to Closed Loop"
db $0f
; *****************************************
O2MIDH_O2HighLimitForMidLevelDetermination:
chem 3 n O2HighLimitForMidLevelDetermination O2 0 255 none Y 0 255 out O2MIDH O2_Sensor_High_Limit_for_In-Middle_determination._$1c_stock._O2_sensor_range_i s_$00_to_$2f
chem2 byte O2MIDH "Compared with Raw O2 signal for In-Middle determination"
db $1c
O2MIDL_O2LowLimitForMidLevelDetermination:
chem 3 n O2LowLimitForMidLevelDetermination O2 0 255 none Y 0 255 out O2MIDL O2_Sensor_Low_Limit_for_In-Middle_determination._$12_stock._O2_sensor_range_i s_$00_to_$2f
chem2 byte O2MIDL "Compared with Raw O2 signal for In-Middle determination"
db $12

New...


; *****************************************
; For detecting toggles
; *****************************************
; FLK01) Multiple changes have been made in this section. The first is all of
; the max O2 sensor ranges have been changed from $2F to $FF since the
; analog input is actually 0v to 5v.
; Since the Techedge WB output is linear, I have made a change to the
; table to show actual A/F target. The modifier is from hex to volts
; is volts = hex_to_dec * 0.01961. The modifier from volts to AFR is
; AFR = (volts * 2) + 9.
; I have also rescaled the original hex values to nb volts to nb afr
; curve and then used the formulas above to the nex hex values.
;
O2HSWP_O2HighLimitForRampSwitching:
chem 3 n O2HighLimitForRampSwitching O2 0 255 none Y 9 19 AFR O2HSWP Compared_with_raw_O2_sensor_signal_to_determine_to ggle._Stock_AFR_is_14.56._O2_sensor_range_is_now_a n_AFR_of_9_to_19
chem2 byte O2HSWP "Compared with Raw O2 signal for switching toggles. This is the high limit"
db $8E
O2LSWP_O2LowLimitForRampSwitching:
chem 3 n O2LowLimitForRampSwitching O2 0 255 none Y 9 19 AFR O2LSWP Compared_with_raw_O2_sensor_signal_to_determine_to ggle._Stock_AFR_is_14.59._O2_sensor_range_is_now_a n_AFR_of_9_to_19
chem2 byte O2LSWP "Compared with Raw O2 signal for switching toggles. This is the low limit"
db $8F
; *****************************************
O2TLMH_O2HighLimitDelayedClosedLoop:
chem 3 n O2HighLimitDelayedClosedLoop O2 0 255 none Y 9 19 AFR O2TLMH O2_Sensor_High_Limit_for_delayed_switch_to_closed_ loop._Stock_AFR_is_14.40._O2_sensor_range_is_now_a n_AFR_of_9_to_19
chem2 byte O2TLMH "Compared with Raw O2 signal for Delayed switch to Closed Loop"
db $8A
O2TLML_O2LowLimitDelayedClosedLoop:
chem 3 n O2LowLimitDelayedClosedLoop O2 0 255 none Y 9 19 AFR O2TLML O2_Sensor_Low_Limit_for_delayed_switch_to_closed_l oop._Stock_AFR_is_14.75._O2_sensor_range_is_now_an _AFR_of_9_to_19
chem2 byte O2TLML "Compared with Raw O2 signal for Delayed switch to Closed Loop"
db $93
; *****************************************
O2MIDH_O2HighLimitForMidLevelDetermination:
chem 3 n O2HighLimitForMidLevelDetermination O2 0 255 none Y 9 19 AFR O2MIDH O2_Sensor_High_Limit_for_In-Middle_determination._Stock_AFR_is_14.50._O2_senso r_range_is_now_an_AFR_of_9_to_19
chem2 byte O2MIDH "Compared with Raw O2 signal for In-Middle determination"
db $8C
O2MIDL_O2LowLimitForMidLevelDetermination:
chem 3 n O2LowLimitForMidLevelDetermination O2 0 255 none Y 9 19 AFR O2MIDL O2_Sensor_Low_Limit_for_In-Middle_determination._Stock_AFR_is_14.70._O2_senso r_range_is_now_an_AFR_of_9_to_19
chem2 byte O2MIDL "Compared with Raw O2 signal for In-Middle determination"
db $91


----------------------

Original...


lda RawO2Sensor ; load a with memory contents
cmpa O2MIDL_O2LowLimitForMidLevelDetermination ; compare a with memory contents (data is 12)
blo L1048 ; branch if lower
cmpa O2MIDH_O2HighLimitForMidLevelDetermination ; compare a with memory contents (data is 1c)
bhs L1048 ; branch if greater or equal


New...


lda RawO2Sensor ; load a with memory contents of the O2 Sensor
; FLK02) Reversed the branch if lower and branch if greater statements since the
; techedge output is lower voltage for richer afr unlike stock.
cmpa O2MIDL_O2LowLimitForMidLevelDetermination ; compare a with memory contents (data is 12)
bhs L1048 ; branch if greater or equal
cmpa O2MIDH_O2HighLimitForMidLevelDetermination ; compare a with memory contents (data is 1c)
blo L1048 ; branch if lower
; end change


----------------------

Original...


lda RawO2Sensor ; load a with memory contents
ldb #$ff ; load b with value -11111111-
cmpa O2MIDH_O2HighLimitForMidLevelDetermination ; compare a with memory contents (data is 1c)
bhi L1209 ; branch if higher
cmpa O2MIDL_O2LowLimitForMidLevelDetermination ; compare a with memory contents (data is 12)
bhi L1210 ; branch if higher

New...


lda RawO2Sensor ; load a with memory contents
ldb #$ff ; load b with value -11111111-
; FLK02) Reversed the branch if lower and branch if greater statements since the
; techedge output is lower voltage for richer afr unlike stock.
cmpa O2MIDH_O2HighLimitForMidLevelDetermination ; compare a with memory contents (data is 8C)
bhi L1210 ; branch if higher
cmpa O2MIDL_O2LowLimitForMidLevelDetermination ; compare a with memory contents (data is 91)
bhi L1209 ; branch if higher
; end of change


----------------------

Original...


lda RawO2Sensor ; load a with memory contents
cmpa O2TLMH_O2HighLimitDelayedClosedLoop ; compare a with memory contents (data is 1f)
bhs L1257 ; branch if greater or equal
cmpa O2TLML_O2LowLimitDelayedClosedLoop ; compare a with memory contents (data is 0f)
bhs L1253 ; branch if greater or equal
; O2 sensor has now traveled outside of the .35 to .55 volt range, which means
; it is likely returning real data.
L1257: clra ; a = 0
sta L00B1 ; store a into memory
sta Timer_CLTIME_ClosedLoopTimer ; store a into memory
lda BitFlags81 ; load a with memory contents
ora #b81_bit4 ; -00010000-
L1252: sta BitFlags81 ; store a into memory
L1253: clra ; a = 0
sta SecondaryO2ControllerKicks_Signed ; store a into memory
rts ; return from subroutine

L1255: clrb ; b = 0
lda RawO2Sensor ; load a with memory contents
cmpa O2MIDH_O2HighLimitForMidLevelDetermination ; compare a with memory contents (data is 1c)
bhs L1258 ; branch if greater or equal
cmpa O2MIDL_O2LowLimitForMidLevelDetermination ; compare a with memory contents (data is 12)
blo L1258 ; branch if lower

New...


lda RawO2Sensor ; load a with memory contents
; FLK02) Reversed the branch if lower and branch if greater statements since the
; techedge output is lower voltage for richer afr unlike stock.
cmpa O2TLMH_O2HighLimitDelayedClosedLoop ; compare a with memory contents (data is 8C)
bhs L1253 ; branch if greater or equal
cmpa O2TLML_O2LowLimitDelayedClosedLoop ; compare a with memory contents (data is 91)
bhs L1257 ; branch if greater or equal
; O2 sensor has now traveled outside of the *2.75* to *2.85* volt range, which means
; it is likely returning real data.
; end of change
L1257: clra ; a = 0
sta L00B1 ; store a into memory
sta Timer_CLTIME_ClosedLoopTimer ; store a into memory
lda BitFlags81 ; load a with memory contents
ora #b81_bit4 ; -00010000-
L1252: sta BitFlags81 ; store a into memory
L1253: clra ; a = 0
sta SecondaryO2ControllerKicks_Signed ; store a into memory
rts ; return from subroutine

L1255: clrb ; b = 0
lda RawO2Sensor ; load a with memory contents
; FLK02) Reversed the branch if lower and branch if greater statements since the
; techedge output is lower voltage for richer afr unlike stock.
cmpa O2MIDH_O2HighLimitForMidLevelDetermination ; compare a with memory contents (data is 8c)
blo L1258 ; branch if lower
cmpa O2MIDL_O2LowLimitForMidLevelDetermination ; compare a with memory contents (data is 91)
bhs L1258 ; branch if greater or equal
; end of change



----------------------

Supporting information...
http://www.wbo2.com/2a0/afrnb.gifhttp://www.wbo2.com/2a0/afrlin.gif

If you look at the Wideband graph here, this is why I had to change/reverse the branch statements in the code. The te Wideband output has less voltage for rich conditions. Since the asm code is written to look at voltages, not AFR, they had to be reversed.

Once I find out if this works, I will create a full release where the WB unit type can be selected before it is compiled.

Frank


***FILES REMOVED - WILL POST WHEN CODE REWORKED MORE COMPLETELY***

Frank
07-03-2008, 11:12 AM
There was a slight mistake in some minor documentation. I have since fixed it. Anything before 11:05 AM EST should be ignored. Thanks!

risen
07-03-2008, 12:06 PM
Hell yeah, Frank. Since you've already done all the hard work we innovate users will either have to adjust the output on the lc-1 to match the techedge output or change the values so that the mid point is 2.45 V (per below). I can give the hex values for the actual code if anyone wants them. If I get to adding innovate values before anyone else does, I would like to make the techedge/innovate mid points selectable with either a build time option or a bitflag. Maybe when I get to it Rob will weigh in as to how he would like it added into the cal.

Innovate's manual says this about the default w/b output:

As factory programmed the first output simulates a typical narrow band oxygen sensor. The
second output is programmed to output between 0 V for an AFR of 7.35 (gasoline) and 5.0V for
an AFR of 22.39. Other curves of course are easily programmable.

MiniMopar
07-03-2008, 12:07 PM
Thanks, Frank. Looks straight forward enough. I'll need to reroute the O2 signal to try this, but I've been meaning to run some different discreet signals back to the the TE module anyway. I'll let you know what happens!

MiniMopar
07-03-2008, 12:10 PM
As factory programmed the first output simulates a typical narrow band oxygen sensor. The
second output is programmed to output between 0 V for an AFR of 7.35 (gasoline) and 5.0V for
an AFR of 22.39. Other curves of course are easily programmable.

Yeah the TE is nicely conditioned, but you could tweak the constants to work with the Innovate as long as you know the transfer function.

risen
07-03-2008, 12:18 PM
Yeah the TE is nicely conditioned, but you could tweak the constants to work with the Innovate as long as you know the transfer function.

For a default lc-1 w/b output it's linear. The above mentioned voltage points are the max and min, and 2.45 is 14.7 (calcualted from the above points). I figured I'd toss the info out there in case someone else with a lc-1 wants to try it. I'm going to try it eventaully, but I'm not in a hurry :) .

Frank
07-03-2008, 12:18 PM
Hell yeah, Frank. Since you've already done all the hard work we innovate users will either have to adjust the output on the lc-1 to match the techedge output or change the values so that the mid point is 2.45 V (per below). I can give the hex values for the actual code if anyone wants them. If I get to adding innovate values before anyone else does, I would like to make the techedge/innovate mid points selectable with either a build time option or a bitflag. Maybe when I get to it Rob will weigh in as to how he would like it added into the cal.

Innovate's manual says this about the default w/b output:

As factory programmed the first output simulates a typical narrow band oxygen sensor. The
second output is programmed to output between 0 V for an AFR of 7.35 (gasoline) and 5.0V for
an AFR of 22.39. Other curves of course are easily programmable.


Yeah the TE is nicely conditioned, but you could tweak the constants to work with the Innovate as long as you know the transfer function.


Well hopefully I will be able to give this a testing on Saturday. If it works, I will work on adding the Innovate, the Zen, and the TE so you just select it and compile. We can then get Rob to roll these into his Turbonator code.

I will have my scanner hooked up on Saturday to ensure that the O2 voltages match the WB and that the Rich/Lean conditions toggle accordingly.

Thanks,
Frank

Frank
07-03-2008, 12:26 PM
For a default lc-1 w/b output it's linear. The above mentioned voltage points are the max and min, and 2.45 is 14.7 (calcualted from the above points). I figured I'd toss the info out there in case someone else with a lc-1 wants to try it. I'm going to try it eventaully, but I'm not in a hurry :) .

Yep. The Zentronix unit is 0v to 5v with 2.55 being 14.7. It is too similar to the TE unit. The Zen is AFR=(V*2)+9.6 so the 0v is 9.6 AFR and 5v is 19.6 AFR.

If you can get me similar information for the Innovate, I can implement that real easily.


Frank

MiniMopar
07-03-2008, 12:36 PM
The other side of this coin...I don't know about all of you but I don't plan to keep the WB in the Daytona forever. I almost took it out already since BB60 is tuned perfect for it, but now I need to tune this cal. Rather than buy another one, my intent was to move it to the CSX and tune that with it. Also, the sensor's expected lifetime is much lower than a stock NB.

Just food for thought....

Frank
07-03-2008, 12:48 PM
The other side of this coin...I don't know about all of you but I don't plan to keep the WB in the Daytona forever. I almost took it out already since BB60 is tuned perfect for it, but now I need to tune this cal. Rather than buy another one, my intent was to move it to the CSX and tune that with it. Also, the sensor's expected lifetime is much lower than a stock NB.

Just food for thought....


Well my plan is to keep using the WB in my car even though it is near stock. Since I don't run a cat, I plan on making it more closely have high O2 feedback. I am also going to make more changes to the car over a longer period of time - full 2.5" exhaust, better incooler or alky, etc. I don't plan on going past 15psi though.

It is also the main reason why I bought the C20 unit... simple. The daytona will get the crazy unit so I can log 2 inputs (fuel pressure and and a bosch wb knock sensor) and 4 EGT probes.


Frank


Frank

risen
07-03-2008, 01:06 PM
Well my plan is to keep using the WB in my car even though it is near stock. Since I don't run a cat, I plan on making it more closely have high O2 feedback. I am also going to make more changes to the car over a longer period of time - full 2.5" exhaust, better incooler or alky, etc. I don't plan on going past 15psi though.

It is also the main reason why I bought the C20 unit... simple. The daytona will get the crazy unit so I can log 2 inputs (fuel pressure and and a bosch wb knock sensor) and 4 EGT probes.


Frank


Frank

I'm not planning on removing mine, 250$ is cheap insurance to keep things together. After I had a fuel pump dying on me, I don't think I'll ever not have a w/b on a boosted car. The car seemed normal, but the afr's would creep up in boost. On one hard run in boost it was almost 16:1 @ 20 psi, I lifted my foot with a quickness. I understand how people destroy engines with weak fuel pumps and my w/b saved my engine.

MiniMopar
07-03-2008, 03:01 PM
I'm not planning on removing mine, 250$ is cheap insurance to keep things together. After I had a fuel pump dying on me, I don't think I'll ever not have a w/b on a boosted car. The car seemed normal, but the afr's would creep up in boost. On one hard run in boost it was almost 16:1 @ 20 psi, I lifted my foot with a quickness. I understand how people destroy engines with weak fuel pumps and my w/b saved my engine.

Something like that would show up on a venerable NB meter, though. The 2A0 is still the cheapest way to go for TE, even though it is being phased-out, but I can't see myself getting another one plus the sensor and meter and all that. I'm still a fan of the NB meter as a diagnostic/reassurance tool. You just can't do a real tune with one. To each his or her own. :D

It will always be in one of my cars, but it will most likely stay in the wilder one.

risen
07-03-2008, 03:26 PM
Something like that would show up on a venerable NB meter, though. The 2A0 is still the cheapest way to go for TE, even though it is being phased-out, but I can't see myself getting another one plus the sensor and meter and all that. I'm still a fan of the NB meter as a diagnostic/reassurance tool. You just can't do a real tune with one. To each his or her own. :D

It will always be in one of my cars, but it will most likely stay in the wilder one.

True, I hadn't thought about using the n/b. Both my cars have a lc-1 at the moment so I don't really have a reason to remove it.

Frank
07-05-2008, 09:18 PM
Well I didn't get a chance to try it out today. I got to a late start and all my efforts were dedicated to figuring out why hooking my LM to the TechEdge NB out was giving me fits! When I first hooked it up, I could not get it to run worth anything. I forgot that the NB out is not setup for NB out right away. I reprogrammed that out put and still no joy. So I reverted it back to stock and it would not start. GRRR!

If I hooked it back up to the TE, it would start, but would stutter alot. I started furiously ringing out some wiring, and found that my splice into the sensor ground (RED's Pin 25 - BK/LB) was hosed. So repaired that and whala! So then I hooked it back up to the TE and all is well again. Now that I have that golden, I just need to finish taking my compiled version of the WB Turbonator and making it match my current cal. Then tomorrow, after church, I should be able to give it a swirl.

Stay tuned!

Aries_Turbo
07-05-2008, 09:39 PM
thats wierd frank, my techedge was setup right out of the box afaik. at least it works like it is.

Brian

Frank
07-05-2008, 09:51 PM
thats wierd frank, my techedge was setup right out of the box afaik. at least it works like it is.

Brian

Like I had mentioned over the phone. I think it got jacked up when I reflashed the Techedge a week ago.

bakes
07-06-2008, 11:39 PM
would it be posible when using a WB to set warning lamp say using the output on the upshift lamp to warn of a lean out at WOT ?

Frank
07-07-2008, 02:51 PM
Well I found some problems in the code and am in the process of reworking it. I found that changing the branch statements, while on the right track, would call the wrong subroutine. I also found some places that also need further updates. I will post a new version soon for testing.


Frank

Frank
07-07-2008, 03:24 PM
Here is a new version of the code. We shall see. I am awaiting the ability to scan the computer before I test. My current, borrowed scanner, wont read below a 1992. I am just going to wait for my USB stuff to show up to datalog.


Frank

GLHNSLHT2
07-07-2008, 05:05 PM
I'm not getting the point I think. You just want to be able to adjust the switch point in the ECU via the wideband's 0-5v signal? Why? I see the TE has a narrowband output that can be tweakable. My LC-1 does as well. Just seems like a lot of work that could screw things up when it's as simple as wiring the NB output to the ECU and tweaking it in the WB's program.

Aries_Turbo
07-07-2008, 05:29 PM
its frank. thats why.

you get better resolution by going to a 0-5v range for o2 input rather than 0-1v. that combined with the fact that people are trying to figure out the o2 feedback system alot more means that you could have tighter control over the fuel feedback and less ping-ponging of the 02 volts.

really though, its an exercise in frank being an engineer and trying to tie too many systems together ;) hehe

Brian

MiniMopar
07-07-2008, 06:06 PM
Well, no one said it would be easy. Well, except for Frank. :D

Conceivably, one could use a very simple (and cheap) WB driver and sensor without a gauge and use that plus the cal to get more precise control over mixture. This would be more of a mileage mod than a performance one.

Frank
07-07-2008, 06:47 PM
its frank. thats why.

you get better resolution by going to a 0-5v range for o2 input rather than 0-1v. that combined with the fact that people are trying to figure out the o2 feedback system alot more means that you could have tighter control over the fuel feedback and less ping-ponging of the 02 volts.

really though, its an exercise in frank being an engineer and trying to tie too many systems together ;) hehe

Brian

That is pretty much it.

GLHNSLHT2
07-07-2008, 08:48 PM
My XD-16/LC-1 only ping/pongs .2 of afr point or so. I have the XD car running at 16.0-16.2:1 and the ECU set to ignore it in boost. The G3/LC-1 car is set to run at 14.7 and it only flickers back and forth .2 of an AFR as well. Not sure how much more resolution you need at cruise?? With that afr/voltage curve almost straight up around your stoich it keeps things close to what you're shooting for. Guess I just don't see the point other than maybe some "engineer" trying to justify his education?? :) Frank did they teach you the K.I.S.S theory? :lol:

Frank
07-07-2008, 09:50 PM
My XD-16/LC-1 only ping/pongs .2 of afr point or so. I have the XD car running at 16.0-16.2:1 and the ECU set to ignore it in boost. The G3/LC-1 car is set to run at 14.7 and it only flickers back and forth .2 of an AFR as well. Not sure how much more resolution you need at cruise?? With that afr/voltage curve almost straight up around your stoich it keeps things close to what you're shooting for. Guess I just don't see the point other than maybe some "engineer" trying to justify his education?? :) Frank did they teach you the K.I.S.S theory? :lol:

Well you are right about cruise, but imagine being able to target a/f outside of cruise. Just some thoughts.

I learned the KISS theory... I use it at work. Out side of work, I use the "If it isn't broke, it doesn't have enough features." :) I have gotten alot better at KISS though. For this, I just mainly want to see if I can get it to work. :)

GLHNSLHT2
07-07-2008, 10:14 PM
I guess with Logging and a flashable smec I don't need the ECU to try and hunt for a target a/f. Just drag the points on the curve a tad and go. I think that's a lot of the problem with the BB/LB cals. Trying too many features. Just document the stock calibration and adjust it.

MiniMopar
07-08-2008, 02:31 PM
The main issue with BB is that it is customized to Geoff's setup. It has a lot of changes to the tables in the source assembly that make it very different from stock. I have no idea why he made many of them and they do not seem to work very well on stock setups. The problem was that when it came out there was no easy way to return it to stock without heavily customizing one of the old TBL files from the library or hand-modifying the tables in the assembly to return them to stock. Even then, most of those old cals did not have TBL entries for some of the things that were changed and there was no reference for the 3-bar tables anyway.

Rob took the time to make the tables in the source code as close to stock as possible, which is a huge help. I'm still not sure why Turbonator doesn't like to idle, though. I've been doing some revisions to BB60 in the meantime but at some point we need to figure out why the spark advance isn't coming out right.

Aries_Turbo
07-08-2008, 03:22 PM
isnt turbonator based on the BN880 3bar stuff which was derived from what jeff c and i did to find and change all the tables back to stock in the 2-bar version?

thats 4 people working on stuff.... there could be errors.

Brian

ShelGame
07-08-2008, 03:45 PM
The main issue with BB is that it is customized to Geoff's setup. It has a lot of changes to the tables in the source assembly that make it very different from stock. I have no idea why he made many of them and they do not seem to work very well on stock setups. The problem was that when it came out there was no easy way to return it to stock without heavily customizing one of the old TBL files from the library or hand-modifying the tables in the assembly to return them to stock. Even then, most of those old cals did not have TBL entries for some of the things that were changed and there was no reference for the 3-bar tables anyway.

Rob took the time to make the tables in the source code as close to stock as possible, which is a huge help. I'm still not sure why Turbonator doesn't like to idle, though. I've been doing some revisions to BB60 in the meantime but at some point we need to figure out why the spark advance isn't coming out right.


Actually, I started with the BB60_Stock that Brian Bucar et al built. I just added the custom code to do the non-stock things (switchable boost, CE Flash, Alky Inj, Anti-lag, etc.). I didn't do anything with the cal values themselves. I did return a couple of code changes back to stock, and I implemented my own staging limiter code...

Aries_Turbo
07-08-2008, 04:29 PM
yeah you used Roberts (BN880) 3bar version. He took the stuff that jeff and i worked with and scaled the values to 3-bar and did nothing else to them.

i wonder if there is a lone timing value for not-WOT (ie part and idle) that is messed up or a scaling factor or something. my car will show the knock light at part throttle sometimes at 9psi even though i have the timing the same for full and part throttle in boost. i know that i had trouble idling smooth when i first started taking a 2.2L cal and making a 2.5L cal out of it. that would explain my rough idle and the knock at part throttle. i need to take a look at some datalogged values for timing at the same boost and rpm at part and full throttle.

Brian

MiniMopar
07-08-2008, 06:16 PM
OK, thanks for clearing that up. In any case, the problem with BB60 is that it is too far from stock to start with.

As for the idle advance, I did some A-B-A tests using the OTC at the track as SDAC and there was a difference in the total advance between the two at idle. I can't remember, but I think BB had less advance. I ended up sticking BB60 at the track since I saw an immediate improvement in my times after switching back. It's just the difference between a tuned cal and one that I hadn't had time to tune yet. I'll be release a new BB60 revision at some point soon. It has some more CHEM tag fixes in the source and has some idle control stuff rolled back to stock.

jpcturbo
05-08-2020, 12:11 AM
I had need recently to enable my LM to run off of a 0-5v wideband signal. I have not seen any of Frank's solution outside of this thread, so here is what I did to make it work. Using T-LMv13 I adjusted 4 constants and swapped 2 branches.

Adjusted these constants for my wideband sensor:

O2MIDH_HighLimitForInMiddleDetermination
O2MIDL_LowLimitForInMiddleDetermination
O2HSWP_HighLimitForO2RampSwitching
O2LSWP_LowLimitForO2RampSwitching
The high limits are now the lean values. The low limits are now the rich values.

I did not change O2TLMH_HighLimitForDelayedSwitchToClosedLoop and O2TLML_LowLimitForDelayedSwitchToClosedLoop because when the O2 sensor is not connected the circuit floats at around 0.45v. So these are not A/F values.

The only routine that cares weather the O2 reading is rich or lean, not just in the middle or not, is at LD70D which calls O2Signal_AboveToggle and O2Signal_BelowToggle. Here I just swapped the branch targets.

Old Code


LD70D: stab Timer_CLTIME_ClosedLoopTimer ; store b into memory
clrb ; b = 0
cmpa O2HSWP_HighLimitForO2RampSwitching ; compare a with memory contents (data is 19)
bcc O2Signal_AboveToggle ; branch if greater or equal
cmpa O2LSWP_LowLimitForO2RampSwitching ; compare a with memory contents (data is 18)
bcs O2Signal_BelowToggle ; branch if lower
rts ; return from subroutine


O2Signal_AboveToggle:
decb
O2Signal_BelowToggle:


New Code


LD70D: stab Timer_CLTIME_ClosedLoopTimer ; store b into memory
clrb ; b = 0
cmpa O2HSWP_HighLimitForO2RampSwitching ; compare a with memory contents (data is 79)
bcc O2Signal_Is_Lean ; Branch if LEAN
cmpa O2LSWP_LowLimitForO2RampSwitching ; compare a with memory contents (data is 78)
bcs O2Signal_Is_Rich ; branch if RICH
rts ; return from subroutine


O2Signal_Is_Rich:
decb
O2Signal_Is_Lean:

tryingbe
05-08-2020, 10:23 AM
Wow, this thread havn't been updated for 12 years.

Great job on that 5v o2 update, jpcturbo

Aries_Turbo
05-08-2020, 07:35 PM
I had need recently to enable my LM to run off of a 0-5v wideband signal. I have not seen any of Frank's solution outside of this thread, so here is what I did to make it work. Using T-LMv13 I adjusted 4 constants and swapped 2 branches.

Adjusted these constants for my wideband sensor:

O2MIDH_HighLimitForInMiddleDetermination
O2MIDL_LowLimitForInMiddleDetermination
O2HSWP_HighLimitForO2RampSwitching
O2LSWP_LowLimitForO2RampSwitching
The high limits are now the lean values. The low limits are now the rich values.

I did not change O2TLMH_HighLimitForDelayedSwitchToClosedLoop and O2TLML_LowLimitForDelayedSwitchToClosedLoop because when the O2 sensor is not connected the circuit floats at around 0.45v. So these are not A/F values.

The only routine that cares weather the O2 reading is rich or lean, not just in the middle or not, is at LD70D which calls O2Signal_AboveToggle and O2Signal_BelowToggle. Here I just swapped the branch targets.

Old Code


LD70D: stab Timer_CLTIME_ClosedLoopTimer ; store b into memory
clrb ; b = 0
cmpa O2HSWP_HighLimitForO2RampSwitching ; compare a with memory contents (data is 19)
bcc O2Signal_AboveToggle ; branch if greater or equal
cmpa O2LSWP_LowLimitForO2RampSwitching ; compare a with memory contents (data is 18)
bcs O2Signal_BelowToggle ; branch if lower
rts ; return from subroutine


O2Signal_AboveToggle:
decb
O2Signal_BelowToggle:


New Code


LD70D: stab Timer_CLTIME_ClosedLoopTimer ; store b into memory
clrb ; b = 0
cmpa O2HSWP_HighLimitForO2RampSwitching ; compare a with memory contents (data is 79)
bcc O2Signal_Is_Lean ; Branch if LEAN
cmpa O2LSWP_LowLimitForO2RampSwitching ; compare a with memory contents (data is 78)
bcs O2Signal_Is_Rich ; branch if RICH
rts ; return from subroutine


O2Signal_Is_Rich:
decb
O2Signal_Is_Lean:


nice!

im not on a LM anymore or id try it out.

Brian

csxtra
05-10-2020, 10:17 PM
Nice job Jeff! I may look into adding this code into my LM and wiring in the 0-5V output on my wideband if time allows this summer.

Thanks for posting this up!

Warren

Aries_Turbo
05-11-2020, 07:44 PM
morris, can you add this into the turbonator-LM code as an option?

jpcturbo
05-12-2020, 01:51 PM
Thanks guys.

Jeff Chojnacki
'87 LeBaron 2.2 T2 Auto
'88 Caravan 2.2 T2 5spd

wowzer
05-12-2020, 07:36 PM
morris, can you add this into the turbonator-LM code as an option?

yes, i'll take a look and see. shouldn't be too hard.

mt

wowzer
05-14-2020, 01:17 PM
jpcturbo, - i quickly looked back through this thread to try to understand what was being done. one thing that does confuse me is the comment that the stock o2 sensor reports a low voltage when lean and a high voltage when rich? at least based on the NB sim graph.. i was also thinking it may be easier to set up the wb2nb stuff like the t-smec does, i.e. a couple translation tables and a cal "option" to turn it on...

wowzer
05-14-2020, 01:43 PM
jpcturbo, would it not be easier to set the lm up like the t-smec wb to nb functions?

jpcturbo
05-14-2020, 02:56 PM
jpcturbo, would it not be easier to set the lm up like the t-smec wb to nb functions?
I originally wanted to just do the same as t-smec and implement the wb2nb functionality as that would be a more flexible solution. However I had trouble figuring out a safe way to inject (hook into) the O2 conversion in the LM's AD conversion loop. How the LM handles the Analog Inputs is a bit different than SMEC and I was afraid that the LM's AD loop would be time sensitive.

wowzer
05-14-2020, 03:01 PM
I originally wanted to just do the same as t-smec and implement the wb2nb functionality as that would be a more flexible solution. However I had trouble figuring out a safe way to inject (hook into) the O2 conversion in the LM's AD conversion loop. How the LM handles the Analog Inputs is a bit different than SMEC and I was afraid that the LM's AD loop would be time sensitive.

what t-lm template are you using? let me put something together for you to look at/test. maybe we can get it to work. i switched my LM to a SBEC so i have nothing to test with anymore.

jpcturbo
05-14-2020, 07:40 PM
what t-lm template are you using? let me put something together for you to look at/test. maybe we can get it to work. i switched my LM to a SBEC so i have nothing to test with anymore.

Latest and greatest version 13. T-LMv13.

Jeff Chojnacki
'87 LeBaron 2.2 T2 Auto
'88 Caravan 2.2 T2 5spd

wowzer
05-14-2020, 11:35 PM
Any particular template?

jpcturbo
05-15-2020, 11:24 AM
Sorry reading too fast. 2.2L Auto 3bar +40s. I've used T_LM_22_ATX_S-IV.tpl as the base template for my K-car.

Jeff Chojnacki
'87 LeBaron 2.2 T2 Auto
'88 Caravan 2.2 T2 5spd

wowzer
05-15-2020, 03:55 PM
jeff - pm'd you.