Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

DEPARTMENT OF MECHATRONICS

ENGINEERING
UNIVERSITY OF ENGINEERING AND
TECHNOLOGY, PESHAWAR
MtE-226L ACTUATING SYSTEM LAB, 4th Semester

LAB NO. 6
SUBMITTED BY : TAIMOOR KHAN
REG NO. : 20PWMCT0739

SUBMITTED TO : SIR WAHAD-UR-REHMAN

SUBMISSION DATE: 26-05-2022


LAB TITLE CONTROLING THE SPEED AND
POSITION CONTROL OF SERVO MOTOR USING
ARDUINO.
Lab Report Rubrics:
LAB 6
LAB TITLE
SPEED AND POSITION CONTROL OF SERVO
MOTOR USING ARDUINO.
 OBJECTIVES:
1. Servo motor and types of servo motor
2. Study the operational mechanism of servo motor
3. Control the speed of servo motor
4. Control the position of servo motor
5. Appilication of servo motor
 THEORY:

Servo Motor:
A Servo Motor is a rotary actuator or linear actuator that allows for precise control of
angular or linear position, velocity, and acceleration. It consists of a suitable motor
coupled to a sensor for position feedback. Servomotors are used in applications such
as robotics, CNC machinery, or automated manufacturing.

Figure 1 SERVO MOTOR

TYPES OF SERVO MOTOR: (1)


1) DC SERVO MOTOR
The motor which is used as a DC servo motor generally have a separate DC source in the
field of winding & armature winding. The control can be archived either by controlling the
armature current or field current. Field control includes some particular advantages over
armature control. In the same way, armature control includes some advantages over field
control. Based on the applications the control should be applied to the DC servo motor. DC
servo motor provides very accurate and also fast response to start or stop command signals
due to the low armature inductive reactance. DC servo motors are used in similar equipments
and computerized numerically controlled machines.

Figure 2 DC SERVO

2) AC SERVO MOTOR

AC servo motor is an AC motor that includes encoder is used with controllers for giving
closed loop control and feedback. This motor can be placed to high accuracy and also
controlled precisely as compulsory for the applications. Frequently these motors have higher
designs of tolerance or better bearings and some simple designs also use higher voltages in
order to accomplish greater torque. Applications of an AC motor mainly involve in
automation, robotics, CNC machinery, and other applications a high level of precision and
needful versatility.

Figure 3 AC SERVO

3) POSITIONAL ROTATION SERVO MOTOR

Positional rotation servo motor is the most common type of servo motor. The shaft’s o/p
rotates in about 180o. It includes physical stops located in the gear mechanism to stop turning
outside these limits to guard the rotation sensor. These common servos involve in radio-
controlled water, radio-controlled cars, aircraft, robots, toys and many other applications.
Figure 4 ROTATIONAL SERVO

4) CONTINUOUS ROTATION SERVO MOTOR


Continuous rotation servo motor is quite related to the common positional rotation servo
motor, but it can go in any direction indefinitely. The control signal, rather than set the static
position of the servo, is understood as the speed and direction of rotation. The range of
potential commands sources the servo to rotate clockwise or anticlockwise as preferred, at
changing speed, depending on the command signal. This type of motor is used in a radar dish
if you are riding one on a robot or you can use one as a drive motor on a mobile robot.

Figure 5 CONTINUOUS ROTATION SERVO

5) LINEAR SERVO MOTOR

Linear servo motor is also similar to the positional rotation servo motor discussed above, but
with an extra set of gears to alter the o/p from circular to back-and-forth. These servo motors
are not simple to find, but sometimes you can find them at hobby stores where they are used
as actuators in higher model airplanes.
Figure 6 LINEAR SERVO

OPERATIONAL MECHANISM OF SERVO MOTOR:

It consists of three parts:

1. Controlled device
2. Output sensor
3. Feedback system

WORKING PRINCIPLE
It is a closed-loop system where it uses a positive feedback system to control motion and
the final position of the shaft. Here the device is controlled by a feedback signal generated
by comparing output signal and reference input signal.

Here reference input signal is compared to the reference output signal and the third signal
is produced by the feedback system. And this third signal acts as an input signal to the
control the device. This signal is present as long as the feedback signal is generated or there
is a difference between the reference input signal and reference output signal. So the main
task of servomechanism is to maintain the output of a system at the desired value at
presence of noises.

AC/DC SERVO MOTOR:


They are classified as AC and DC Servo Motor. The AC servomotor is further divided into
two types:

1. Two Phase AC Servo Motor


2. Three Phase AC Servo Motor
DC SERVO MOTOR:

DC Servo Motors are separately excited DC motors or permanent magnet DC motors. Figure
(a) shows the connection of Separately Excited DC Servo motor and figure (b)shows the
armature MMF and the excitation field MMF in quadrature in a DC machine.

This provides a fast torque response because torque and flux are decoupled. Therefore, a
small change in the armature voltage or current brings a significant shift in the position or
speed of the rotor. Most of the high-power servo motors are mainly DC.

The Torque-Speed Characteristics of the motor are shown below:


As from the above characteristics, it is seen that the slope is negative. Thus, a negative slope
provides viscous damping for the servo drive system.

