BRAT Biped PS2 & BotBoarduino Tutorial

Last modified by Eric Nantel on 2023/01/23 10:30

PS2 Biped BRAT Tutorial.

Updated 04/09/2012

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

Note: This tutorial uses the BotBoarduino and a wireless PS2 controller/receiver.

Software:
  - Arduino Software


Image of Biped BRAT.
 
Step 1.
Make sure your servos are plugged into the appropriate channels, as shown in Table 1.

*Note, P1 is used for communications and P5 is used by the speaker, so we can't plug a servo in there.

BotBoarduino Connection
P2 Left Ankle
P3 Left Knee
P4 Left Hip
P10 Right Ankle
P11 Right Knee
P12 Right Hip
P13 Panning Servo (Optional)

Table 1.

 
Step 2.
Make sure the BotBoarduino's jumpers are set according to Table 2.

Refer to Figure 2 for help with jumper settings.

*Note, the VS to AX0 jumper enables the program to monitor the servo battery voltage. When the battery is low, the robot can beep in warning.

BotBoarduino Jumper Settings
Enable A, B, and C buttons (JA, JB, JC)
5v Analog Group
VS I/O Groups 1-5 and 6-9
Enable SPK (Speaker)
Enable VS (Servo Voltage) to P0 (Analog 0)

Table 2.


 
Figure 2.

 
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 BRAT here.

Open the .ino file in the IDE, program the BotBoarduino, and power the robot down afterwards.


Figure 3.


Step 4.
Place the robot in a position as close to neutral as possible, hold the "A" button, and turn it on. Your robot should go to and hold the neutral position, and should resemble figures 4-1 through 4-3. 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
.
  • Press B to decrease the servo offset by 1°.
  • Press C to increase the servo offset by 1°.
  • Press A to change which servo is being manipulated, and to save your offsets. The order of the program is shown in Figure 3. When the program reaches "Save Data", the robot will Save the offsets and commence the rest of the program. If you made a mistake in an offset, you will need to restart the robot while holding the A button.

Note, if you have the Speaker enabled, when you press the A button you will hear a short tone. The tone will raise in pitch when you change from servo to servo.

Use the A, B, and C buttons to straighten the BRAT as shown in Figures 4-1, 4-2, and 4-3.

Note, if you are building the robot with HS-422 servos, you will notice the hip servos oscillate if the robot is lifted off the ground. This is normal, and is due to the lower power servo. When the robot is walking, the effects are minimal. Using a voltage that is higher than 6vdc will make the oscillations worse. When building a robot with more powerful servos such as HS-475, HS-485, or HS-645, you will not see this effect.


Figure 4-1.

 


Figure 4-2.


Figure 4-3.

 
Step 6.
Now you need to create the PS2 cable to connect the PS2 receiver. Repeat this step on one side of two 6" servo extender cables.

1. Use an exacto knife to carefully pry the black tabs up and slip the wires out of the black housing.

2. Remove the black housing completely and set aside.

3. Cover the header pin receptacles with 1/2" of heat shrink.


Figure 6.

 
Step 7.
Plug the cables into the PS2 Receiver and BotBoarduino as shown. 

BotBoarduino Connections
Cable 1 Black P6
Red P7
Yellow P8
Cable 2 Black GND
Red 5vdc
Yellow P9
BotBoarduino Jumper Settings
Disable JPU (Remove JA, JB, JC)
5v I/O Group 12-15

Table 7.


Figure 7.


Schematic.
Double check your connections against the schematic below.

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

 
Figure 7.

 
Step 8.
The PS2 control commands are shown in Table 8. If you need to adjust your robot's offsets later, you will need to unplug the PS2 receiver and replace the JA, JB, and JC jumpers.

PS2 Button Command
Left Joystick Forward/Back Walk forward/backward
Left Joystick Left/Right Turn in place left/right
X Return robot to home position
/\ Headbutt
L1 Kick with left leg
R1 Kick with right leg
D-pad Up Get up from face-down position
D-pad Down Get up from back-down position
Start Enable/Disable robot's standby "rest" mode (enabled by default)
Select Changes stride length

Table 8.

Tags:
Created by Eric Nantel on 2023/01/23 10:21
Copyright RobotShop 2018