All of the power-handling needs are taken care of by the FIGURE 20.6 You can construct your own servo connectors using snap-off headers soldered to your robot control board... CONTROLLIN
Trang 1Typical Servo SpecsR/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 servotypes 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 thespecs 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 theservo can lift when the weight is extended one inch from the shaft of the motor Servosexhibit 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 full360° 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-torqueversions Servo manufacturers list the specifications for each model, so you can compareand make the best choice based on your particular needs
Many R/C servos are designed for use in special applications, and these applicationscan 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 aroundwater
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°
Sail winch 2.3¨ 1.1¨ 2.0 3.8 oz 195 oz-in 0.22 sec/60°
Trang 2Connector Styles and WiringWhile 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 areceiver 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
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 veryfew 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 commoncolors 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.100inch 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 ofpins you want For a servo, snap off three pins, then solder them to your circuit board, asshown in Fig 20.6
Trang 31 2 3
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
Airtronics Red Black White
Red stripe BlueBrown
Cirrus Red Brown OrangeDaehwah Red Black WhiteFleet Red Black WhiteFutaba Red Black WhiteHitec Red Black Yellow
JR Red Brown Orange
Kraft Red (4.8 v) Black Orange
White (2.4 v) YellowSanwa Red stripe Black Black
Trang 4You’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 andcontrol electronics can be irreparably damaged
Circuits for Controlling a ServoUnlike a DC motor, which runs if you simply attach battery power to its leads, a servomotor requires proper interface electronics in order to rotate its output shaft While theneed 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 ormicrocontroller (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 microcontrollerwith no additional electronics All of the power-handling needs are taken care of by the
FIGURE 20.6 You can construct your own servo connectors using snap-off
headers soldered to your robot control board.
Trang 5control board in the servo, saving you the hassle This is one of the key benefits of usingservos 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 theoperation 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 servomay 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 roboticparts, including servos The Stamp, which is discussed in more detail in Chapter 31, candirectly control one or more servos However, the more servos the more processing time isrequired to send pulses to each one (at least, not without resorting to some higher-levelprogramming 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 offour AA batteries is sufficient to power the servo For proper operation ensure that thegrounds are connected between the Stamp and the battery pack Use a 33–47 µF capacitorbetween the V and ground of the AA pack to help kill any noise that may be induced into
6 2
IC1 555
1
7 8
5
4 3
+6 vdc
+
C2 0.1
C3
22 µF
c b e
Q1 2N3904
10KR4
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.
Trang 6the electronics when the servo turns on and off See Chapter 31 for suitable code that youcan 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 adigital pulse train from the transmitter, beginning with a long sync pulse, followed by asmany 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 syncpulse 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 servosaren’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 multipleservos at a time (multitasking), the control circuitry can no longer effectively send the refreshpulses (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 EdwardsElectronics and NetMedia (see Appendix B, “Sources,” for addresses and Web sites).Dedicated servo controllers can operate five, eight, or even more servos autonomously, whichreduces 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 becommanded simultaneously, even if your computer, microcontroller, or other circuitry is notmultitasking 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, eachcapable of handling eight servos Each controller would be responsible for a given degree offreedom 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 theyneed to be provided with real-time data in order to operate the servos This data is
+6 vdc
Gnd
BasicStamp
Any I/OpinServo
Connectedgrounds
+V for BSII
Ground for+6 vdc servopower Ground for
+V BSII power
FIGURE 20.8 Hookup diagram for connecting a
servo to a Basic Stamp II
Trang 7commonly sent in a serial data format A sequence of bytes sent from the computer ormicrocontroller is decoded by the servo controller, with each byte corresponding to a servoattached 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 veryhelpful 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 outfrom 4.8 to 7.2 volts, depending on the number of cells they have Servos allow a fairlywide latitude in input voltage, and 6 volts from a four-pack of AAs provides more thanenough juice As the batteries drain, however, the voltage will drop, and you will noticeyour servos won’t be as fast as they used to be Somewhere below about 4.0 or 4.5 voltsthe 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/Cmodels? 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 withmore 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 yourservos at no more than 9 volts, and preferably between the rated 4.8- to 7.2-volts range Ofcourse, check the data sheet that comes with the servos you are using and note any specialvoltage 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 tiometer If the time difference equates to less than the dead band—say, five or sixmicroseconds—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 theexact match between the incoming signal and its own internal reference signal The deadband 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
poten-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 probablywon’t even notice the effects of dead band if your control circuitry has a resolution lowerthan 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 MotorolaMC68HC11—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 thepulse width—may not have an effect on the servo
Trang 8The 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 isthat with a narrow dead band the servo will be more prone to hunt to its position and mayeven buzz after it has gotten there (Hint: the way to minimize this is to stop the stream ofpulses 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 experimentwith 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 statefor 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 ofcontrol 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 programswing the servo back to its center or neutral position When during your testing you hearthe servo hit its internal stop (the servo will “chatter” as the gears slip), you’ve found theabsolute lower-bound value for that servo Repeat the process for the upper bound It’s notunusual for some servos to have a lower bound of perhaps 250 µs and an upper bound ofover 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 orparts storehouse Since there can be mechanical differences between servos of the same brandand model, number your servos so you can tell them apart When it comes time to programthem, 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 rotatecontinuously, like a regular DC motor Such modified servos can be used as drive motorsfor your robot Modified servos can be easier to use than regular DC motors since theyalready have the power drive electronics built in, they come already geared down, and theyare easy to mount on your robot
BASIC MODIFICATION INSTRUCTIONS
Servo modification varies somewhat between makes and models, but the basic steps arethe same:
Trang 91. 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 rating the top and bottom
sepa-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 replacethings in their proper location!
3. Remove the potentiometer and replace it with two 2.7K-ohm 1 percent tolerance cision”) resistors, wired as shown in Fig 20.9 This fools the servo into thinking it’salways 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 thecenter position Alternatively, you can attach a new 5K- or 10K-ohm potentiometer tothe circuit board outside the servo, as shown in Fig 20.10
(“pre-4. Reassemble the case
In the following two sections we provide more detailed modification instructions fortwo 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 goodcross-section of the internal designs used with low- and medium-priced servos With minorvariations, 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-148uses a brass bushing on its output gear See the previous section, “Basic ModificationInstructions,” 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 tohandle the gears too much, as this will remove the grease that was applied to the gears
at the factory
Connections fromremoved pot2.2K resistors
Solder here
Solder here
FIGURE 20.9 To modify a servo you must
replace the internal tiometer with two 2.7K resis- tors, wired as shown here.
Trang 10poten-2. Locate and remove the two screws near the motor shaft With these two screws removedyou 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) toremove the circuit board You may need to work the circuit board loose by using a smallscrewdriver 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 5Kpotentiometer, follow the additional steps provided in “Basic ModificationsInstructions,” earlier in the chapter
6. Clip off the nub on the bottom of the output gear, as described in “Basic ModificationsInstructions.”
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 thebrass bushing
4. Reassemble the bottom casing, with screws
The S-148 is representative of servos that are constructed with metal bushings orball bearings for the output shaft With minor variations, you can use these steps withother servos of similar design For example, with only minor variations the same steps
FIGURE 20.10 For greater control and accuracy, use an external 5K or 10K pot
to replace the one removed from the servo.
Trang 11apply to the Hitec HS-422, another popular servo Like the S-148, the Hitec HS-422uses 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 you are modifying a servo with metal gears, you will not be able to easily clip off themechanical stop that is located on the bottom of the output gear For these you will need
to use a file or small rotary grinder to remove the stop You can use a Dremel or othermotorized hobby tool to make short work of this task
STEPS FOR MODIFYING 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, and
no bushing or bearing is used This means that if you remove the potentiometer, you alsoremove the structure on which the output gear is attached Therefore, the steps for modify-ing an HS-300 are different than those for the S-148 See “Basic Modification Instructions,”earlier in the chapter for the generic steps to disassemble the servo
1. Remove the center gear and the output gear All the other gears can remain If needed,place a small piece of electrical tape on the gears to hold them in place while you work(don’t get any grease on the tape or it won’t stick!)
2. Remove the control board from the bottom of the case
3. Clip off the three wires leading to the potentiometer
4. With a small flat-head screwdriver, pry off the three “fingers” holding the bottom ofthe potentiometer to its casing Discard this part
5. Using a small pair of needle-noise pliers, remove the small disc inside the
potentiome-ter Take care not to pull the shaft of the potentiometer out It should remain held in
place by a small retainer Discard this part once it has been removed
6. If using fixed resistors, solder them in place as shown in Fig 20.9 If using a 5K tiometer, follow the additional steps provided in “Basic Modifications Instructions,”earlier in the chapter
poten-7. Clip off the nub on the bottom of the output gear, as described in “Basic ModificationsInstructions.”
An alternative to steps 4 and 5 is to ream or drill out the underside of the output gear sothat it rotates freely around the potentiometer shaft Be sure not to ream or drill out toomuch or you’ll ruin the gear At the same time, be sure you remove enough material sothat the gear rotates freely, without any binding You will still want to clip off the leads ofthe potentiometer so that it is no longer in circuit with the control board
You may now reassemble the servo:
1. Insert the circuit board back into the top casing
2. Replace the output gear onto the shaft of the modified potentiometer Replace the ter gear and make sure all the gears properly mesh
cen-3. Reassemble the bottom casing with screws
Trang 12The HS-300 is representative of servos that are constructed without metal bushings orball bearings for the output shaft With minor variations, you can use these steps with otherservos of similar design.
APPLYING NEW GREASE
The gears in a servo are lubricated with a white or clear grease As you remove and replacethe gears during your modification surgery it’s inevitable that some of the grease will comeoff on your fingers If you feel too much of the grease has come off, you’ll want to applymore Most any viscous synthetic grease suitable for electronics equipment will work,though you can also splurge and buy a small tube of grease especially made for servo gearsand other mechanical parts in model cars and airplanes
When applying grease be sure to spread it around so that it gets onto all the cal parts of the servo that mesh or rub However, avoid getting any of it inside the motor
mechani-or on the electrical parts Wipe off any excess
While it may be tempting, don’t apply petroleum-based oil to the gears, such as in-one oil or a spray lubricant like WD-40 Some oils may not be compatible with the plas-tics used in the servo, and spray lubricants aren’t permanent enough
three-TESTING THE MODIFIED SERVO
After reassembly but before connecting the servo to a control circuit, you’ll want to testyour handiwork to make sure the output shaft of the servo rotates smoothly Do this by
attaching a control disc or control horn to the output shaft of the servo Slowly and
care-fully rotate the disc or horn and note any snags Don’t spin too quickly, as this will putundo stress on the gears
If you notice any binding while you’re turning the disc or horn, it could mean you didn’tremove enough of the mechanical stop on the output gear Disassemble the servo justenough to gain access to the output gear and clip or file off some more
A CAUTION ON MODIFYING SERVOS
Modifying a servo typically entails removing or “gutting” the potentiometer and clippingoff any mechanical stops or nubs on the output gear For all practical purposes, this ren-ders the servo unusable for its intended use, that is, to precisely control the angular posi-tion of its output shaft So, before modifying a servo, be sure it’s what you want to do It’ll
be difficult to reverse the process
Several sources of robotics parts provide premodified servos, which are a practical native if you don’t care to do the modification yourself The price is just a little higher thanunmodified servos of the same brand and make
alter-SOFTWARE FOR RUNNING MODIFIED SERVOS
Even though a servo has been modified for continuous rotation, the same digital
puls-es are used to control the motor Keep the following points in mind when using to runmodified servos:
Trang 13■ If you’ve used fixed resistors in place of the original potentiometer inside the servo,sending a pulse of about 1.5 ms will stop the motor Decreasing the pulse width willturn the motor in one direction; increasing the pulse width will turn the motor in theother direction You will need to experiment with the exact pulse width to find the valuethat will cause the motor to stop.
■ If you’ve used a replacement 5K potentiometer in place of the original that was insidethe servo, you have the ability to set the precise “center point” that will cause the motor
to stop In your software, you can send a precise 1.5 ms pulse, then adjust the tiometer until the servo stops As with fixed resistors, values higher or lower than 1.5
poten-ms will cause the motor to turn one way or another
Specific software examples for running servos are provided in Part 5 of this book
LIMITATIONS OF MODIFIED SERVOS
Modifying a servo for continual rotation carries with it a few limitations, exceptions, and
“gotchas” that you’ll want to keep in mind:
■ The average servo is not engineered for lots and lots of continual use The mechanics
of the servo are likely to wear out after perhaps as little as 25 hours (that’s elapsed time),depending on the amount of load on the servos Models with metal gears and/or brassbushing or ball bearings will last longer
■ The control electronics of a servo are made for intermittent duty Servos used to power arobot across the floor may be used minutes or even hours at a time, and they tend to be underadditional mechanical stress because of the weight of the robot Though this is not exactlycommon, it is possible to burn out the control circuitry in the servo by overdriving it
■ Standard-sized servos are not particularly strong in comparison to many other DCmotors with gear heads Don’t expect a servo to move a 5- or 10-pound robot If yourrobot is heavy, consider using either larger, higher-output servos (such as 1/4-scale orsail winch), or DC motors with built-in gear heads
■ Last and certainly not least, remember that modifying a servo voids its warranty You’llwant to test the servo before you modify it to ensure that it works
MODIFYING BY REMOVING THE SERVO CONTROL BOARD
Another way to modify a servo for continuous rotation is to follow the steps outlined lier and also remove the control circuit board Your robot then connects directly to the servomotor You’d use this approach if you don’t want to bother with the pulse width schema.You get a nice, compact DC motor with gearbox attached
ear-However, since you’ve removed the control board, you will also need to provide quate power output circuitry to drive the motor Your PC or microcontroller will likely not
ade-be able to provide adequate current; in fact, trying to control a “gutted” servo motor
direct-ly will probabdirect-ly damage your PC or microcontroller
A servo modified by removing its control board is essentially the same as an ordinary
DC motor, and the control circuitry is exactly the same See Chapter 18 for more mation on working with DC motors
Trang 14infor-Attaching Mechanical Linkages to Servos
One of the benefits of using R/C servos with robots is the variety of ways it offers you toconnect stuff to the servos In model airplane and car applications, servos are typicallyconnected to a push/pull linkage of some type For example, in a plane, a servo for con-trolling the rudder would connect to a push/pull linkage directly attached to the rudder Asthe servo rotates, the linkage draws back and forth, as shown in Fig 20.11 The rudder isattached to the body of the plane using a hinge, so when the linkage moves, the rudderflaps back and forth
You can use the exact same hardware designed for model cars and airplanes with your equipped robots Visit the neighborhood hobby store and scout for possible parts you can use.Collect and read through Web sites and catalogs of companies that manufacture and sell servolinkages and other mechanics Appendix B, “Sources,” lists several such companies
servo-Attaching Wheels to ServosServos reengineered for full rotation are most often used for robot locomotion and are out-fitted with wheels Since servos are best suited for small- to medium-sized robots (underabout three pounds), the wheels for the robot should ideally be between 2 and 5 inches indiameter Larger-diameter wheels make the robot travel faster, but they can weigh more.You won’t want to put extra large 7- or 10-inch wheels on your robot if each wheel weighs1.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 disc thatcomes with the servo (see Fig 20.12) The underside of the disc fits snugly over the out-put shaft of the servo You can glue or screw the wheel to the front of the disc Here aresome ideas:
■ Large LEGO “balloon” tires have a recessed hub that exactly fits the control discincluded with Hitec and many other servos You can simply glue the disc into the rim ofthe tire
■ Lightweight foam tires, popular with model airplanes, can be glued or screwed to thecontrol disc The tires are available in a variety of diameters If you wish, you can grinddown the hub of the tire so it fits smoothly against the control disc
Shaft attached
to servo disc Servo disc
FIGURE 20.11 Servos can be used to
transform rotational motion to linear motion.
Trang 15■ A gear glued or screwed into the control disc can be used as an ersatz wheel or as a gearthat drives a wheel mounted on another shaft.
In all these cases, it’s important to maintain access to the screw used to secure thecontrol disc to the servo When you are attaching a wheel or tire be sure not to blockthe screw hole If necessary, insert the screw into the control disc first, then glue or oth-erwise attach the tire Make sure the hub of the wheel is large enough to accept thediameter of your screwdriver, so you can tighten the screw over the output shaft of theservo
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:
■ Duct tape or electrical tape The “goo” on the tape is elastic, and eventually the servo
works itself lose The tape can also leave a sticky residue
FIGURE 20.12 Attaching a round control disc to the hub of a wheel.
Trang 16■ Hook-and-loop, otherwise known as Velcro Accurate alignment of the hook-and-loop
halves can be tricky, meaning that every time you remove and replace the servos thewheels are at a slightly different angle with respect to the body of the robot This makes
it harder to program repeatable actions
■ Tie-wraps You must cinch the tie-wrap tightly in order to adequately hold the servo in
place Unless your robot is made of metal or strong plastic, you’re bound to distortwhatever part of the robot you’ve cinched the wrap against
Over the years, I’ve found “hard mounting”—gluing, screwing, or bolting—the servosonto the robot body to be the best overall solution, and it greatly reduces the frustrationlevel of hobby robotics
ATTACHING SERVOS WITH GLUE
Gluing is a quick and easy way to mount servos on most any robot body material, ing heavy cardboard and plastic Use only a strong glue, such as two-part epoxy or hot-melt glue I prefer hot-melt glue because it doesn’t emit the fumes that epoxy does, and itsets much faster (about a minute in normal room temperatures versus a minimum of fiveminutes for fast-setting epoxy)
includ-When gluing it is important that all surfaces be clean Rough up the surfaces with a file
or heavy-duty sandpaper for better adhesion If you’re gluing servos to LEGO parts, apply
a generous amount so the extra adequately fills between the “nubs.” LEGO plastic is hardand smooth, so be sure to rough it up first
ATTACHING SERVOS WITH SCREWS OR BOLTS
A disadvantage of mounting servos with glue is that it’s more or less permanent (and,
according to Murphy’s Law, more permanent than you’d like if you want to remove the
servo, less permanent if you want the servo to stay in place!) For the greatest measure offlexibility, use screws or bolts to mount your servos to your robot body All servos havemounting holes in their cases; it’s simply a matter of finding or drilling matching holes inthe body of your robot
Servo mounts are included in many R/C radio transmitters and separately availableservo sets You can also buy them separately from the better-stocked hobby stores Theservo mount has space for one, two, or three servos The mount has additional mountingholes that you can use to secure it to the side or bottom of your robot Most servo mountsare made of plastic, so if you need to make additional mounting holes they are easy to drill.You can also construct your own servo mounting brackets using 1/8-inch thick aluminum
or plastic A template is shown in Fig 20.13 (Note: the template is not to scale, so don’t trace
it to make your mount Use the dimensions to fashion your mount to the proper size.)The first step in constructing your own servo mounting brackets is to cut and drill thealuminum or plastic, as shown in Fig 20.13 Use a small hobby file to smooth off the edgesand corners The mounting hole centers provided in the template are designed to line upwith the holes in LEGO Technic beams This allows you to directly attach the servo mounts
to LEGO pieces Use 3/32 or 4/40 nuts and bolts, or 4/40 self-tapping screws, to attach theservo mount to the LEGO beam
Trang 17Figure 20.14 shows a servo mounted on a bracket and attached to a LEGO beam If essary, the servos can be easily removed for repair or replacement.
(Note: Not to scale)
FIGURE 20.13 Use this template to construct a servo
mount-ing bracket The template may not be duced in 1:1 size, so be sure to measure before cutting your metal or plastic.
repro-FIGURE 20.14 A servo mounted on a homemade servo bracket.