The QRB1114 IR Sensor is a focused reflect sensor that is used for the detection of changes in a surface.
NOTE: This item has been discontinued. The OPB704 is now it's direct replacement.
The QRB1114 is a focused reflective Infrared Photo Detector. It is very useful for non-contact surface sensing. This sensor has a very narrow range of detection making it ideal for wheel and RPM counters.
Object or surfaces must be within 0.5cm. This circuit will not distinguish between white and black objects but it will let you know when you are at the edge of a surface.
If you want to detect the difference between white or black surfaces, in the circuit above the Input pin on the Micro should be an analog to digital converter or some other device that can utilize variable voltage levels. A black surface will give a voltage somewhere near the upper voltage (4~5V, due to the pull-up resistor), and white surfaces will give a voltage near ground (due to the phototransistor pulling the voltage down).