Obstacle IR sensor switches ON when comes sufficiently close to an object surface. For the sensor to switch ON, it needs to be within few millimeters to a couple of centimeters from the object.
It remains ON as long as object is at a distance less then predefined distance. This Predefined distance can be adjusted by turning potentiometer mounted on sensor.
Please note that the obstacle sensor does not work with black surfaces. When brought close to an object with black surface, it may not switch ON or may switch ON when it is very close to such black object.