Category Archives: Arduino ECU

This project was undertaken as the final project and dissertation for my MSc in Automotive Electronic Engineering. The projected aimed to develop a simple engine control unit for a single cylinder port injected 4-stroke gasoline engine. The ECU has been developed on an Arduino Mega board and the project primarily focuses on the software rather than the electronic interfaces.

The code is available to view and download here

Arduino Controlled Electronic Ignition

Success! I have started and run the engine on my own electronic ignition. The problem was in the end quite simple, it turns out that the missing tooth wheel on the crank was aligned differently to what I expected. I thought that the missing tooth occurred 240 degrees after TDC, but in fact it appears to be aligned almost exactly at TDC. This meant that my spark was happening around Bottom Dead Centre, which is no use at all!

Continue reading

Updates and Ignition problems

From my couple of brief tests, I’ve identified a few problems which are preventing the engine from starting up and running for more than a few seconds.

  • The ignition timing at very low speeds < 500 RPM is very erratic, and not at all on time.
  • Under heavy acceleration the ignition timing is erratic, for example when pull starting the engine
  • There are some occasional misfires
  • The ignition timing is generally not massively stable – sometimes varying as much as 10 degrees(!) Continue reading

First Test

Today was the first test of the engine with the control unit and it worked! Albeit only for a short time and a bit roughly (only had about 10 minutes to test). Initially I just needed to check that the ECU was triggering the ignition and fuel injection, and find a roughly suitable ignition angle.

Continue reading

Fuel injection map and closed loop lambda feedback

I have now managed to successfully map my engine simulator for the fuel injection timings across all loads and engine speeds. I have set up a two dimensional array, of speed and throttle position, and inside each element is the time in microseconds (us) that the fuel injector should be open for. I’ve also added closed loop lambda feedback.
Continue reading

Setting up the engine

I spent yesterday setting up the engine and equipment that I will need for the project. The engine is mounted on a frame with a car alternator as the load. The frame is then stood on a trolley which can be moved around. Some driving circuitry for the fuel injector and ignition coil has already been built and is also mounted to the trolley. There is also a conditioning circuit for the Variable Reluctance Sensor (VRS) to process the toothed wheel sensor output into a nice clean square wave ready to input to a microcontroller. The engine can be run using the stock carburettor, or with a fuel injector, and can use the stock magneto ignition or electronically controlled coil ignition.

I’ve set up a PC on the trolley to use to reprogram my ECU, and an Oscilloscope to measure signals. I forgot to take pictures, but will add them later when I do.

Update: pictures available here http://www.flickr.com/photos/gadgit/sets/72157633929512218/

Variable Reluctance Sensors (Crankshaft position sensor)

VRS sensors (sometimes called crank sensors) are basically a coil of wire around a ferrite core. They are located close to a toothed wheel which is usually mounted on the crankshaft or the teeth are part of the flywheel itself. Here’s an example of one:

From this website: http://forum.205gtidrivers.com/index.php?showtopic=60917

From this website: http://forum.205gtidrivers.com/index.php?showtopic=60917

Continue reading

Ignition Timing, Engine and Fuel Map

I have now implemented more accurate ignition timing control which is based on degrees before top dead centre rather than a fixed time period.

I’ve also implemented a simple fuel map with the ability to store new values, display the map and save the map over serial from the Arduino.

Continue reading

How Torque varies with Air to Fuel Ratio

For my Stellaris Launchpad engine simulator, I wished to add a calculation of the Air to Fuel Ratio (AFR) or lambda/equivalence ratio for the current engine conditions. I did this crudely by using the throttle position, engine speed (this->s) and current fuel pulse width (this->F) as factors in calculating the AFR:

this->AFR = (0.32666 * this->s * this->throttle)/(this->F);

Continue reading