If you enjoy my work, please consider a small donation to help my future efforts...

Click here to lend your support to: ROBOTICS AND AUTOMATION and make a donation at www.pledgie.com !

Tuesday, September 22, 2009

6---SERVO MOTORS

A servo motor consists of a dc motor, gear train, potentiometer, and some control circuitry all mounted compactly in a case. There are three wires, white, red, and black on the servo leading from a 3-pin female connector to the case. These carry the control signal, power, and ground return respectively. In general, servos are wired from light to dark --- the wire of the lightest color carries the signal, the darkest wire is the ground wire, and the middle wire carries the power.

(CLICK ON THE PICTURES FOR A BETTER VIEW)





Each servo has a built-in processor that responds to electrical pulses sent to it. The uC creates an electrical pulse by sending voltage to one of its pins for a very specific amount of time. The uC cannot control how much voltage is sent (that is not required too). It simply turns the voltage on or off. When the voltage is on, the o/p pin outputs +5V. When the voltage is off, 0V is output. The AVR can turn the output voltage on and off rapidly, thereby creating pulses of high and low voltages.



Servos interpret pulse widths as positions. Each position along the arc traced out by the rotating shaft has a corresponding pulse width. When we send a pulse to the servo, the control board calculates which way the shaft should rotate in order to reach the corresponding position. There are two ways that servo manufacturers can wire their servos: positions increasing clockwise, and positions increasing counterclockwise. The positions and corresponding pulse widths for Futaba and Blue Bird brand servos are shown in the figure below. All servos have a center position, sometimes called the neutral position. Both servos below are in the center positions as indicated by the dark pointers. Observe that the Futaba center position corresponds to 1.5ms and the Blue Bird’s center is at the 1.8ms-position.









Let’s look at an example: A Futaba S3004 servo is initially situated at the 1.40ms-position when it receives a train of 1.75ms-pulses, as shown in Figure below. The servo’s control board determines that the shaft must rotate counterclockwise to reach the 1.75ms-position, and furthermore, it determines that the initial rotation speed should be high because the 1.40ms-position is far away from the 1.75ms-position. Since the first pulse does not move the shaft to the desired position, the process is repeated and the shaft continues to rotate counterclockwise with decreasing speed. After a few pulses, the shaft reaches the desired 1.75ms-position.






If additional 1.75ms-pulses are sent to the servo, they are ignored since the shaft is already in the 1.75ms-position. This is shown in Figure below.







Figure below shows another train of 1.75ms-pulses being sent to the Futaba servo, but this time the shaft will rotate clockwise since the desired 1.75ms-position is to the right of the original 2.0ms-position. In addition, the shaft will spin at a relatively slow speed since the 1.75ms-position is near the 2.0ms-position.