Close or Esc Key

Arduino Projects   |   Raspberry Pi   |   Electronic Circuits   |   AVR   |   PIC   |   8051   |   Electronic Projects

Servo Motor

Table of Contents:

Written By: 

Nikhil Agnihotri
Power supply for Servo
The servo requires a DC supply of 4.8 V to 6 V. For a specific servo, its voltage rating is given as one of its specification by the manufacturer. The DC supply can be given through a battery or a regulator. The battery voltage must be closer to the operating voltage of the servo. This will reduce the wastage of power as thermal radiation. A switched regulator can be used as the supply for better power efficiency. Learn more about working of a servo motor through exclusive images at the Insight about servo motor.
Selection of a Servo    
The typical specifications of servo motors are torque, speed, weight, dimensions, motor type and bearing type. The motor type can be of 3 poles or 5 poles. The pole refers to the permanent magnets that are attached with the electromagnets. 5 pole servos are better than 3 pole motor because they provide better torque.
The servos are manufactured with different torque and speed ratings. The torque is the force applied by the motor to drive the servo arm. Speed is the measure that gives the estimate that how fast the servo attains a position. A manufacturer may compromise torque over speed or speed over torque in different models. The servos with better torque must be preferred.
The weight and dimensions are directly proportional to the torque. Obviously, the servo having more torque will also have larger dimensions and weight. The selection of a servo can be made according to the torque and speed requirements of the application. The weight and dimension may also play a vital role in optimizing the selection such as when a servo is needed for making an RC airplane or helicopter.
The website of the manufacturers can be seen to obtain details about different models of the servos. Also their product catalogue can be referred to. Some manufacturers like Futaba also provide online calculator for the selection of a servo.


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

okay carry on...


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 wanted to know about servo motors.......

thank you i fully understand about servo motor very thanhs

give the detailed explain of electronic component in servo

 very informative article

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

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 ....
really i impressed with this presentation
how will move servo from ic 555. 

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

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


thank u it was really helpfullyes

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 article

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

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

nice information very usefull 


nice article

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


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 that a lot of people shows interest at servo motors.:)

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!


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.


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 (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 article is so detailed, love it

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

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



thanks  a lot

Very good explanation. Better than text book and manual.

Very nice and awesome!

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



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,

thanks for post

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 beginners like me .....




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

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 .. reply me as soon as possible...


Thanks ......

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 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 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..

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 learnt a lot from this web

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

Yes it can be... there is another article on this site detailing the avr code:

Can you tell me how to rotate a servo in the reverse direction?

Are you sure that there is nothing in the electronics as well that would prevent a 180 degree servo motor from making a full 360 degree rotation, once we file off the mechanical stops??

Are you sure that there is nothing in the electronics as well that would prevent a 180 degree servo motor from making a full 360 degree rotation, once we file off the mechanical stops??


Add new comment

This is to ensure that you are a human visitor and to prevent automated spam submissions.
Enter the characters shown in the image.