0% found this document useful (0 votes)
37 views3 pages

Laboratory Activity No. 3 Control of Servo Motor

This experiment involves controlling the angular displacement of a servo motor using an Arduino microcontroller and a graphical user interface created in Visual Studio. The objectives are to control the servo motor's angular displacement and create an interface to send control data to the Arduino. Procedures involve setting up the Arduino, computer, and servo motor. An Arduino program will control the servo motor's angle by sending pulse widths corresponding to the desired angle. The Visual Studio interface will have a track bar from 0 to 180 degrees; as the track bar value changes, the angle will be sent to the Arduino to control the servo motor's rotation.
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)
37 views3 pages

Laboratory Activity No. 3 Control of Servo Motor

This experiment involves controlling the angular displacement of a servo motor using an Arduino microcontroller and a graphical user interface created in Visual Studio. The objectives are to control the servo motor's angular displacement and create an interface to send control data to the Arduino. Procedures involve setting up the Arduino, computer, and servo motor. An Arduino program will control the servo motor's angle by sending pulse widths corresponding to the desired angle. The Visual Studio interface will have a track bar from 0 to 180 degrees; as the track bar value changes, the angle will be sent to the Arduino to control the servo motor's rotation.
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/ 3

Laboratory Activity No.

3
Control of Servo Motor

NAME:__________________________ DATE:_______________________
SECTION:_______________ INSTRUCTOR: ________________

Objectives
This experiment will enable the student
1. To control the angular displacement of the servomotor.
2. To create a computer program user interface to send data control to Arduino

Equipments and Materials


Qty Equipment/Materials
1 Personal Computer
1 Arduino microcontroller
1 Robotic arm
1 USB cable
1 Power supply
1 Breadboard
8 Alligator clips
1 set Connecting wires

Introduction:

In this activity we will going to control the movement of the robotic arm
which joints are compose of servo motors. The movement of the conveyor is
controlled through a program implemented in Visual Studio and Arduino. The
Arduino microcontroller will control the Servo motor and the visual studio will
provide the interface to execute commands.

The servo motors are connected to the microcontroller. The microcontroller


will send pulses to the servo motor with different width that correspond to the
angle rotational displacement of the servo motor. Angular data is needed to be
fed to the microcontroller to instruct it to rotate in that angle.

The graphical user interface is compose of a track bar. The track bar is set
from a minimum value of 0 degree to the maximum angle rotation of the servo
motor of 180 degrees. Each time the track bar value change, the computer will
send the angle data which the microcontroller will execute. A label box is also
included for it to show the angle it will move.
Procedures
A. Set-up
1. Connect the computer and Arduino microcontroller using USB serial cable

2. Connect the black cable to ground, red cable to 5V and yellow to pin 9 of the
microcontroller respectively.

B. Arduino Program:
1. Create a program for the microcontroller that will control the angular displacement
of the motor by sending pulse with different width that correspond to the angle of the
servo motor.
C. Graphical User Interface
1. Create the GUI to the Microsoft visual studio as shown below.

D. Interface Code

1. Create code for the program that it will send angular value to the microcontroller
that correspond to the angular displacement for the servo motor. The motor will
rotate every time the track bar is pressed and change it value..

You might also like