Optoreflector sensors contain a matched infrared transmitter and infrared receiver pair. These devices work by measuring the amount of light that is reflected into the receiver. Because the receiver also responds to ambient light, the device works best when well shielded from abient light, and when the distance between the sensor and the reflective surface is small(less than 5mm). IR reflectance sensors are often used to detect white and black surfaces. White surfaces generally reflect well, while black surfaces reflect poorly. One of such applications is the line follower of a robot.
The diagram on the right shows an example of a infrared reflectance sensor. For this particular example, the IR detector being used can be ordered from Mouser Electronics ( Part# 512-QSE113) and the IR emitter can be ordered form Digi-Key (Part# LN175PA-ND). The resistors being used in this example are chosen to match the electrical properties of the IR dectector and emitter. You might want to choose different resistors if you use different dectectors and emitters. Different resistor values affect the sensitivity of the infrared reflectance sensor.