Servo+Research+-+Vipul

toc = = = = = = =**Servo Motor**=

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.

The three wires coming out of the servo are: Red - Power (+5 Volts) Black - Ground White/Yellow (depending on the servo) - Servo Control



The servo motor has some control circuits and a potentiometer (a variable resistor, aka pot) that is connected to the output shaft. 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. 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.



=**Stepper Motor**=

A stepper motor’s shaft has permanent magnets attached to it. Around the body of the motor is a series of coils that create a magnetic field that interacts with the permanent magnets. When these coils are turned on and off the magnetic field causes the rotor to move. As the coils are turned on and off in sequence the motor will rotate forward or reverse.

=**Servo vs. Stepper Motor**=

Various differences can be pointed out between both the motors, but the solid reason for bending towards a Servo motor is due to its position feedback control. Usually a Stepper motor serves the purpose of a servo motor in these kind of robotic arms, as high rotations per min is not required. The stepper motor would probably be better than a servo for a general robotic arm, where high speed is not a priority due to its high holding torque nature and a comparatively cheaper cost. Therefore, even though a stepper motor would be a better choice for a non-industrial robotic arm, where high acceleration is not a priority, __//the servo motor is considered for our project//__ as it operates similar to a stepper motor at low speeds but also provides positional feedback.

=Torque Calculation=

Let us consider a basic light servo motor that provides a torque of 57 in-oz. That means if there was a weightless robot arm 1 inch long and a 57 oz (about 3.5 lbs) weight is applied on the end and oriented the arm horizontally, that servo could keep the arm straight. If it was a load of 56 oz., the servo could accelerate the arm with 1 in-oz. of torque. If it was a 58 oz weight, it would move downwards with a torque of 1 oz-in, despite the servo's best efforts. If gravity is not a factor (ie, not lifting against gravity), it would accelerate the mass at a rate of Torque / (mass x distance^2) rotations/second.

Gravity pulls down against any rotational arm with a torque of mass x length of arm. So, take the torque provided by the motor, subtract the torque created by gravity, and if the number is still greater than zero the arm will move in the direction the motor is turning.

So in our case, we will need different servos at each joint of the arm, i.e., two similar servos for both the arms at each joint. The gripper would need the lightest servo only depending on weight of the object the arm would lift. But when it comes to the second joint from the gripper, it should be powerful enough to carry everything above it including the object, gripper and the weight of the material above it. So in order to achieve this, that joint would require a stronger servo motor compared to the one used at the gripper. Same goes for the rest of the joints below. The base servo would have to be the strongest in the entire arm, while the gripper has the lightest.

**Parameters**
· **Gripper Servo 1 (Gripping) Total weight: 200g** - Object to be lifted – 200g (maximum) · **Gripper Servo 2 (Rotating the wrist) Total weight: 300g** - Gripping servo 1 – 50g - Object to be lifted – 200g - Gripper – 50g · **Joint Servo Total weight: 450g** - Gripper servo 1 – 50g - Gripper servo 2 – 50g - Object to be lifted –200g - Gripper – 50g - Material – 100g (includes body and servo brackets) · **Base Servo 1 (Moving Up and Down) Total weight: 550g** - Gripper servo 1 – 50g - Gripper servo 2 – 50g - Gripper – 50g - Object to be lifted – 200g - Joint servo – 50g - Material – 150g (includes body and servo brackets) · **Base Servo 2 (Moving Sideways) Total weight: 650g** - Gripper servo 1 – 50g - Gripper servo 2 – 50g - Gripper – 50g - Object to be lifted – 200g - Joint servo – 50g - Base servo 1 - 100g - Material – 150g (includes body and servo brackets)


 * Length of link 1: 5 inches**
 * Length of link 2: 8 inches**

Gripper Servo 2: 50 deg/sec^2 Joint Servo: 50 deg/sec^2 Base Servo 1: 50 deg/sec^2
 * Acceleration required:**



//W1: Weight of the Base servo 1 = 0.98 N W2: Weight of the joint = 0.98 N W3: Weight of the Joint servo = 0.49 N W4: Weight of the joint = 0.98 N W5: Weight of the Gripper servos (Rotating & Gripping) = 0.98 N W6: Weight of the object lifted + Gripper = (2+.49) N

L1: Length of the joint 1 = 6 inches = 15.24 cm L2: Length of the joint 2 = 8 inches = 20.32 cm

M0: Base servo 2 (Sideways movement) M1: Base servo 1 (Upwards movement) M2: Joint servo M3: Gripper servos (Rotating & Gripping)//




 * Joint 0:** M0
 * - **0 N.m (**as it is not affected by gravity)


 * Joint 1:** M1 //(Tracking arm)//
 * - L1/2 * W2 + L1 * W3 + (L1 + L2/2) * W4 + (L1 + L2) * (W5+W6)
 * - (15.24/2)(0.98) + (15.24)(0.49) + (15.24 + 20.32/2)(0.98) + (15.24 + 20.32)(0.98 + 2.45)


 * - 1.6180 N.m :- 16.5 Kg-cm :- 229 oz-in**

