BRAT Biped Mech PS2 Tutorial

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

PS2 Biped BRAT Mech Tutorial

Updated December 20, 2011

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

Hardware required: Bot Board II, BASIC Atom Pro 28, wireless PS2 controller/receiver, two PicoSwitches (DE-03).

Software & downloads:

Overview: This tutorial shows how to build a BRAT-based mech using the components used in this build. This is not the only approach — if you use different components you may need to modify the code and assembly instructions. Have fun and experiment!

Biped BRAT Mech.

BRAT Mech — Orient U-Channel
Step 1 / 15

Depending on how the aluminum channel was installed on your BRAT, you may need to change it. Orient the channel as shown in Figure 1 — if yours differs, you will need to rebuild it.

Figure 1.
BRAT Mech — Verify Rebuilt Configuration
Step 2 / 15

After rebuilding, make sure your robot matches Figure 2 before proceeding to Step 3.

Figure 2.
BRAT Mech — Attach ASB-24 Bracket
Step 3 / 15

Attach an ASB-24 bracket to the aluminum channel as shown using 2-56 screws and nuts. The bracket will be off-centre, but the servo horn will be centre-aligned.

Figure 3.
BRAT Mech — Install Turret Rotation Servo
Step 4 / 15

Attach a suitable servo to the ASB-24 — an HS-645 is recommended. In testing, the turret was unstable with HS-475 or HS-485 servos. Remove the servo horn. This servo rotates the gun platform turret. Plug it into P11 on the Bot Board II.

Figure 4.
BRAT Mech — Build Gun Platform Turret
Step 5 / 15

The gun platform turret uses the add-on base rotate (ABR-01). A MPSH-01 supports the camera; HUB-08s attached to ASB-06s support the guns.

Use 2-56 screws and nuts to attach brackets via the innermost holes as shown. Use a 5/64" drill bit to add holes for the outermost screws. Drill carefully — ensure everything is aligned properly before drilling!

Use 2-56 screws and nuts to attach the HUB-08s to the ASB-06s.

Figure 5.
BRAT Mech — Mount Guns
Step 6 / 15

Use the airsoft barrel mechanism version of the gun (NOT the IR version). If you use different guns, you may need to modify the code — the assembly instructions may not apply. Gun wiring is covered in Step 12.

Drill the centre hole of the HUB-08s to .25" to accommodate the gun mounting posts. File or cut down the ridges on the posts to fit into the HUB-08. Attach the guns to the HUB-08s using epoxy — hold or clamp firmly and allow plenty of time to set before proceeding.

Figure 6.
BRAT Mech — Attach Turret to Servo
Step 7 / 15

Use the servo horn screw to attach the gun platform turret to the HS-645 servo. This completes the mechanical assembly. The next steps calibrate the software to the servos.

Figure 7.
BRAT Mech — Configure Bot Board II
Step 8 / 15

Set up the Bot Board per Table 8 and Figure 8. The buttons MUST be enabled to proceed.

Bot Board I/OConnection
P4Left Ankle
P5Left Knee
P6Left Hip
P7Right Ankle
P8Right Knee
P10Right Hip
P11Turret Rotation
Bot Board II Jumper Settings
EnableA, B, and C buttons
VSI/O Groups 4–7 and 8–11
EnableSPKEN (Speaker Enable)
Table 8.

Figure 8 — Bot Board II wiring diagram

BRAT Mech — Find Servo Offsets
Step 9 / 15

Download and install BASIC Micro Studio. Download the BRAT Servo Offset Finder Program, load it into the IDE, and program the Atom Pro. Use the buttons to adjust:

  • A — decrease servo offset by 5µs
  • C — increase servo offset by 5µs
  • B — change which servo is being adjusted, and save offsets (order shown in Figure 9)

If the Speaker is enabled, pressing B plays a tone that rises in pitch as you cycle through servos and drops to a longer lower tone when returning to Start.

Figure 9 — Offset finder sequence.
BRAT Mech — Calibrate to Neutral Position
Step 10 / 15

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

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 effect.

After adjusting all servos to match Figures 10-1 through 10-3, pressing B saves the offset values to the Atom Pro's EEPROM.

Figure 10-1 (front view).
Figure 10-2 (side view).
Figure 10-3 (rear view).
BRAT Mech — Load PS2 Mech Control Code
Step 11 / 15

Download the PS2 BRAT Mech Code v1.2, load it into the IDE, and program your BRAT.

BRAT Mech — Wire the Guns
Step 12 / 15

Repeat this wiring for each gun. Use heat shrink as needed. Refer to Table 12 and Figure 12 for connections.

Motor wiring: The gun's black motor wire goes directly to ground. The red wire connects to one side of the PicoSwitch; run a wire from the other side of the PicoSwitch to (+) on the Bot Board II.

Internal switch wiring: Cut a 24" servo extender cable in half and strip the ends. Strip extra length on the RED wire and solder a 10kΩ resistor onto it. Solder both the yellow wire and the other end of the resistor to one side of the switch. Solder the black wire to the other side.

Bot Board IIMech Component
P16 (AX0)Right gun PicoSwitch
P17 (AX1)Right gun internal switch
P18 (AX2)Left gun PicoSwitch
P19 (AX3)Left gun internal switch
Table 12.

Figure 12 — Gun wiring diagram

BRAT Mech — PS2 Control Reference
Step 13 / 15

The PS2 control commands are shown in Table 13. Note: the command set has changed slightly from the PS2 control tutorial — read the table carefully.

PS2 ButtonCommand
Left JoystickWalk forward/backward and turn
Right JoystickAim gun platform
XReturn robot to home position
Toggle switch connected to P0
L1Shoot with left gun
R1Shoot with right gun
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 13.
BRAT Mech — Mount Camera
Step 14 / 15

A lightweight IP wireless camera (not 2.4GHz) is recommended — the TRENDnet TV-IP110W was used in this build. Remove the camera's outer casing to reduce weight and attach it to the MPSH-01 using double-sided foam tape. Power the camera from a 7.4VDC LiPo battery with a 5VDC switching regulator.

Figure 14.
BRAT Mech — Make Ammo Holders
Step 15 / 15

There are many ways to make ammo holders. Small tupperware containers work well — cut holes to match the guns and secure them to the guns with double-sided foam tape.

Figure 15.
Tags:
Created by Eric Nantel on 2024/07/03 09:21
Copyright RobotShop 2018