Servo motors

RC servos were originally intended for use in remote control models but provide a versatile and inexpensive means of implementing "precision animation".

A "servo" is a generic term used for an automatic control system. It comes from the Latin word "servus" - slave. In practical terms, that means a mechanism that you can set and forget, and which adjusts itself during continued operation through feedback. Disk drives, for example, contain a servo system insuring that they spin at a desired constant speed by measuring their current rotation, and speeding up or slowing down as necessary to keep that speed. What is "feedback"? Think about driving a car, and wanting to keep your speed smack on 55 MPH. You are cruising along, and occasionally glance at the speedometer. If your speed is under 55, you press down harder on the gas pedal. If your speed is over 55, you lift your foot. The speedometer gives you feedback - information about how fast you really are going. The brain uses this to decide whether to press down or raise the foot. This is also known as "closed loop" control.
An automobile's "cruise control" is a closed loop system that works similar to the way that you do while driving. You establish a set point, and if the speed is below that, the cruise control presses down on the gas pedal.

The most common consumer-visible servo is that used to operate radio controlled (RC) model planes, boats, and other gadgets. These are small boxes that contain:
  • a DC electric motor,
  • gears with an output shaft,
  • position-sensing mechanism,
  • and control circuitry.
The controlling intelligence, in this case the operator of the model, indicates to the servo the position that the output shaft should have. The position-sensing mechanism tells the servo what position the shaft currently has. The control circuitry notes the difference between the desired position and the current position, and uses the motor to "make it so". If the difference in position is large, the motor moves rapidly to the correct position; if the difference is small, the adjustment is more subtle. As for the operator, all he knows is that he moved a slider half-way up, and the rudder on his model plane moved to the center position, and will stay there until he moves the slider again.
RC servos have a huge amount of haunt potential for precision animation. Just imagine a skull head with eyeballs that can track left to right, following guests as they walk by....
Here are a couple of Royal "Titan" servos.

 

Types and availability of RC servos

There are numerous types of servos. They differ in their precision, speed, and strength - all of which are reflected in price. This is as it should be - you shouldn't have to pay for a ball-bearing, metal-gear, high-precision servo, when your application can get by with a cheaper kind. The radio controlled model market is evidently a lucrative one - there are numerous companies making RC servos: Airtronics, Cirrus, FMA Direct, Futaba, Hitec, JR, Ko Propo, Multiplex, Tower Hobbies.
Although the array of manufacturers may seem daunting, it is only a good thing. It gives you lots of choices, and lowers the prices.

Servo Connectors

The good news is that all of these servos feed off of the same electrical connections: roughly 6VDC to power the thing, and a PWM pulse stream to indicate position. The bad news is that just about everybody formerly used a different connector layout for these same signals. If you are using an Airtronics, you can't just plug a Futaba in its place. Luckily, this silliness has been noticed - there is an entire industry that revolves around replacing the various connectors with a plug-compatible arrangement. And, as time marches on, the various brands slowly converge on a standard.

If you need to mix and match different types of servos, this connection information may help:
brand universal positive wire negative wire signal wire
KO Propo NO Red, outside pin Black, middle pin Blue or White, inside pin
Airtronics
(old)
NO Red Black, middle pin Black, White, or Blue
Airtronics/Sanwa T
(old)
NO Red, outside pin Black, middle pin White or Yellow, inside pin
Airtronics/Sanwa Z YES Red, middle pin Black, outside pin Blue or Yellow, inside pin
Futaba J NO Red, middle pin Black, outside pin White, inside pin
Hitec S YES Red, middle pin Black, outside pin Yellow, inside pin
Japan Radio (JR) YES Red, middle pin Brown, outside pin Orange, inside pin
Tower Hobbies YES Red, middle pin Black, outside pin White, inside pin
Futaba G
(old)
NO
Kyosho/Pulsar ? Red Black Yellow
Royal ?
Notes:
  • If you purchase a new servo, it should come with a connection diagram. Keep it on file someplace!
  • Connector chaos is slowly going away, as manufacturers become more standardized. The standard connector is sometimes called a "universal" connector.
  • If you buy a used servo, or remove a servo from old equipment it may have a strange old connector. The connector may even have been replaced or modified in the past. Use caution!
  • Just about all modern servo connectors put the positive power in the middle. With this arrangement, plugging in a servo backwards won't hurt anything - it simply won't work.
  • The modern Futaba "J" connector has a little polarization tab that must be ground off if its going into other connectors.
  • Most older Futaba radio systems use a "G" plug, which doesn't physically match any other units.
  • Some old Airtronics connectors have a thin light grey or white stripe lead on the positive lead, pin 3.
  • The old Airtronics with three ridges on top can be plugged into modern sockets if you shave off the ridges and reposition the wires.
  • The direction of rotation is opposite for Futaba and JR.
  • In general, Black or Brown wire is negative; red wire is positive; other colors (blue, white, yellow) are signal.
  • Most servos are designed to work on 6 volts. Some special servos may require a lower voltage (e.g. a micro servo may be limited to 4.8 volts) and others may require higher voltage (e.g. high powered servos).
 

