IR obstacle sensor, weird output

Hello everyone

I have a question about IR sensors. I´ve been struggling with those, because I do not understand their output, although it should be really simple.

This does not happen only with the sensors Im trying now (5pcs IR Infrared Obstacle Avoidance Sensor Module for Arduino Smart Car Robot | eBay), it also happened in the past with other sensors from other places.

Basically, the sensor works fine at 5-8 cm range, and then, as I turn the pot to " more range" it just outputs 1 forever. Why does it seem to stop working? I know this is a bit vague, but it is all I observed. Any guesses are really welcome.

Thank you a lot

Andre

Are you shielding the sensor from stray sunlight and other light that may contain IR wave lengths?

Paul