I would suggest a sensor like the TSOP1838 or TSOP4838. The emitter you have will work. What you will need to do is pulse the emitter at 38 kHz and then read the output of the TSOP1838. This will output a 1 if there is nobody there, and a 0 if there is based on light reflected from an object. Of course, the IR emitter and IR detector have to be aligned on the same axis for light to reflect from the emitter, off the object, and back to the detector.
You will have to play with the duty cycle of the 38 kHz output to get the right range. Too high a duty cycle (too much power) and there will be so much light leaking from the IR LED that the TSOP1838 will always be on. Too small a duty cycle (too little power) and of course, there will not be enough IR light to reflect off the object being detected.
We have a demo of this object detection principle working for our Gadget Shield
, you can also see a
of this principle in action, and also download the source code
The Quick Shield
: breakout all 28 pins to quick-connect terminals