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:
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 check 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.
BLACK (in the middle)
BLACK, WHITE or BLUE
Airtronics / Sanwa (Obsolete)
WHITE or YELLOW
Airtronics / Sanwa
BLUE or YELLOW
Kyosho / Pulsar
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:
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!
Thanks for the incredible informative post! I have built your circuit but instead of going to one particular position, the servo jitters back and fourth. On the oscilloscope the waveform locks as you describe. There is a voltage drop of around 1V (from 6V to 5V) when I connect it, but that should be ok, or?
You can amplify the signal from your PT100 and introduce it into an error amplifier circuit using an operational amplifier. ALthought it seems complicated, it´s very simple and I would be glad to help. The solution I think consists on an amplifier that receives the weatstone bridge signal and produces a proportional, amplified DC signal. The second one could compare the setpoint you have with the actual temperature, producing an "error voltage" that could be applied into the 555 in PWM mode. My e-mail is email@example.com Regards.
Nice post! Nobody told me that an analog servo could use a PWM signal. As the name analog, I thought it was a comparator with an H brigde....So, stupidly, I tried to tie potentiometers, variable supplies voltage/current.....and nothing worked.....Back to the bench....Thank you!
Here's an unusual servo question regarding turning OFF a standard analog RC servo motor. I am an amateur astronomer with plenty of good test equipment ( scopes, logic analyzers, meters,etc ). We are building a crude/ cheap grating spectrograph for a telescope. The light weight grating film is sitting on top of an RC servo motor ( shaft vertical ) which rotates the grating less than a few degrees. There is NO TORQUE LOAD on the servo motor since the shaft is vertical. We rotate the grating with the servo and then turn off the power to reduce EMI.It works well. Unfortunately, most hobby RC servos seem to have a capacitor which discharges to rotate the shaft to a fail-safe home position on power off. We need the grating to stay in position when the power to the servo is turned off. Is there a way to defeat the fail-safe home position feature....maybe remove the electrolytic capacitor in the motor ? If you reply send an email to: firstname.lastname@example.org
Cheers & thanks.
Green Bay, Wisconsin, USA
Dear George, My promulgated web site not currently active.
I am wanting to create as simple a circuit as possible to drive a 5v servo motor in order to operate model rail points and semaphore/arm signals. The motor needs to be instructed to turn 90 degrees, say left and halt and then 90 degrees right and then halt with the halts being from a few seconds to infinity. Currently signals in use are operated by way of nomentary switches and magnetic solenoids which are entirely successful but not prototypical as they are very quick in operation. The servo works at an appreciably slower speed which I deem to be more in keeping with reality.
Can you help me or point me in the right direction please. I am currently building your servo test circuit but don't expect to be able to operate the signals and turn outs from it.
@Pellas basically you mean "variable duty cycle" and not "frequency". What you want to make is certainly possible and easy to make. Replace the pot with a set of resistors, each one taking place only when a limit switch is achieved.
Hello from Greece!
I would like to make a very compact servo controller with a three position switch (by using different resistors) and adjustable frequency, upper and lower positive pulse. Basically like the one you did but with a two or three (or more) position switch instead of a rheostat.
Is that possible?
@akshay The rate of change of switching pulse[duty cycle] will vary the speed of servo movement. The different duty cycle is just telling the servo which angle to turn to. Decrease from neutral may means turn anti-clockwise while increase from neutral may means turn clockwise.
hello!ive built a rc bulldozer that uses a gas engine to power a 24 volt generator that powers all the 24 volt motors to make it go.i have 24 volt batteries in parallel to absorb voltage spikes to protect the esc.im using system voltage,through a servo testor,to control a servo to set my engine throttle.in theory,and in practice,it should sense current draw and adjust engine speed to keep voltage at a set point regardless of load,and it does.the problem i have is at partial loads,the voltage drops to far below battery voltage.at no load and full load it works well,keeping voltage around 28 volts.im powering the servo testor with a seperate 6 v battery,the signal(hooked to 3rd leg of pot on testor)is system voltage through a standard diode,then a 24 v zener,470 resistor,100 cap to ground and another resistor.the servo is linked to the throttle so that as voltage goes down(signal)the throttle opens more and vice versa.any ideas on why my half load conditions cause low system voltages? thanks ed
@Andrew Yes it does indeed, and this is the idea. You put the 100K pot and then adjust it by the R2 to achieve the min and max PWM duty cycle, since the potentiometers do not come in a wide value variety as resistors. The same goes for R1 as well. So, with R1 you can set the minimum potentiometer value (when it is rotated to 0 ohms), and with R2 the maximum value (when it is rotated to 100K).
Great article! I just have one question -- I notice that you clamped the variable resistor range by bridging its outside pins with R2. Doesn't this affect the taper? Any thoughts on how to get around this if you *need* to use a 100K variable resistor?
I am doing a project on dc servomotor and have started by saying the application for my servomotor is in an industrial air con system without fully understanding this is this a viable choice ? i may change the application to R/C vehicle to enable me to use lower voltage (6-12v)where can i find PCB layout drawing and parts list and spec. Any pointers would be greatly received
ok Is there a point on the circuit board like the reverse of frequency of the servo you can put another motor for example? OR
Do you know a way you can put 2 motors on one channel without using the Y-cable and you have to switch between the both of them, doesnt matter if its one is going Clockwise and the other CounterClockwise. I dont need a ECS because im not worried about how fast just need the signal to change between them
hey Kammenos I got a great question for u
if you have two solenoids you want to make it for one servo
for example on the transmitter if you turn the stick to the left servo move Clockwise, if you moved the stick to the right the servo to rotate CounterClockwise. can I put one solenoid one the wire for the motor and the other solenoid + wire on the 2N2222 to make one stop and the other one to start?
@Michal the period [T] is the reverse of frequency [F].
T = 1/F
So, as you say, period of 50Hz is 20mSec etc. Of course, the period depends of the frequency of the servo.
Regarding the fast servos with the 400Hz signal, i have never test them, but i do not find something strange if the signal has 2.5mSec pulse duration and the angle setup is from 1 to 2 msec... Sounds ok to me, although i have never test it.
I know the duty cycle is usually between 1-2 ms. But what about signal period? In case of 50 Hz servo, should it be 20 ms and in case of 30 Hz servo 33,3 ms? Does signal period depend on servo frequency? If yes, what about digital servo with frequency 400 Hz? In that case, period will be 2.5 ms what compared to duty cycle 1-2 ms just doesn\'t seem right to me. Could someone explain this to me, please? Thank you for any information you can provide.
An easier version of this controller uses a 556 ( two 555 IC in a single package). Set the first 555 to operate in astable mode permanently at 50hz and run the output into the trigger of the second 555. that 555 will run in monostable mode with its Capacitor and variable resistor ( potentiometer) tuned so that at max resistance the High wave will be be 2 ms long and as you decrease the potentiometer the high wave will shorten to 1 ms.
akshay i think you got something wrong here. The duty cycle on a servo has nothing to do with the speed. The speed on a servo is fixed to a standard value. The duty cycle controls only the position. 1msec positive pulse means most left position of the servo, and 2msec means most right position. the middle is at 1.5 msec. read the document once more to make this clear.
kammenos- sir , i am talking about the servo shown in the video. when the potentiometer is turned i could see the pulse width decreasing and the servo motor was gaining speed. but generally if we increase the pulse width the speed actually increases and here in the video i see the opposite. please forgive me if i am asking questions which seem very basic and stupid. i am only a beginner.
Hi, I've got the circuit working however its working the wrong way round. I mean when the potentiometer is turned right the servo turns left and vice versa could you please help me? Thanking you in advance
The RC servo i got operated at 5 volts. So it is impossible to run at 12. First of all, you need to get a servo able to run at 12 volts. Also, you may need to add a 100 ohm resistor to the yellow connector of the servo, the one that starts from the emitter of the 2n2222.
The 555 will operate normally, but the frequency may change - this is normal if the voltage change. The R3 is responsible for the frequency. Current circuit has about 35 Hz. You need to test t be sure.
You should not need other changes, except R1 and R2 that sets min and max angle of the servo, but that has to do with the application.
Hy, I would like to use the circuit that you showed, with the same values that you did. But i plan on using it on an 12V servo(in a car; 12V to 14.4 V). Due to the fact that there are 12V to 14.4V instead of 5V, should i change anything in your circuit. Sorry if I bother you with this question, but I\'m quite a beginner with these things. Thank you!
The only way to make it work properly is with a microcontroller, because there are too many parameters to take in mind. In any case, the 80-120 degrees is not to small, if you use a proper PTC (or NTC) sensor. You can adjust it by R1 and R2
This is what I have been looking for, great! I\'m trying to construct a mechanism to control the airflow over the engine in my model aero plane. So I figured I could just replace the potentiometer with a temperature sensor (PT100....), but the difference (80C - 110C) is too small to make it work.. any suggestions?