Home      Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science

19 June 2009
Author: Giorgos Lazaridis
How RC Servos Works

What is an RC Servo?

An RC servo

RC Servos are very popular mechanisms in the world of RC models. No matter if this is a train model, or a car, or a boat, plane or helicopter, there must be at least one servo hidden somewhere within the constructions.

RC Servos are used to convert electrical signal into polar or linear movement. A simple example is the steering system of an RC car. When signal is transmitted from the control to the car, this signal is decoded and sent to a servo. According to this signal, the servo will rotate it's drive shaft for some degrees, and this rotation is translated into wheel steering.

The reason that makes those servos vary handy is that, they have a very easy (and universal) way of driving them with a simple PWM circuit, they can achieve from low to higher torques, enough to move almost everything needed in an RC model, they are very compact and reliable, and most of all, they come with very low prices according to their specifications.

The anatomy of an RC Servo

The anatomy of an RC servo

The servo with the guts out

The vast majority of RC servos are composed with he same blocks:

• The controller circuit: This is the "brain" of the Servo. This circuit is responsible to read the user's input signal (pulses) and translate it into a motor revolution in such a way, that the drive shaft will be rotated to the desired position.
• The feedback potentiometer: The shaft of the potentiometer is attached to the drive shaft of the servo. When the drive shaft rotates, so does the potentiometer. In that way, each and every rotation angle of the drive shaft, corresponds to a different resistance of the potentiometer. By reading the potentiometers' resistance, the controller is able to know the exact angle of the drive shaft of the servo.
• The motor: This is usually a small high speed DC motor controlled by a H-bridge circuit attached to the servos' controller.
• The gearbox: The gearbox will drive the motor's revolution to the drive shaft. Also, the rpm will be significantly reduced and the torque will be increased. The torque is one of the main characteristics of RC servos.
• The drive shaft: When all of the above operate in perfect harmony, the drive shaft will be rotated with accuracy to the user's requested angle.

Different types of RC Servos

There are lot of different RC servos made from many companies. The basic differences that will increase or decrease the cost are:

• Precision: How accurately will the servo translate the input signal into drive shaft position
• Speed: how fast can this translation be made
• Strength: What torque can achieve during rotation
• Break strength: With how much load can be the servos' drive shaft be loaded without loosing it's position
• Motion type: How does the drive shaft moves. it could be circular (like motors) or linear (like pistons)
• Size and Weight: An important consideration when used in small planes or helicopters. Typically, smaller servos have lower torque.
• Bearing type: Standard servos have bushings supporting the main shaft, heavy duty servos typically have one or two ball bearings supporting the main shaft.
• Gearbox type: In common, nylon gears are used for the gearbox. For heavy duty servos, there are also metallic gears. Karbonite gears are rather new to the market and offers higher strength than nylon gears (5 times stronger or more) and very high durability, but they are still expensive. The most durable are the titanium gears. They are much more lighter than the metallic gears and in some cases they are more durable than them. Thus, they can achieve higher torques and speeds.
• Motor type: The standard motor used in servos is a three pole ferrite motor. For some high speed servos, five poles core-less motors are used. For heavy duty servos, heavy duty core-less motors are used.

According to your application, you should carefully choose the most appropriate servo. For example, an expensive and heavy metal-geared high torque servo could be inappropriate for controlling a helicopter's fin, but it could be an one-way solution for the steering system of a racing car, that the torque loads are very high and a lot of vibrations are sent from the wheels to the servo.

Following, you may find the links of some manufacturers that provide the specifications of their servo product range:

• Futaba
• Hitec
• Airtronics

• Analog and digital servos

There are two types of servos in the market, the analog and the digital servos. There is no difference in how the servo is controlled by the user. The main difference is how the motor is driven by the servo controller.

The motor of an analog servo would receive a signal from the servo controller (AKA amplifier) at about 30 to 50 times a second. And this is the position refresh speed of the servo. On the other hand, digital servos can achieve position refresh rates up to 400 times per second.

By updating the motor position that often, the digital servo can deliver full torque from the beginning of movement and increases the holding power of the servo, about 3 times higher! The quick refresh also allows the digital servo to have a tighter dead-band. Moreover, the response of the servo is significantly increased, and in conjunction to the increased holding power and the faster max torque delivery, the digital servos can accurately set and hold a position on the shaft.

Digital servos can be programmed for direction of rotation, center and end points, fail-safe option, speed, and dead bandwidth adjustment. You do not need to worry about programming as most of the digital servos operate like normal servos out of the box and require no programming.

A main drawback of digital servos is that they are much more expensive than analog servos, and require more power from your batteries.

Theory of operation

The block diagram of the automation for an RC servo

The servo is actually an implementation of an ACS (Automated Control System). When no input signal is detected from the controller, the servo does just nothing. When an input signal is driven, the following actions are taken:

• The controller will decode the signal into a reference voltage. Each voltage corresponds to different drive-shaft position
• The controller will read the drive shaft position by reading the feedback potentiometers' voltage.
• A comparison shall be made between those two voltages. If the potentiometers' voltage is greater than the reference voltage, the motor shall be rotated one way. If it is less than the reference voltage, the motor shall be rotated the other way. Then, the comparison shall be made again.
• If after the comparison the two voltages are equal, this means that the required position has been achieved and no more actions should be taken
• At any time, the servo is never idle. It always checks if the drive shaft has change position due to any external interference. If it does, the controller will try to correct the position. Therefore, the input signal should always be driven to the servo if the desired position needs to be held.

