Recalibrate VE table after change of injector open time

For discussing MicroSquirt (TM) configuration and tuning of fuel parameters (including idle valves, etc.).
Forum rules
Forum rules
Read the manual to see if your question is answered there before posting. If you have questions about MS1/Extra or MS2/Extra or other non-B&G code configuration or tuning, please post them at http://www.msextra.com The full forum rules are here: Forum Rules, be sure to read them all regularly.
Post Reply
Jedrik
Helpful Squirter
Posts: 78
Joined: Thu Oct 21, 2004 9:07 am
Location: Seattle WA
Contact:

Recalibrate VE table after change of injector open time

Post 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!" :RTFM: Also the file reading logic is not very robust!
efahl
Site Admin
Posts: 232
Joined: Mon Feb 16, 2004 3:15 pm
Location: San Clemente, California, USA
Contact:

Post 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
woh
Helpful Squirter
Posts: 69
Joined: Sat Aug 27, 2005 1:19 am
Location: Colorado, USA
Contact:

Post 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?
ochizon
Helpful Squirter
Posts: 42
Joined: Mon Jan 16, 2006 1:59 pm

Post by ochizon »

How do you decipher the proper open time of your injector?
woh
Helpful Squirter
Posts: 69
Joined: Sat Aug 27, 2005 1:19 am
Location: Colorado, USA
Contact:

Post 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'
Jedrik
Helpful Squirter
Posts: 78
Joined: Thu Oct 21, 2004 9:07 am
Location: Seattle WA
Contact:

Post 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.
71jeep
MegaSquirt Newbie
Posts: 23
Joined: Sun Mar 27, 2005 2:57 pm
Location: Eastern Pennsylvania

Post by 71jeep »

Okay I downloaded pearl now what ?


71jeep :P
Post Reply