You are on page 1of 5

Arduino Lesson 13: Servo

Motor Control
Author
Kerem İzgöl
-
September 11, 2015
57023

91

Hello friends. Today we will do servo motor control application with Arduino UNO.

Necessary materials:

 Arduino UNO
 breadboard
 Servo-motor
 10 kΩ potentiometer
 Two male jumper cables

Servo motors are used in vehicles such as RC (radio controlled) cars, helicopters and
airplanes. These motors, unlike DC motors, are designed to remain stationary at the
desired position. They usually work from 0 to 180 degrees. RC is used in the steering of
our car, to angle the helicopter's propellers and to move the control surfaces of the
aircraft. They work with PWM signal.

In our first implementation, we used PWM to obtain analog voltage output. But in servo
motors, the PWM works a bit differently. If we remember, we obtained different analog
signals by changing the duty cycle of the PWM signal we received with the analogWrite
() command in Arduino at only 5V. In servomotors, we can similarly adjust the servo
period between 0 ms and 180 ms by changing the open period of the 20 ms signal
between 1 ms and 2 ms.
We make our connections as follows:

From the Arduino program to the appropriate code


File> Examples> Servo> Sweep

by following the steps. This code will advance my servos step by step from 0 degrees to
180 degrees; When it reaches 180 degrees, it will return 0 degrees step by step.

As a different application we can connect the position of our servomotor to Arduino and
we can also control it with a potentiometer:
The code for this circuit

File> Samples> Servo> Knob


by following the steps.

You might also like