The Servo Buddy
by Jim Stewart
This article introduces servo motor construction and
operation, and describes an inexpensive circuit you
can build to control a servo without a microcontroller.
When I first started to build projects with R/C servo motors it
became clear that, during construction, I needed a way to set
the position of a servo manually. You can’t just grab the shaft
and turn it, and writing software for a micro was overkill. Just a
simple little circuit would do the job. That was the birth of the
Servo Buddy. First, let’s review some basics.
An R/C servo (or just servo) is an electro-mechanical
device used to rotate an actuator to a precise position and
hold it there, even if the actuator is pushing back. R/C
stands for Radio Control since originally these servos were
used for radio control of model airplanes. Standard ranges
of rotation are 90 degrees and 180 degrees. Figure 1
shows a Hitec model HS-5645MG servo. Note the three
wires near the actuator. They are power, ground, and input.
While servos made by Hitec and Futaba are very popular,
you will find servos from other companies, especially
Servos come in two basic types: the original analog
type and the newer digital type. Both types look similar
from the outside and also have the same basic parts on the
inside. The difference between analog and digital servos is
in the electronics. Digital servos contain a microprocessor.
32 SERVO 05.2008
Figure 2 shows a Hitec
S-type connector and a Futaba
J-type connector. They are
almost the same except for a
polarizing key along the edge
of the Futaba connector. They
mate with standard 0.025 inch
square pins on 0.1 inch centers.
The sequence of wires is the
same, but the colors differ.
Voltage (typically +5V) is the
center red wire. Ground is the
black wire. The input signal is
either yellow (S-type) or white
(J-type). For other servo brands,
the colors may differ.
Parts of a Servo
Figure 3 shows a simplified view of what’s inside a servo.
A small DC motor is connected to an output shaft through
a set of speed-reduction gears. The power of a motor is
P = kwG, where k is a constant, w is the rpm, and G is the
torque. If power is fixed, then reducing speed will increase
torque on the output shaft. The motor is controlled by the
electronics. A position command is the input, while a
potentiometer on the shaft provides position feedback. The
actuator — commonly called a horn — has grooves in its
mounting hole that mate with the spline at the end of the
output shaft. The spline prevents the horn from slipping
under torque. A screw attaches the horn to the shaft. Horns
come in various shapes: arms, bars, crosses, discs, etc. Note
that the spline on a Hitec servo has 24 grooves while the spline
on a Futaba servo has 25. Their horns aren’t interchangeable.
The control input is a pulse width modulated (PWM)
signal as shown in Figure 4. For an analog servo, the pulses
are typically 20 milliseconds apart for a repetition rate of
50 Hz. Digital servos use the same PWM widths but can
use a higher repetition rate, up to 300 Hz. The pulse widths
shown are common, but other widths are also used. Check
the particular manufacturer’s datasheet.
Analog Servo Electronics
Figure 5 shows a block diagram of the electronics of
an analog servo. The local pulse generator (triggered by the
input pulse) generates a pulse width proportional to the
current position. The local pulse and the input pulse go to
a comparator which subtracts one from the other. The
difference is the error pulse. The direction signal depends
on which pulse was wider. The error signal goes to a