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!


So, all I did was adjusted my #define for the Tooth Offset to be 360 degrees, and the engine fired up straight away! It still it a little difficult to start because it needs high cranking speeds > ~500 RPM before it begins to trigger the ignition. I can adjust this down to get it a bit more reasonable perhaps around 100 RPM which is easier to produce with the pull chord.

I then played around with the spark timing in a range of about ±30 degrees around the missing tooth, and found that under no load, at idle speeds, it didn’t make a great deal of difference, but did start to run rough and cut out closer to the -20 degrees, so I suspect that this is beginning to get after TDC. I need to spend more time mapping the ignition with different loads and engine speeds, and try to tune for maximum torque. For now, I’m happy that it works, and am moving on to the fuel injection side, to confirm that works before combining them together and adding lambda feedback.

The code is available here:
https://bitbucket.org/SSnowden/project-arduino-ecu/src

Please comment or email me with any similar projects!

11 thoughts on “Arduino Controlled Electronic Ignition

  1. Carlos

    I really admire what you’ve achieved and I’m working in the same thing trying it with a 4 cylinder diesel engine. Where can I find the code you used for the electronic injection? I’d really appreciate being able to take a look at it.

    Reply
  2. Solihin Millin

    Hi Scott,

    Just discovered your project. I’m doing something similar (more simple) on a Chinese 80 cc two stroke.

    I’d love to hear all and any of your comments and if you have them, links to other such arduino ignition timing projects.

    I’m in the process of 3D printing the timing disc and optical pickup and then will launch into the Arduino code. I’ve manufactured a 36 hole including one missing hole for TDC timing disc. I hope you used the same? As soon as I’ve got the engineering right I’ll start on the code.

    Thanks so much for your info and code. Very much appreciated.

    Did you get it all to work in the end?

    Sol 🙂
    Melbourne Australia

    Reply
    1. Scott Snowden Post author

      Hi,

      That sounds really interesting, I suggest you take a look at the speeduino Project, theyve made really good progress on this. Mine worked perfectly fine, it does most of what yoy want from basic engine control. I used a 24 or 36 tooth wheel, cant remeber and it doesnt really matter too much. Ive got some Videos on Youtube of my system if they’re not in this post.

      Would be interested in knowing how you get on!

      Cheers
      Scott

      Reply
  3. Gideon

    Hello this is very exciting. Have you ever thought about controlling an electronic transmission with paddle shifting . Like for instance the Mercedes 722.6 gearbox. The gear changes are controlled by solenoids.

    Reply
  4. Josh

    Hello! I know this is an old project, but I am doing something similar for my 2 cylinder motorcycle. Where exactly before TDC were the sensors mounted? (you used a missing tooth design, so i should ask how far BTDC was the missing tooth?)

    Also, are youy able to controll dwell time of your coil?

    Reply
    1. Scott Snowden Post author

      Hi Josh,

      Always interested to hear about similar projects! To be honest I really can’t remember. I have a feeling it was around 1/3 a revolution or 120degrees. It shouldn’t make too much difference, aside from probably not wanting to be right around TDC due to the rapid acceleration. I believe I could control the dwell angle, although I think I had this as a fixed time in my code as that’s probably want you want. If I remember correctly this time reduced if the engine speed was fast enough for it to overlap the last cycle.

      Reply
  5. Reena Gibson

    So glad I found this. I have a 1981 Honda CB650 custom that’s going back on the road very soon. It already has electronic ignition so half the problem has been solved in terms of trigger. The carbs though have struggled over the years to be efficient in fuel delivery, I’m hoping a full electronic system that’ll allow me to get rid of those carbs and replace them with injectors will fix it for me. Carbs for this bike are as rare as hens teeth and so when they do come up on ebay they cost a bucket load.

    One important question I have is how to you manage with revs, is the Arduino responsive enough to attain high revs? I’m talking around the 14,000 rpm range. It’s one thing being able to make an engine run but in terms of performance it needs to be able to cope with high revs and coil switching.

    Reply
    1. Scott Snowden Post author

      Sounds like a good project! Would really recommend taking a look at Speeduino. I think my controller and code would have struggled to get to 14,000RPM, if I remember correctly, I did test it up to 6,000RPM. However, with a faster microcontroller (e.g. MSP430, or maybe Arduino Duo and some optimisation, I think it could get there.

      Reply

Leave a Reply to Scott Snowden Cancel reply

Your email address will not be published. Required fields are marked *