0% found this document useful (0 votes)
38 views5 pages

The University of Faisalabad: Experiment No.10

This document summarizes an experiment interfacing a servo motor with an Arduino Uno board. It describes the software used, explains what a servo motor is and how it works using pulse-width modulation signals. It then outlines the procedure, including writing code to control the servo position, verifying the code, and simulating the circuit in Proteus software.

Uploaded by

Arbab Aslam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views5 pages

The University of Faisalabad: Experiment No.10

This document summarizes an experiment interfacing a servo motor with an Arduino Uno board. It describes the software used, explains what a servo motor is and how it works using pulse-width modulation signals. It then outlines the procedure, including writing code to control the servo position, verifying the code, and simulating the circuit in Proteus software.

Uploaded by

Arbab Aslam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

The University of

Faisalabad
Experiment No.10
To interfacing Servo Motor With Arduino Uno R3.

Softwares Used:
1. Proteus professional 8.1
2. Arduino Software
3. Microsoft Word

What is Servo Motor?


A servomotor is a rotary actuator that allows for precise control of
angular position. It consists of a motor coupled to a sensor for position
feedback. It also requires a servo drive to complete the system. The
drive uses the feedback sensor to precisely control the rotary position
of the motor.

How Servo motor Works?


Servos are controlled by sending an electrical pulse of variable width,
or pulse width modulation (PWM), through the control wire. There is a
minimum pulse, a maximum pulse and a repetition rate. A servo
motor can usually only turn 90 in either direction for a total of 180
movement.

Procedure:
First of all I open the Arduino software.Then I write a program for servo
motor and verify the code that I wrote.Screen shoot is attached below.

2-Programming Code of Arduino:


#include <Servo.h>
Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created
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 += 1) // goes from 0 degrees to
180 degrees
{
// in steps of 1 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-=1)
// 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
}
}

3- In this step I open Proteus and select all components used. I select
Arduino and Servo motor. Now I connect these components. The screen
shoot is attached below.

Before playing the simulation Circuit Diagram:

Step 4:
Now I play the Proteus simulation. And it shows the results here the
screen shoot of running project is attached below.

In Running Process Circuit Diagram:

You might also like