Arduino Projects    |   Raspberry Pi  |     Electronic Circuits   |   Electronics Reference Design Library  |   AVR    |    PIC    |    8051    |    Electronic Projects

Servo Motor

Written By: 
Nikhil Agnihotri
Servo Motor What are Servo Motors?
Servo refers to an error sensing feedback control which is used to correct the performance of a system. Servo or RC Servo Motors are DC motors equipped with a servo mechanism for precise control of angular position. The RC servo motors usually have a rotation limit from 90° to 180°. Some servos also have rotation limit of 360° or more. But servos do not rotate continually. Their rotation is restricted in between the fixed angles.
 
Where are Servos used?
The Servo motors are used for precision positioning. They are used in robotic arms and legs, sensor scanners and in RC toys like RC helicopter, airplanes and cars.
 
Servo Motor Applications in RC Helicopter
Servo Motor Applications in RC Airplanes Servo Motor Applications in RC Airplanes
Servo Motors in Robotic  Arms Servo Motors in Robotic Arms
 
Servo Motor manufacturers
There are four major manufacturers of servo motors: Futaba, Hitec, Airtronics and JR radios. Futaba and Hitec servos have nowadays dominated the market. Their servos are same except some interfacing differences like the wire colors, connector type, spline etc.
 
Servo Motor Manufacturers
 
 
Servo Motor wiring and plugs
The Servo Motors come with three wires or leads. Two of these wires are to provide ground and positive supply to the servo DC motor. The third wire is for the control signal. These wires of a servo motor are color coded. The red wire is the DC supply lead and must be connected to a DC voltage supply in the range of 4.8 V to 6V. The black wire is to provide ground. The color for the third wire (to provide control signal) varies for different manufacturers. It can be yellow (in case of Hitec), white (in case of Futaba), brown etc.
 
Futaba provides a J-type plug with an extra flange for proper connection of the servo. Hitec has an S-type connector. A Futaba connector can be used with a Hitec servo by clipping of the extra flange. Also a Hitec connector can be used with a Futaba servo just by filing off the extra width so that it fits in well.

Hitec splines have 24 teeth while Futaba splines are of 25 teeth. Therefore splines made for one servo type cannot be used with another. Spline is the place where a servo arm is connected. It is analogous to the shaft of a common DC motor.
 
Structure of Servo Motor

Unlike DC motors, reversing the ground and positive supply connections does not change the direction (of rotation) of a servo. This may, in fact, damage the servo motor. That is why it is important to properly account for the order of wires in a servo motor.
 
 

Comments (48)

Thanks for this article i was

Thanks for this article i was searching about for servo motors and finally i found what i wanted to learn.

okay carry on... 

okay carry on...

 

Hi there to all, the contents

Hi there to all, the contents present at this website are genuinely remarkable for people experience, well, keep up the good work fellows.

thanks for this article. i

thanks for this article. i wanted to know about servo motors.......

thank you i fully understand

thank you i fully understand about servo motor very thanhs

give the detailed explain of

give the detailed explain of electronic component in servo

 very informative article

 very informative article

 A article with all

 A article with all information about servo motor at one place. 

hi sir this was really

hi sir

this was really informative.I m using HS-311 servo mortors with ATMEGA 16 microcontroller.for making it rotate to 0degree i gave 0.33 us on pulse and 20 ms off pulse,for 90 degree i gave 0.95ms on pulse and for 180 degree......1.56 ms pulse.... it worked effectively.for2 servos i had to use 2 avr ports. i want to use 4 servos in only 1 port in ATMEGA 16,how can it be done without interfering with other servo's PWM??

super like.....its 2 good

super like.....its 2 good ....

really i impressed with this

really i impressed with this presentation

how will move servo from ic

how will move servo from ic 555. 

This Site has taken my

This Site has taken my tension by giving such a worderful guidence @AVR.

i am really impressed with

i am really impressed with the explanation of servomotor. i now see that its a step ahead of the dc motor we used back in the days

thanks 

thank u it was really

thank u it was really helpfull

Informative post on servo

Informative post on servo motors. This post will really help in selecting a servo and in manufacturing it. Generally, people have to face problem while selecting a particular servo according to their requirement. Thanks a lot for this wonderful post.

very informative

very informative article

should post some relative circuit diagram to check the servo's working

hi plz attach pdf form of

hi plz attach pdf form of this artile for download tanx very informative article

nice information very

nice information very usefull 

Thanks........

nice article

nice article

this is a really nice to

this is a really nice to learn all about the servo motor by the artical.

 

The post is really cool,

The post is really cool, thanks for sharing it here. Good thing someone shared it so we can all use it as guide and future reference when it comes to servo motor.

Anyway, it's nice to know

Anyway, it's nice to know that a lot of people shows interest at servo motors.:)