RC Servo connectors

It would be very nice to have one type of universal connector that all manufacturers would use, but this is yet not true. Although nowadays standards are trying to be settled, still there are servos with different connectors and color codes. Therefore, it is highly recommended, before you proceed connecting a servo or experimenting with it, to check first what each wire does.

Following we have a table with some known manufacturers and the color code that they follow. Not that servos have 3 wires that comes out: One wire that goes to the positive of the power supply, one that goes to the negative of the power supply, and another one with the input signal.

 Manufacturer Positive Negative Signal Airtronics (Obsolete) RED BLACK (in the middle) BLACK, WHITE or BLUE Airtronics / Sanwa (Obsolete) RED BLACK WHITE or YELLOW Airtronics / Sanwa RED BLACK BLUE or YELLOW Futaba RED BLACK WHITE Hitec RED BLACK YELLOW Japan Radio RED BROWN ORANGE Tower Hobbies RED BLACK WHITE Kyosho / Pulsar RED BLACK YELLOW

If you cannot find your servo on the above table, or cannot find the manufacturer, you should get some help from the following general information:

• The vast majority of modern servos have the positive wire in the middle (just to avoid damaging the controller in case of reverse plug insertion)
• Most older Futaba servos use a "G" type plug.
• Modern Futaba "J" connectors have a little polarization slot or tab
• Some old Airtronics connectors have a gray or white strip on the positive wire
• The old Airtronics connectors have three ridges on top
• In general, BLACK or BROWN should be negative, RED should be positive and BLUE or WHITE or YELLOW should be the signal

How to control an RC Servo

A very simple PWM servo controller circuit to test our servo in the labs

The power supply of servos is usually from 4.6 to 6 volts, and that could vary between manufacturers and types. For maximum torque and speed achievements, you should supply the servo with it's maximum nominal voltages.

As mentioned before, servos are controlled with a PWM signal driven to their signal wire. A PWM signal has three parameters that characterizes it: The first is the amplitude (or peak to peak voltage) of the signal. You should use from 3 to 5 volts for your signal, according to it's specifications. The second is the frequency. In PWM, the frequency is usually fixed to a value. For analog servos the frequency is 30-50 Hz, and for digital servos it is 300 to 400 Hz.

The third and most critical value is the positive pulse with of the PWM, AKA "duty cycle". The width of the pulse will have a direct result into the drive shaft position. In other words, to control the position of a servo, you should change the duration of the positive pulse of the PWM signal driven to the signal wire of the servo...

The translation of pulse width to drive shaft position is not easily to be made. It depends on the manufacturer and the type of servo. It is a good beginning to say that the pulse width duration for a full drive shaft move should be within the range of 1mSec to 2mSec. If we take for example a rotary servo, a PWM with positive pulse width 1mSec would cause the shaft to revolve fully left. A 2mSec positive pulse width would cause the drive shaft to revolve fully right. 1.5mSec pulse width would cause the shaft to turn to the middle of the revolution area.

There are of course manufacturers that have different min and max pulse width duration values. But those differences slightly differs from the range of 1 to 2 mSec.

An RC Servo in the lab

And here is an example. Using a very simple PWM circuit, we will control an RC servo. This is the best circuit in terms of flexibility and simplicity that i have came up with. It is able to change it's frequency, its highest and it's lowest pulse width duration by just changing one component each time! With the addition of 3 potentiometers (instead of three set-up resistors) the circuit can change all the above characteristics with just a screw driver!

An oscilloscope will be all the time visible so that you will see how does the angular position of the servo changes in conjunction to the PWM duty cycle. Here is the corresponding video of this experiment:

The circuit

Following, i have added the above circuit schematic diagram.

As you can see, the circuit is a 555 connected as astable multivibrator. The servo is controlled through a 2N2222 transistor directly connected to it's signal wire. You should add a resistor if your RC needs lower signal voltage, and also you should take care about the supply voltage of your servo. If it is powered with lower than 5V, you should add a zener diode accordingly.

There are 3 componnents, three resistors in the circuit that have no value, the R1, the R2 and the R3. Those components are the ones that changes the characteristics of the output signal. The resistor R3 is the one that will change the PWM frequency. In my test circuit, this resistor is 470K, and this results in an oscillation of about 35Hz.

The second resistor is the R1. By changing the value of this resistor, it results to the lower positive pulse duration. In my test circuit, this resistor is chosen to be 6.9K (two resistors in series, one 2.2K and one 4.7K) and as a result i get about 0.6mSec minimum pulse duration.

The third and last resistor is the R2. By changing it's value, it results to the maximum positive pulse duration. I have chosen a 33K resistor. The maximum pulse duration that i get with this resistor is about 2.5mSec.

As you can see, this is a very flexibly circuit. If you change the R1 and R2 resistors with a rheostat, then you will be able to change the minimum and maximum angle of the drive shaft by simply changing those rheostats. Isn't that something for such a simply circuit!

Relative pages
• 555 theory of operation
• Basic transistor circuits
• Learn how dimmers work
• PWM signal theory
• Peltier coolers (TEC) theory of operation
• Learn about the WiFi interferences to the human body
• How to make a PWM fan controller / LED dimmer using a 555
• Dr.Calculus: LED resistor calculator
• Dr.Calculus: Standard resistor values calculator
• Op-Amp IC Pinouts
• Learning PICs @ PCB Heaven On-Line Book