Here's a really cool quadrature encoder and motor driver for the GM17 Gear motor designed by the micro-specialists at Didel.
Four spindles on the trackball have a tiny circular magnet the end; each of these are paired with an SMD hall effect sensor, which are used to measure up, down, left and right movements of the trackball.
This ratiometric linear Hall-effect sensor provides a voltage output that is proportional to the applied magnetic field.
The Phidget Rotation Sensor is a 300 deg. Rotation sensor for the Phidget 8/8/8.