Lab 8

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

LAB 8: Controlling the speed of Servo Motors using PWM

1. Objectives:
- Knowledge on the differences between types of motors that can use with Arduino
- How servo motor works
- How to program Arduino to control the speed of servo motor by using PWM

2. Introduction
a. Motor Types
There are three types of motors widely-used with Arduino:
Servo motor
Stepper motor
DC motor

Motors
No Characteristics Servo motor
Stepper motor DC motor
limited between 00
1 Rotation and 1800 unlimited unlimited

Clockwise,
Rotating Clockwise, Clockwise,
2 counter-Clockwise
direction counter-Clockwise counter-Clockwise

can be controlled can be controlled


Very difficult to
Rotating to rotate a specific to precisely rotate
3 precisely rotate to
position angle between 00 to any angle
a specific angle
and 1800 position
4 Rotating speed can be controlled, can be controlled Easy to control
but not smoothly precisely. how fast, but very
Futhermore, difficult to
acceleration and precisely control
deacceleration can to a specific speed
can be controlled value
precisely
NOT required.
Extra hardware Just control
5 required required
driver directly from an
Arduino pin
Extra power
6 required required required
supply
complicated, Easy, use high-
easy, just use
7 How to control beginners should voltage PWM
PWM signal
use the library signal

b. About servo motor


3. Lab exercise
To safeguard the Arduino board, we should use an external power supply for the servo
motor.
- Draw a schematic diagram as above circuit. Please ensure that connect the GND of the
external power supply to the GND of the Arduino board.
- Program for Arduino to control the speed of servo motor
Name: Student Code: Class: Lab:
1. Circuit
2. Algorithm flowchart
3. Code and explanation
4. Summary

You might also like