AC SERVO MOTOR

The AC Servo Motors are divided into two types 2 and 3 Phase AC servomotor. Most of the
AC servomotors are of the two-phase squirrel cage induction motor type. They are used for
low-power applications. The three-phase squirrel cage induction motor is now utilized for
applications where a high power system is required.(2)

 Application of Servo Motor:


1. Robotics: A servo motor at every “joint” of a robot is used to actuate movements,
giving the robot arm its precise angle.
2. Conveyor Belts: Servo motors move, stop, and start conveyor belts carrying
product along to various stages, for example, in product packaging/bottling, and
labelling.
3. Camera Auto Focus: A highly precise servo motor built into the camera corrects
a camera’s lens to sharpen out-of-focus images.
4. Robotic Vehicle: Commonly used in military applications and bomb detonation,
servo motors control the wheels of the robotic vehicle. And generating enough
torque to move, stop, and start the vehicle smoothly as well as control its speed.
5. Solar Tracking System: Servo motors adjust the angle of solar panels throughout
the day so that each panel continues to face the sun, harnessing maximum energy
from sunup to sundown.
6. Antenna Positioning: Servo motors are used on both the azimuth and elevation
drive axis of antennas and telescopes such as those used by the National Radio
Astronomy Observatory (NRAO).
7. Textiles: Servo motors control industrial spinning and weaving machines, looms,
and knitting machines that produce textiles such as carpeting and fabrics as well
as wearable items such as socks, caps, gloves, and mittens.
8. Automatic Door Openers: Supermarkets and hospital entrances are prime
examples of automated door openers controlled by servo motors. Whether the
signal to open is via push plate beside the door for handicapped access or by radio
transmitter positioned overhead.
IN LAB TASK EXPERIMENTATIONS:

1. Task 1
TO CONTROL THE SPEED OF SERVO MOTOR (0 TO 180)
DELAY OF 0.1 SEC 0 TO 180 WITH SERVO LIBRARY:
PROCEDURE
I. Take an arduino UNO and servo motor.
II. Then connect them with jumper wires.
III. Then write the code according to the circuit
IV. Then check the results.

CODING:

#include<Servo.h>
Servo Myservo;
int pos;
void setup()
{
Myservo.attach(3);
}
void loop()
{
for(pos=0;pos<=45;pos++){
Myservo.write(pos);
delay(15);
}
delay(1000);
for(pos=45;pos<=90;pos++){
Myservo.write(pos);
delay(15);
}
delay(1000);
for(pos=90;pos<=135;pos++){
Myservo.write(pos);
delay(15);
}
delay(1000);
for(pos=135;pos<=180;pos++){
Myservo.write(pos);
delay(15);
}
delay(1000);
}
EXPERIMENTAL PICTURES

Figure 7:Servo Motor At zero Degree

Figure 8:Servo Motor At 45 Degree

Figure 9:Servo Motor At 90 Degree


Figure 10:Servo Motor At 180 Degree

2. TASK 2:TO CONTROL THE SPEED OF SERVO MOTOR


(0 TO 180) WITH DELAY OF 0.2 SEC 0 TO 180:
PROCEDURE
I. Take an arduino UNO and servo motor.
II. Then connect them with jumper wires.
III. Then write the code according to the circuit and upload it to the arduino.
IV. Then check the results.

CODING

#include<Servo.h>
Servo Myservo;
int pos;
void setup()
{
Myservo.attach(3);
}

void loop()
{

for(pos=0;pos<=180;pos++){
Myservo.write(pos);
delay(15);
}
delay(200);

for(pos=180;pos>=0;pos--){
Myservo.write(pos);
delay(15);
}
delay(200);

Figure 11:Servo Moving From Zero to 180 Degree

Figure 12:Servo Motor Moving From 180 to 0 Degree


TASK 3:
TO CONTROL THE POSITION OF SERVO MOTOR (0 TO
180) USING POTENTIOMETER:

PROCEDURE
V. Take an arduino UNO and servo motor.
VI. Then connect them with jumper wires.
VII. Then write the code according to the circuit and upload it to the arduino.
VIII. Then check the results.

CODING:
#include <Servo.h> // add servo library

Servo myservo; // create servo object to control a servo

int potpin = 0; // analog pin used to connect the potentiometer


int val; // variable to read the value from the analog pin

void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}
void loop() {
val = analogRead(potpin); // reads the value of the potentiometer (value
between 0 and 1023)
val = map(val, 0, 1023, 0, 180); // scale it to use it with the servo (value between 0
and 180)
myservo.write(val); // sets the servo position according to the scaled value
delay(15); // waits for the servo to get there
}

Figure 13:Servo Motor Controlled with PotentioMeter


RESULTS AND DISCUSSIONS
WE STUDY ABOUT
 Servo motor.
 Types of servo motor.
 Construction and working
 Then interfacing of arduino with servo motor.
 Perform different functions with servo using arduino.

REFERENCES:
[1] https://www.watelectrical.com/servo-motor-types-and-working-principle/

[2] https://circuitglobe.com/servo-motor.html

You might also like