0% found this document useful (0 votes)
54 views13 pages

ENGG 200 Introduction To Engineering: Servo Motor

This document discusses servo motors and how they work. It provides the following key points: 1) Servo motors use closed-loop feedback control to achieve precise control of the motor's position. A potentiometer provides position feedback to correct the motor's position to match the target position. 2) Servo motors are controlled by sending pulse signals to their control line, with the pulse width determining the position. Pulse widths between 1-2ms rotate the servo shaft through 180 degrees. 3) The document demonstrates how to wire a servo motor to an Arduino and use example code to sweep the servo back and forth. It also shows how to control the servo position using a potentiometer as

Uploaded by

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

ENGG 200 Introduction To Engineering: Servo Motor

This document discusses servo motors and how they work. It provides the following key points: 1) Servo motors use closed-loop feedback control to achieve precise control of the motor's position. A potentiometer provides position feedback to correct the motor's position to match the target position. 2) Servo motors are controlled by sending pulse signals to their control line, with the pulse width determining the position. Pulse widths between 1-2ms rotate the servo shaft through 180 degrees. 3) The document demonstrates how to wire a servo motor to an Arduino and use example code to sweep the servo back and forth. It also shows how to control the servo position using a potentiometer as

Uploaded by

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

ENGG 200

Introduction to Engineering

Servo Motor
What is Servo?
 Servo is a general term for a closed loop control system.
 A closed loop system uses the feedback signal to adjust the
speed and direction of the motor to achieve the desired
result.

LIU ENGG200- Introduction to Engineering 2


What is Servo?
 RC servo motor works on the same principal. It contains a
small DC motor connected to the output shaft through the
gears.
 The potentiometer provides position feedback to the servo
control unit where the current position of the motor is
compared to the target position.
 According to the error, the control unit corrects the actual
position of the motor so that it matches the target position.

LIU ENGG200- Introduction to Engineering 3


How Servo Motors Work?
 You can control the servo motor by sending a series of
pulses to the signal line. A conventional analog servo motor
expects to receive a pulse roughly every 20 milliseconds (i.e.
signal should be 50Hz).
 The length of the pulse determines the position of the servo
motor.

LIU ENGG200- Introduction to Engineering 4


How Servo Motors Work?
 If the pulse is high for 1ms, then
the servo angle will be zero.
 If the pulse is high for 1.5ms,
then the servo will be at its
center position.
 If the pulse is high for 2ms, then
the servo will at 180 degrees.
 Pulses ranging between 1ms and
2ms will move the servo shaft
through the full 180 degrees of
its travel.

The duration of the pulses may sometimes vary with


different brands and they can be 0.5ms for 0 degrees
and 2.5ms for 180 degrees.
LIU ENGG200- Introduction to Engineering 5
Servo Motor Pinout
 Servo motors typically have three
connections and are as follows
 GND is a common ground for both the
motor and logic.
 5V is a positive voltage that powers the
servo.
 Control is input for the control system.
 The color of the wires varies between
servo motors, but the red wire is
always 5V and GND will either be black
or brown. The control wire is usually
orange or yellow.

LIU ENGG200- Introduction to Engineering 6


Wiring Servo Motor to Arduino UNO
 For example let’s use SG90 Micro Servo Motor. It runs on
4.8-6VDC (5V Typical) and can rotate approximately 180
degrees (90 in each direction).
 It consumes around 10mA at idle and 100mA to 250mA
when moving, so we can power it up through 5-volt output
on the Arduino.
 If you have a servo that consumes more than 250mA,
consider using a separate power supply for your servo.
 Connect the Red wire to the 5V on Arduino (or DC jack) and
Black/Brown wire to ground. Finally connect the
Orange/Yellow wire to the PWM enabled pin 9.

LIU ENGG200- Introduction to Engineering 7


Wiring Servo Motor to Arduino UNO

LIU ENGG200- Introduction to Engineering 8


Arduino Code – Sweep
 For our first Arduino sketch, we will use one of the built-in
examples that come with the Arduino IDE.
 Go to the Examples sub-menu. Select the Servo and Load
the Sweep sketch.

LIU ENGG200- Introduction to Engineering 9


Arduino Code – Sweep

LIU ENGG200- Introduction to Engineering 10


Controlling Servo with a Potentiometer
 Our next step is to add a potentiometer so that we can
control the position of the servo by turning the knob.
 This project can be very useful when you want to control
the pan and tilt of a sensor connected to the servo.
 As the wiring diagram shows you’ll need a potentiometer,
any value from 10k up will be OK. Connect one end of the
pot to ground, the other end to the Arduino 5V and the
wiper to analog input A0.

LIU ENGG200- Introduction to Engineering 11


Controlling Servo with a Potentiometer

LIU ENGG200- Introduction to Engineering 12


Controlling Servo with a Potentiometer

LIU ENGG200- Introduction to Engineering 13

You might also like