How to create WBO2 Lookup Table file

Questions specific to Megatunix - alternate tuning software that runs on unix and windows.
Note that Megatunix is obsolete.

Moderator: djandruczyk

Post Reply
StevenD57
Helpful MS/Extra'er
Posts: 103
Joined: Fri Oct 14, 2005 1:14 pm
Location: Phoenix, AZ
Contact:

How to create WBO2 Lookup Table file

Post by StevenD57 »

I have a WBO2 unit called a Uego 1000 that is not directly supported by any of the normal Megasquirt tuning software.
After asking David how to calibrate it with Megatunix and getting a rather complex set of directions, I decided to write this HOWTO document in case others might need to do something similar. It seems the lookup table files that are currently packaged with Megatunix consist of a rather unusual format. According to David's description:
djandruczyk wrote:The lookuptable needs to have 256 entries, corresponding to the AFR*10 values corresponding to the input voltages from 0-5 volts (0-255 ADC counts, since MS-i has 8 bit ADC's) look at CustomWB.inc:

DB 90T ; 0 0.00
DB 90T ; 1 0.02
DB 90T ; 2 0.04
DB 91T ; 3 0.06
DB 91T ; 4 0.08

The fields are "DB" (marker for a lookuptable entry), the value of the AFR*10 with a "T" suffix, a semicolon (comment break), the ADC value corresponding to this entry and the last column is the input voltage corresponding to the ADCvalue on a 0-5 V scale. When making your own table the semicolon and all after it is not required, but it is handy to have as you can debug the table easily.
In looking at all of the included Lookuptable files and re-reading David's explanation several times, I finally figured out that the voltage values are actually represented by the position from 0 thru 255 in the file. So for instance the 4th AFR entry from the beginning of the file always corresponds to a voltage value of 0.06 and the AFR value at the 36th position in the file always corresponds to 0.69 volts.

Since I only had 12 discrete points and they did not start at 0.0volts and they did not end at exactly 5.0volts, I knew I would have to figure out how to come up with a way to generate the 256 AFR verses Voltage pairs I needed for my lookup table. I used the curve fitting functionality in gnuplot to try various types of equation forms to see if I could come up with a good match for the curved formed by the 12 known points. Unfortunately due to the unusual curve formed by these twelve points I was not able to find a signle equation that generated a close enough fit to the original curve. I ended up breaking my input curve up into five distinct regions and then I was able to use gnuplot to find five equations that gave me a really good fit over those five regions.

Once I had my equations, I wrote a perl script to take the 256 input voltages and the output would be a correctly formatted lookup table file with the 256 AFR values. I have submitted this file to David for inclusion with Megatunix so anyone else who might have one of these older WBO2 units made by EFI Systems out of Walhalla, SC would not have to go through this same process.
Jaguar E-Types, modified Merkur XR4Ti, Jensen-Healey
Linux = no virii or spyware, EVER
StevenD57
Helpful MS/Extra'er
Posts: 103
Joined: Fri Oct 14, 2005 1:14 pm
Location: Phoenix, AZ
Contact:

Re: How to create WBO2 Lookup Table file

Post by StevenD57 »

BTW, if anyone wants more details about the curve fitting process or about the perl script that actually produced the output file just let me know. I can add additional information to this post if the interest is there.
Jaguar E-Types, modified Merkur XR4Ti, Jensen-Healey
Linux = no virii or spyware, EVER
StevenD57
Helpful MS/Extra'er
Posts: 103
Joined: Fri Oct 14, 2005 1:14 pm
Location: Phoenix, AZ
Contact:

Re: How to create WBO2 Lookup Table file

Post by StevenD57 »

bump so the Camero guy with the custom gauges can find this post.
Jaguar E-Types, modified Merkur XR4Ti, Jensen-Healey
Linux = no virii or spyware, EVER
Post Reply