Driving RC servos

As has already been mentioned, all RC servos have three connections: power (positive), power (ground or negative), and the controlling signal. We are going to assume that you are smart enough to hook up the power leads to a battery or suitable substitute. The interesting part is the control signal. An RC servo motor doesn't just run when you give it power. It's an intelligent device, and you must tell it what you want it to do. You need something that drives the servo with that control signal.
 

Powering RC Servos

Most servos require a power supply between 4.8V and 6.0V. The higher the voltage, the faster the servo will move and the more torque it will have. Check the specifications before you buy. Example: the Hitec HS-50 Ultra-Micro "feather" runs only on 4.8 volts.
 

Theory of Driving RC servos

The servo is controlled by a series of pulses, wherein the length of the pulse indicates the position to take.
pulse width angle comment
0.6m Sec -45 degrees minimum pulse length
1.5m Sec 0 degrees center position
2.4 mSec -45 degrees maximum pulse length
Notes:
  • Increasing the pulse width by 10 µSec results in about a degree of movement on the output shaft.
  • These numbers are nominal, and vary slightly between manufacturers and models. For example, the HiTech HS81 likes pulses between 0.74 mSec and 2.14 mSec.
  • The rate at which these pulses are sent isn't terribly important - only the width of the pulse. Some typical rates are 400 Hz (2.5 mSec pulse spacing) and 50 Hz (20 mSec pulse spacing).
So, the short story is, if you can make a series of electrical pulses, you can rotate the servo shaft through a range of 90 degrees. And that 90 degree range of rotation can open and close the jaw of a skull, move eyeballs left and right, point a finger, or do all sorts of creepy animation.
The driving pulse is usually specified as 3-5 Volt Peak to Peak, but I suspect that in many cases you can get by with whatever power the motor is getting. I would avoid using a drive pulse greater than the motor power.

Modification For Continuous Rotation

One popular modification to RC servos sets them up for "continuous rotation". Instead of moving through a range of about 90 degrees, a modified servo spins around and around. This modification is often used by those building their own miniature robots: the servo is turned into a combination motor, gearbox, speed control, and reversing switch. I won't go into details of how this is done, but I will outline the general principle.

  • A normal servo uses feedback to determine where the current angle is, as opposed to where the pulse train says it should be.
  • The feedback comes from a potentiometer attached to the output shaft. The potentiometer is used in a voltage divider that produces a voltage proportional to the current angle.
  • The incoming pulse train is measured, producing a voltage proportional to the desired angle.
  • The one voltage is subtracted from the other.
  • This difference drives me motor. Big differences drive the motor rapidly. Small differences drive it slowly.
  • The modification removes the feedback and substitutes a fixed voltage divider set for 50%. [It also removes any mechanical "stops" used to prevent 360-degree rotation.]
  • Now, the speed and direction of the motor is relative to a fixed voltage, not the current position. Pulses of medium width produce 50% voltage, no difference, no movement. Slightly longer pulses move the motor slowly. Longer pulses more the motor faster. Pulses shorter than the medium width cause the motor to spin in the opposite direction.
You can see how handy this is to robot builders. Just bolt a couple of modified servos to the bottom of the robot, and put tires on the output shafts. Then just generate a stream of pulses to control speed and direction.
 

Digital Servos

All RC servos operate according to the instructions of a train of pulses, and could be thought of as digital. But in fact, they are easily and usually built from analog components. A few companies offer servos that are actually digital inside. Such servos contain a computer chip that measures the width of the incoming pulses, convert the current potentiometer position to digital (or measure position digitally), compute the difference, and drive the internal motor digitally.
For the sake of discussion, the theory of operation is the same. The signals are merely processed in another way.

1 comment:

  1. Good post! I must thank you for this informative read. I hope you will post again soon.
    Kind regard

    PLC Repairs

    ReplyDelete