Page 1 of 1

Re: Feasibility of RPi for EFI

Posted: Sat May 12, 2012 1:25 am
by portets
I'm planning on creating a throttle body fuel injection system for an old 2-stroke scooter(Honda spree) and am wondering if an RPi would be able to handle such a timing critical application. I'd need it to analyze two input sources that wiil determine pulse length and rate of the fuel injector output. Pulse duration would need to be accurate to the millisecond and run between about 2 hz through 150 hz.

If i got this working, i may also have the device control spark timing. Possibly, later on, it could change the spark time depending on engine rpm. I think this would require accuracy in the microseconds range. Just a thought anyway.

Would an Arduino be better suited to this?

I was thinking the RPi because it's power would allow it to control many more things, ease of programming, and it's storage space would allow me to log all data i would want collect about the engine.

Re: Feasibility of RPi for EFI

Posted: Sat May 12, 2012 8:49 am
by jamesh
I doubt the Raspi will be accurate enough - although fast enough, there will be enough jitter to make things rather 'rough'

I  think Arduino would be a better bet.

Re: Feasibility of RPi for EFI

Posted: Sat May 12, 2012 9:01 am
by Dave_G_2
@portets

You may get away with it if you use a real time kernel and providing that the dynamic system clock can be "set" to one frequency and not be allowed to decrease when idle to save power.

All in all, for time critical applications, you would be better off using an Atmel MegaAVR or similar, never played with an Arduino but suspect that it does use an Atmel part.

Re: Feasibility of RPi for EFI

Posted: Sat May 12, 2012 7:47 pm
by rew
Again, I'll say that such applications are entirely possible. However you'll have to build a device driver for "engine management". The proper thing to do would be to have userspace things do the slow things, like determining the proper value for injection moment, and then the actual triggering of an interrupt at exactly the right moment is a kernel thingy that the driver does.

You lose some of the "ease of programming" though. And you gain the complexity of interfacing with the Linux kernel. But after this driver is written, you have a neat setup with plenty "ease of programming" to add things.

Oh, and by the way: Automotive (even a scooter) environments are nasty. You'll likely sometimes drive in rain and the electrical environment with firing spark-gap components (the spark plugs!) nearby isn't friendly either....

Re: Feasibility of RPi for EFI

Posted: Sun May 13, 2012 8:15 am
by scudderfish
If you haven't already, google 'Megasquirt' which is an open source ECU. There is a huge amount of documentation out there about how it works, I've got one fitted to my car.
Running engines is really nasty, you have some tough timing requirements in a very noisy electrical environment. And if it goes wrong, you're dealing with a fuel system pressurised to 3 bar, a red hot exhaust and a seized engine. Have some fire extinguishers handy when you test it.
My RPi plan is to hook up to the RS232 port on the ECU and use that for logging/tuning, but let the ECU deal with the explosive side of the system.

Re: Feasibility of RPi for EFI

Posted: Sun May 13, 2012 4:34 pm
by Dave_G_2
The automobile environment is very nasty.
Lots of spikes on the supply, voltage brownouts when the battery is a tad low and the car is started on those cold wintery mornings and of course lots of vibration, thuds and bumps which are great at dislodging and cracking surface mount components.

Re: Feasibility of RPi for EFI

Posted: Sat Feb 17, 2018 4:45 pm
by pishta68
running EFI off a Raspberry should not be a huge task. EFI is not timing critical, you use a Ford EDIS for the timing, its already 'hardened' and does 2 things very well: coil triggering and timing. All the RPi needs to do is analyze the RPM and compute the Duty cycle of the injectors which are far from trigger timing critical as they fog the intake, the are not direct injection and make simple timing adjustments that the EDIS handles with a very basic ECU input. Even MPFI can only fire on open valves below 2500 RPM. If you run a simple alpha-N (RPM/Vacuum/O2) calculation, you can do it with less than 2K of code. The early EFI ECU models were very basic. I would tend to believe the Arduino would be a more stable platform as it is less likely to bog down with non EFI realted cycles like video and USB subsystems.