Servo Functionality Test
By Elaine Doan, Systems and Test Engineering
Servo Functionality Testing
The objectives of this test were to verify that ROFI’s servos were working correctly. There are two servos that the CSULB Biped group is concerned with: the Towerpro MG996R servo and the Power HD 1501MG servo. These two servos were used in both ROFI and ROFIA, with ROFI having a combination of both servos and ROFIA using exclusively Power HD 1501MG servos.
Servo Test Materials
1. Arduino MEGA 2560
2. Towerpro MG996R and Power HD 1501MG on ROFI
3. UBEC-5A-HV DC-DC regulator
Servo Wiring Procedure
1. Connect the red wire to the positive terminal of the UBEC and the brown wire to the negative terminal of the UBEC DC-DC regulator. Do not connect either the red wire or the brown wire of the servo to the Arduino, there is a possibility that the servo will draw a lot of current and destroy the Arduino.
2. Connect the orange wire to an Arduino output pin. The orange wire is the control signal terminal of the servo and will allow you to control the servo with the Arduino.
Testing Code
The following code will command a servo on Arduino PIN 8 to rotate 60° clockwise within two seconds, then rotate 60° counterclockwise within two seconds. This process is repeated until the Arduino is turned off. The servo is assumed to have been centered before the test, but can be centered by using myservo.write(90).
#include <SPI.h>
#include <Servo.h> // Include servo library
Servo myservo; // create servo object to control a servo
void setup()
{
myservo.attach(32); // attaches servo on pin 8 to servo object
}
void loop()
{
myservo.write(1); // Move servo to 1 degree angle
delay(2000); // Delay 2 seconds
myservo.write(120); // Move servo to 120 degree angle
delay(2000); // Delay 2 seconds
}
Servo Test Conclusions:
Three of the twelve servos on ROFI were found to be completely non-responsive. All of the nonresponsive servos were Power HD 1501MG servos and tended to be close to the feet of the robot, suggesting that the load was responsible for breaking the servos. Following this is a diagram and table detailing the results of the servo test.
Servo# Servo Type Result
1 Towerpro MG996RC Functional, rotates 90°
2 Power HD 1501MG Functional, rotates 120°
3 Towerpro MG996R Functional, rotates 90°
4 Power HD 1501MG Nonresponsive
5 Towerpro MG996R Functional, rotates 90°
6 Towerpro MG996R Functional, rotates 90°
7 Towerpro MG996R Functional, rotates 90°
8 Towerpro MG996R Functional, rotates 90°
9 Towerpro MG996R Functional, rotates 90°
10 Power HD 1501MG Nonresponsive
11 Power HD 1501MG Nonresponsive
12 Towerpro MG996R Functional, rotates 90°
Demonstration Video
http://youtu.be/hO09e36LdrU
Datasheets available at:
Power HD 1501 MG: http://www.pololu.com/file/0J729/HD-1501MG.pdf
TowerPro MG996R: http://www.towerpro.com.tw/driver/drivers/Towerpro%20servo%20spec.pdf