1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

McGraw-Hill - The Robot Builder''''s Bonanza Part 10 pptx

35 302 0

Đ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

Typical Servo Specs R/C servo motors enjoy some standardization. This sameness applies primarily to standard- sized servos, which measure approximately 1.6 inches by 0.8 inch by 1.4 inches. For other servo types the size varies somewhat between makers, as these are designed for specialized tasks. Table 20.1 outlines typical specifications for several types of servos, including dimen- sions, weight, torque, and transit time. Of course, except for the size of standard servos, these specifications can vary between brand and model. A few of the terms used in the specs require extra discussion. As explained in Chapter 17, “Choosing the Right Motor for the Job,” the torque of the motor is the amount of force it exerts. The standard torque unit of measure for R/C servos is expressed in ounce-inches—or the number of ounces the servo can lift when the weight is extended one inch from the shaft of the motor. Servos exhibit very high torque thanks to their speed reduction gear trains. The transit time (also called slew rate) is the approximate time it takes for the servo to rotate the shaft X° (usually specified as 60°). Small servos turn at about a quarter of a sec- ond per 60°, while larger servos tend to be a bit slower. The faster the transit time, the “faster acting” the servo will be. You can calculate equivalent RPM by multiplying the 60° transit time by 6 (to get full 360° rotation), then dividing the result into 60. For example, if a servo motor has a 60° transit time of 0.20 seconds, that’s one revolution in 1.2 seconds (.2 ϫ 6 ϭ 1.2), or 50 RPM (60 / 1.2 ϭ 50). Bear in mind that there are variations on the standard themes for all R/C servo classes. For example, standard servos are available in more expensive high-speed and high-torque versions. Servo manufacturers list the specifications for each model, so you can compare and make the best choice based on your particular needs. Many R/C servos are designed for use in special applications, and these applications can be adapted to robots. For example, a servo engineered to be used with a model sail- boat will be water resistant and therefore useful on a robot that works in or around water. TYPICAL SERVO SPECS 301 TABLE 20.1 TYPICAL SERVO SPECIFICATIONS SERVO TYPE LENGTH WIDTH HEIGHT WEIGHT TORQUE TRANSIT TIME Standard 1.6¨ 0.8¨ 1.4¨ 1.3 oz 42 oz-in 0.23 sec/60° 1/4-scale 2.3¨ 1.1¨ 2.0¨ 3.4 oz 130 oz-in 0.21 sec/60° Mini-micro 0.85¨ 0.4¨ 0.8¨ 0.3 oz 15 oz-in 0.11 sec/60° Low profile 1.6¨ 0.8¨ 1.0¨ 1.6 oz 60 oz-in. 0.16 sec/60° Sail winch 1.8¨ 1.0¨ 1.7¨ 2.9 oz 135 oz-in 0.16 sec/60° small 1 sec/360° Sail winch 2.3¨ 1.1¨ 2.0 3.8 oz 195 oz-in 0.22 sec/60° large 1.3 sec/360° Ch20_McComb 8/18/00 2:22 PM Page 301 Connector Styles and Wiring While many aspects of servos are standardized, there is much variety between manufac- turers in the shape and electrical contacts of the connectors used to attach the servo to a receiver. While your robot probably won’t use a radio receiver, you may still want to match up the servo with a properly mated connector on your controller board or computer. Or, you may decide the connector issue isn’t worth the hassle, and just cut it off from the servo, hardwiring it to your electronics. This is an acceptable alternative, but hardwiring makes it more difficult to replace the servo should it ever fail. CONNECTOR TYPE There are three primary connector types found on R/C servos: ■ ”J” or Futaba style ■ ”A” or Airtronics style ■ ”S” or Hitec/JR style Servos made by the principle servo manufacturers—Futaba, Airtronics, Hitec, and JR—employ the connector style popularized by that manufacturer. In addition, servos made by competing manufacturers are usually available in a variety of connector styles, and connector adapters are available. PINOUT The physical shape of the connector is just one consideration. The wiring of the connectors (called the pinout) is also critical. Fortunately, all but the “old-style” Airtronics servos (and the occasional oddball four-wire servo) use the same pinout, as shown in Fig. 20.5. With very few exceptions, R/C servo connectors use three wires, providing DC power, ground, and sig- nal (or control). Table 20.2 lists the pinouts for several popular brands of servos. COLOR CODING Most servos use color coding to indicate the function of each connection wire, but the actu- al colors used for the wires vary between servo makers. Table 20.3 lists the most common colors used in several popular brands. USING SNAP-OFF HEADERS FOR MATED CONNECTORS The female connectors on most R/C servos are designed to mate with pins placed 0.100 inch apart. As luck would have it, this is the most common pin spacing used in electron- ics, and suitable pin headers are in ready supply. The “snap-off ” variety of header is per- haps the most useful, as you can buy a long strip and literally snap off just the number of pins you want. For a servo, snap off three pins, then solder them to your circuit board, as shown in Fig. 20.6. 302 WORKING WITH SERVO MOTORS Ch20_McComb 8/18/00 2:22 PM Page 302 123 Signal +V Ground FIGURE 20.5 The standard pinout of servos is pin 1 for sig- nal, pin 2 for ϩV, and pin 3 for ground. In this configuration damage will not usually occur if you accidentally reverse the connector. TABLE 20.3 COLOR CODING OF POPULAR SERVO BRANDS SERVO +V GND SIGNAL Airtronics Red Black White Red stripe Blue Brown Cirrus Red Brown Orange Daehwah Red Black White Fleet Red Black White Futaba Red Black White Hitec Red Black Yellow JR Red Brown Orange KO Red Black Blue Kraft Red (4.8 v) Black Orange White (2.4 v) Yellow Sanwa Red stripe Black Black (in center) TABLE 20.2 CONNECTOR PINOUTS OF POPULAR SERVO BRANDS BRAND PIN 1 (LEFT) PIN 2 (CENTER) PIN 3 (RIGHT) Airtronics (“new” style) Signal ϩVGnd Airtronics (“old” style) Signal Gnd ϩV Futaba Signal ϩVGnd Hitec Signal ϩVGnd JR Signal ϩVGnd Ch20_McComb 8/18/00 2:22 PM Page 303 You’ll want to mark how the servo connector should attach to the header, as it’s easy to reverse the connector and plug it in backward. Fortunately, this probably won’t cause any damage to either the servo or electronics, since reversing the connector merely exchanges the signal and ground wires. This is not true of the “old-style” Airtronics connector: if you reverse the connector, the signal and ϩV lines are swapped. In this case, both servo and control electronics can be irreparably damaged. Circuits for Controlling a Servo Unlike a DC motor, which runs if you simply attach battery power to its leads, a servo motor requires proper interface electronics in order to rotate its output shaft. While the need for interface electronics may complicate to some degree your use of servos, the elec- tronics are actually rather simple. And if you plan on operating your servos with a PC or microcontroller (such as the Basic Stamp), all you need for the job is a few lines of software. A DC motor typically needs power transistors, MOSFETs, or relays if it is interfaced to a computer. A servo on the other hand can be directly coupled to a PC or microcontroller with no additional electronics. All of the power-handling needs are taken care of by the 304 WORKING WITH SERVO MOTORS FIGURE 20.6 You can construct your own servo connectors using snap-off headers soldered to your robot control board. Ch20_McComb 8/18/00 2:22 PM Page 304 control board in the servo, saving you the hassle. This is one of the key benefits of using servos with computer-controlled robots. CONTROLLING A SERVO VIA A 555 TIMER You don’t need a computer to control a servo. You can use the venerable 555 timer IC to provide the required pulses to a servo. Fig. 20.7 shows one common approach to using the 555 to control a servo. In operation, the 555 produces a signal pulse of varying duty cycle, which controls the operation of the servo. Adjust the potentiometer to position the servo. Since the 555 can eas- ily produce pulses of very short and very long duration, there is a good chance that the servo may be commanded to operate outside its normal position extremes. If the servo hits its stop and begins chattering remove power immediately! If you don’t, the gears inside the servo will eventually strip out, and you’ll need to either throw the servo away or replace its gears. CONTROLLING A SERVO VIA A BASIC STAMP The Basic Stamp II is a popular microcontroller used to interface with various robotic parts, including servos. The Stamp, which is discussed in more detail in Chapter 31, can directly control one or more servos. However, the more servos the more processing time is required to send pulses to each one (at least, not without resorting to some higher-level programming which we’ll leave to the Stamp-specific books). Fig. 20.8 shows the hookup diagram for connecting a standard servo to the Basic Stamp II. Note that the power to the servo does not come from the Basic Stamp II, or any proto- typing board it is on. Servos require more current than the Stamp can provide. A pack of four AA batteries is sufficient to power the servo. For proper operation ensure that the grounds are connected between the Stamp and the battery pack. Use a 33–47 µF capacitor between the ϩV and ground of the AA pack to help kill any noise that may be induced into CIRCUITS FOR CONTROLLING A SERVO 305 6 2 IC1 555 1 7 8 5 4 3 +6 vdc + C2 0.1 C3 22 µF c b e Q1 2N3904 10K R4 R2 20K R3 10K R1 270K C1 0.1 Servo ground connection Servo signal connection Servo +V connection R5 2.2K FIGURE 20.7 A 555 timer IC can be used to provide a control signal to a servo. Ch20_McComb 8/18/00 2:22 PM Page 305 the electronics when the servo turns on and off. See Chapter 31 for suitable code that you can use to command a servo using a Basic Stamp II. USING A DEDICATED CONTROLLER R/C receivers are designed with a maximum of eight servos in mind. The receiver gets a digital pulse train from the transmitter, beginning with a long sync pulse, followed by as many as eight servo pulses. Each pulse is meant for a given servo attached to the receiver: pulse 1 goes to servo 1, pulse 2 goes to servo 2, and so on. The eight pulses plus the sync pulse take about 20 ms. This means the pulse train can be repeated 50 times each second, which we earlier referred to as the refresh rate. As the refresh rate gets slower the servos aren’t updated as quickly and can “throb” or lose position as a result. Unless the control electronics you are using can simultaneously supply pulses to multiple servos at a time (multitasking), the control circuitry can no longer effectively send the refresh pulses (the continuous train of pulses) fast enough. For these applications, you can use a ded- icated servo controller, which is available from a number of sources, including Scott Edwards Electronics and NetMedia (see Appendix B, “Sources,” for addresses and Web sites). Dedicated servo controllers can operate five, eight, or even more servos autonomously, which reduces the program overhead of the microcontroller or computer you are using. The main benefit of dedicated servo controllers is that a great number of servos can be commanded simultaneously, even if your computer, microcontroller, or other circuitry is not multitasking. For example, suppose your robot requires 24 servos. Say it’s an eight-legged spi- der, and each leg has three servos on them; each servo controls a different “degree of freedom” of the leg. One approach would be to divide the work among three servo controllers, each capable of handling eight servos. Each controller would be responsible for a given degree of freedom. One might handle the rotation of all eight legs; another might handle the “flexion” of the legs; and the third might be for the rotation of the bottom leg segment. Dedicated servo controllers must be used with a computer or microcontroller, as they need to be provided with real-time data in order to operate the servos. This data is 306 WORKING WITH SERVO MOTORS +6 vdc Gnd Basic Stamp Any I/O pin Servo Connected grounds +V for BSII Ground for +6 vdc servo power Ground for +V BSII power FIGURE 20.8 Hookup diagram for connecting a servo to a Basic Stamp II Ch20_McComb 8/18/00 2:22 PM Page 306 commonly sent in a serial data format. A sequence of bytes sent from the computer or microcontroller is decoded by the servo controller, with each byte corresponding to a servo attached to it. Servo controllers typically come with application notes and sample pro- grams for popular computers and microcontrollers, but to make sure things work it’s very helpful to have a knowledge of programming and serial communications. USING GREATER THAN 7.2 VOLTS Servos are designed to be used with rechargeable model R/C battery packs, which put out from 4.8 to 7.2 volts, depending on the number of cells they have. Servos allow a fairly wide latitude in input voltage, and 6 volts from a four-pack of AAs provides more than enough juice. As the batteries drain, however, the voltage will drop, and you will notice your servos won’t be as fast as they used to be. Somewhere below about 4.0 or 4.5 volts the servos will be too slow to do you much good, and they may not even function. But what about going beyond the voltage of typical rechargeable batteries used for R/C models? Indeed, many servos can be operated in an intermittent fashion with up to about 12 volts, with few or no bad aftereffects. However, most servos will begin to overheat with more than 9 or 10 volts, and they may not like operating for long periods of time without a “cooling off ” period. Unless you need the extra torque or speed, it’s best to keep the supply voltage to your servos at no more than 9 volts, and preferably between the rated 4.8- to 7.2-volts range. Of course, check the data sheet that comes with the servos you are using and note any special voltage requirements. WORKING WITH AND AVOIDING THE “DEAD BAND” References to the Grateful Dead notwithstanding, all servos exhibit what’s known as a dead band. The dead band of a servo is the maximum time differential between the incom- ing control signal and the internal reference signal produced by the position of the poten- tiometer. If the time difference equates to less than the dead band—say, five or six microseconds—the servo will not bother trying to nudge the motor to correct for the error. Without the dead band, the servo would constantly “hunt” back and forth to find the exact match between the incoming signal and its own internal reference signal. The dead band allows the servo to minimize this hunting so it will settle down to a position close to, though maybe not exactly, where it’s supposed to be. Dead band varies between servos and is often listed as part of the servo’s specifications. A typical dead band is 5 microseconds (µs). If the servo has a full travel of 180° over a 1000 µs (1–2 ms) range, then the 5 µs dead band equates to one part in 200. You probably won’t even notice the effects of dead band if your control circuitry has a resolution lower than the dead band. However, if your control circuitry has a resolution higher than the dead band— which is the case with a microcontroller such as the Basic Stamp II or the Motorola MC68HC11—then small changes in the pulse width values may not produce any effect. For instance, if the controller has a resolution of 2 µs and if the servo has a dead band of 5 µs, then a change of just one or even two values—equal to a change of 2 or 4 µs in the pulse width—may not have an effect on the servo. CIRCUITS FOR CONTROLLING A SERVO 307 Ch20_McComb 8/18/00 2:22 PM Page 307 The bottom line: choose a servo that has a narrow dead band if you need accuracy and if your control circuitry or programming environment has sufficient resolution. Otherwise, ignore dead band since it probably won’t matter one way or another. The trade-off here is that with a narrow dead band the servo will be more prone to hunt to its position and may even buzz after it has gotten there. (Hint: the way to minimize this is to stop the stream of pulses to the servo, assuming this is practical for your application.) GOING BEYOND THE 1–2 MILLISECOND PULSE RANGE You’ve already read that the “typical” servo responds to signals from 1 to 2 ms. While this is true in theory, in actual practice many servos can be fed higher and lower pulse values in order to maximize their rotational limits. The 1–2 ms range may indeed turn a servo one direction or another, but it may not turn it all the way in both directions. However, you won’t know the absolute minimums and maximums for a given servo until you experiment with it. But take fair warning: Performing this experiment can be risky because operating a servo to its extremes can cause the mechanism to hit its internal stops. If left in this state for any period of time, the gears of the servo can become damaged. If you just must have maximum rotation from your servo, connect it to your choice of control circuitry. Start by varying the pulse width in small increments below 1 ms (1000 µs), say in 10 µs chunks. After each additional increment, have your control program swing the servo back to its center or neutral position. When during your testing you hear the servo hit its internal stop (the servo will “chatter” as the gears slip), you’ve found the absolute lower-bound value for that servo. Repeat the process for the upper bound. It’s not unusual for some servos to have a lower bound of perhaps 250 µs and an upper bound of over 2200 µs. Yet other servos may be so restricted that they cannot even operate over the “normal” 1–2 ms range. Keep a notebook of the upper and lower operating bounds for each servo in your robot or parts storehouse. Since there can be mechanical differences between servos of the same brand and model, number your servos so you can tell them apart. When it comes time to program them, you can refer to your notes for the lower and upper bounds for that particular servo. Modifying a Servo for Continuous Rotation Many brands and models of R/C servos can be readily modified to allow them to rotate continuously, like a regular DC motor. Such modified servos can be used as drive motors for your robot. Modified servos can be easier to use than regular DC motors since they already have the power drive electronics built in, they come already geared down, and they are easy to mount on your robot. BASIC MODIFICATION INSTRUCTIONS Servo modification varies somewhat between makes and models, but the basic steps are the same: 308 WORKING WITH SERVO MOTORS Ch20_McComb 8/18/00 2:22 PM Page 308 1. Remove the case of the servo to expose the gear train, motor, and potentiometer. This is accomplished by removing the four screws on the back of the servo case and sepa- rating the top and bottom. 2. File or cut off the nub on the underside of the output gear that prevents full rotation. This typically means removing one or more gears, so you should be careful not to mis- place any parts. If necessary, make a drawing of the gear layout so you can replace things in their proper location! 3. Remove the potentiometer and replace it with two 2.7K-ohm 1 percent tolerance (“pre- cision”) resistors, wired as shown in Fig. 20.9. This fools the servo into thinking it’s always in the “center” position. An even better approach is to relocate the potentiome- ter to the outside of the servo case, so that you can make fine-tune adjustments to the center position. Alternatively, you can attach a new 5K- or 10K-ohm potentiometer to the circuit board outside the servo, as shown in Fig. 20.10. 4. Reassemble the case. In the following two sections we provide more detailed modification instructions for two popular R/C servos, the Futaba S-148, and the Hitec HS-300. While there are certain- ly many more brands and models of servos to choose from, these two represent a good cross-section of the internal designs used with low- and medium-priced servos. With minor variations, the steps that follow can be applied to similarly designed servos. STEPS FOR MODIFYING A FUTABA S-148 SERVO The Futaba S-148 is among the most common servos used for hobby robotics. The S-148 uses a brass bushing on its output gear. See the previous section, “Basic Modification Instructions,” for the generic steps for disassembling the servo. 1. Note the arrangement of all the gears, then remove them and set them aside. Try not to handle the gears too much, as this will remove the grease that was applied to the gears at the factory. MODIFYING A SERVO FOR CONTINUOUS ROTATION 309 Connections from removed pot 2.2K resistors Solder here Solder here FIGURE 20.9 To modify a servo you must replace the internal poten- tiometer with two 2.7K resis- tors, wired as shown here. Ch20_McComb 8/18/00 2:22 PM Page 309 2. Locate and remove the two screws near the motor shaft. With these two screws removed you can separate the top of the case from the drive motor. 3. Press down on the metal output shaft (it is actually the shaft of the potentiometer) to remove the circuit board. You may need to work the circuit board loose by using a small screwdriver to pry it out by its four corners. 4. Snip the potentiometer off near where the leads connect to the circuit board. 5. If using fixed resistors, solder them in place as shown in Fig. 20.9. If using a 5K potentiometer, follow the additional steps provided in “Basic Modifications Instructions,” earlier in the chapter. 6. Clip off the nub on the bottom of the output gear, as described in “Basic Modifications Instructions.” You may now reassemble the servo: 1. Insert the circuit board back into the top casing. 2. Attach the two small screws that secure the top casing to the motor. 3. Reassemble the gears in the proper sequence. The output gear will fit snugly over the brass bushing. 4. Reassemble the bottom casing, with screws. The S-148 is representative of servos that are constructed with metal bushings or ball bearings for the output shaft. With minor variations, you can use these steps with other servos of similar design. For example, with only minor variations the same steps 310 WORKING WITH SERVO MOTORS FIGURE 20.10 For greater control and accuracy, use an external 5K or 10K pot to replace the one removed from the servo. Ch20_McComb 8/18/00 2:22 PM Page 310 [...]... apply to the Hitec HS-422, another popular servo Like the S-148, the Hitec HS-422 uses a brass bushing to support the output gear The major difference between the S148 and HS-422 is that the HS-422 lacks the two screws holding the top casing to the motor If you are modifying a servo with metal gears, you will not be able to easily clip off the mechanical stop that is located on the bottom of the output... setscrew Either way, make sure that the wheels aren’t too thick for the shaft The wheels used in the prototype where 1 1/2 inches wide, perfect for the 2-inch-long motor shafts Mount the motors using two 2 1/2-inch-by-3/8-inch corner irons, as illustrated in Fig 21.5 Cut about one inch off one leg of the iron so it will fit against the frame of the motor Secure the irons to the motor using 8/32 by 1/2-inch... 4 3/16-inch-by-9-inch mending plate to the left third of the base Temporarily undo the nuts and bolts on the corners to accommodate the plate Drill new holes for the bolts in the plate if necessary Repeat the process for the center and left mending plate When the three plates are in place, tighten all the hardware Make sure the plates are secure on the frame by drilling additional holes near the inside... for the frame of the Roverbot (bottom view) Now attach the wheels Use reducing bushings if the hub of the wheel is too large for the shaft If the shaft has been threaded, twist a 1/4-inch 20 nut onto it, all the way to the base Install the wheel using the hardware shown in Fig 21.6 Be sure to use the tooth lock washer The wheels may loosen and work themselves free otherwise Repeat the process for the. .. crosspiece using a 1 1/2-inch-by-3/8-inch flat angle iron Secure the angle iron by drilling matching holes in the channel stock Attach the stock to the angle iron by using 8/32 by 1/2-inch bolts on the crosspieces and 8/32 by 1 1/2-inch bolts on the riser pieces Don’t tighten the screws yet Repeat the process for the other riser Construct two beams by cutting the angle stock to 10 1/2 inches, as illustrated... angle irons Use 8/32 by 1/2-inch bolts to attach the iron to the beam Connect the angle irons to the risers using the 8/32 by 1 1/2-inch bolts installed earlier Add a spacer between the inside of the channel stock and the angle iron if necessary, as shown in Fig 21.12 Use 8/32 nuts to tighten everything in place Attach the riser to the baseplate of the robot using 1-inch-by-3/8-inch corner angle irons... (yes, these motors have pretapped mounting holes!) Finally, secure the motors in the center of the platform using 8/32 by 1/2-inch bolts and matching nuts Be sure that the shafts of the motors are perpendicular to the side of the frame If either motor is on crooked, the robot will crab to one side when it rolls on the floor There is generally enough play in the mounting holes on the frame to adjust the. .. tighten the screw over the output shaft of the servo Mounting Servos on the Body of the Robot Servos should be securely mounted to the robot so the motors don’t fall off while the robot is in motion In my experience, the following methods do not work well, though they are commonly used: I Duct tape or electrical tape The “goo” on the tape is elastic, and eventually the servo works itself lose The tape... three pounds), the wheels for the robot should ideally be between 2 and 5 inches in diameter Larger-diameter wheels make the robot travel faster, but they can weigh more You won’t want to put extra large 7- or 1 0- inch wheels on your robot if each wheel weighs 1.5 pounds There’s your three-pound practical limit right there The general approach for attaching wheels to servos is to use the round control... because of the weight of the robot Though this is not exactly common, it is possible to burn out the control circuitry in the servo by overdriving it I Standard-sized servos are not particularly strong in comparison to many other DC motors with gear heads Don’t expect a servo to move a 5- or 1 0- pound robot If your robot is heavy, consider using either larger, higher-output servos (such as 1/4-scale or . the Hitec HS-422 uses a brass bushing to support the output gear. The major difference between the S- 148 and HS-422 is that the HS-422 lacks the two screws holding the top casing to the motor. If. A HITEC HS-300 SERVO The HS-300 is an economical alternative to the S-148 and other servos with brass bushings or ball bearings. The output gear of the HS-300 is mounted directly to the potentiometer,. small- to medium-sized robots (under about three pounds), the wheels for the robot should ideally be between 2 and 5 inches in diameter. Larger-diameter wheels make the robot travel faster, but they

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

Xem thêm: McGraw-Hill - The Robot Builder''''s Bonanza Part 10 pptx

TỪ KHÓA LIÊN QUAN