Using Servo Motors with Arduino
Accompanying article with code: https://dbot.ws/servo
Join the DroneBot Workshop Newsletter: https://dbot.ws/dbnews
More projects and info at https://dronebotworkshop.com
Today we’ll be making things move with Servo Motors!
Analog servo motors are inexpensive little powerhouses that can be perfect when you’re designing something that needs to move. They pack a lot of torque for their size and their shaft position can be pretty accurately controlled.
We will start out by taking a look at how analog servo motors work and what kind of signal we’ll need to control them. We will also learn how to read the specs so that we can choose the best servo motor for our application.
There are two types of servo motors we will look at – conventional servos that rotate 180 or 270 degrees and continuous rotation servo motors.
Then it’s time for the experiments. We will use a couple of the example sketches written for the Arduino Servo library to show just how easy it is to control a servo motor with an Arduino.
We will also examine a method of controlling LOTS of servo motors, the PCA9685 16-channel PWM controller board. As its name would imply this board lets you control 16 devices like servo motors and it interfaces to your Arduino or Raspberry Pi using the versatile I2C bus.
And if 16 servos still isn’t enough you can cascade up to 62 of these boards to drive an unimaginable 992 servo motors with just one Arduino!
I’ll settle for a more reasonable 4 servo motors, the 4 servo motors in the MeArm that I built in an earlier video. I’ll show you how to build a controller for the MeArm using an arduino Uno and a PCA9685 board.
Here is the Table of Contents for this video:
Servo Motor Basics – 2:14
Understanding Servo Specifications – 7:26
Servo Tester Demo – 9:25
Arduino Sweep Sketch – 14:09
Arduino Knob Sketch – 18:56
The PCA9685 – 25:12
MeArm Controller – 30:05
As always you’ll find a detailed article on the DroneBot Workshop Website at https://dbot.ws/servo. It includes the sketches we cover in the video in an easy to download ZIP file as well as detailed explanations and links to other useful resources.
And speaking of useful resources please sign up for the DroneBot Workshop newsletter at https://dbot.ws/dbnews . You’ll get updates on what I’m working on and best of all surveys so you can tell me what videos and articles you want me to make for you. Just provide your email address at https://dbot.ws/dbnews and you’ll be on the list!
I hope you enjoy the video, if you have any questions please let me know in the comments below. And if you haven’t already please subscribe to the YouTube channel.
source