Monday, August 4, 2008

Servo Motor

Fig:Servo motor
A "servo" is a generic term used for an automatic control system. It comes from the Latin word "servus" - slave. In practical terms, that means a mechanism that you can set and forget, and which adjusts itself during continued operation through feedback. Servo control is a closed loop control system for electric motors. Servo Motor are DC motors with built in gearing and feedback control loop circuitry. And no motor drivers required. A Servo is a small device that has an output shaft. This shaft can be positioned to specific angular positions by sending the servo a coded signal. As long as the coded signal exists on the input line, the servo will maintain the angular position of the shaft. As the coded signal changes, the angular position of the shaft changes. In practice, servos are used in radio controlled airplanes to position control surfaces like the elevators and rudders. They are also used in radio controlled cars, puppets, and of course, robots hobby robotic ,RC planes.
Servos are extremely useful in robotics. The motors are small, have built in control circuitry, and are extremely powerful for their size. It also draws power proportional to the mechanical load. A lightly loaded servo, therefore, doesn't consume much energy.. You can see the control circuitry, the motor, a set of gears, and the case. You can also see the 3 wires that connect to the outside world. One is for power (+5volts), ground, and the white wire is the control wire.

Components of Servo Motor


Fig:Servo Motor: DC motors ,built in gearing and feedback control loop circuitry
Each motor assembly comes complete with a gear box and control electronics that make interfacing them to microcontrollers. With the wide variety of available end attachments, it is easy to mount wheels and custom mechanisms to the motor .You can see the control circuitry, the motor, a set of gears, and the case. You can also see the 3 wires that connect to the outside world. One is for power (+5volts), ground, and the white wire is the control wire. The spline is the output shaft of the servo. This is where you would attach your servo horn or servo arm

Working of Servo Motor

The servo motor has some control circuits and a potentiometer (a variable resistor, pot) that is connected to the output shaft. In the picture above, the pot can be seen on the right side of the circuit board. This pot allows the control circuitry to monitor the current angle of the servo motor. If the shaft is at the correct angle, then the motor shuts off. If the circuit finds that the angle is not correct, it will turn the motor the correct direction until the angle is correct. The output shaft of the servo is capable of traveling somewhere around 180 degrees. Usually, its somewhere in the 210 degree range, but it varies by manufacturer. A normal servo is used to control an angular motion of between 0 and 180 degrees. A normal servo is mechanically not capable of turning any farther due to a mechanical stop built on to the main output gear. The amount of power applied to the motor is proportional to the distance it needs to travel. So, if the shaft needs to turn a large distance, the motor will run at full speed. If it needs to turn only a small amount, the motor will run at a slower speed. This is called proportional control

Controlling angle of Servo Motor

Fig:standard time vs. angle is represented in this chart


The control wire is used to communicate the angle. The angle is determined by the duration of a pulse that is applied to the control wire. This is called Pulse Coded Modulation. The servo expects to see a pulse every 20 milliseconds (.02 seconds). The length of the pulse will determine how far the motor turns. A 1.5 millisecond pulse, for example, will make the motor turn to the 90 degree position (often called the neutral position). If the pulse is shorter than 1.5 ms, then the motor will turn the shaft to closer to 0 degrees. If the pulse is longer than 1.5ms, the shaft turns closer to 180 degrees.

As you can see in the picture, the duration of the pulse dictates the angle of the output shaft (shown as the green circle with the arrow).
The PWM input signal that a servo requires is simply a square wave (0-5V) with the high time being variable as shown in Figure 2. One of the important characteristics of the PWM signal is that the repeat rate must be between 20-30mSecs (i.e., 50 times a second), otherwise the on-board electronics will ignore the signal or in some cases cause the motor to exhibit poor performance such as chattering and unpredictable movements. The pulse width, w, determines the command position, which varies from manufacturer to manufacturer, but the neutral position (90 degrees or so) is usually characterized by a 1.5uS pulse width. Thus, any source capable of supplying this PWM signal can control a servo, which means that microcontrollers are the best candidates for controlling servos because they can easily generate PWM signals. In addition, the pulse width can be controlled via software, making servos the ideal actuator to use in robotics in terms of locomotion and mechanism control
.

Servo Wiring

All servos have three wires:
Black or Brown is for ground.

Red is for power (~4.8-6V).
Yellow, Orange, or White is the signal wire (3-5V).

Servo Voltage (Red and Black/Brown wires)

Servos can operate under a range of voltages. Typical operation is from 4.8V to 6V. There are a few micro sized servos that can operate at less. The reason for this standard range is because most microcontrollers and RC receivers operate near this voltage.