Hi there ,
From the 3 excellent links we got from fmssp , I liked the 3rd most because of its simplicity srspinho.
But you can make it simpler on replacing the Hall-Effect sensor with an Optical one .
In my experience , once you are done with the Hardware-Software part , comes the trouble to attach those magnets on to the rotating part you want to sense,.....
I succesfully use
QRD1114 as a sensor , only thing needed to sense the movement is a tiny White-Black transitions spot on rotational part,... ( Can also use
OPTEK 703 ). I commonly use Girls Nail Paint for this painting ( clean part before apply).
I have some real world applications of this using Basic PIC processor and very simple PULSE IN code to get an speedometer for a few $.
Moreover , QRD1114 can easily be used as a proximity sensor , or distance measure in the 0 - 100 mm range. A nice IC I must say and cheap.
If still interested , maybe I can help you set up one of these,
Greetings
FAA