dcb - Another question?
I replaced my breadboard device with the MPGuino v1 from Fundamental Logic. Hooked up to my Audi, I adjusted VSS pulses per mile to 13418. That's within 0.10 miles distance over an 80 mile trip. So it's very close.
I adjusted fuel flow uSec per gallon to 050000000 which seems to be in the ballpark. I noticed that the GPH and MPG were responding in reverse. Up a hill, on the accelerator, GPH decreased and MPG increased. That's reverse of what it should be.
I remembered that the fuel flow signal was negative going. Assuming that the code is set up to measure a positive going FF signal, I changed the code like this:
attachInterrupt(0, processInjOpen, FALLING); changed to RISING
attachInterrupt(1, processInjClosed, RISING); changed to FALLING
The idea being to start measuring the pulse on the negative going leading edge. Now the GPH and MPG are responding in the proper direction.
Now I'm trying to zero in on the uSec per gallon number and I noticed that when I lift off the accelerator going down a hill, the GPH quickly goes to zero but then jumps up to something like 70 GPH. I'm guessing that the engine computer cuts off the fuel flow entirely when coasting and the signal is being interpreted as a very high flow rate.
Have you seen this before? Is my code change correct? Or is there something else in the code that should be changed instead?
Thanks.
|