Just my 2c: - The problem with the reed switch you describe is unlikely to happen in real life, and can be easily remedied in software. Just check for minimum time b/w pulses, or implement an even more clever algorithm. I have no idea why Olin thinks it is not a good choice (it's certainly good enough for commercial speedos). - If you go with the coil option, you need an amplifier that will take the pulse from the coil and get it up to 5 volts. Put a low pass filter (in the simplest form, a cap) on the input of the amplifier. Vitaliy solarwind wrote: On Sat, Aug 15, 2009 at 7:55 PM, Olin Lathrop wrote: > A reed switch is not a good choice. This is usually done with a permanent > magnet between two spokes of the back wheel as far radially outward as > possible and a pickup coil on the frame. A little analog electronics and > you get a pulse into the PIC once per wheel rotation. Good idea, but the analog electronics part is wayyyyy too complicated for me. But I'm going to go for it as I can already see an advantage with the analog solution: if I were to use a reed switch, it may rapidly switch on and off if the magnet stalls near the switch. However, with a coil, it is possible to filter that out. This approach also raises a few more questions: * What kind of coil would need to be used? Thickness? Resistance? * Would a coil pulled out of an analog clock work? (Was formerly used in the clock to move the seconds hand.) * How much coil is needed and how will it be configured physically? Will it be wrapped around a pencil, for example? * I'll look at the signal produced by the coil through an oscilloscope, but what other electronics is needed to isolate the wanted signal? Or can a PIC alone and it's A to D converter tackle the task? I'll have to do some reading on analog filter design. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist