Page 1 of 1
Recalibrate VE table after change of injector open time
Posted: Sat Feb 11, 2006 11:16 am
by Jedrik
If you play with things like changing the number of injector pulses you will probably quickly discover that your injector open time is wrong. And reseting it means you have to tune the VE table from scratch. After all that time tuneing with an open time of 1.0 ms what a shock to discover the actual open time was closer to 0.7 ms!
I couldn't stand the idea of starting from scratch so made this simple perl program that recalibrates the VE table. It is not exact but gets you in the ~5% range. Better than nothing!
You just have to edit the file with the old and new open time, your req_fuel value, and the name of the input VEX file.
Hope someone finds it useful.
*Note to PERL experts. I used this program to teach myself perl, so some of the string extraction is... creative, intentionaly (read as "I didn't know what I was doing!"

Also the file reading logic is not very robust!
Posted: Sat Feb 11, 2006 1:13 pm
by efahl
Cool. Two suggestions for your perl effort:
1) add "use strict;" up top on all your programs. This forces you to declare all your variables ("my" or "local"), so when you have an inevitable typo, the compiler tells you about it right away rather than wasting hours trying to track it down.
2) "split" is your friend, I see you use it in the first little parsing loop, but you could also use it in your table parsing loop and save a lot of char-by-char doodling.
Code: Select all
my @stuff = split(/ +/, $TheLine);
for (my $i = 0; $i < scalar @stuff; $i++) {
... $stuff[$i] ...
}
Eric
Posted: Sat Feb 11, 2006 1:19 pm
by woh
Jedrik
Yes, Cool. I will need this shortly. After looking at the current waveform of the injector, it looks like open time is .5ms. I had it set to 1ms.
I don't know anything about Perl, how do I use this? How do I run it? Do I have Perl on my PC or do I need to load it?
Posted: Sat Feb 11, 2006 7:06 pm
by ochizon
How do you decipher the proper open time of your injector?
Posted: Sat Feb 11, 2006 9:50 pm
by woh
If you have a scope to monitor the fuel injector current then you can estimate the open time from the current waveform. Monitor the current at R37, or R38 of MS1 v3
See here:
http://www.picotech.com/auto/articles/e ... ction.html
http://www.picotech.com/auto/tutorials/ ... ction.html
http://www.asashop.org/autoinc/dec2000/mech.htm
or search Google for 'fuel injector current waveform'
Posted: Sun Feb 12, 2006 6:58 pm
by Jedrik
Eric,
Thanks for the advice.
I actually coded the end section first... inspiring me to discover the split comand. Just didn't take the time to clean up the old code.
woh,
For windows get perl from: (free download)
http://www.activestate.com/Products/ActivePerl/
in general check out
http://www.perl.com
It is a handy language to have in the tool box, quite nice for manipulating text files. My local public library had half a dozen books on programing perl.
ochizon
If you have a scope check out the links woh posted (I plan try that out tomorow.)
But you don't need a scope. With the correct open time you should be able to change the number of squirts and maintain tuneing (Untill duty cycle runs out) For example you are idling at 14.7 AFR on one squirt per cycle. Then switch to two squirts per cycle. (It seems you have to "Burn to ECU" then cycle megasquirt/restart engine to get it to take.) If you are now running rich that means your open time is too long. (realsie there are other factors that could also change the mixture... like the timeing of the pulse to valve opening...)
So then you try a shorter open time. Start the engine and discover you are SUPER lean now. If it runs at all!
The problem is that the VE tuneing you worked so hard to perfect is relative to the open time you tuned at. The openconv.pl program makes this adjustment for you.
To get the conversion:
Code: Select all
$veTemp = $veIn + (($oldOpen - $newOpen) * 10000 * $baro) / ($map[$mapN] * $req_fuel);
I solved the fuel pulse equation setting all the corrections to 100%. This simplification is why you still need to fine tune the new VE table.
It is interesting how the VE table is changed. For example reduceing the open time tends to flatten the VE table. At 1.0 ms my VE was 37% at idle and 109% WOT. At 0.7 ms open time I have 64% to 111%. I suspect most of us are tuned at the default 1.0 ms time and not the actual open time for our injectors. Yet another reason VE tables for "identical" engines can sometimes be so different.
Posted: Mon Feb 13, 2006 1:38 pm
by 71jeep
Okay I downloaded pearl now what ?
71jeep
