0% found this document useful (0 votes)
19 views4 pages

Experiment

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

Experiment

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

Servo Motor – Position, Speed and Direction Control

Servo Motor

A servo motor is a device that can rotate to a specific angle using a feedback system. It consists of a
motor, a control circuit, and a feedback mechanism . The motor moves to the required position when
given a signal, and the feedback system makes sure it stays there accurately.

Working Principle

When a control signal tells the servo to move to a certain angle, the motor turns. The feedback
mechanism checks the angle and tells the control circuit if there’s any error. The circuit then corrects
the position if needed, ensuring precise movement. This process is called closed-loop control.

AC and DC Servo Motors

• DC Servo Motors: Common in everyday gadgets that need moderate precision.


• AC Servo Motors: Used in heavy-duty machines for higher accuracy and industrial tasks.

Components of Servo Mechanisms

i. Motor Unit: Converts electrical signals into mechanical motion.


ii. Feedback Sensor: Checks the position or speed. (like a potentiometer, resolver, encoder, etc)
iii. Controller: Processes feedback and adjusts the motor’s action to maintain accuracy.
iv. Actuator: AC or DC motor, that moves the physical object
v.

Servomechanism

Applications

i. Servo motors are widely used for:


ii. Robotics: Controlling arm movements and positions.
iii. Aerospace: Stabilizing flight control surfaces.
iv. Manufacturing: Operating CNC machines and automated systems.
v. Automotive: Used in systems like power steering and precise engine controls.
10. Stepper Motor – Position, Speed and Direction Control

Aim

To control the position, speed, and direction of a servo motor using an Arduino microcontroller.

Apparatus Required

i. Arduino board
ii. Servo motor
iii. Connecting wires
iv. USB cable
v. Computer with Arduino IDE installed

Experimental Procedure

i. Connect the red wire of the servo motor to the 5V pin on the Arduino to supply power.
ii. Connect the ground wire of the servo motor to the GND pin on the Arduino to complete the
circuit.
iii. Connect the servo motor's control wire (signal) to pin 9 on the Arduino for signal transmission.
iv. In the Arduino IDE, include the Servo library by using #include <Servo.h> to facilitate servo
motor control.
v. Declare and attach the servo object to pin 9 to establish communication between the servo and
Arduino.
vi. Program Position Control: Write code to move the servo from 0 degrees to 180 degrees,
specifying precise positions for accurate control.
vii. Control Speed: Use delays between position increments in the code to adjust the speed of the
servo movement. A longer delay slows the movement, while a shorter delay speeds it up.
viii. Direction Control: Define the sequence in which the servo moves. Start from 0 degrees and
incrementally move to 180 degrees, then reverse the direction back to 0 degrees.
ix. Compile the program and upload it to the Arduino board using the Arduino IDE.

Result

The position, speed, and direction control of a servo motor using an Arduino microcontroller.
Code

#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 += 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 >= 0; 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
}
}
Servo Motor – Position, Speed and Direction Control

You might also like