Changing lambdaSensors.ini for Zeitronix WB ? - Miata Turbo Forum - Boost cars, acquire cats.

Welcome to Miataturbo.net   Members
 


MEGAsquirt A place to collectively sort out this megasquirt gizmo

Reply
 
 
 
LinkBack Thread Tools
Old 08-14-2008, 07:57 AM   #1
Senior Member
Thread Starter
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,497
Total Cats: 81
Question Changing lambdaSensors.ini for Zeitronix WB ?

Hi guys,

As I will be using me already installed Zeitronix ZT-2 WB with the Megasquirt, I had a look at the Megatune 2.25 and there is just the otion of the non-linear wideband output of the ZT-2 and that makes the AFR Target tables to read in Volt. (the newer ZT-2 have a non-linear, as well as a linear output)

As I don't wnat't to hassle with the AFR/Volt calculation all the time (and I am used to deal with AFRs from the EMU) I had a look at the background of the lambda sensors in Megasquirt.

There is the lambdaSensors.ini file within the Megatune2.25/mtCfg/ folder. In this file there seem to be all the calculation algorithms for the AFR calculation from the voltages comming from the WBO2.

like for the Innovate 0-5v 10-20:1 AFR

#elif INNOVATE_0_5_LINEAR
afr = { 10 + egoADC * 0.039216 }
lambda = { afr / 14.7 }
TargetAFR = { 10 + afrtarget * 0.039216 }
TargetLambda = { TargetAFR / 14.7 }

Would it be possible to change this ini-file to match the ZT-2 linear output?
Zeitronix descibes the function for the AFR at the linear output as follows:

"The Linear Wideband Output transfer function is AFR=2xV+9.6"

This is were my knowledge at this point ends - I don't know what the string egoADC means, it is not the sensor voltage - because otherwise it wouldn't fit the AFRs.

Just a thought to make the life for the ZT-2 user a bit easier. Any ideas?
Zaphod is offline   Reply With Quote
Old 08-14-2008, 08:23 AM   #2
Senior Member
Thread Starter
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,497
Total Cats: 81
Default

O.K. found some more new background (at least for me, I suppose the pro's already know this...)

In a thread at msextra.com:

Q:
I was looking at the formula in lambdasensors.ini and for the LM-1, the formula is: 10 + egoADC * 0.039216. I'm confused on what the 0.039216 value is for because it doesn't look like [O2] * 2 + 10 to me.

A:
The difference is one is working against O2 volts (0-5) the other is ADC (0-255)
ADC 0 = 0V
ADC 255 = 5V

so:
5/255 = 0.01960784313
so:
2*0.01960784313 = 0.03921568627

Therefore:
10 + egoADC * 0.039216
and
10 + O2volts * 2
are the same

So in the case of the ZT-2 it would be:
afr = { 9.6 + egoADC * 0.039216 }
lambda = { afr / 14.7 }
TargetAFR = { 9.6 + afrtarget * 0.039216 }
TargetLambda = { TargetAFR / 14.7 }

Greets
Zaphod is offline   Reply With Quote
Old 08-23-2009, 04:05 PM   #3
Senior Member
 
Join Date: Nov 2007
Location: Belgium
Posts: 940
Total Cats: 59
Default

Just digging up an old thread because I wanted to do the same thing.
I think what you describe only works in MS1, but not in MS2. I modified the lambdasensors.ini as well and found that the uploaded table is still the default table, unchanged. MS2 doesn't look at lambdasensors.ini when it uploads the table.
I still would like to know where it goes looking for the formula/table/.inc though.
The only way to upload a different table is by doing it directly in MegaTune - Tool - Calibrate AFR table. Choose Generic Lineair WB and enter 2 points from the formula's curve.

Last edited by WestfieldMX5; 08-23-2009 at 05:06 PM.
WestfieldMX5 is offline   Reply With Quote
Old 08-24-2009, 09:37 AM   #4
Senior Member
Thread Starter
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,497
Total Cats: 81
Default

That is a fix for Megatune - it won't help your MS.

MSx/Extra EFI • View topic - Changing lambdaSensors.ini for Zeitronix WB ?

Here is some more.

For the MS-2 you can also send the value to your MS (at least with Tuner Studio, which I am using now) but at the moment I don't know how to set in Tuner Studio to shwo the correct values. (I am using the non linear ZT-2 output which is supportet by the MS and Tuner Studio and Megatune)
Zaphod is offline   Reply With Quote
Old 08-24-2009, 02:33 PM   #5
Senior Member
 
Join Date: Nov 2007
Location: Belgium
Posts: 940
Total Cats: 59
Default

It works for me. I had a .3 offset with my AFR and after entering 2 points in Generic WB, my AFR is spot on.
In my working dir, I had a afrTable.log with inside the following text, followed by my custom uploaded table. So MegaTune definitely uploads the custom table to the MS2

Quote:
//------------------------------------------------------------------------------
//-- Generated by MegaTune 2009-08-24T08:57:33+02:00 --
//-- This file merely records what was sent to your MS-II, and may be --
//-- deleted at any time. --
//-- Selected type: Generic Linear WB --
//------------------------------------------------------------------------------
WestfieldMX5 is offline   Reply With Quote
Old 11-24-2011, 09:26 PM   #6
Junior Member
iTrader: (4)
 
Join Date: May 2009
Location: Simi valley
Posts: 203
Total Cats: -8
Default

helped me out thanks!!!
amak87 is offline   Reply With Quote
 
 
Reply

Related Topics
Thread Thread Starter Forum Replies Last Post
MP62 maintenance Pist0n Supercharger Discussion 3 10-10-2015 05:23 PM
Bad head gasket or ? shooterschmidty Engine Performance 8 09-30-2015 11:28 PM
01-05 Fab9 PNP COPs (used) FrankB Miata parts for sale/trade 6 09-30-2015 12:48 PM
Another Alternator thread ihiryu General Miata Chat 9 09-28-2015 11:22 AM


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 02:59 PM.