McGraw-Hill - The Robot Builder''''s Bonanza Episode 2 Part 8 pdf

35 363 0
McGraw-Hill - The Robot Builder''''s Bonanza Episode 2 Part 8 pdf

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Contact Detection A sure way to detect objects is to make physical contact with them. Contact is perhaps the most common form of object detection and is often accomplished by using simple switch- es. In this section we’ll review several contact methods, including “soft-contact” tech- niques where the robot can detect contact with an object using just a slight touch. PHYSICAL CONTACT BUMPER SWITCH An ordinary switch can be used to detect physical contact with an object. So-called “bumper switches” are spring-loaded push-button switches mounted on the frame of the CONTACT DETECTION 581 +12V 8 1 4 3 2 7 6 Q1 2N2222 e b c IC1 555 About 40 kHz R3 1.2K R4 2.2K Ultrasonic Transducer C2 0.1 C1 0.0033 R2 5K R1 1K FIGURE 36.10 Schematic diagram for a basic ultrasonic proximity transmitter. - + 4 7 6 2 3 C1 0.01 R6 10K R7 10K R5 1K 4 7 6 2 3 R1 330Ω R3 10K R4 10K R2 100K + - IC1 741 Ultrasonic Transducer +V +V +V +V IC2 741 Output C2 0.01 R8 330Ω FIGURE 36.11 Schematic diagram for a basic ultrasonic proximity receiver. Ch36_McComb 8/29/00 8:33 AM Page 581 robot, as shown in Fig. 36.12. The plunger of the switch is pushed in whenever the robot collides with an object. Obviously, the plunger must extend farther than all other parts of the robot. You may need to mount the switch on a bracket to extend its reach. The surface area of most push-button switches tends to be very small. You can enlarge the contact area by attaching a metal or plastic plate or a length of wire to the switch plunger. A piece of rigid 1/16-inch thick plastic or aluminum is a good choice for bumper plates. Glue the plate onto the plunger. Low-cost push-button switches are not known for their sensitivity. The robot may have to crash into an object with a fair amount of force before the switch makes positive contact, and for most applications that’s obviously not desirable. Leaf switches require only a small touch before they trigger. The plunger in a leaf switch (often referred to as a Microswitch, after the manufacturer that made them popular) is extra small and travels only a few fractions of an inch before its contacts close. A metal strip, or leaf, attached to the strip acts as a lever, further increasing sensitivity. You can mount a plastic or metal plate to the end of the leaf to increase surface area. If the leaf is wide enough, you can use miniature 4/40 or 3/38 hardware to mount the plate in place. 582 COLLISION AVOIDANCE AND DETECTION TABLE 36.3 PARTS LIST FOR ULTRASONIC PROXIMITY RECEIVER. IC1,IC2 741 op amp IC R1,R8 330 ohm resistor R3,R4,R6,R7 10K resistor R2 100K potentiometer R5 1K resistor C1,C2 0.01 µF ceramic capacitor TR1 Ultrasonic receiver transducer (40kHz nominal) All resistors have 5 or 10 percent tolerance, 1/4-watt; all capacitors have 10 percent tolerance, rated 35 volts or higher. TABLE 36.2 PARTS LIST FOR ULTRAPROXIMITY TRANSMITTER. IC1 555 Timer IC Q1 2N2222 NPN transistor R1 1K resistor R2 5K resistor R3 1.2K resistor R4 2.2K resistor C1 0.1 µF ceramic capacitor C2 0.0033 µF monolithic, mica, or ceramic capacitor TR1 Ultrasonic transmitter transducer (40 kHz nominal) Ch36_McComb 8/29/00 8:33 AM Page 582 WHISKER Many animal experts believe that a cat’s whiskers are used to measure space. If the whiskers touch when a cat is trying to get through a hole, it knows there is not enough space for its body. We can apply a similar technique to our robot designs—whether or not kitty whiskers are actually used for this purpose. You can use thin 20- to 25-gauge piano or stove wire for the whiskers of the robot. Attach the wires to the end of switches, or mount them in a receptacle so the wire is sup- ported by a small rubber grommet. By bending the whiskers, you can extend their usefulness and application. The com- mercially made robot shown in Fig. 36.13, the Movit WAO, has two whiskers that can be rotated in their switch sockets. When the whiskers are positioned so the loop is vertical they can detect changes in topography to watch for such things as the edge of a table, the corner of a rug, and so forth. A more complex whisker setup is shown in Fig. 36.14. Two different lengths of whiskers are used for the two sides of the robots. The longer-length whiskers represent a space a few inches wider than the robot. If these whiskers are actuated by rubbing against an object but the short whiskers are not, then the robot understands that the pathway is clear to travel but space is tight. The short whiskers are cut to represent the width of the robot. Should the short whiskers on only one side of the robot be triggered, then the robot will turn the opposite direction to avoid the obstacle. If both sides of short whiskers are activated, then the robot knows that it cannot fit through the passageway, and it either stops or turns around. Before building bumper switches or whiskers into your robot, be aware that most elec- tronic circuits will misbehave when they are triggered by a mechanical switch contact. The contact has a tendency to “bounce” as it closes and opens, so it needs to be conditioned. See the debouncing circuits in Chapter 29 for ways to clean up the contact closure so switches can directly drive your robot circuits. PRESSURE PAD In Chapter 35 you learned how to give the sense of touch to robot fingers and grippers. One of the materials used as a touch sensor was conductive foam, which is packaged with CONTACT DETECTION 583 Frame Plunger switch FIGURE 36.12 An SPST spring-loaded plunger switch mounted in the frame or body of the robot, used as a contact sen- sor. Experiment with different shapes and sizes for the plunger. Ch36_McComb 8/29/00 8:33 AM Page 583 most CMOS and microprocessor ICs. This foam is available in large sheets and is perfect for use as collision detection pressure pads. Radio Shack sells a nice five-inch square pad that’s ideal for the job. Attach wires to the pad as described in Chapter 35, and glue the pad to the frame or skin of your robot. Unlike fingertip touch, where the amount of pressure is important, the salient ingredient with a collision detector is that contact has been made with something. This makes the interface electronics that much easier to build. Fig. 36.15 shows a suitable interface for use with the pad (refer to the parts list in Table 36.4). The pad is placed in series with a 3.3K resistor between ground and the positive sup- ply voltage to form a voltage divider. When the pad is pressed down, the voltage at the out- put of the sensor will vary. The output of the sensor, which is the point between the pad and resistor, is applied to the inverting pin of a 339 comparator. (There are four separate comparators in the 339 package, so one chip can service four pressure pads.) When the voltage from the pad exceeds the reference voltage supplied to the comparator, the com- parator changes states, thus indicating a collision. The comparator output can be used to drive a motor direction control relay or can be tied directly to a microprocessor or computer port. Follow the interface guidelines provid- ed in Chapter 29. MULTIPLE BUMPER SWITCHES What happens when you have many switches or proximity devices scattered around the periphery of your robot? You could connect the output of each switch to the computer, but 584 COLLISION AVOIDANCE AND DETECTION FIGURE 36.13 The Movit WAO robot (one of the older models, but the newer ones are similar). Its two tentacles, or whiskers, allow it to navi- gate a space. Ch36_McComb 8/29/00 8:33 AM Page 584 that’s a waste of interface ports. A better way to do it is to use a priority encoder or multi- plexer. Both schemes allow you to connect several switches to a common control circuit. The robot’s microprocessor or computer queries the control circuit instead of the individ- ual switches or proximity devices. Using a priority encoder The circuit in Fig. 36.16 uses a 74148 priority encoder IC. Switches are shown at the inputs of the chip. When a switch is closed, its binary equiva- lent appears at the A-B-C output pins. With a priority encoder, only the highest value switch is indicated at the output. In other words, if switch 4 and 7 are both closed, the out- put will only reflect the closure of pin 4. Another method is shown in Fig. 36.17. Here, a 74150 multiplexer IC is used as a switch selector. To read whether a switch is or not, the computer or microprocessor applies a binary weighted number to the input select pins. The state of the desired input is shown in inverted form at the Out pin (pin 10). The advantage of the 74150 is that the state of any switch can be read at any time, even if several switches are closed. CONTACT DETECTION 585 Whisker Leaf switch Grommet (for holding whisker) Mounting bolt Left whisker Right whisker B A Vibration or movement causes switch activation FIGURE 36.14 Adding whiskers to a robot. a. Whiskers attached to the dome of the Minibot (see Chap. 8); b. Construction detail of the whiskers and actuation switches. Ch36_McComb 8/29/00 8:33 AM Page 585 Using a resistor ladder If the computer or microcontroller used in your robot has an analog-to-digital converter (ADC) or you don’t mind adding one, you can use another tech- nique for interfacing multiple switches: the resistor ladder. The concept is simple, as Fig. 36.18 shows. Each switch is connected to ground on one side and to Vϩ in series with a resistor on the other side. Multiple switches are connected in parallel to an ADC input, as depicted in the figure. The resistors form a voltage divider. Each resistor has a different value, so when a switch closes the voltage through that switch is uniquely different. Note that because the resistors are in parallel, you can close more than one switch at one time. An “in-between” voltage will result. Feel free to experiment with the values of the resistors connected to each switch to obtain maximum flexibility. “Soft Touch” and Compliant Collision Detection The last nickname you’d want for your robot is “Bull in a China Closet,” a not too flatter- ing reference to your automaton’s habit of crashing into and breaking everything. 586 COLLISION AVOIDANCE AND DETECTION FIGURE 36.15 Converting the output of a conductive foam pressure sensor to an on/off type switch output. RA Pressure sensor - + IC1 339 (1/4) 4 5 2 12 3 +5V Output R1 3.3K R3 10K R3 10K TABLE 36.4 PARTS LIST FOR PRESSURE SENSOR BUMPER SWITCH. IC1 LM339 Quad Comparator IC R1 3.3K resistor R2 10K potentiometer R3 10K resistor Misc Conductive foam pressure transducer (see text) Ch36_McComb 8/29/00 8:33 AM Page 586 FIGURE 36.16 Multiple switch detection using the 74148 priority encoder IC. Basic wiring diagram. +5vdc A B C 4 3 2 1 13 12 11 10 INPUTS ENABLE OUTPUT 14 15 9 7 6 ENABLE INPUT GROUP SIGNAL 5 Goes LOW when a switch is closed Goes HIGH when a switch is closed S1 thru S8 R1 thru R8 all 1K 74148 EI 1 2 3 4 5 6 7 8 A B C SWITCH OUTPUT 1 0 0 0 0 0 0 0 X C 0 0 0 0 0 0 0 X O C 0 0 0 0 0 0 X 0 0 C 0 0 0 0 0 X C 0 0 C 0 0 0 0 X C 0 0 0 C 0 0 0 X C 0 0 0 0 C 0 0 X C 0 0 0 0 0 C 0 X C 0 0 0 0 0 0 0 1 1 0 1 0 1 0 1 0 1 1 1 0 0 1 1 0 0 1 1 1 1 1 0 0 0 0 Truth Table 74148 priority encoder 0 8 16 Ch36_McComb 8/29/00 8:33 AM Page 587 Unfortunately, even the best behaved robots occasionally bump into obstacles, including walls, furniture, and the cat (your robot can probably survive a head-on collision with a solid wall, but the family feline . . . maybe not!). Since it’s impractical—not to mention darn near impossible—to always prevent your robot from colliding with objects, the next best thing is to make those collisions as “soft” as possible. This is done using so-called soft touch or compliant collision detection means. Several such approaches are outlined here. You can try some or all; mixing and matching 588 COLLISION AVOIDANCE AND DETECTION OUT 10 1 2 3 4 5 6 7 8 10 11 12 9 13 14 15 0 7 6 5 4 3 2 1 23 22 21 20 19 18 17 16 8 9 ENABLE 15 +5VDC Output 14 13 A B C GND R1-R16 1.2K IC1 74150 S1-S16 Bumper Switches Input select 12 24 11 D FIGURE 36.17 Multiple switch detection using a 74150 multiplexer IC. FIGURE 36.18 A resistor ladder provides a variable voltage; the voltage at the output of the ladder is dependent on the switch(es) that are closed. +5 vdc R 2R 3R 4R 10K R=About 1K To ADC or other circuit Ch36_McComb 8/29/00 8:33 AM Page 588 sensors on one robot is not only encouraged, it’s a good idea. As long as the sensor redun- dancy does not unduly affect the size, weight, or cost of the robot, having “backups” can make your robot a better behaved houseguest. Laser Fiber “Whiskers” You know about fiber optics: they’re used to transmit hundreds of thousands of phone calls through a thin wire. They’re also used to connect together high-end home entertainment gear and even to make “light sculpture” art. On their own, optical fibers offer a wealth of technical solutions, and when combined with a laser, optical fibers can do even more. The unique “whiskers” project that follows makes use of a relatively underappreciated (and often undesirable) synergy between low-grade optical fibers and lasers. To fully under- stand what happens to laser light in an optical fiber, let’s first take a look at how fiber optics work and then how the properties of laser light play a key role in making the fiber optic robo- whiskers function. FIBER OPTICS: AN INTRODUCTION An optical fiber is to light what PVC pipe is to water. Though the fiber is a solid, it chan- nels light from one end to the other. Even if the fiber is bent, the light follows the path, altering its course at the bend and traveling on. Because light acts as an information carri- er, a strand of optical fiber no bigger than a human hair can carry the same amount of data as some 900 copper wires. The idea for optical fibers is over 100 years old. British physicist John Tyndall once demonstrated how a bright beam of light was internally reflected through a stream of water flowing out of a tank. Serious research into light transmission through solid material start- ed in 1934, when Bell Labs was issued a patent for the light pipe. In the 1950s, the American Optical Corporation developed glass fibers that transmitted light over short dis- tances (a few yards). The technology of fiber optics really took off around 1970 when sci- entists at Corning Glass Works developed long-distance optical fibers. Optical fibers are composed of two basic materials, as illustrated in Fig. 36.19: the core and the cladding. The core is a dense glass or plastic material that the light actually pass- es through as it travels the length of the fiber. The cladding is a less dense sheath, also of plastic or glass, that serves as a refracting medium. An optical fiber may or may not have an outer jacket, a plastic or rubber insulation used as protection. Optical fibers transmit light by total internal reflection (TIR), as shown in Fig. 36.20. Imagine a ray of light entering the end of an optical fiber strand. If the fiber is perfectly straight, the light will pass through the medium just as it passes through a plate of glass. But if the fiber is bent slightly, the light will eventually strike the outside edge of the fiber. If the angle of incidence is great (more than the so-called critical angle), the light will be reflected internally and will continue its path through the fiber. But if the bend is large and the angle of incidence is small (less than the critical angle), the light will pass through the fiber and be lost. Note the cone of acceptance, as shown in Fig. 36.20; the cone represents the degree to which the incoming light can be off axis and still make it into the fiber. The cone of LASER FIBER “WHISKERS” 589 Ch36_McComb 8/29/00 8:33 AM Page 589 acceptance (usually 30°) of an optical fiber determines how far the light source can be from the optical axis and still manage to make it into the fiber. Though the cone of accep- tance may be great, fiber optics perform best when the light source (and detector) are- aligned to the optical axis. TYPES OF OPTICAL FIBERS The classic optical fiber is made of glass, otherwise known as silica (which is plain ol’ sand). Glass fibers tend to be expensive and are more brittle than stranded copper wire. But they are excellent conductors of light, especially light in the infrared region between 850 and 1300 nanometers (nm). Less expensive optical fibers are made of plastic. Though light loss through plastic fibers is greater than through glass fibers, they are more durable. Plastic fibers are best used in communications experiments with near-infrared light sources—the 780 to 950 nm 590 COLLISION AVOIDANCE AND DETECTION Core Cladding Protective sheath FIGURE 36.19 The physical makeup of an optical fiber, con- sisting of core and cladding. Totally reflected ray Lost rays outside cone of acceptance Cone of acceptance FIGURE 36.20 Light travels through optical fibers due to a process called total internal reflection (TIR). Ch36_McComb 8/29/00 8:33 AM Page 590 [...]... ADC 081 6 8- bit, 16-input analog-to-digital converter IC The output of each photocell is converted when selected at the Input Select lines The ADC 081 6 can handle up to 16 inputs, so you can add another eight cells R1-R8 2. 2K (see text) 5 IN7 3 IN5 4 IN6 28 IN2 1 IN3 2 IN4 11 26 IN0 VCC 27 IN1 R10 2. 2K 4 :26 PM LD1-LD8 R9 2. 2K 8 /21 /00 +5V Ch37_McComb Page 606 606 ROBOTIC EYES Ch37_McComb 8 /21 /00 4 :26 PM... 607 TABLE 37 .2 IC1 PARTS LIST FOR MULTICELL ROBOTIC EYE ADC 081 6 8- bit analog-to-digital converter IC (okay to substitute another multiplexing ADC, such as the ADC 081 7, etc.) R1–R8 2. 2K resistor (adjust value to gain best response of photocells) R9,R10 2. 2K resistors LD–L8 Photocell All resistors have 5 or 10 percent tolerance, 1/4-watt 2. 5" 1/16" plastic (painted gray or black) 1" Photocell 8 sensor "eye"... and tie-wrap This bundle is then inserted into the opening of the penlight laser and held in place with a sticky-back tie-wrap connector (available at Radio Shack and many other places) On the opposite ends of the optical fibers are # 18 crimp-type bullet connectors These are designed to splice two # 18 or #20 wires together, end to end I (carefully) crimped them onto the ends of the fibers, so they act... 4 :26 PM Page 610 610 ROBOTIC EYES +5 vdc 18 Pin10 Pin9 Pin8 Pin7 1 A6 A7 2 A5 A8 3 A4 A9 4 A3 IO1 Pin4 5 A0 Pin5 6 A1 21 12 IO2 IO3 7 A2 IO4 8 /CS Pin6 /WE 17 16 15 14 13 12 11 10 Pin11 Pin 12 Pin13 Pin0 Pin1 Pin2 Pin3 Pin14 9 FIGURE 37.9 How to connect the 21 14 static RAM chip to a Basic Stamp II The hookup requires that quite a number of connections be made to the Stamp’s pins the 21 14 to make your own... uses the two closest side beams, ignoring all the others The beam spacing increases as the distance from the lens to the surface of the disc increases Similarly, the beam spacing decreases as the lens-to-CD distance decreases A multicelled photodetector in the CD players integrates the light reflected by these beams and determines whether the lens should be moved closer to, or farther away, from the. .. 37.14) The beams move closer together as the distance from the laser and surface is decreased; the beams move further apart as the distance from the laser and surface is increased As you can guess, when the beams are projected onto a three-dimensional scene, they form a kind of topographical map in which they appear closer or farther apart depending on the distance of the object from the laser The red... multicell eyes for their creations Most all semiconductors are sensitive to light, even the memory matrix inside memory chips By using static FIGURE 37.5 Input Select A1 A2 23 A4 24 25 GND 13 IC1 ADC 081 6 9 22 OE ALE 12 -RF 16 +RF CLK SC EOC Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 10 6 7 17 LSB 14 15 8 18 19 20 21 MSB 500kHz In Start Conversion End of Conversion Digital Outputs One way to make a robotic “eye.” The circuit,... volts The diodes you use should be rated for 1/4-watt or higher INTERFACING THE PHOTODETECTORS The output of a phototransistor is close to the full 0–5-volt range of the circuit’s supply range You’ll want your robot to be able to determine the intensity changes as the whiskers Ch36_McComb 8 /29 /00 8: 33 AM Page 593 LASER FIBER “WHISKERS” 593 FIGURE 36 .22 The prototype laser-optic sensor, showing the loose... use hot-melt glue!), or even LEGO parts should your robot be constructed with them When forming the loops don’t make them too tight The more compliant the loops are, the more they will detect small amounts of pressure If the loops are very tight, the fibers become rigid and not very compliant This reduces the effectiveness of the whiskers At the same time, the loops should not be so loose that they tend... your robot These include the following: I Photoresistors These are typically a cadmium-sulfide (CdS) cell (often referred to sim- ply as a photocell) A CdS cell acts like a light-dependent resistor: the resistance of the cell varies depending on the intensity of the light striking it When no light strikes 601 Copyright 20 01 The McGraw-Hill Companies, Inc Click Here for Terms of Use Ch37_McComb 8 /21 /00 . object. So-called “bumper switches” are spring-loaded push-button switches mounted on the frame of the CONTACT DETECTION 581 +12V 8 1 4 3 2 7 6 Q1 2N 222 2 e b c IC1 555 About 40 kHz R3 1.2K R4 2. 2K Ultrasonic Transducer C2 0.1 C1 0.0033 R2 5K R1 1K FIGURE. matching 588 COLLISION AVOIDANCE AND DETECTION OUT 10 1 2 3 4 5 6 7 8 10 11 12 9 13 14 15 0 7 6 5 4 3 2 1 23 22 21 20 19 18 17 16 8 9 ENABLE 15 +5VDC Output 14 13 A B C GND R1-R16 1.2K IC1 74150 S1-S16 Bumper. 591 Ch36_McComb 8 /29 /00 8: 33 AM Page 591 the relative intensity of the collision. The more the robot has “connected” to some object, the more the fibers will deform and the greater the output change of the

Ngày đăng: 10/08/2014, 04:22

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan