Ken Gracey obtained some sample mouse sensor chips and their associated
lenses/lightguides on a recent trip to China. He approached me with a
request to help him develop an optical mouse sensor module. The idea was
to have something that would interface to BASIC Stamps and Propellers
and that would detect X and Y motion from a contact or near-contact
surface. The chips and optics are mass produced for computer mice, but
they're not terribly user-friendly for experimenters. Although the chip
comes in a DIP, it's bottom-looking, requiring a board cutout, and has
staggered 2mm-spaced pins. The optics consist of a single, clear
injection-molded piece of plastic with no mounting holes. The chip docs
show how all the pieces are supposed to fit together
using a custom
injection-molded base. But this isn't much help for the
do-it-yourselfer...
http://forums.parallax.com/forums/default.aspx?f=36&m=424710