Sunteți pe pagina 1din 4

Servo Motor

As mentioned in the introduction, a servo motor is a type of DC motor which is used for
precision control. Servo motors are available as both AC Servo motors and DC Servomotor with
each type having its own areas of applications.

A simple servo motor (as the one used in this project) consists of a small DC motor, a
potentiometer for providing position feedback, a gear system for increased torque and a control
system.

Typically, simple servo motors consists of three wires. These are usually color coded as Red,
Brown and Orange (may vary with different models). The Red wire is used for supply, the Brown
wire is used for ground and the Orange wire is used for control signal.

Here, the control signal will determine the position of the servo motor’s shaft. The control signal
is usually a PWM signal but this PWM signal is not used to control the speed of the motor as in
case of a DC Motor. But rather, it is used to determine the position of the servo meter.

The DC Motor in the servo motor is powered as per the control signal it receiver. As per the
feedback from the position sensing system (like a potentiometer), when the servo achieves the
desired position, the power to the motor is terminated.

Even though the power supply to the motor inside the servo motor is not constant, the overall
power should be constant as the servo motor has a dedicated system that controls the power.

The servo motor used in this project is Tower Pro SG90. It is a small but powerful servo motor
that can produce a torque of 1.8 kgf.cm.

A servo motor is a combination of DC motor, position control system, gears. The position of the shaft of the DC
motor is adjusted by the control electronics in the servo, based on the duty ratio of the PWM signal the SIGNAL
pin.

Simply speaking the control electronics adjust shaft position by controlling DC motor. This data regarding
position of shaft is sent through the SIGNAL pin. The position data to the control should be sent in the form of
PWM signal through the Signal pin of servo motor.

The frequency of PWM (Pulse Width Modulated) signal can vary based on type of servo motor. The important
thing here is the DUTY RATIO of the PWM signal. Based on this DUTY RATION the control electronics adjust
the shaft.
First we need to set frequency of PWM signal and for that we should call “#include <Servo.h>” header file, on
including this header file in the program, the frequency gets set automatically and we get to use some special
conditions, which enables the user to enter needed position of servo directly without any fuzz.

Now we need to define a name for the servo “Servo sg90sevo”, here ‘sg90servo’ is the name chosen, so while
writing for potion we are going to use this name, this feature comes in handy when we have many servos to
control, we can control as many as eight servo by this.
Now we tell the UNO where the signal pin of servo is connected or where it needs to generate the PWM signal.
To do this we have “Sg90.attach(3);”, here we are telling the UNO we connected the signal pin of servo at
PIN3.

All left is to set the position, we are going set the position of servo by using “Sg90.write(30);”, by this command
the servo hand moves 30 degrees, so that’s it. After that whenever we need to change the position of servo we
need to call the command ”Sg90.write(needed_position_ angle);”. In this circuit we will have two buttons one
button increases the position of servo and the other is for decreasing the position of servo.

1. Connect the black wire from the servo to the GND pin on the Arduino.
2. Connect the red wire from the servo to the +5V pin on the Arduino.
3. Connect the yellow or white wire from the servo to a digital pin on the Arduino.

Servo motor works on PWM (Pulse width modulation) principle, means its angle of rotation is
controlled by the duration of applied pulse to its Control PIN. Basicallyservo motor is made up
of DC motor which is controlled by a variable resistor (potentiometer) and some gears.

1. Connect the black wire from the servo to the GND pin on the Arduino.
2. Connect the red wire from the servo to the +5V pin on the Arduino.
3. Connect the yellow or white wire from the servo to a digital pin on the Arduino.

 Servo red wire – 5V pin Arduino.


 Servo brown wire – Ground pin Arduino.
 Servo yellow wire – PWM(9) pin Arduino.

Wire Configuration

Wire Number Wire Colour Description

1 Brown Ground wire connected to the ground of system

2 Red Powers the motor typically +5V is used

3 Orange PWM signal is given in through this wire to drive the motor
owerPro SG-90 Features

 Operating Voltage is +5V typically

 Torque: 2.5kg/cm

 Operating speed is 0.1s/60°

 Gear Type: Plastic

 Rotation : 0°-180°

 Weight of motor : 9gm

 Package includes gear horns and screws

SG-90 Servo Motor Equivalent


MG90S Metal Gear, MG995 High Torque Metal Gear, VTS-08A Analog Servo

Selecting your Servo Motor


There are lots of servo motors available in the market and each one has its own speciality and applications. The following
two paragraphs will help you identify the right type of servo motor for your project/system.
Most of the hobby Servo motors operates from 4.8V to 6.5V, the higher the voltage higher the torque we can achieve, but
most commonly they are operated at +5V. Almost all hobby servo motors can rotate only from 0° to 180° due to their gear
arrangement so make sure you project can live with the half circle if no, you can prefer for a 0° to 360° motor or modify
the motor to make a full circle. The gears in the motors are easily subjected to wear and tear, so if your application requires
stronger and long running motors you can go with metal gears or just stick with normal plastic gear.
Next comes the most important parameter, which is the torque at which the motor operates. Again there are many choices
here but the commonly available one is the 2.5kg/cm torque which comes with the Towerpro SG90 Motor. This 2.5kg/cm
torque means that the motor can pull a weight of 2.5kg when it is suspended at a distance of 1cm. So if you suspend the
load at 0.5cm then the motor can pull a load of 5kg similarly if you suspend the load at 2cm then can pull only 1.25. Based
on the load which you use in the project you can select the motor with proper torque. The below picture will illustrate the
same.
How to use a Servo Motor
After selecting the right Servo motor for the project, comes the question how to use it. As we know there are three wires
coming out of this motor. The description of the same is given on top of this page. To make this motor rotate, we have to
power the motor with +5V using the Red and Brown wire and send PWM signals to the Orange colour wire. Hence we
need something that could generate PWM signals to make this motor work, this something could be anything like a 555
Timer or other Microcontroller platforms like Arduino, PIC, ARM or even a microprocessor like Raspberry Pie. Now, how
to control the direction of the motor? To understand that let us a look at the picture given in the datasheet.

From the picture we can understand that the PWM signal produced should have a frequency of 50Hz that is the PWM
period should be 20ms. Out of which the On-Time can vary from 1ms to 2ms. So when the on-time is 1ms the motor will
be in 0° and when 1.5ms the motor will be 90°, similarly when it is 2ms it will be 180°. So, by varying the on-time from
1ms to 2ms the motor can be controlled from 0° to 180°

S-ar putea să vă placă și