Optical Detector / Phototransistor: QRD1114 (0.5mm to 1cm)
This Optical Detector / Phototransistor has an infrared emitter and NPN Phototransistor all in one package. When the sensor is in front of a reflective surface, the emitted IR beam makes it to the internal phototransistor and closes the circuit.