Arduino based small engine ignition controller

I’ve been spending the last week planning out the engine build for my Bonneville bike. I’d like to step up the configuration this year to push the limits of the little 50cc eBay engine. The mild modifications done last year made the bike roughly twice as fast as stock yet remained completely reliable.

Part of the build plan this year involves designing and building a microprocessor controlled ignition system to replace the stock magneto ignition. The ignition system on these particular engines fire the ignition coil on the falling edge of the magneto pickup. This type of ignition system, found on many small engines, is inherently unstable and insufficient for peak power and high revs.  By developing a microprocessor based ignition controller I can precisely control when the ignition fires as well as define an advance curve based on engine speed.  The result will be higher power output and the stability required to operate the engine at very high speeds.

I’m using the Arduino Duemilanove to develop the hardware and firmware for the controller. My current mock-up consists of a signal generator to create tach signal pulses, the Arduino, a coil with built in ignition module from my RX-7, and a protoboard to interface all of the electronics.

Firmware development is the first phase of this project. The firmware currently fires the coil when there’s a tach pulse and reports engine RPM through the serial port.

int coilOut = 7; //Coil output on pin 7
volatile byte rpmcount;
unsigned int rpm;
unsigned long timeold;

void setup()
{
attachInterrupt(0, fire, RISING); //Pin 2 tach input
pinMode(coilOut, OUTPUT); //Coil output
Serial.begin(9600); //Initialize serial port
}

void loop()
{
if (rpmcount >= 40) //Serial print RPM loop
{
rpm = 30*1000/(millis() – timeold)*rpmcount;
timeold = millis();
rpmcount = 0;
Serial.print(rpm,DEC);
Serial.println(” RPM”);
}
}

void fire() //Interrupt routine run when tach pulse goes high
{
digitalWrite (coilOut, HIGH); //Charge coil
delayMicroseconds(4000); //4ms dwell time
digitalWrite (coilOut, LOW); //Fire coil
rpmcount++;
}

Eventually the firmware will evolve to advance ignition timing 1 degree per 1000 rpm. The ignition has been tested on the bench and fires a hot spark up to 27,000 rpm. Although my engine will never see such speeds it’s nice to know the controller is capable of running that high. The dwell time has been tuned so the coil makes a nice, hot spark.

About nsfab

Nick Salyer (nick@nsfabrication.com)
This entry was posted in Projects, Small engine electronic ignition controller. Bookmark the permalink.

Comments are closed.