hudmut,
I use a hall sensor on my lathe and works great. It was much easier to mount / implement that an opto with a single slotted disc when i did my lathe conversion. So have used both with success. For a pickup i used a rare earth magnet from Radio Shack ( about 1/8" in diameter ) and just cleaned a spot and crazy glued it to the back of a gear. You will need look up the max current allowed by the sensor and limit it to the the sensor via a resistor. Just needed +5v / signal wire back as an input in MAch / and a grd.
RICH