This module emits infrared light and measures the amount that is reflected back. An onboard LM393 comparator determines if the light reflected back meets the set threshold and emits a digital on signal if it does. A separate pin allows the reading of the analog sensor directly. The amount of distance this sensor could be used for is 1-25mm.
The comparator has a driving current of 15mA so it could be used to power a small LED for indication directly.
Pulse data sampling of watt-hour meter
Paper detection of fax machine shredder
Black and white line detection
8 x TCRT5000 Infrared Reflectoin Proximity Sensor