The GP2D15J0000F is intended as an simple object presence dectector. It works great to sense blockages to trigger an emergency stop or other resposne. Please note, it is not possible to change the factory set detection threshold range of 24cm (9.45 in).
Sharp infrared distance sensore are extremely light weight, low power and compact, making them ideal for integration into mobile automation applications like UAVs, UGVs, and remotely controlled semi-autonomous cars. These sensors are perfect for collision avoidance and object detection, and can even be used for indoor mapping applications. Their narrow beamwidth of approximately 6cm at half of the maximum range allows for precise mapping of detected objects relative to the sensor. Since Sharp sensors use infrared light, their output can be variable in bright sunlight or when detecting glossy objects like glass or metal. Be sure to test the sensor in applicable lighting conditions and object reflectivities. Our application note provide more detail on detecting different object types in various lighting conditions.
These types of infrared distances sensors use triangulation to determine the distance from the sensor to objects placed in their beam pattern. A pulsed infrared light source creates the illumination beam, and a small linear CCD array receives light reflected off any object in the beam path. If there is no object in the beam path, the light is never reflected, and the reading shows no object. If the light reflects off an object, it returns to the detector and creates a triangle between the point of reflection, the emitter and the detector. By using triangulation, the sensor can compute the distance to the object which reflected the light. An internal comparator circuit then triggers the detection output when the distance is less than the detection threshold. Our Sharp Infrared Comparison Article provides more details on how this sensor works. Also, in order to quickly convert this sensor's analog output to a linearized distance using only interger math (e.g. when running on a low power microcontroller), see our example code in our Linearizing Sharp Range Data.