Introduction: My Seventh Project: Robot Arm Set

I made use of Smart Tank Chassis in the past 4 projects and I wanna do something very different. After searching in google and consider different stuffs for a couple of days, I found the Robot Arm Set. It looks awesome! It provides servos, servo wheels and extension wires so that I can save more time to focus on my project. I can connect it to Arduino and make use of different stuffs together for many combinations!

Step 1: Parts

Robot Arm Set (This set includes six servos, servo wheels and extension wires)

16-Channel Servo Controller

7.4V Li-Po Battery

Charger

JST female connector

Standoff

Arduino MEGA 2560 R3

AMS1117 Linear Regulator Breadboard Set

Switch

* I just make use of the battery and charger in my remote-controlled car for this project. : )

Step 2: Assembly

I guessed it should be very complicated and difficult to finish, but in fact it is not. It is easy to assemble. Just following a few steps in the manual and that's it!

Step 3: Wiring

I wanna do a test with my PC first before connecting to Arduino. The brown color of the wire in servos represents GND, red is + and orange is for signal. To make it simple I connect the servos from the base to the claw to the servo controller with a sequence from S1 to S6 respectively. Use extension wires if the servo cable is not long enough. Make sure all the cables are in correct direction. I've also bundled the wires with plastic cable ties.

The servo controller is fixed at the side of the base with standoff.

The servos are powered with VS and GND of the blue terminal block on the servo controller, so red wire of 7.4 Li-Po battery is connected to VS and black wire to GND.

For the chip we can either power it up with the pins 5V and GND next to S1, or via USB, or VSS and GND of the blue terminal block. Here I choose USB first. The left green LED is the chip power indicator and the right green LED is the servo power indicator. It is ready if both green LEDs are on. The left red LED indicates data transfer.

Step 4: Test With PC

Next, I install both the driver and the software of this controller to my PC, and connect the controller to PC via USB. Open Device Manager in Control Panel and you can check the COM port of the controller. Then open the software, choose the COM port and click "Connect". Now I can test the servos by sliding the bars slowly. As the servos react to the bar I slided instantly, if sliding the bars quickly, the servos will move quickly and you may get hurt. Also, don't slide the bar further if the servo gets stuck already. It is dangerous and the servo may burn out.

During the test I've jotted down the maximum and minimum PWM, and the movement of the servos as follow:

Servo Lowest PWM Movement Highest PWM Movement

S1 500 right 2500 left

S2 500 up 2500 down

S3 500 down 2500 up

S4 500 down 2500 up

S5 500 anticlockwise 2500 clockwise

S6 900 open claw 1700 close claw

The PWM of servos are ranged from 500 to 2500, or from 0 degree to 180
degree, at which 1500 represents 90 degree. However, as the degree needed to control the claw is far less than others, to avoid the servo gets stuck, the range of PWM is narrower compare with other servos, from 900 to 1700. The data is for reference only and there may be difference. You are highly recommended doing a test and create this table yourselves.

Step 5: Further Testing

Another function of this software is that we can add a series of movements among servos and run it in cycle. After choosing one set of movement, select "Add", and a set of code appears below "Order", for example:

#1P1389#2P2P1522#3P922#4P1544#5P1500#6P1567T1000

We can interpret it as follow:

#P<servo number>P<PWM> ...........T<Time>

That means, "1st servo turns to PWM 1389, 2nd servo turns to PWM 1522...... finish in 1000 millisecond (or 1 second)." (This command will be used frequently when connected to Arduino.)

After completing a series of movements, click "Cycle run". The arm will move continuously according to the sets of movements we've added.

Step 6: Test With Arduino

I am looking for the code for Arduino, and finally I've got it with this link:

http://letsmakerobots.com/node/33001

The code is as follow:

void setup() {
Serial.begin(9600);

}

void loop() {

move(1, 2400, 500);

move(1, 750, 500);

}

void move(int servo, int position, int time) {

Serial.print("#");

Serial.print(servo);

Serial.print("P");

Serial.print(position);

Serial.print("T");

Serial.println(time);

delay(time);

}

The code can be interpreted as: the 1st servo turns to PWM 2400 in 500 millisecond. Then turns to PWM 750 in 500 millisecond. After that waits for 500 millisecond and loop again.

RX in servo controller is connected to Arduino MEGA pin 0 and TX to pin 1. (I think using Arduino UNO is just the same, but I use Arduino MEGA instead only because I'd lent Arduino UNO to my friend.) After uploading the code, nothing happens. I've followed the instruction by mogul in the same link and connecting pin 4 and 5 to RX and TX on the board. I get it back on serial monitor. I've tried all the options but the servos are still no response. I am sure there should not be any problem on the controller. Then what's happen?

Step 7: Troubleshooting

I've asked my friend what's going on. After a while he's made four suggestions:

1. Select "Newline" in serial monitor

2. To ensure the code is properly upload, disconnect pin 0 and pin 1 before uploading.

3. Connect pin 0 and pin 1 to Arduino after uploaded.

4. Make sure pin 0 to TX of the controller and pin 1 to RX

As pin 0 and pin 1 are used to communicate with USB. They may interfered against one other if both pin 0 and pin 1 are connected before uploading the code.

For safety I've also soldered a switch and set a wiring between the battery and the controller. + of the wire is soldered to the middle (1) of the switch and another wire to 1a of the switch. (My soldering skill is terribly poor..... : (

Step 8: Result

So let's start.....Wow~~~~~ The servo moves ~~~~~

After that I try the code with the command mentioned before. Here is the code:

void setup() {

Serial.begin(9600);

}

void loop() {

Serial.println("#1P1500#2P1500#3P1500#4P1500#5P1500#6P1500T2000");

delay(2000);

Serial.println("#1P1000#2P2000#3P1200#4P1200#5P1500#6P900T2000");

delay(2000);

Serial.println("#1P1000#2P2000#3P1200#4P1200#5P1500#6P1700T2000");

delay(2000);

Serial.println("#1P1500#2P1500#3P1500#4P1500#5P1500#6P1700T2000");

delay(2000);

Serial.println("#1P1500#2P2000#3P1200#4P1200#5P1500#6P900T2000");

delay(2000);

}

You can also watch the result in the video. : )

Actually I'd thought about how to deal with this servo controller for a few days. Thanks for my friend's support! Also thanks to everyone who viewed my previous projects. I was very surprised when number of viewers hits over 13,000! Next time I will try to combine this arm with other stuffs. Thanks for watching it. See you!