Page 1 of 1

Fuel Pump control.

Posted: Thu Oct 24, 2013 2:54 pm
by AndreyB
What kind of logic do we need for fuel pump control? Just always pull down relay output wire when our ECU is hot?

I have created a ticket for the implementation if any code would be needed. No idea if any code would be needed at all - https://sourceforge.net/p/rusefi/tickets/3/

Re: Fuel Pump control.

Posted: Thu Oct 24, 2013 4:35 pm
by Sergey89
After the ECU is powered up you need to turn on the fuel pump for defined time. It is neccesary to make the initial pressure in the fuel rail. You should always turn on the fuel pump when the engine is cranking or running.

Re: Fuel Pump control.

Posted: Thu Oct 24, 2013 4:58 pm
by AndreyB
Sergey89 wrote:After the ECU is powered up you need to turn on the fuel pump for defined time.
Is not it just constantly on if the ECU is on?

Re: Fuel Pump control.

Posted: Thu Oct 24, 2013 5:02 pm
by Sergey89
This is not necessary.

Re: Fuel Pump control.

Posted: Thu Oct 24, 2013 5:09 pm
by AndreyB
I have updated the ticket with your proposed algorithm, I guess it would do the job.

Re: Fuel Pump control.

Posted: Thu Oct 24, 2013 8:38 pm
by erich
It's important to turn off the fuel pump ater a couple of seconds of no crank angle changes.
You do not want the fuel pump running for more than a few seconds if the engine stalls for safety.
Think fuel line ruptures.

Re: Fuel Pump control.

Posted: Thu Oct 24, 2013 8:41 pm
by AndreyB
erich wrote:Think fuel line ruptures.
You have convinced me - we do need some code there :)

Re: Fuel Pump control.

Posted: Fri Oct 25, 2013 8:55 am
by Sergey89
Pseudocode :)

Code: Select all

void FuelPumpControl(void)
{
    if (Engine.IsRunning || Engine.IsCranking)
    {
        FuelPump = 1;
    }
    else
    {
        if (Switches.Ignition && FuelPumpPrime) 
        {
            if (!FuelPumpPrime)
            {
                FuelPump = 0;
            }
        }
        else
        {
            FuelPump = 0;
        }
    }
}
FuelPumpPrime is delay.

Re: Fuel Pump control.

Posted: Fri Oct 25, 2013 6:00 pm
by erich
I'd do it with more of a watchdog approach.
Turning on the ECU and getting crank signals reset the watchdog. If the watchdog expires, turn off the fuel pump.

Re: Fuel Pump control.

Posted: Fri Oct 25, 2013 6:04 pm
by AndreyB
erich wrote:Turning on the ECU and getting crank signals reset the watchdog. If the watchdog expires, turn off the fuel pump.
Actually this might be the most elegant way to do this. So on startup you turn it on and you setup a timer which would turn it off. On each shaft position event, you re-start the timer with a new timer further in the future...

Like this approach! Now question who is ready to actually code it :)

I should add info on timers into the "working with time" section of Source code Q&A

Re: Fuel Pump control.

Posted: Wed Oct 30, 2013 1:16 am
by AndreyB
erich wrote:Turning on the ECU and getting crank signals reset the watchdog. If the watchdog expires, turn off the fuel pump.
Roman 'frig' has implemented this under https://sourceforge.net/p/rusefi/tickets/3/