The following page details the development of my Arduino based Electronic Fuel Injection (EFI) Engine Control Unit (ECU). This project was the result of my work getting my Corvair engine running with an EFI ECU, with the goal of having an ECU tailored specifically to a VW experimental aircraft engine.

I'll admit, I'm not nearly the first person to develop an EFI ECU system; there are several from the DIY level to a fully developed professional package. But my goal here is to develop a system that is simple, reliable, and specific to aircraft engines. Aircraft engines are different than automobile engines in that they may start by hand propping, they run at near full throttle the majority of the time, and they don't require firmware subroutines that deal with transmissions, emissions, and a dozen other ancillary items.

The Controller
The Firmware Described
Connected to the Corvair
Engine Running Video

February 2014

The Arduino Controller, First Iteration

On a previous page I've written about the history of my efforts which led me to develop an EFI ECU for the Arduino Mega 2560. I don't want to repeat all of that here, but the popularity of the Arduino system was the deciding factor in continuing development with that system. On my previous ECU designs I had already worked out all of the necessary circuits, so it was a simple matter of developing a PCB and having a few prototypes fabricated. So after a weekend of board design, and a week waiting for the board to be built, I had my PCB:

Arduino EFI ECU

And a few days later I had the board populated and mounted to the Arduino:

Arduino EFI ECU

The Firmware Described

Arduino has a simplified IDE, and for the most part they have libraries available for typical microcontroller functions. This is great for learning, but I was about to develop a very complicated program, and I didn't want to get half way into it and find that their libraries limited me in some fashion. The price of simplicity is that lack of options. So I set up the Eclipse IDE to develop programs for the Atmel AVR Mega 2560 (which is the microcontroller on the Arduino board). In essence, I'm using the Arduino board only as a breakout board and do not plan on using any Arduino specific software.

So without dumping all of the code on this web page (it is still under development) the firmware works like this:

The main loop has two subroutines. The first reads all of the inputs pins and determines the corresponding value. For example, a ten bit A/D input will have a value of 0 to 1023, and that has to coorispond to some formula that provides me the outside air temperature. So the first subroutine provides values for manifold air pressure, intake air temperature, oil temperature, throttle position, etc.

The second subroutine provides the calculated output. It looks up the volumetric efficiency and spark advance from two tables. It calculates the injector pulse width in microseconds (using the ideal gas law, air temperature, air pressure, the size of the cylinder, the desired air to fuel ratio, and the volumetric efficiency, and the injector flow rate). It calculates the advance time in microseconds. It calculates the coil dwell in microseconds.

So the main loop does nothing but go back and forth reading inputs and calculating outputs (about 1000 times a second). Only when a crankshaft trigger is sensed does something actually happen. A interrupt service routine is called when a trigger is sensed, and that ISR then uses the previously calculated information to set a spark time and set an injector open time.

And that's pretty much it. OK, I've oversimplified and I've omitted explaining all of the error checking and safeties, but if the ECU doesn't have to worry about a dozen other car related stuff the basic fuel and spark control is fairly simple.

May 2014

Connected to the Corvair

So I still have my Corvair engine on its test stand and the Harley Davidson throttle body is still mounted (see my previous web pages), and so I've simply replaced the controller with the Arduino ECU:

Arduino EFI ECU

The other side of the test stand you can see the ignition coil from a General Motors LS1 engine. I'm using this coil since it has a internal ignitor and all I have to do is send it 5 volts. And if you really wanted to know, I'm controlling the injectors with the board mounted IGBT's (actually those IGBT's are ignition coil ignitors, so if they can handle an ignition coil they can handle a much smaller injector coil).

Arduino EFI ECU

May 24, 2014

The Video of the First Run

If you watch the video below, you'll notice that although it does run, it's running really rich and misses a few times. It also has the timing retarded past top dead center... I really wanted to make sure that the ECU would spin the engine the correct direction before I did much else.

Arduino EFI ECU

--- Click HERE for a WMV Video of the engine running. ---