Long Range IR LED.

There’s so little information to go on, it’s hard to recommend what to do.

Driving the IR LED harder seems to be a good 1’st step. Driving it straight from an Arduino I/O pin is not a good idea and certainly less output power than the max I’d expect any LED to be capable of. Restricting the FOV of the receiver might also be a good idea. Putting it in a tube so it doesn’t “see” as much reflected light should also help. The bandwidth of the reciever is probably not well matched to the expected signal as well. Perhaps some simple low pass filtering might help as well. The OP could record some 100 or so samples of the detected output, with and w/o a signal, and attach a text file with those so we could see what’s going on.

Lastly I wonder is he might be better off using a peak detection scheme. That is really drive the LED hard for a short period of time to get as much signal as possible. Detect the peaks at the receiver and then declare the beam broken when 2 or more peaks are missed.

Really finally lastly I agree using a IR LED and IR receiver module (as in a TV remote) is the best way to go. Obvciously they work at more than the 4-5 feet desired. Drive the LED with a 555 circuit and again use a missing pulse type of detection scheme. He’ll have to be a little tricky in that these receivers are made to detect bursts of coded IR, not a continuous 38 kHz stream.