portets
Posts: 186
Joined: Sat Oct 29, 2011 6:24 am

Re: Feasibility of RPi for EFI

Sat May 12, 2012 1:25 am

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.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 20257
Joined: Sat Jul 30, 2011 7:41 pm

Re: Feasibility of RPi for EFI

Sat May 12, 2012 8:49 am

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.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

User avatar
Dave_G_2
Posts: 196
Joined: Sat Apr 14, 2012 7:04 pm

Re: Feasibility of RPi for EFI

Sat May 12, 2012 9:01 am

@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.

User avatar
rew
Posts: 410
Joined: Fri Aug 26, 2011 3:25 pm

Re: Feasibility of RPi for EFI

Sat May 12, 2012 7:47 pm

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....
Check out our raspberry pi addons: https://www.bitwizard.nl/shop/

scudderfish
Posts: 2
Joined: Thu Feb 23, 2012 8:06 am

Re: Feasibility of RPi for EFI

Sun May 13, 2012 8:15 am

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.

User avatar
Dave_G_2
Posts: 196
Joined: Sat Apr 14, 2012 7:04 pm

Re: Feasibility of RPi for EFI

Sun May 13, 2012 4:34 pm

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.

pishta68
Posts: 12
Joined: Sat Jan 27, 2018 4:53 pm
Location: California, USA

Re: Feasibility of RPi for EFI

Sat Feb 17, 2018 4:45 pm

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.

Return to “Other projects”

Who is online

Users browsing this forum: No registered users and 7 guests