Optical encoder help

The QRE113 sensor is pretty good for most encoders. It only sees a couple of millimeters and ignores everything beyond tgat.