Agreed. From what I’ve picked up, ambient light rejection and crosstalk between units or between emitter and receiver is where these get iffy. My application is vey simple and ambient light can can be controlled in its immediate environment and there will be no other sensors in proximity. Where I think the challenge will be in my application is in dialing it in for accurate distance.
Basically I’m trying to detect the presence of a model train moving through an enclosed space of about 150mm in diameter. The sensor can be placed to within about 10-20mm of the train but will need to be adjustable enough so that it’s not triggered by the opposite wall of the enclosure when there’s nothing in front of it. When the train passes in front of the sensor, its output changes state.
Hell, I could do it with an LED and photo cell but an IR proximity sensor like this seems much more elegant and easier to implement.
I was looking at these too: https://www.sparkfun.com/products/12728
EDIT: here’s the shorter range one with the JST pigtail probably better suited to my application:
Any thoughts on these Sharp sensors? I keep running across these specifically. Thanks for your help, I’m pretty much a noob at this stuff. I know just enough to be dangerous :)