The z1670 photo interrupter from altronics ships with a 3mm gap through which an obstacle must pass to trigger a voltage drop that can be detected as digital state change by something like an arduino. What if you want a wider gap? How far apart can the IR LED and the Detector be?
About 13mm seems to be the sweet-spot (indoors on a mild day).
While I was able to measure a voltage drop at distances up to about 20mm (which could be detected as an Analog input to my Arduino project), it seems that things degrade pretty quickly after about 13mm. Using the resistor setup I describe here, 13mm gives an input reading of <100 as an analog input with gap open, and jumps to 1023 when closed – ideal for digital LOW/HIGH state change with good margin for error in differing conditions.
Here is the data: