Infrared Obstacle Avoidance Sensor Faulty?

I purchased 2 of these:

http://www.banggood.com/Infrared-Obstacle-Avoidance-Sensor-For-Arduino-Smart-Car-Robot-p-72965.html

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.

https://www.youtube.com/watch?v=1shH5EWyETI

I wish he showed what happens when you adjust the pot the other way, but he didn't.

Hi microzee, I have just purchased 2 of these also. I think if you turn the pot fully to the right you perhaps upset the comparator (LM393?), this has two inputs one the voltage from the pot wiper (the other ends being connected to 5V & Gnd), the other being from the sensor. As the name suggest it compares the values input, but if you set the pot too ( high/low) close to the supply rails you and your sensor have no chance and the output goes too high or low and you just get a maasive positive swing, the same can happens if its set fully left with a swing to a low output...

I can get a good 15-22 cm setting with mine (turn the pot fully right, then just back off a tad so the led goes off) , which is what I need, don't think you can ask for great distances, without some amplification or even modulating at say 20KHz, remember daylight and many artificial lights are full of IR! . Get some black heat shrink tubing and cover the LEDs? with a sleeve of it, leaving just the sensitive ends visible, this makes them more directional.. Just moved to the sunny side of the room and it's useless TOO much IR!

Hope this helps.. regards

Mel.

Cactusface: Hi microzee, I have just purchased 2 of these also. I think if you turn the pot fully to the right you perhaps upset the comparator (LM393?), this has two inputs one the voltage from the pot wiper (the other ends being connected to 5V & Gnd), the other being from the sensor. As the name suggest it compares the values input, but if you set the pot too ( high/low) close to the supply rails you and your sensor have no chance and the output goes too high or low and you just get a maasive positive swing, the same can happens if its set fully left with a swing to a low output...

I can get a good 15-22 cm setting with mine (turn the pot fully right, then just back off a tad so the led goes off) , which is what I need, don't think you can ask for great distances, without some amplification or even modulating at say 20KHz, remember daylight and many artificial lights are full of IR! . Get some black heat shrink tubing and cover the LEDs? with a sleeve of it, leaving just the sensitive ends visible, this makes them more directional.. Just moved to the sunny side of the room and it's useless TOO much IR!

Hope this helps.. regards

Mel.

Thank you, that is how I was originally adjusting them. Turn it just til it turns green then turn it back a hair. But after a while, It would trigger itself again. Maybe the lighting in my room changed or something. What about a pull down resistor. Would that help? I will also try the heat shrink trick. I was originally wrapping electrical tape around them, but didn't think of heat shrink.

Would that help?

No

Hi, The LM393 comparator output is an open collector, so no point in trying to pull it LOW. The pullup pulls it up you can't do it the other way. The tape around the devices should do the trick just the same, this only partly works because most plastics are transparent to IR, having to two devices side by side might cause a bit of sideways leakage.

I still think you may just have too much IR flying around. I must admit in my early bots I modulated it with 38KHz, but then you need the proper receiver to detect it, very cheap on you know where. http://www.ebay.co.uk/itm/400761969888?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2648 Or Vishay might give you a free sample if you ask nicely!!

Regards

Mel.