Hi,

I've fiddled a bit with Arduino basic stuff, and my bigg plans for an EV controller have stumbled upon legislation, so that has never really taken off. I am in the mean time working on a custom motorcycle, and I feel the ignition needs some improvement. It has no part-load advance. Here's what I like to do with Arduino: Measure revolution time (1 puls per revolution generated). Look up standard advance the ignition degrees conform a table as a result of rpm Devide measured revolution time by 360 degrees and multiply by advance value just looked up plus 180 degrees (sensor opposite to TDC), and subtract dwell time. Wait for next pulse, start revolution time counter again and start counting the just calculated number of ms, write ignition pin high, wait dwell time, write ignition pin low, done.

It will rely on two tables that I can make as detailed as possible, but could be simple to start with: RPM < 1000 advance 18 degrees RPM 1000 - 4000 advance 18 - 10 degrees (linear) RPM 4000 - 8000 advance 10 - 5 degrees (linear) RPM > 8000 advance 5 degrees

MAP value 0 - 1,5V advance 0 - 4 degrees (linear) MAP value 1,5 - 3,5V advance 4 - 7,5 degrees (linear) MAP value 3,5 - 5V advance 7,5 - 10 degrees (linear)

And I could split the tables into more fractions as desired.

Can this be done? The max RPM of my engine is 12k rpm (in theory, never go there) and I require only one spark, it's a 2 cilinder and I will fire a dual coil with waisted spark. Hooking everything up mechanically and sensor-wise I can do.

Thanks for input, Cheers,

Hugo