Page 290 - Robot Builder's Bonanza
P. 290
ELECTRONICS FOR CONTROLLING A SERVO 259
rate sources— a 9- volt battery for the voltage-regulated controller, for example, and a set of
4 AA cells for the servo— you avoid messy power line problems.
• When using separate power sources, be sure to connect the grounds from these sources
together. Otherwise, your server will not work properly.
• Only one input/output (I/O) line from the microcontroller is needed to operate the servo.
You may insert an optional 470 (ohm) 1/8- watt resistor inline between the controller
and the Signal input of the servo. This helps protect the microcontroller in case the servo
has an (unlikely) internal electrical problem.
Be sure to power the servos using a separate battery pack. Connect as shown. You might also
wish to add a 1 F to 22 F tantalum capacitor between the +V and ground of the servo
power source to help kill any noise that may be induced into the electronics when the servo
G turns on and off.
Tantalum capacitors are polarized. Be sure to connect the + lead of the capacitor to the +V
pin of the servo. For more information about tantalum and other types of capacitors, see
Chapter 31, “Common Electronic Components for Robotics.”
See the chapters in Part 7, “Microcontroller Brains,” for specific hookup diagrams and
FYI programming code for using servos with the Arduino and other microcontrollers. Be sure to also
visit the RBB Online Support site (see Appendix A) for additional programming examples.
USING A SERIAL SERVO CONTROLLER
Even the fastest microcontrollers have trouble generating signals for more than 8 or 10 servos
at a time— and you may have that many, or more!, if you’ve designed a six- legged walking
robot.
Even if your microcontroller is a speed demon and has no trouble creating pulses for 12,
18, or even 24 servos, you may not want to use it for that task. Instead, you may wish to use
a dedicated serial servo controller. It acts as a pulse- making coprocessor.
Servo controllers connect to your microcontroller via a serial communications line. Using
programming code (examples are provided with the unit you buy), you then send commands
to each servo, telling it to move to a certain position. The work of producing the properly
timed pulses is the job of the servo controller, thus freeing up your microcontroller to do other,
more important jobs.
BONUS PROJECT: CONTROLLING A SERVO VIA AN LM555
TIMER IC, AND MORE
See the RBB Online Support site for additional methods of controlling an R/C servo, includ-
ing using an LM555 timer IC, practical examples of using several popular serial servo control-
lers (like the Lynxmotion SSC- 32), and more. See Appendix A for details on how to access
the RBB Online Support site.
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
23-chapter-23.indd 259 4/21/11 11:51 AM