EasyManua.ls Logo

LAFVIN Obstacle Avoidance Smart Car Kit - Lesson 5 Servo

LAFVIN Obstacle Avoidance Smart Car Kit
80 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
54/78
Lesson 5 Servo
About this lesson:
In this lesson, you will learn how to control a servo motor using LAFVIN UNO R3.
The servo motor has three leads. The color of the leads varies between servo motors, but the red lead is always 5V and GND will either
be brown.The red one is the power wire and should be connected to the 5v port and this is usually orange. This control lead is connected
to digital pin 9.
Introduction
Servo motors are great devices that can turn to a specified position.
Usually, they have a servo arm that can turn 180 degrees. Using the Arduino, we can tell a servo to go to a specified position and it will
go there. As simple as that!
Servo motors were first used in the Remote Control (RC) world, usually to control the steering of RC cars or the flaps on a RC plane.
With time, they found their uses in robotics, automation, and of course, the Arduino world.
There are two ways to control a servomotor with Arduino. One is to use a common digital sensor port of Arduino to produce square
wave with different duty cycle to simulate PWM signal and use that signal to control the positioning of the motor. Another way is to
directly use the Servo function of the Arduino to control the motor. In this way, the program will be easier but it can only control
two-contact motor because for the servo function, only digital pin 9 ang 10 can be used. The Arduino drive capacity is limited. So if you
need to control more than one motor, you will need external power.