EcoModder.com

EcoModder.com (https://ecomodder.com/forum/)
-   OpenGauge / MPGuino FE computer (https://ecomodder.com/forum/opengauge-mpguino-fe-computer.html)
-   -   MPGuino - Question about kill switch & instant fuel consumption (https://ecomodder.com/forum/showthread.php/mpguino-question-about-kill-switch-instant-fuel-consumption-26681.html)

Pawtuckett 08-14-2013 05:31 PM

MPGuino - Question about kill switch & instant fuel consumption
 
I tried using the search function to see if anyone has had the same issue as me, but I couldn't find anything that quite answered the question I have.

For some background, I have my MPGuino hooked up to my ECU for VSS and Injector Pulse and to my stereo for power and ground. My kill switch is a SPDT rocker switch acting as a ground interrupt circuit that is connected to the ground wire of my PGM-FI unit under my dash.

Now, the issue: Whenever I flip the kill switch to break the ground for the PGM-FI, I notice that my Instant MPG plummets momentarily (to, say, 5 mpg or so), and then goes to 999999, indicating that the fuel has been cut off successfully.

And the question: Is this normal operation? Do the fuel injectors actually dump a bunch of fuel (relatively speaking) when they are cut by the kill switch?

I know I'm not the only person here that hooked their kill switch up to the PGM-FI unit, but I don't know if this issue is particular to my situation or not.

Thoughts?

t vago 08-15-2013 03:20 PM

It's hard to say, without viewing any sort of oscilloscope trace of your fuel injector signal, as you actuate your fuel cutoff switch. It would not be anything to worry about, I would think.

Pawtuckett 08-15-2013 03:44 PM

Quote:

Originally Posted by t vago (Post 385407)
It's hard to say, without viewing any sort of oscilloscope trace of your fuel injector signal, as you actuate your fuel cutoff switch. It would not be anything to worry about, I would think.

I'm not actually worried about it, just puzzled. I can't accurately calibrate my MPGuino because there is no set percentage that it is reporting over or under. I haven't changed the settings for a looooong while now, just to see how much the odometer & gas pump compared with the Guino. It's over AND under reported during said time, and I'm getting tired of feeling like I can't trust my instrumentation. :(

Is it even possible that tapping into the ECU for VSS and Injector pulse could give voltage readings that would be spiking erroneously upon activation of the kill switch? There may only be one way to know for sure, as you said.

t vago 08-15-2013 04:46 PM

Quote:

Originally Posted by Pawtuckett (Post 385414)
I'm not actually worried about it, just puzzled. I can't accurately calibrate my MPGuino because there is no set percentage that it is reporting over or under. I haven't changed the settings for a looooong while now, just to see how much the odometer & gas pump compared with the Guino. It's over AND under reported during said time, and I'm getting tired of feeling like I can't trust my instrumentation. :(

I hear ya there.

Hey, I just got a strange idea. The injector is fired by the PGM-FI by switching the ground on and off, right? So, the MPGuino sees a low-going voltage signal as the start of a fuel injector pulse. And, your kill switch removes power from the injector circuit, too, right? The MPGuino would see the same thing (a low-going voltage signal) when you actuate your kill switch, too. Basically, the MPGuino code you're using is interpreting that as a really long valid fuel injector pulse.

I have seen much the same problem with my re-written MPGuino code. When I first started testing the code, I'd get some really freaky large fuel consumption measurements, whenever my vehicle would enter EOC. Basically, I'd go from a tank average 23 MPG to around 1 MPG, all of a sudden. It was because the fuel injector measurement routines did not really do any sort of sanity checking.

I came up with two different rationality checks that are applied on each measured fuel injector pulse. Basically, if the measured pulse width is greater than what could be expected at some arbitrarily low engine speed (say, 400 RPM), then that pulse measurement is simply thrown out. Also, if the fuel injector pulse start is recorded, and a pulse end isn't received by about 0.5 seconds or so, then the pulse measurement itself is abandoned, and the code waits for the fuel injector signal to go high, then go low again. These two checks have eliminated the issue I've seen, and they may well eliminate your problem, too.

Quote:

Originally Posted by Pawtuckett (Post 385414)
Is it even possible that tapping into the ECU for VSS and Injector pulse could give voltage readings that would be spiking erroneously upon activation of the kill switch? There may only be one way to know for sure, as you said.

No, I would not think this would cause your issue.

Pawtuckett 08-15-2013 05:31 PM

Quote:

Originally Posted by t vago (Post 385441)
The injector is fired by the PGM-FI by switching the ground on and off, right?

I'm not sure that's correct. From civic-eg.com, ala suspendedHatch: "The PGM-FI Main Relay controls the Fuel Injectors, the Fuel Pump, the O2 sensor, the Alternator, and the Vehicle Speed Sensor." Since it controls several other vital components, I would think it's only switching the fuel injector signal wire on and off. Don't quote me on that, though.

Quote:

Originally Posted by t vago (Post 385441)
So, the MPGuino sees a low-going voltage signal as the start of a fuel injector pulse.

That makes sense. Perhaps as the ground is cut, all of the voltages in the wires drop at that exact moment, but the MPGuino sees a "long pulse" signal being sent to the injectors via the ECM.

Quote:

Originally Posted by t vago (Post 385441)
And, your kill switch removes power from the injector circuit, too, right?

The kill switch only cuts the ground wire of the PGM-FI, so if that removes all power from the injector circuit, then yes.

Quote:

Originally Posted by t vago (Post 385441)
The MPGuino would see the same thing (a low-going voltage signal) when you actuate your kill switch, too. Basically, the MPGuino code you're using is interpreting that as a really long valid fuel injector pulse.

I have seen much the same problem with my re-written MPGuino code. When I first started testing the code, I'd get some really freaky large fuel consumption measurements, whenever my vehicle would enter EOC. Basically, I'd go from a tank average 23 MPG to around 1 MPG, all of a sudden. It was because the fuel injector measurement routines did not really do any sort of sanity checking.

That's crazy. Mine doesn't drop THAT much, but it's noticeable at the beginning of a trip.

Quote:

Originally Posted by t vago (Post 385441)
I came up with two different rationality checks that are applied on each measured fuel injector pulse. Basically, if the measured pulse width is greater than what could be expected at some arbitrarily low engine speed (say, 400 RPM), then that pulse measurement is simply thrown out. Also, if the fuel injector pulse start is recorded, and a pulse end isn't received by about 0.5 seconds or so, then the pulse measurement itself is abandoned, and the code waits for the fuel injector signal to go high, then go low again. These two checks have eliminated the issue I've seen, and they may well eliminate your problem, too.

So, would it be possible for me to modify the code my MPGuino is using? I know you're currently working on modifying the original MPGuino code, but I'm not that great of a programmer. At least, I'm not familiar with Arduino, that is.

nickdigger 08-15-2013 09:26 PM

Quote:

Originally Posted by t vago (Post 385441)
I came up with two different rationality checks that are applied on each measured fuel injector pulse.

I thought the whole injector sanity check issue was resolved long ago, after rmccomiskie tackled it. I just checked the 0.86 code, and I guess it wasn't. I fixed it in mine (I even have a max-inj-length parm in eeprom for the cutoff value). I think i even posted my corrected processInjOpen/Closed(), but it didn't seem like anyone gave a crap, and they definitely didn't make it into the base code.

t vago 08-15-2013 09:46 PM

Quote:

Originally Posted by Pawtuckett (Post 385457)
So, would it be possible for me to modify the code my MPGuino is using? I know you're currently working on modifying the original MPGuino code, but I'm not that great of a programmer. At least, I'm not familiar with Arduino, that is.

Everyone's got to start somewhere. Both rationality checks should be able to be squeezed into the existing 0.86 code without too much fuss, though they'll be effectively hardcoded in. That means that, in order to change the thresholds, changes would have to be made to the modified 0.86 code itself. (My code has an EEPROM parameter associated with each rationality check).

The below code is pasted for reference. Only the boldfaced stuff has to be added into the 0.86 code.

Code:

pFunc eventFuncs[] = { enableVSS, enableLButton, enableMButton, enableRButton, injTimeOutCheck };
#define eventFuncSize (sizeof(eventFuncs)/sizeof(pFunc))
//define the event IDs
#define enableVSSID 0
#define enableLButtonID 1
#define enableMButtonID 2
#define enableRButtonID 3
#define injTimeOutCheckID 4

volatile boolean injFlop = 0;

void injTimeOutCheck() {

        injFlop = 0;

}

Now, this other stuff will have to replace the existing processInjOpen/processInjClosed functions, in their entirety.

Code:

// The value of 240000ul used below for the low engine speed rationality check assumes the following:
//    The engine uses sequential port injection (that is, one injection event every other crank revolution)
//    400 RPM engine speed
//    80% injector duty cycle at the given engine speed
//    MPGuino running on 16 MHz clocked hardware

// Use a value of 300000ul for a 20 MHz chip

void processInjOpen(void) {

        injHiStart = microSeconds();
        injFlop = 1;
        addEvent(injTimeOutCheckID, 500); // use 625 on a 20 MHz system

}

void processInjClosed(void) {

        unsigned long t = microSeconds();
        unsigned long x = elapsedMicroseconds(injHiStart, t);

        if ((x > injectorSettleTime) && (x < 240000ul) && (injFlop != 0)) {

                x -= injectorSettleTime;
                tmpTrip.injHius += x;
                tmpTrip.injPulses++;

                if (tmpInstInjStart != nil) {

                        if (x > 0) tmpInstInjTot += x;
                        tmpInstInjCount++;

                } else {

                        tmpInstInjStart = t;

                }

                tmpInstInjEnd = t;

        }

        injFlop = 0;

}


t vago 08-15-2013 09:49 PM

Quote:

Originally Posted by nickdigger (Post 385513)
I thought the whole injector sanity check issue was resolved long ago, after rmccomiskie tackled it. I just checked the 0.86 code, and I guess it wasn't. I fixed it in mine (I even have a max-inj-length parm in eeprom for the cutoff value). I think i even posted my corrected processInjOpen/Closed(), but it didn't seem like anyone gave a crap, and they definitely didn't make it into the base code.

I think people assumed it was because of rmccomiskie's particular engine controller, that nobody paid attention to his fix. Thus, it never made it into the 0.86 code.

As for your fix... I don't know that, either. I came up with my checks independently of yours.

P-hack 11-15-2013 02:45 AM

Pawtuckett, I have a 94 EX 5 speed I just picked up. I installed a kill switch relay in the injector power lead(s). I hope to have a mpguino installed soon and will let you know if it behaves differently than the pgm-fi kill. With ground to the pgm-fi unit disabled, the guino injector signal might be sort-of floating, so there is a chance a different kill switch will fix it.

It might need a pulldown resistor too for more accuracy if it isn't pulled low by default, or otherwise a couple bias resistors so it reads correctly when the fi is hooked up or not.

Pawtuckett 11-15-2013 11:46 AM

Quote:

Originally Posted by P-hack (Post 399523)
Pawtuckett, I have a 94 EX 5 speed I just picked up. I installed a kill switch relay in the injector power lead(s). I hope to have a mpguino installed soon and will let you know if it behaves differently than the pgm-fi kill. With ground to the pgm-fi unit disabled, the guino injector signal might be sort-of floating, so there is a chance a different kill switch will fix it.

It might need a pulldown resistor too for more accuracy if it isn't pulled low by default, or otherwise a couple bias resistors so it reads correctly when the fi is hooked up or not.

Sounds complicated, lol. I'm not exactly the engineering type, so I eagerly anticipate the results of your testing to see how I should modify my setup.


All times are GMT -4. The time now is 04:33 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com