As nbucska said, it is often easier to use a permant magnet pick-up sensor, like those used to drive a speedometer , along with a slotted wheel, or gear. You can even use a metal disc that you have cut slots into. I have done this on trucks, using a drive shaft U-Joint 's four wrist pin ends as the "wheel", or a balancing weight on the drive shaft.
You may need to do some shaping of the waveform, since it will be similar to a sinewave, but that is easy to do.
They are called "inductive or magnetic pick-up senders " and you could even get one from an auto scrap yard for cheap.