A very well done by the

A very well done by the author. A very informational article with clear a well structured literature. A real joy to read . Once again WELL DONE!

Hi, I am new to electronics

Hi, 

I am new to electronics world i would like to know is there a way to reduce the speed of sservo motors without decreasing its toque. 

Thanks in advance.

Regards

Hi sirIm using MG995 twoerPro

Hi sir

Im using MG995 twoerPro servo motor interfacing with arduino.
im not getting result as programed 
I connected red to +5v
brown to ground

& yellow for signal to arduinos pin 9

 

and want to rotate 20 degrees like this

for (i=0;i<=180; i=i+20)

move 20 degree

 

 

here is the complete program

here is the complete program (i tested with arduino uno board with vs2 and v0006 servo)

 

 

#include <Servo.h> 
 
Servo myservo;  // create servo object to control a servo 
               
 
int pos = 0;    // variable to store the servo position 
 
void setup() 
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object 
 
 
void loop() 
  for(pos = 0; pos < 180; pos += 20)  // goes from 0 degrees to 180 degrees 
  {                                  // in steps of 20 degree 
    myservo.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(15);                       // waits 15ms for the servo to reach the position 
  } 
  for(pos = 180; pos>=1; pos-=20)     // goes from 180 degrees to 0 degrees 
  {                                
    myservo.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(15);                       // waits 15ms for the servo to reach the position 
  } 

thank you very much . this

thank you very much . this article is so detailed, love it

hy siri'm using pic 16f877A

hy sir

i'm using pic 16f877A controller
i'wanna conrol a servo motor in such a way that pulses of different time period  are given to motor ........
i'm using CCs compiler
i've confusion to make the code
any 1 help me please

engg_umair17@yahoo.com

i'm tHankful to yOUh.. .. ..

I GOT WHAT I M FINDING ABOUT

I GOT WHAT I M FINDING ABOUT SERVO MOTOR

 

thanks  a lot

thanks  a lot

Very good explanation. Better

Very good explanation. Better than text book and manual.

Very nice and awesome!

Very nice and awesome!

Really great post!!.Thank you

Really great post!!.Thank you for sharing this knowledge with us.Its a well written post i would share with my friends also.

i WANT TO CONTROL THE

i WANT TO CONTROL THE DIRECTION OF SERVO MOTOR USING ULTRASONIC SENSOR SO PLEASE HELP .. I AM DOING ARM 7 LPC2368

 

I recently came across your

I recently came across your blog and have been reading along. I think I will leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.

Thanks and Regards,

Pharmaexpressrx.net

thanks for post

thanks for post

It does help me a lot knowing

It does help me a lot knowing that you have shared this information here freely. I love the way the people here interact and shared their opinions too

Very Useful article for

Very Useful article for beginners like me .....

 

Thanks

Sairam.

sir, I'm working with 6

sir, I'm working with 6 servomotor robotic arm, which will pick up & place object,.......but I didn't get the o/p with my program........plz help

 

nice information

nice information

hi sir, i'm using pic 16f877A

hi sir,

 

i'm using pic 16f877A controller..i'wanna conrol a servo motor in such a way that pulses of different time period  are given to motor ........
i'm using hitech compiler.i've confusion to make the code.any 1 help me please.

i need 0 to 90 of rotation and 90 to 0 of rotation ... pls send me the code to ..

 

nataraj87@gmail.com..Pls reply me as soon as possible...

 

Thanks ......

I'm having trouble

I'm having trouble understanding what the sw 1 goes to in the first ic 555. Can u help?

please help me i want make

please help me 

i want make robot arm by using servo motor but i donot know which servo model can be used and any type 

servo which rotate 180 degree or 360 degree.

i will use pic16f877a .i want code for controll arm by micro c langague .

 

hi , i am using atmega32. i

hi , i am using atmega32. i want to control servo motor with help of keypad 4*3 (eg. by pressing key '1' motor should rotate anticlockwise and by pressing key '4' it should rotate clockwise) atmega32 comes with pwm output(pin 21), i want some help in programing the output pin(21) with desire duty cycle generated by pressing key 1 or 4 to rotate servo motor acw or cw respectivly..

 

thanking you in advance..

avdish@gmail.com

Hi Sir I am using ATMEGA16

Hi Sir

 

I am using ATMEGA16 for my robotic arm which has a servo motor 

I have connected the data pin of servo motor to Port B3 .

I need to control the position of servo motor using a 10k potentiometer.

The servo has to rotate only when i change the resistance through pot

Plese give me the code ,it is so important and also urgent

 

this website is remarkable. i

this website is remarkable. i learnt a lot from this web

Can anyone tell me whether

Can anyone tell me whether servo motor can be run by Atmega-16 ?

You are here