Using Servo Motors with Arduino
1188142 People Read – 17590 People Liked – You Can Also Like
Learn to use Servo Motors with an Arduino. Directly, and with a PCA9685 I2C Servo Driver.
Accompanying article with code: https://dronebotworkshop.com/servo-motors-with-arduino/
More articles and tutorials: https://dronebotworkshop.com
Join the conversation on the forum: https://forum.dronebotworkshop.com
Subscribe to the newsletter and stay in touch: https://dronebotworkshop.com/subscribe/
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:
00:00 – Introduction
02:14 – Servo Motor Basics
07:26 – Understanding Servo Specifications
09:25 – Servo Tester Demo
14:09 – Arduino Sweep Sketch
18:56 – Arduino Knob Sketch
25:12 – The PCA9685
30:05 – MeArm Controller
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 .
I hope you enjoy the video, and if you haven’t already please subscribe to the YouTube channel.