MEGAsquirt A place to collectively sort out this megasquirt gizmo

Changing lambdaSensors.ini for Zeitronix WB ?

Thread Tools
 
Search this Thread
 
Old 08-14-2008, 06:57 AM
  #1  
Elite Member
Thread Starter
 
Zaphod's Avatar
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,553
Total Cats: 101
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  
Old 08-14-2008, 07:23 AM
  #2  
Elite Member
Thread Starter
 
Zaphod's Avatar
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,553
Total Cats: 101
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  
Old 08-23-2009, 03:05 PM
  #3  
Senior Member
 
WestfieldMX5's Avatar
 
Join Date: Nov 2007
Location: Belgium
Posts: 999
Total Cats: 73
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 04:06 PM.
WestfieldMX5 is offline  
Old 08-24-2009, 08:37 AM
  #4  
Elite Member
Thread Starter
 
Zaphod's Avatar
 
Join Date: Mar 2006
Location: Schwarzenberg, Germany
Posts: 1,553
Total Cats: 101
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  
Old 08-24-2009, 01:33 PM
  #5  
Senior Member
 
WestfieldMX5's Avatar
 
Join Date: Nov 2007
Location: Belgium
Posts: 999
Total Cats: 73
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

//------------------------------------------------------------------------------
//-- 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  
Old 11-24-2011, 08:26 PM
  #6  
Junior Member
iTrader: (4)
 
amak87's Avatar
 
Join Date: May 2009
Location: Simi valley
Posts: 203
Total Cats: -8
Default

helped me out thanks!!!
amak87 is offline  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Pist0n
Supercharger Discussion
6
08-02-2019 05:27 PM
shooterschmidty
Engine Performance
8
09-30-2015 10:28 PM
FrankB
Miata parts for sale/trade
6
09-30-2015 11:48 AM
ihiryu
General Miata Chat
9
09-28-2015 10:22 AM



Quick Reply: Changing lambdaSensors.ini for Zeitronix WB ?



All times are GMT -4. The time now is 09:40 AM.