The purpose of this article is to give an overview of how servos operate and to describe their interfaces. Though we have taken steps to assure the quality of information here, Brookshire Software, LLC makes no guarantees about the information presented here. Brookshire Software, LLC cannot be held liable or accountable for any use or misuse of the provided information.
There are a wide variety of servos on the market today. Ranging from micro servos with 15oz-in torque to powerful heavy-duty sail boat servos, they all share several common characteristics.
A servo is essentially a positionable motor. The servo "knows" two things: where it is (the actual position) and where it wants to be (the desired position). When the servo receives a position, it attempts to move the servo horn to the desired position. The task of the servo, then, is to make the actual position the desired position.
We will divide our servo study into two parts: "Receiving the Desired Position" and "Matching the Desired and Actual Positions."
The first step to understanding how servos work is to understand how to control them. In this section, we will discuss the electrical interface of a typical servo. All timing and electrical characteristics described here have been experimentally determined from a "HS-303 HiTec" servo.
The servo is controlled by three wires: ground (black), power (red), and command (typically white). Power is usually between 4v and 6v and should be separate from system power (as servos are electrically noisy). Even small servos can draw over an amp under heavy load so the power supply should be appropriately rated. Though not recommended, servos may be driven to higher voltages to improve torque and speed characteristics.
Servos are commanded through "Pulse Width Modulation," or PWM, signals sent through the command wire. Essentially, the width of a pulse defines the position. For example, sending a 1.5mS pulse to the servo, tells the servo that the desired position is 90 degrees. In order for the servo to hold this position, the command must be sent at about 50Hz, or every 20mS. The following table shows the timing constraints of one servo:
|Position||Pulse Width||Example Pulse|
If you were to send a pulse longer than 2.5mS or shorter than 0.5mS, the servo would attempt to overdrive (and possibly damage) itself.
Once the servo has received the desired position (via the PWM signal) the servo must attempt to match the desired and actual positions. It does this by turning a small, geared motor left or right. If, for example, the desired position is less than the actual position, the servo will turn to the left. On the other hand, if the desired position is greater than the actual position, the servo will turn to the right.
In this manner, the servo "zeros-in" on the correct position. Should a load force the servo horn to the right or left, the servo will attempt to compensate.
Note that there is no control mechanism for the speed of movement and, for most servos, the speed is specified in degrees/second. Indeed, one of the primary tasks of VSA is to synthesize servo speed control by stepping through a series of positions.
VSA is a copyright of Brookshire Software, LLC. All other products mentioned are registered trademarks or trademarks of their respective companies.
Questions or problems regarding this web site should be directed to webber@BrookshireSoftware.com.
Copyright © Brookshire Software, LLC. All rights reserved.