Embed the magnet into the flywheel, with some metal left in the outer edge so the magnet doesn't fly out. Magnet/Hall is a lot more reliable than opto anything in dirty R/C environment, and there's no such thing as a clean R/C environment.. Keep in mind what you want to do if sensor fails or opto gets dirty. Let the engine stop, keep the last settings, or go to some not optimal but reliable setting. May not be a prob if your pic is only controlling when and not IF the spark happens, but could be nice to still have power and land if sensor goes bad.. Andrew Schenk wrote: > > Has anybody ever tried using a PIC to control a spark ignition system. Than > plan is to sense the propeller RPM on a 2 stroke gasoline engine from a > radio controlled modelairplane. Depending on the RPM, the spark will be > advanced. for a prototype, the 16F84 will be used. The input will probably > be an optical sensor as engine weight is a concern. A magnet in the fly > wheel would add to the weight. What I am not sure about is the conversion > from a radian numerical value to a delay time for the spark. > > Thanks > Andrew > Student of Instrumentation Technology > St. Lawrence College > Kingston, ON CANADA