I began working on this idea a while back but lost attention over the riding season. Cold weather is coming, so it's time to pick it back up. I mentioned this in another thread and several people seemed interested in learning some Arduino usage as well as using the final product. So, I thought I would start a new thread for this specific topic. Once things are sorted out this will all be wiki'd, but for now we can use this as a place to exchange ideas for the thing.
So far, I have been using an Arduino Uno. It's simple and cheap; ~$25 at the time of writing this. You can even buy them at local places like Radio Shack.
When I initially began development of this, I built a simple CDI circuit which was basically a copy of one that Ryan had posted some time before. Essentially it rectified (converted AC to DC) the current coming off the ignition coil and dumped it in to a capacitor, and when the signal coil 'fired', an SCR (Silicon Controlled Rectifier) acted as a switch which would ground the capacitor, thereby dumping its charge to the high tension coil. Here is the circuit to the best of my recollection (as the image from the original thread has 404'd):
Here is a video of the circuit in use:
Now that I had a simple working circuit, I wanted to basically circumvent the trigger signal going in to that SCR and send it to the Arduino, such that I could programmatically delay the response based on various conditions such as current RPM, temperature, etc.
The problem I ran in to was treating the signal coming from the trigger coil so as to prepare it for input to the Arduino. At about 1000 RPM, the trigger coil on my MVT Millennium was putting out about 4 volts, meaning at 15 thousand RPM (no I don't plan on going to that RPM, but if I'm going to design a system, I want it to be able to handle extremes) it would be putting out a whopping 60 volts. I'm still learning all this stuff as I go along, and despite consulting some EE students here at MIT, I could not come up with a good way of essentially converting that to a binary signal. If I were to resist down the signal such that it's low enough to pipe in to an analog input on the Arduino at 15k RPM, the signal at 1k RPM would be so low that it would no different than the ambient noise.
That catches us up to the present date. A few days ago I was kicking an empty can down a dirt road and realized that all I had to do was just epoxy a Hall Effect sensor on to my stator and I could then simply ignore the stock trigger coil all together. Hall Effect sensors's are magic little switches that turn 'on' when a magnet passes over them, and then turn 'off' when the opposite pole of a magnet passes over again. Because most of our flywheels have four magnets in them, all I had to do was listen to this sensor for on-off-on-off and then I know that a full revolution has occurred.
To test my device I have taken a small centrifuge and turned a custom rotor for it on the lathe in to which I have embedded two small neodymium magnets and screwed a shitty piece of wood in there on which to mound my sensor. Yesterday I finished writing some basic code for this project and tested it out. It simply prints to the serial monitor the current RPM. This centrifuge spins up to 14k RPM, and I'm happy to say that my device was reading it as ~14998 RPM!
(old picture.. that is the pickup coil for a 'Treats CDI' from my initial tests. The Hall Effect sensor is not pictured)
So, the next step is to build another CDI circuit to trigger with a digital output pin on the Arduino. I am currently researching a new circuit so I may run it off of a 12v battery. I don't plan on running a total-loss ignition, but it would be nice to have it as an option and would make testing easier. The problem with the earlier circuit is that when the SCR triggers to ground the capacitor, it will also ground the + lead on the battery for a moment and that is going to eventually break things. (edited)