The Robotics with the BoeBot tutorial which is downloadable from Parallax (go to their main web page, select the Resources tab, then choose Downloads, then Stamps in Class Downloads) has a chapter on using modulated IR for distance detection. This includes circuit diagrams and sample code. The use is different, but the technique is usable at shorter range. By using a larger resistor value for the IR LED, you can reduce the amount of power used, thus the range of the IR beam. I can't give you a specific value. You'll need to experiment with the effective range for different amounts of LED current.
Depending on your circumstances, you may want a baffle on the IR detector to limit its range of view (like the opaque tube that comes with the IR LED shown in the tutorial.
This thread is being moved from the Completed Projects Forum to the Sandbox Forum as it is off topic in the original forum which is for Completed Projects only.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Chris Savage Parallax Tech Support
Comments
Depending on your circumstances, you may want a baffle on the IR detector to limit its range of view (like the opaque tube that comes with the IR LED shown in the tutorial.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
http://www.maxbotix.com/