Methodology
Sensors
Two functions of the sensors that will be used for this Micromouse is to detect walls as well as to measure path in the maze. Distance sensors will be used to detect the length of the path in front, and possibly to the sides of the Micromouse. The Sharp GP2D12 (analog output) or Sharp GP2D02 (digital output) short distance measuring sensors are being considered. At least three sensors will be used and located in front, left and on the right side of the Micromouse.
Sharp GP2D12 IR sensor |
Theory of Operation
With the introduction of the GP2DXX line of Sharp detectors, a new approach was developed that not only gives object detection at a longer range than the previous method, but also offers range information, in the case of the GP2D12, GP2D120, and GP2DY0A ('0A') detectors. These new rangers offer much better immunity to ambient lighting conditions because of the new method of ranging.
These new rangers all use triangulation and a small linear CCD array to compute the distance and/or presence of objects in the field of view. The basic idea is this: a pulse of IR light is emitted by the emitter. This light travels out in the field of view and either hits an object or just keeps on going. In the case of no object, the light is never reflected and the reading shows no object. If the light reflects off an object, it returns to the detector and creates a triangle between the point of reflection, the emitter, and the detector.
These new rangers all use triangulation and a small linear CCD array to compute the distance and/or presence of objects in the field of view. The basic idea is this: a pulse of IR light is emitted by the emitter. This light travels out in the field of view and either hits an object or just keeps on going. In the case of no object, the light is never reflected and the reading shows no object. If the light reflects off an object, it returns to the detector and creates a triangle between the point of reflection, the emitter, and the detector.
The angles in this triangle vary based on the distance to the object. The receiver portion of these new detectors is actually a precision lens that transmits the reflected light onto various portions of the enclosed linear CCD array based on the angle of the triangle described above. The CCD array can then determine what angle the reflected light came back at and therefore, it can calculate the distance to the object.
This new method of ranging is almost immune to interference from ambient light and offers amazing indifference to the color of object being detected. Detecting a black wall in full sunlight is now possible.
Which Detector to Use?
The GP2XX detectors come in several derivatives. The table below helps to characterize each type by minimum and maximum ranges, as well as whether the sensor returns a varying distance value or a boolean detection signal:
Comparison of Sharp IR Rangers by Acroname |
Non-Linear Output
Because of some basic trigonometry within the triangle from the emitter to reflection spot to receiver, the output of these new detectors is non-linear with respect to the distance being measured.
GP2D12 Output Voltage to Distance Curve |
The above graph shows typical output from these detectors. There are two things interesting in this graph. First, the output of the detectors within the stated range (10 cm - 80 cm) is not linear but rather somewhat logarithmic. This curve will vary slightly from detector to detector so it is a good idea to "normalize" the output with a lookup table or parameterized function. In this way, you calibrate each detector and end up with linear data that is consistent from detector to detector.
The second thing to notice in the above graph is that once you fall inside of the stated distance range (less than 10cm), the output drops rapidly and starts to look like a longer range reading. This can be disastrous if your robot is slowing down as it approaches a solid object, gets below the minimum range, and then misinterprets the apparently long range reading driving full-speed into the object. The easiest way to avoid this is to cross-fire the detectors across the width or length of the robot.
The Linearizing Function
According to page 10 of the Sharp Device Specification for Distance Measuring Sensor Model No. GP2D120, a plot of the following interpolated equation is demonstrated:
According to page 10 of the Sharp Device Specification for Distance Measuring Sensor Model No. GP2D120, a plot of the following interpolated equation is demonstrated:
V = 1 / ( R + 0.42 )
Where V is voltage and R is range, the equation produces a very straight line. The division operation acts as a linearizing function that turns the ungainly curve into a linear plot. This observation is the key to finding a simple approximation function for a Sharp IR range finders.
The constant in the linearization function depends on the sensor type and calibration data parameters. The value of 0.42, as shown above, works well for the GP2D120 and the calibration points in the Sharp document, but may not be suitable for other sensors. This constant will be represented as k since it may change. The first step in getting a good voltage-to-range function is to find a constant k that linearizes the data. The following plot shows how the GP2D12 response graph shown above can be linearized by defining the variable k = 4.0.
Reference:
No comments:
Post a Comment