This 200 pulse per rotation rotary encoder outputs gray code which you can interpret using a microcontroller and find out which direction the shaft is turning and by how much. This allows you to add feedback to motor control systems. Encoders of this kind are often used in balancing robots and dead reckoning navigation but it could also be used as a very precise input knob. The encoder comes with a set screw coupler which will attach to any 4mm shaft.
- Resolution: 200 Pulse/Rotation
- Input Voltage: 5 - 12VDC
- Maximum Rotating Speed: 5000rpm
- Allowable Radial Load: 5N
- Allowable Axial Load: 3N
- Cable Length: 50cm
- Shaft Diameter: 4mm
Datasheet and example code are available on the website of Sparkfun.