AL5 Programming Tutorial - PS2 & BotBoarduino

Last modified by Eric Nantel on 2026/04/06 10:24

AL5 Programming Tutorial — PS2 RC Rev. 1

Updated January 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 using a BotBoarduino.

Note: PS2 control programs have been verified to work with Lynxmotion wireless controllers. Non-Lynxmotion controllers cannot be guaranteed.

What You'll Need

Any AL5 arm · BotBoarduino · PS2 Controller

AL5 PS2 RC (BotBoarduino) — Install Board
Step 1 / 4

Install the BotBoarduino as shown in Figure 1. Wire the board as shown in the schematic and Table 2 (Step 2). Verify all jumpers are correct.

Figure 1.
AL5 PS2 RC (BotBoarduino) — Configure Jumpers & Connections
Step 2 / 4

Configure the BotBoarduino as illustrated in Table 2. For more information about setting up the force sensing resistor, see here.

BotBoarduino Jumpers

ActionSetting
Connect6.0VDC battery or wall pack to VS
Connect9.0VDC battery to VL
EnableSpeaker
ConnectI/O 0-3 Power Bus to VS
ConnectI/O 4-7 Power Bus to VS
ConnectI/O 12-15 Power Bus to 5V

BotBoarduino Connections (Table 2)

PinFunctionPinFunction
P1N/AP8PS2 Data
P2Base RotateP9PS2 Clock
P3ShoulderP10Wrist
P4ElbowP11Gripper
P5SpeakerP12Wrist Rotate
P6PS2 AttentionP13N/A
P7PS2 CommandA2Force Sensing Resistor

Schematic. Double check your connections against the schematic below. You can check your PS2 cable colors and their functions here.

Schematic.

AL5 PS2 RC (BotBoarduino) — Download & Program
Step 3 / 4

Download and install the Arduino Software. Install the PS2X library — instructions for installing libraries are here. Download the arm code here.

Open the .ino file and locate the arm selection section near the top. Remove the comments (//) from in front of the arm you are using. The code defaults to AL5D — if using another arm, add // before the AL5D line (see Table 3).

If using an FSR on the gripper, uncomment the line #define FSRG.

When finished, save your program and click "Upload".

Table 3 — Arm Selection

//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
AL5 PS2 RC (BotBoarduino) — Controller Reference
Step 4 / 4

PS2 Controls — Table 4

ButtonFunctionButtonFunction
L Joy UpGripper Angle UpR Joy UpGripper Up
L Joy DownGripper Angle DownR Joy DownGripper Down
L Joy LeftBase Rotate LeftR Joy LeftGripper Back
L Joy RightBase Rotate RightR Joy RightGripper Away
L1Wrist Rotate CWR1Gripper Close
L2Wrist Rotate CCWR2Gripper Open
L3N/AR3N/A
D-Pad UpIncrease Speed△ TriangleCenter Wrist Rotate
D-Pad DownDecrease SpeedX CrossFully Open Gripper
D-Pad LeftN/A□ SquareN/A
D-Pad RightN/AO CircleN/A
StartEnable / Disable ArmSelectN/A
Tags:
Created by Eric Nantel on 2024/07/03 09:20
Copyright RobotShop 2018