This is a multipurpose infrared sensor which can be used for obstacle sensing, color detection(between basic contrasting colors), fire detection, line sensing, etc and also as an encoder sensor. The sensor provides a digital and an analog output. The sensor outputs a logic one(+5V) at the digital output when an object is placed in front of the sensor and a logic zero(0V), when there is no object in front of the sensor. An onboard LED is used to indicate the presence of an object. The sensor outputs an analog voltage between 0V and 5V, corresponding the distance between the sensor and the object at the analog output.The analog output can be hooked to an ADC to get the approximate distance of the object from the sensor.
IR sensors are highly susceptible to ambient light and the IR sensor on this sensor is suitably covered to reduce effect of ambient light on the sensor. The sensor has a maximum range of around 40-50 cm indoors and around 15-20 cm outdoors. For better ambient light immunity, please see our