AL5 Programming Tutorial - PS2 & BotBoarduino

Last modified by Eric Nantel on 2023/01/20 11:07

AL5 Programming Tutorial - PS2 RC
Rev. 1.

Updated 01/11/2012

Safety first! Wear eye protection and never touch a powered robot!

The purpose of this guide is to set up the robot arm to be controlled via a Playstation 2 game controller.

Note, the PS2 control programs have been verified to work with Lynxmotion wireless controllers. We cannot guarantee that non-Lynxmotion controllers will work.

What you'll need to get started:

Image of arm.
 
Step 1.
Install the BotBoarduino as shown in Figure 1. Wire the board as shown in the schematic and table below. Make sure the jumpers are all correct.

Figure 1.
Step 2.
Configure the BotBoarduino as illustrated in Table 2. For more information about setting up the force sensing resistor, look here.
BotBoarduino Jumpers
Connect 6.0vdc battery or wall pack to VS
Connect 9.0vdc battery to VL
Enable Speaker
Connect I/O 0-3 Power Bus to VS
Connect I/O 4-7 Power Bus to VS
Connect I/O 12-15 Power Bus to 5V
BotBoarduino Connections
P1 N/A P8 PS2 Data
P2 Base P9 PS2 Clock
P3 Shoulder P10 Wrist
P4 Elbow P11 Gripper
P5 Speaker P12 Wrist Rotate
P6 PS2 Attention P13 N/A
P7 PS2 Command A2 Force Sensing Resistor
Table 2.

Schematic.
Double check your connections against the schematic below.

Note: You can check your PS2 cable's colors and the functions they represent here.


Schematic.


Step 3.
Download and install the Arduino Software
. You will need to install the PS2X library. You can find instructions on installing the library here. Download the code for the arm here.

Open the .ino file in the IDE and locate the section of code to the right located near the top of the file. Remove the comments (double forward slash) from in front of the arm you are using. For example, if you are using an AL5D, the text should look like Table 3. The code is set to default to the AL5D arm. If you use another arm, be sure to add a comment before the AL5D line.

If you are using a FSR on the gripper, be sure to uncomment the line "#define FSRG".

When you are finished, save your program and click "Program."

Arm Selection in Program

//comment to disable the Force Sensitive Resister on the gripper
//#define FSRG

//Select which arm by uncommenting the corresponding line
//#define AL5A
//#define AL5B
#define AL5D

Table 3

 
Step 4.
Consult Table 4 for information on controlling the arm.

PS2 Controls
L Joy U Gripper Angle Up R Joy U Gripper Up
L Joy D Gripper Angle Down R Joy D Gripper Down
L Joy L Base Rotate Left R Joy L Gripper Back
L Joy R Base Rotate Right R Joy R Gripper Away
L1 Wrist Rotate CW R1 Gripper Close
L2 Wrist Rotate CCW R2 Gripper Open
L3 N/A R3 N/A
D-Pad U Increase Speed Tri Center Wrist Rotate
D-Pad D Decrease Speed X Fully Open Gripper
D-Pad L N/A Squ N/A
D-Pad R N/A O N/A
Start Enable/Disable Arm Select N/A

Table 4

Tags:
Created by Eric Nantel on 2023/01/18 13:15
Copyright RobotShop 2018