**Joint 1:** M1 //(User-controlled arm)//
 * - L1/2 * W2 + L1 * W3 + (L1 + L2/2) * W4 + (L1 + L2) * (W5+W6)
 * - (15.24/2)(0.98) + (15.24)(0.49) + (15.24 + 20.32/2)(0.98) + (15.24 + 20.32)(0.98 + 0.49)


 * - 1.02 N.m :- 10.44 Kg-cm :- 145 oz-in**

//The torque for the 'user-controlled' arm at Joint 1 is lesser than the 'tracking arm' as it is not lifting the object. But in order to simplify the calculations, similar servos are used in both the arms at Joint 1.//


 * Joint 2:** M2
 * - L2/2 * W4 + L2 * (W5+W6)
 * - (20.32/2)(0.98) + (20.32)( 0.98 + 2.45)


 * - 0.7965 N.m :- 8.12 Kg.cm :- 112.78 oz-in**

**Joint 3:** M3
 * - 0** **N.m** (distance is 0)

**Dynamic Torque**
It is too hard to calculate the dynamic torque as the arm does not denote a specific shape. So an approximation was done in order to calculate the total torque required.

//Torque Calculator:////[| http://www.societyofrobots.com/robot_arm_calculator.shtml]//

=Proposed Servos=

Hitec HS-422HD Standard Heavy Duty Servo (http://www.robotshop.ca/hitec-hs422-servo-motor.html) - $14.12 • Speed: 0.21 sec @ 60° • Torque: 4.1 kg/cm – 57 oz/in • Size: 41x20x37 mm • Weight: 45.5 g - 1.6 oz • Karbonite Gear
 * Gripper:**

Hitec HS-422HD Standard Heavy Duty Servo (http://www.robotshop.ca/hitec-hs422-servo-motor.html) - $14.12 • Speed: 0.21 sec @ 60° • Torque: 4.1 kg/cm – 57 oz/in • Size: 41x20x37 mm • Weight: 45.5 g - 1.6 oz • Karbonite Gear
 * Wrist:**

Hitec HS-755HB Giant Scale Servo ([]) - $31.34 • Speed (sec/60o): 0.23 • Torque (Kg-cm/Oz-in): 13.2/183 • Size (mm): 59 x 29 x 50 • Weight (g/oz): 110 /3.88
 * Elbow:**

Hitec HS-805HB Giant Scale Servo ([]) - $44.77 • Speed (sec/60o): 0.14 • Torque (Kg-cm/Oz-in): 24.7/343 • Size (mm): 66x30x58 • Weight (g/oz): 152/5.26
 * Base:**

Hitec HS-805HB Giant Scale Servo ([]) - $44.77 • Speed (sec/60o): 0.14 • Torque (Kg-cm/Oz-in): 24.7/343 • Size (mm): 66x30x58 • Weight (g/oz): 152/5.26
 * Base (rotating):**

Total servo cost for each arm (approx.) :- $150 =Positional Feedback=

A hobby servo works by sending pulses to the servo from a controller. There is a small potentiometer inside the servo that is attached to the servo arm. The electronics inside the servo compares the position of the potentiometer with the desired position from the pulses and moves the arm as required until they match. The servo does not give any feedback to the controller; therefore the controller has to assume that the servo is always at the desired position. Therefore, the servo has to be modified so that the potentiometer inside the servo provides us with the information about the location of the servo arm. We can ‘close the loop’ with this data and always know the location of the arm. The steps to modify the servo are as follows: 1) Firstly, remove the four screws on the back of the servo casing. The back of the casing should just slide off, exposing the circuit board, as shown in Figure 1 2) The board is only held in place by compression so it should lift free of the casing. Gently pry it up, taking care not to damage the board or the wires holding the board. The potentiometer should now be exposed. The wire in the middle of the potentiometer will be the wiper. This is the wire that we will want to connect to in the future. Shown in Figure 2. 3) Connect the red and black wires from the servo cable to a power supply or battery that will supply the voltage for the servo. Move the servo arm all the way to one side and measure the voltage from the wiper of the potentiometer (yellow wire in Figure 2) to ground (black wire of servo cable). Write down the voltage, move the servo arm all the way around to the opposite position, and record that voltage as well. These values will be used in a moment. 4) Follow the wire that is attached to the wiper on the potentiometer to where it connects to the circuit board. This is shown as the yellow wire in the upper right corner of the circuit board in Figure 3. 5) Gently heat the solder on the wire and remove it from the circuit board. Strip one piece of wire that will be used to make the feedback cable and solder it to the yellow wire. Re solder both wires back to where the wire was just removed. Take extreme care not to damage the board or apply too much heat. Place the board back into the casing and fold the new wire so that it exits next to the motor, as shown in Figure 4. 6) Locate a good ground by checking resistance from various points on the top of the board to the back wire on the servo cable. The anode of the surface mount diode, shown in Figure 5, makes a nice place to attach the ground wire. Strip the second wire of the feedback cable and solder it to the ground, as shown in Figure 5. 7) Move the feedback cable so that it is parallel to the servo cable and secure it with a very small amount of hot glue. This will protect the cables by giving them a small amount of strain relief. Place the cover back on the servo and tighten down all of the screws, as shown in Figure 7