|
|
![]() ![]() »þÇÁÀÇ °Å¸® °ËÃâ¿ë Àû¿Ü¼± ¼¾¼ GPIU58X, GPIU58X¸¦ ºÐ¼®ÇÑ ÀÚ·áÀÔ´Ï´Ù. ÀϺ» SHARP »çÀÇ Àû¿Ü¼± ¹Ý»ç ÃøÁ¤¹æ½Ä °Å¸®°¨Áö ¼¾¼ÀÔ´Ï´Ù. 20CM - 150CM, 10CM - 80CM, 4CM - 30CM ÀÇ °Å¸®¸¦ ŽÁöÇÕ´Ï´Ù. °Å¸®¿¡ µû¸¥ ¾Æ³ª·Î±× Àü¾ÐÀÌ Ãâ·ÂµË´Ï´Ù. . ¡ß SHARP GPIU58X, GPIU58XÀÇ ±¸Á¶: µÞ¸éÀº EMI¹æÁö¿ë ±Ý¼Ó½Çµå·Î µÇ¾î ÀÖ°í Á¢ÁöÇÉ¿¡ ³³¶«µÇ¾î ÀÖ´Ù. ¿¬°á´ÜÀÚ´Â 3ÇÉÀ¸·Î ½ÅÈ£, Àü¿ø,Á¢Áö·Î ±¸¼ºµÈ´Ù. ³»ºÎ±¸¼ºÀº ºí·¢¸¶½ºÅ©·Î µ¤Èù ¼¾¼IC¿¡¼ ³ª¿Â ¾Æ³¯·Î±× ½ÅÈ£´Â Ãâ·ÂÀÌ Á¦·ÎÀ϶§ 1.5V, Ç®½ºÄÉÀÏ¿¡¼ 2.5VÀÌ´Ù. »ó½Â,Çϰ ½Ã°£Àº 100msÀ̸ç, »ùÇøµ ·¹ÀÌÆ®´Â 10HzÀÌ´Ù. 40KHz ¹êµåÆÐ½ºÇÊÅ͸¦ ÅëÇÑ µÚ¿¡ ÀûºÐ Capacitor 0.1uF¿¡¼ ÇÊÅ͸µµÇ°í À̰ÍÀ» 5000~10,000pF Á¤µµ·Î ¹Ù²Ù¸é ÀÀ´ä¼Óµµ°¡ 1~2ms·Î °³¼±µÈ´Ù. ¸¶Áö¸·À¸·Î µðÁöÅÐ ½ÅÈ£·Î º¯È¯µÇ¾î Ãâ·ÂµÈ´Ù. µðÁöÅнÅÈ£´Â °Å¸® 100~300mm¿¡¼ 5 ºñÆ®ÀÇ ºÐÇØ´ÉÀ¸·Î Á¤µµ´Â 6.25mmÀÌ´Ù ÇöÀç »þÇÁ¿¡¼ »ý»êÇϰí ÀÖ´Â »óǰÀº ´ÙÀ½ÀÇ 3Á¾ÀÌ ÀÖ´Ù. GP2Y0A02YK ÃøÁ¤¹üÀ§: 20 CM - 150 CM : 39,600¿ø GP2D12 ÃøÁ¤¹üÀ§: 10 CM - 80CM : 35,200¿ø GP2D120 ÃøÁ¤¹üÀ§: 4CM - 30CM : 33,000¿ø ¡ß Sharp GP2D12 Distance Measuring Sensor Infrared distance measuring sensor. Accurately determines range to target between 10cm and 80cm. Can be used as a proximity detector to detect objects betwen 0cm and 130cm. This sensor uses a hard-to-find 3-pin JST connector. For your convenience, we highly recommend purchasing a pre-made cable with connector that mates with this sensor. See 3-pin JST Cable for Sharp Sensors (12 inch). ¡ß Sharp GP2Y0A02YK Distance Measuring Sensor This is the long-range version of the popular GP2D12 infrared distance measuring sensor. Accurately determines range to target between 20cm and 150cm. Can be used as a proximity detector to detect objects between 0cm and 250cm. This sensor uses a hard-to-find 3-pin JST connector. For your convenience, we highly recommend purchasing a pre-made cable with connector that mates with this sensor. See 3-pin JST Cable for Sharp Sensors (12 inch). ¡ß GP2D02 IR Rnage Sensor ![]() The way triangulation is implemented in the GP2D02 can be seen in Figure 2. IR LED light shines through a small convex collimating lens with the LED's effective point of emission placed at its focal point. This causes the diverging rays of the LED to be brought together into a thin parallel column of light. ![]() When the light strikes the target, a certain amount of light is reflected straight back up at the emitter. This is known as specular reflection. If the object were a perfect mirror, this is all that would happen, and the distance measurement would be impossible to obtain. However, almost all substances have a fairly large degree of surface roughness, which results in a hemispherical scattering of the light (non-specular reflection). Some of the light from this hemisphere is directed back towards the sensor's receiving lens. The receiving lens is also a convex lens, but now serves a different purpose. It acts as an angle to position converter. If a target is placed in the focal plane of a convex lens and parallel rays shine in from the other side, the ray that goes through the center of the lens passes through unchanged and marks the focal spot. The remaining rays also focus at this point. Placed in the focal plane is a Position Sensitive Detector (PSD). This is a semiconductor device that outputs a signal whose intensity is proportional to the position of the centroid (effective center) of the light shining on it. In the case of the GP2D02, the PSD outputs a signal proportional to the position of the focal spot. This signal is then digitized to an 8-bit unsigned value and can be read out of the GP2D02 in a clocked serial format. ¡ß Sensor Measurement Characteristics For the tests conducted for this application note, the GP2D02 was mounted vertically. The ultimate goal of the tests was to obtain a mathematical model for the sensor's output code vs. distance curve. Such a model would enable a robot's brain to convert the code from the sensor into an accurate distance reading. Many factors, including manufacturing variations, target reflectance, and ambient light might be expected to affect the accuracy. The following graphs and discussion show the degree of accuracy that can be expected, and the conditions under which the sensor can be expected to deliver good results. If the sensor were perfect, the sensor output value would be directly proportional to the angle at the peak of the triangulation triangle. Theoretically, the output of the sensor should take the form: Output = K1 * ARCTAN (K2 / Distance) + K3 This formula comes from trigonometry, as applied to the triangulation triangle (see Figure 3). K1 is just a multiplicative constant to bring the result into the range of 0 to 255. K2 is the lens separation, and K3 is an offset. ![]() Figure 4 shows the typical output of a GP2D02 against a white paper target measuring 12.7 cm horizontally by 17.8 cm vertically. It also shows a rough fit of the formula given above to the typical curve, obtained by just trying different constants. For the particular sensor used in the test, the resultant constants are K1=1000, K2=1.9, and K3=25. The sensor does fit the theoretical expectations well for distances greater than 10 centimeters. The sensor cannot handle shorter distances, due to the small lens diameter and the large angle at which the reflected rays would be directed. ![]() The factors affecting accuracy can be divided into three categories: those caused by the sensor itself, those caused by the target, and those caused by the environment. The only significant factor caused by the sensor itself is manufacturing variation. Tests conducted on three sensors show that the variation in the sensors consists mainly in a change in the offset (K3) and that the shape of the curve is the same from sensor to sensor. K3 differed by as much as 17 between two of the sensors. Target reflectivity, target angle, target size, and target position, relative to the optical axis, are the major factors caused by the target. Figures 5 through 11 show the effects of these variables on the output. Target reflectivity seems to play the most significant role, affecting the results for distances greater than 30 centimeters for both gray fabric and black cardboard. The output of the sensor is very consistent for both large and small targets. The results are reliable even for targets as small as 3x3 cm. ![]() ¡ß Electrical Interface The GP2D02 has two electrical requirements: a 5 volt power supply, and a suitable clock signal. The GP2D02 has a small 4-pin connector for power, ground, and signals The GP2D02 datasheet states that the supply voltage must remain within the limits of 4.4 V to 7 V for proper operation. When the sensor is in the process of measuring or sending data, it draws an average current of about 18mA. This current drain actually consists mainly of a series of 32 pulses at 270mA. These pulses are on for 100uS and off for 800uS. Presumably, these are due to the internal IR LED being pulsed. The current consumption is independent of external conditions (lighting, presence or absence of a target, etc.). While the sensor is idle, it draws only about 1uA. Because the sensor needs to draw 270mA of current in short pulses heavy bypassing is necessary. The combination of a 470uF electrolytic capacitor and a 0.1uF ceramic disc capacitor provided good regulation in test circuits. The second interfacing requirement is the clock. The clock line (Vin) is intended to be driven by an open-collector (or open-drain) type output. Figure 13 shows the level of Vin with varying currents. To ensure that it is pulled down reliably, one should sink at least 100uA from it. If an open-collector output is not available, then one can use a silicon switching diode (1N914 or 1N4148 or similar) between a normal output and Vin. The banded end should face the output. In this configuration, the output is able to pull down, but not pull up. A timing diagram of the process of initiating a measurement cycle and reading out the data is shown in Figure 14. To place the sensor in idle mode, Vin should be placed high. If Vin is high for greater than 1.5mS, the sensor will reset and go into idle mode. As shown in the timing diagram, lowering Vin initiates the measurement cycle. After the delay needed by the sensor to take the reading, the sensor lowers Vout, signaling that it is ready to clock out the data. Vin can then be toggled high and low. The output data is clocked out MSB first, and is valid shortly after the falling clock edge. When the cycle is finished, Vin should be raised to high again for at least the minimum inter-measurement delay. ![]() To illustrate how the sensor can be interfaced to microcontrollers, schematics and source code for a GP2D02 test device are included. There are two versions, one for the Microchip PIC16F84, and another for the Parallax Basic Stamp II. The test device continuously takes measurements using the GP2D02, and feeds them to a PC over a serial port. To illustrate how the sensor can be interfaced to microcontrollers, schematics and source code for a GP2D02 test device are included. There are two versions, one for the Microchip PIC16F84, and another for the Parallax Basic Stamp II. The test device continuously takes measurements using the GP2D02, and feeds them to a PC over a serial port. ¡ß PICmicro and BSII Schematics The BSII version is designed to work with the BSII Debug Terminal, but it may be able to send data to other terminal programs as long as the lines on the serial port are in the same state as used by the Debug Terminal. The PIC version is designed to work with any terminal program running at 1200 bps, N parity, 8 data bits, and 1 stop bit. For most systems, a simple resistor (as shown in the PIC schematic) should be sufficient to interface the PIC to the PC's serial port. However, if this fails, a level converter such as a MAX233 should be used. If the level converter is used, be sure to invert the serial output stream as indicated in the PIC source code. The GP2D02 is an excellent short-range, inexpensive robotics distance measurement sensor. It would be difficult to attain a high degree of measurement accuracy or precision using the sensor, but for simple robot navigation and obstacle avoidance, there is no easier or less expensive solution than the GP2D02. ![]() ÀúÀÚ : Keith L. Doty University Florida 8/9/1996 AVRTOOLS |
![]() ![]() ![]() ![]() | ![]() |
![]() |
![]() |