This reflectance sensor carries an infrared LED and phototransistor pair. The phototransistor is connected to a pull-up resistor to form a voltage divider that produces an analog voltage output between 0V and +5V as a function of the reflected IR. Lower output voltage is an indication of greater reflection.
The LED current-limiting resistor is set to deliver approximately 20mA. The current requirement can be met by some microcontroller I/O lines, allowing the sensor to be powered up and down through an I/O line to conserve power.
Because of its small size, multiple units can easily be arranged to fit various applications such as line following robots and proximity/edge detection