Here is the latest on my progress...
I received and constructed my MPGuino kit without
issue.
Using the Arduino software environment I modified
the ATmega168's firmware, With the code change you
recommended, plus another one as well to directly
track the following variables:
- tank.injHiSec
- tank.injHius
- injPulses
These code changes worked well.
Following your suggestion, I looked further into the
effects of:
- Fuel Temperature:
- Gasoline's coefficient thermal expansion =
950ppm/deg K, which is rather large. I added
a thermometer to monitor the fuel temperature
during fill-ups to allow compensation for this.
- Battery Voltage:
- I made oscilloscope measurements to
understand how much the injector delay was
affected by battery Voltage.
- By powering the injectors with a separate
power supply, connected to a big honkin cap,
and using my oscope, I was able to look at
how the injectors' delay-time varied with
Voltage by measuring the change in time that
their "pintle humps" appeared.
- (see
http://www.motor.com/magazine/pdfs/012005_04.pdf
for a great explanation about interpreting
injector oscope plots.)
- These measurements indicated that the injDelay, on
these injectors, would drop by about 155usec for
each one-Volt increase in battery Voltage.
I modified my MPGuino code to measure battery Voltage (Vbat)
using the ATmega168's ADC. This allowed me to compensate for
injector delay as battery Voltage varied. (I have attached
a copy of my latest code. This mod also required the
addition of a resistor divider and two capacitors on the
MPGuino circuit board.)
I have not yet performed my two-trip injector calibration.
(This has now become a three trip calibration since I
now have three variables, due to the fact that my inj delay
now includes a Voltage coefficient.)
As a side note: I did encounter what I suspect was an issue
with Arduino-0011 properly handling statements to modify
bits within the ADCSRA register.
I was trying to write "00000101b" by using
different permutations of
"ADCSRA|=((1<<ADPS2|1<<ADPS0)&!(1<<ADPS1));"
but had to resort to
"ADCSRA=5;"
to achieve the desired value in the register.
Thanks and regards, Singletree5990