I purchased 2 of these:
And plugged them up to ground and 5v. That is just to test the sensor since there is a green light that tells you when it is set off etc. Green light on means it detects something. I adjust the pot all the way to the left, and as expected, its not set off when you put your hand over it since the distance is to small. Then I move it a little to the right, and it sets it off anywhere from 0 to 6 cm. Which makes sense. But then I turn it all the way to the right, and it turns on the green light! Why? I can't get a distance farther than 6 cm? shouldn't all the way to the right be the maximum sensor distance? So why does set itself off? Is it faulty? Am I doing something wrong?
If you need a video or something let me know.
Here's a video I found kinda showing how this sensor works, although it wasn't made by me.
I wish he showed what happens when you adjust the pot the other way, but he didn't.