Withdrawn DIRPD-S
Dual IR Proximity Detector
.
This product is withdrawn and no longer available. It is listed here for reference only.
Proximity Detector lets you know when you are getting near a wall or large object.
Note: The connector on this product has been changed. The new version has a standard black Lego wire and 2x2 bump connector. The sensor bottom plate is black plastic with no metal.
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 is fixed at about five inches, which gives most robots enough time to stop or turn.
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.
Dual IR Proximity Detector..
Simple Robot.
This simple robot will avoid collisions with walls and beverage cans. When the DIRPD detects an object, it turns off the motor on the opposite wheel. When the edge is no longer seen, the motor is turned back on. Look at this example program after you read the programming section below.
A variation on this is the Billbot. It bounces around on top of a pool table without hitting the ball on the table.
You program the detector just like the Lego light sensor. Use the Light Sensor block in the Mindstorms program environment to cause program branches. The DIRPD returns four different values depending on what it sees. In the example below, Motor A will run when the DIRPD sees an object on the left. Motor C will run when it sees an object on the right. Both motors run when it sees an object straight ahead. If you put lights on the motor outputs, this program is useful for testing the range of the IRPD.
You can download the Users Guide in pdf format. (446KB)
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 flat plate on top of the IR Proximity Detector, as show in this picture. Try different color plates to get the maximum distance without false signals. This technique can double the range.
Sometime one LED is stronger than the other. As you aproach an object straigh ahead, it may first read as if to one side. As you get closer, it registers as straight ahead. You can correct this using the biasing technique above, applied to the weak side. Use a flat 1x2 plate as shown in the picutre. Adjust the angle to enhance the weaker LED.
This sensor uses an observation of DennisClark.
He reported that the PIC12C805 microprocessor is well suited to the dual
IRPD application. Thanks Dennis!