A4WD1 & AL5 Arm Tutorial for PS2 Control v2.0
Updated 12/06/2010
Safety first! Wear eye protection and never touch a powered robot!
Note: This guide follows the A4WD1 and AL5 arm assembly guides. The RoboClaw has already been installed.
Software:
[hr][/hr]
Step 1. Mounting the ARC-32 board
Add the four standoffs for the ARC-32 to the robot’s top panel as shown. Use four .250" hex socket head screws.
[hr][/hr]
Step 2.
Install the ARC-32 board as shown, using four of the .250" 4-40 screws.
[hr][/hr]
Step 3.
It is now time to add the arm. Attach the arm to the A4WD1 as shown.
Any AL5 arm will work (AL5A, B, C, or D), with or without wrist rotate. You will edit the code later on to match your arm.
[hr][/hr]
Step 4. Connections
The RoboClaw has a BEC (battery elimination circuit) that provides 5vdc power for onboard logic as well as external logic power. The RoboClaw is capable of powering the ARC-32 logic from the BEC. Refer to Table 4 and the schematic (Figure 4) for ARC-32 and RoboClaw wiring connections. Double check your wiring. Make sure the red battery wire goes to the plus(+) terminals!
Table 4
[table=1,320,#000000][tr][td=100,#808080,#C0C0C0,center,2,1]ARC-32 Jumpers & Connections[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]6vdc battery[/td][td=50,#808080,#FFFFFF,center,1,1]+S2-[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Jumper[/td][td=50,#808080,#FFFFFF,center,1,1]Vcc for Pins 24 to 31[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Jumper[/td][td=50,#808080,#FFFFFF,center,1,1]Vs for Pins 8 to 15[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Gripper FSR Sensor
(Optional)[/td][td=50,#808080,#FFFFFF,center,1,1]Pin 7[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Base Servo[/td][td=50,#808080,#FFFFFF,center,1,1]Pin 8[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Shoulder Servo[/td][td=50,#808080,#FFFFFF,center,1,1]Pin 9[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Elbow Servo[/td][td=50,#808080,#FFFFFF,center,1,1]Pin 10[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Wrist Servo[/td][td=50,#808080,#FFFFFF,center,1,1]Pin 11[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Gripper Servo[/td][td=50,#808080,#FFFFFF,center,1,1]Pin 12[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Wrist Rotate Servo
(Optional)[/td][td=50,#808080,#FFFFFF,center,1,1]Pin 13[/td][/tr][tr][td=100,#808080,#C0C0C0,center,2,1]RoboClaw Jumpers and Connections[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]12vdc battery[/td][td=50,#808080,#FFFFFF,center,1,1]B+ B-[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Jumper[/td][td=50,#808080,#FFFFFF,center,1,1]JP3[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]AUX1 Pin 3[/td][td=50,#808080,#FFFFFF,center,1,1]S1 Header[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]AUX1 Pin 5[/td][td=50,#808080,#FFFFFF,center,1,1]S2 Header[/td][/tr][/table]
[hr][/hr]
Step 5.
Set the RoboClaw switches to the settings listed in Figure 4.
[hr][/hr]
Step 6.
Now it’s time to set up the A4WD1 for PS2 R/C control.
Table 6
[table=1,320,#000000][tr][td=100,#808080,#C0C0C0,center,2,1]PS2 connections[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]AUX2 Pin 2[/td][td=50,#808080,#FFFFFF,center,1,1]PS2 Data[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]AUX2 Pin 4[/td][td=50,#808080,#FFFFFF,center,1,1]PS2 Cmd[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]AUX2 Pin 6[/td][td=50,#808080,#FFFFFF,center,1,1]PS2 Select[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]AUX2 Pin 8[/td][td=50,#808080,#FFFFFF,center,1,1]PS2 Clock[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Servo 31 GND[/td][td=50,#808080,#FFFFFF,center,1,1]PS2 GND[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Servo 31 Vcc[/td][td=50,#808080,#FFFFFF,center,1,1]PS2 5V[/td][/tr][/table]
[hr][/hr]
Step 7.
Download and install Basic Micro Studio 2.0.0.6.
Download PS2 A4WD1 & AL5 arm program v2.0.
Open Basic Micro Studio
Open the PS2 A4WD1 & AL5 arm program v2.0 file.
Connect a USB cable to a PC USB port.
Connect the other end of the USB cable to the ARC-32.
The PC will automatically detect the ARC-32 USB device and install the driver. Note the new Comport number in the Comport dropdown at the top of Studio. Select this new Comport
Figure 7.
[hr][/hr]
Step 8.
Select the proper arm type as shown in figure 8 by uncommenting the line of code. If you are using the FSR sensor on the gripper, uncomment the “EnableFSR” line as well.
(The FSR assembly and set up guide can be found here.)
Select BasicAtomPro from the dropdown lists if it is not already selected. Click Program to program the basic code to the ARC-32.
Figure 8
[hr][/hr]
Step 9.
Press the select button on the PS2 controller. Your robot should go to and hold the neutral position, and should resemble figure 9. If the joints are off by more than 15� you may have made an error in assembly. To correct this, remove the center screw from the round servo horn, pull the servo horn off the servo, rotate until it’s aligned, then reattach the servo horn.
[hr][/hr]
Step 10.
The first step in calibration is to move the arm to the position shown in Figure 10. The commands available during calibration are listed in Table 10.
Table 10.
[table=1,320,#000000][tr][td=50,#808080,#C0C0C0,center,1,1]PS2 Buttons[/td][td=50,#808080,#C0C0C0,center,1,1]Function[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Left/Right D-Pad[/td][td=50,#808080,#FFFFFF,center,1,1]Moves active servo[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Hold L2[/td][td=50,#808080,#FFFFFF,center,1,1]Activate Shoulder[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Hold L1[/td][td=50,#808080,#FFFFFF,center,1,1]Activate Elbow[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Hold R2[/td][td=50,#808080,#FFFFFF,center,1,1]Activate Wrist[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Hold R1[/td][td=50,#808080,#FFFFFF,center,1,1]Activate Base[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Square[/td][td=50,#808080,#FFFFFF,center,1,1]Save Position 1[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Circle[/td][td=50,#808080,#FFFFFF,center,1,1]Calculate Calibration and exit Setup[/td][/tr][/table]
Figure 10.
[hr][/hr]
Step 11.
Now press the Square button on the PS2 to save Position 1 and move the arm back to its starting position. Now use the same controls to move the arm to the position shown in Figure 11. Please note that the base servo is now rotated 90 degrees counter clockwise.
Figure 11.
[hr][/hr]
Step 12.
Press the Circle button to finish calibrating the arm and exit from Setup. The arm will move to the position shown in Figure 12. if calibration was done correctly.
Figure 12.
[hr][/hr]
Step 13.
After calibration is complete the program lets you control the movement of the bot in two modes. On powerup, the vehicle is controlled with a tank mode, meaning left and right joysticks control the left and right motors independently. Pressing the left joystick in (L3) switches the control mode from tank mode to a single joystick control mode. Up and Down on the D-pad control the robot’s max speed. This is useful when precise positioning of the robot base is required.
Consult Tables 13 for a list of controls for the A4WD1 with AL5 Arm.
Table 14.
[table=1,320,#000000][tr][td=50,#808080,#C0C0C0,center,1,1]PS2 Buttons[/td][td=50,#808080,#C0C0C0,center,1,1]Function[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Select[/td][td=50,#808080,#FFFFFF,center,1,1]Arm Setup mode(See Table 10.)[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]L3[/td][td=50,#808080,#FFFFFF,center,1,1]Switch between Tank and One-Stick mode[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]R3[/td][td=50,#808080,#FFFFFF,center,1,1]Switch between Rover and Arm control[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]D-Pad U[/td][td=50,#808080,#FFFFFF,center,1,1]Shift gear up (1-4)
(Default gear 3)[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]D-Pad D[/td][td=50,#808080,#FFFFFF,center,1,1]Shift gear down (1-4)
(Default gear 3)[/td][/tr][tr][td=100,#808080,#C0C0C0,center,2,1]Arm Mode[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Left Joystick[/td][td=50,#808080,#FFFFFF,center,1,1]Gripper X/Y position[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Right Joystick[/td][td=50,#808080,#FFFFFF,center,1,1]Gripper Z position and Angle[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]L1/R1[/td][td=50,#808080,#FFFFFF,center,1,1]Gripper Open/Close
(Pressure Sensitive)[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]L2/R2[/td][td=50,#808080,#FFFFFF,center,1,1]Wrist Rotate
(Pressure Sensitive)[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]Triangle[/td][td=50,#808080,#FFFFFF,center,1,1]Move to Start position[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]X[/td][td=50,#808080,#FFFFFF,center,1,1]Power Down Servos
(only works with analog servos)[/td][/tr][tr][td=100,#808080,#C0C0C0,center,2,1]Tank Mode[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]L Joy U/D[/td][td=50,#808080,#FFFFFF,center,1,1]Left wheels forward/reverse[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]R Joy U/D[/td][td=50,#808080,#FFFFFF,center,1,1]Right wheels forward/reverse[/td][/tr][tr][td=100,#808080,#C0C0C0,center,2,1]One-Stick Mode[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]R Joy U/D[/td][td=50,#808080,#FFFFFF,center,1,1]Forward/reverse[/td][/tr][tr][td=50,#808080,#FFFFFF,center,1,1]R Joy L/R[/td][td=50,#808080,#FFFFFF,center,1,1]Steering[/td][/tr][/table]