Fuel Pump control.

It's all about the code!
Post Reply
User avatar
AndreyB
Site Admin
Posts: 14327
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Fuel Pump control.

Post 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/
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
Sergey89
contributor
contributor
Posts: 839
Joined: Wed Sep 25, 2013 5:30 pm
Location: Russia, Velikiy Novgorod

Re: Fuel Pump control.

Post 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.
User avatar
AndreyB
Site Admin
Posts: 14327
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Fuel Pump control.

Post 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?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
Sergey89
contributor
contributor
Posts: 839
Joined: Wed Sep 25, 2013 5:30 pm
Location: Russia, Velikiy Novgorod

Re: Fuel Pump control.

Post by Sergey89 »

This is not necessary.
User avatar
AndreyB
Site Admin
Posts: 14327
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Fuel Pump control.

Post by AndreyB »

I have updated the ticket with your proposed algorithm, I guess it would do the job.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
erich
Posts: 21
Joined: Tue Sep 03, 2013 4:55 am

Re: Fuel Pump control.

Post 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.
User avatar
AndreyB
Site Admin
Posts: 14327
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Fuel Pump control.

Post by AndreyB »

erich wrote:Think fuel line ruptures.
You have convinced me - we do need some code there :)
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
Sergey89
contributor
contributor
Posts: 839
Joined: Wed Sep 25, 2013 5:30 pm
Location: Russia, Velikiy Novgorod

Re: Fuel Pump control.

Post 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.
erich
Posts: 21
Joined: Tue Sep 03, 2013 4:55 am

Re: Fuel Pump control.

Post 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.
User avatar
AndreyB
Site Admin
Posts: 14327
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Fuel Pump control.

Post 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
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
User avatar
AndreyB
Site Admin
Posts: 14327
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Fuel Pump control.

Post 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/
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Post Reply