BRAT Biped PS2 & BotBoarduino Tutorial

Last modified by Eric Nantel on 2026/04/06 13:19

PS2 Biped BRAT Tutorial (BotBoarduino)

Updated April 9, 2012

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

Hardware required: BotBoarduino, wireless PS2 controller/receiver.

Software: Arduino Software

Biped BRAT.

PS2 BRAT (BBuino) — Verify Servo Channel Connections
Step 1 / 8

Make sure your servos are plugged into the appropriate channels per Table 1. Note: P1 is used for communications and P5 is used by the speaker — neither can be used for servos.

BotBoarduinoConnection
P2Left Ankle
P3Left Knee
P4Left Hip
P10Right Ankle
P11Right Knee
P12Right Hip
P13Panning Servo (Optional)
Table 1.
PS2 BRAT (BBuino) — Configure BotBoarduino Jumpers
Step 2 / 8

Set the BotBoarduino jumpers per Table 2. The VS to P0 (Analog 0) jumper enables battery voltage monitoring — the robot beeps when the battery is low. Refer to Figure 2 for the jumper layout.

BotBoarduino Jumper Settings (Table 2)
EnableA, B, and C buttons (JA, JB, JC)
5VAnalog Group
VSI/O Groups 1–5 and 6–9
EnableSPK (Speaker)
EnableVS (Servo Voltage) to P0 (Analog 0)
Table 2.

Figure 2 — Jumper diagram

PS2 BRAT (BBuino) — Install Arduino & Load Code
Step 3 / 8

Download and install the Arduino Software. Install the PS2X library — instructions for installing libraries are available here. Download the BRAT code from GitHub.

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

Figure 3 — Offset finder sequence.
PS2 BRAT (BBuino) — Calibrate to Neutral Position
Step 4 / 8

Place the robot as close to neutral as possible, hold the "A" button, and turn it on. It should hold the neutral position resembling Figures 4-1 through 4-3. If any joint is off by more than 15°, remove the servo horn, rotate to align, and reattach.

  • B — decrease servo offset by 1°
  • C — increase servo offset by 1°
  • A — change which servo is being adjusted, and save offsets. When the program reaches "Save Data" it saves offsets and runs the program. If you make a mistake, restart while holding A.

If the Speaker is enabled, pressing A plays a tone that rises in pitch as you cycle through servos.

Note: HS-422 hip servos may oscillate when lifted — normal and minimal when walking. Higher voltage worsens this. HS-475, HS-485, HS-645 servos do not exhibit this.

Figure 4-1 (front view).
Figure 4-2 (side view).
Figure 4-3 (rear view).
PS2 BRAT (BBuino) — Prepare PS2 Cables
Step 5 / 8

Repeat this process on one end of two 6" servo extender cables:

  1. Use an exacto knife to carefully pry up the black tabs and slip the wires out of the housing.
  2. Remove the black housing completely and set aside.
  3. Cover the header pin receptacles with 1/2" of heat shrink.
Figure 5.
PS2 BRAT (BBuino) — Connect PS2 Cables to BotBoarduino
Step 6 / 8

Plug the cables into the PS2 receiver and BotBoarduino per Table 7, and update the jumper settings as shown. To adjust offsets later, unplug the PS2 receiver and replace the JA, JB, and JC jumpers.

BotBoarduino Connections (Table 7)
Cable 1BlackP6
RedP7
YellowP8
Cable 2BlackGND
Red5VDC
YellowP9
Jumper Settings
DisableJPU (Remove JA, JB, JC)
5VI/O Group 12–15
Table 7.

Schematic — double-check connections below. PS2 cable colour reference

Figure 6 (cable connections).

Figure 7 — Full wiring schematic.

PS2 BRAT (BBuino) — PS2 Control Reference
Step 8 / 8

The PS2 control commands are shown in Table 8. To adjust servo offsets later, unplug the PS2 receiver and replace the JA, JB, and JC jumpers.

PS2 ButtonCommand
Left Joystick Forward/BackWalk forward/backward
Left Joystick Left/RightTurn in place left/right
XReturn robot to home position
Headbutt
L1Kick with left leg
R1Kick with right leg
D-pad UpGet up from face-down position
D-pad DownGet up from back-down position
StartEnable/Disable standby rest mode (enabled by default)
SelectChange stride length
Table 8.
Tags:
Created by Eric Nantel on 2024/07/03 09:21
Copyright RobotShop 2018