This sensor is out of stock and being withdrawn.
Detector lets you know when you are getting near a wall or large object.
This sensor is replaced by the Infrared Relative Distance sensor, IRRD.
Building a robot that moves around is easy. Making one that does not self-destruct is more difficult. Lego sells a mechanical switch that can be used to detect when your robot hits a wall. Unforturnatly, when you hit the wall, it is sometimes too late. Fast moving robots usually can not stop in time to prevent the robot from breaking apart. The Proximity Detector provides warning BEFORE you hit the wall. This gives your robot time to reverse, or turn away from the wall. The detector trigger point can be adjusted from a few inches to a foot. With good lighting conditions, the range can be increased up to 3 feet.
NOTE: This product uses the same Infra-red technology that the RCX uses to communicate with your PC. When the IR Proximity Detector is in operation, it may interfere with communication between the RCX and PC.
IRPD IR Proximity Detector $24.00
IR Proximity Detector..
Bill-bot Robot billiard ball using two IR Proximity Detectors.
Placed on a pool table, the robot will bounce around like a ball in motion. Two Infra-Red Proximity Detectors cause the robot to turn before it hits the table edge. When an IRPD detects the table edge, it turns off the motor on the opposite wheel. When the edge is no longer seen, the motor is turned back on.
A variation on this is the table-top robot. It runs around on top of a table without falling off.
You program the detector just like the Lego light sensor. Use the Light Sensor block in the Mindstorms program environment to cause program branches. In the example below, Motor A will run until the IR Proxmimity Detector sees a wall, then it will turn off. In a simple, one-motor robot, the robot would run up to the wall, then stop before hitting the wall.
The trigger distance is set by a 3 position range switch on the detector. The distance can be fine-tuned to some extent by changing the sensor threshold in the program. Distance can also be changed by using a hinged lego piece to change the amount of light reaching the detector.
See the technical description below for details on how the IR Proximity Detector works, and how to adjust the trigger distance.
The light detecting device contains an Automatic Gain Control. This AGC varies the detector's senititity to light. If no light is being detected, the AGC will slowly increase the sensitity to maximum. When light is detected, the AGC slowly decreases sensitivity until light is no longer detected. The AGC takes a couple of seconds to ramp the sensitivity from low to high. When light is detected, the sensitivity is reduced more quickly. If a weak return signal is being recieved ( the wall is "far" away), the AGC will slowly increase sensitivity to near maximum, until the signal is detected. Once the signal is detected, the AGC quickly lowers the sensitivity, and the signal is no longer detected. The AGC then slowly increases the sensitivity until the signal is detected again. This cycle repeats continuously. The detecting device output is binary, so the resulting output is a string of pulses, where the time between pulses is a function of the received signal strength. Stated another way, the duty cycle (percent of time "on") is a function of the distance to the reflecting wall. The IR Proximity Detector integrates the pulse string to create an analog voltage that is proportional to the duty cycle. This analog voltage is returned to the Mindstorms RCX. Thus the value read by the RCX is a function of the distance to the reflecting object. Actually, the RCX value is a function of the range switch, distance to the object, and reflectivity of the object. (Some objects reflect more infrared light than others).
If an object is far away, some reflected light still reaches the detector, but not enough to trigger the detector. If you add another small, constant amount of light, you have enough to trigger the detector, and hence you can detect the far object. Think of this a biasing the detector closer to it's trigger point. The easiest way to achieve this optical bias is to reflect light from a small, close object. Place a Lego hinge piece on top of the IR Proximity Detector, as show in this picture. Adjust the hinge position until the IR Proximity Detector detects the object, then back off the position until the signal first goes away. With fresh batteries and the range switch set to "long", this technique can detect a wall three feet (one meter) away.
If you have electronic construction experience, the IR Proximity detector
circuit is not difficult to build. Here is the schematic.
Packaging in a 2x4 Lego brick is more of a challenge.