Physical Output
8.0 Introduction
You can make things move by controlling motors with Arduino. Different types of motors suit different applications, and this chapter shows how Arduino can drive many different kinds of motors. You’ll see how to work with servos, which are motors that have circuits within them to allow moving to a specific motor position or to spin at a specific speed. You’ll also learn about brushed and brushless motors, which use different designs to drive a motor that spins at varying speeds and directions. There are recipes in this chapter for stepper motors, which allow you to move a motor a specific number of steps in one direction or the other. In addition to motors that generate rotary motion, there are recipes for working with relays and solenoids.
Servos
Servos enable you to accurately control physical movement because they generally move to a position instead of continuously rotating. They are ideal for making something rotate over a range of 0 to 180 degrees. Servos are easy to connect and control because the motor driver is built into the servo.
Servos contain a small motor connected through gears to an output shaft. The output shaft drives a servo arm and is also connected to a potentiometer to provide position feedback to an internal control circuit (see Figure 8-1).
You can get continuous rotation servos that have the positional feedback disconnected so that you can instruct the servo to rotate continuously clockwise and counterclockwise with some ...
Get Arduino Cookbook, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.