I'm making a sensor that will be triggered when there is an object between sender and receiver. At the moment I'm using laser on one side and photo-diode on another. But its quite difficult to align laser to hit exactly 5mm photo-diode from 4-5m distance and sometimes a sun can cause errors. So I'm thinking about making something more reliable.
The idea is to use IR detector like TSOP38238
as described in adafruit
and IR led blinking at 38kHz (maybe even 0.5W led, for better distance between receiver and transceiver). The question is are those IR detectors reliable in outside conditions: direct sunlight, rain, snow, low temperatures (-15C) etc.? Well, temperature I think will be OK (it is written in datasheet), but what scares me the most is a sunlight.