BRAT Biped Mech PS2 Tutorial

Last modified by Eric Nantel on 2024/07/03 09:21

PS2 Biped BRAT Mech Tutorial.

Updated 12/20/2011

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

Note: This tutorial uses the Bot Board II, BASIC Atom Pro 28, a wireless PS2 controller/receiver, and two PicoSwitches (DE-03).

Software:
  - BASIC Micro Studio
  - BRAT Servo Offset Finder Program (09/17/09)
  - PS2 Mech Control Code v1.2 (11/11/2009)


Image of Biped BRAT mech.
 

Overview: This tutorial will show how to build a BRAT-based mech using the hardware and components that we used in our build. This is NOT the only way to do a BRAT-based mech, though! Keep in mind that if you deviate from the components we used, you may have to make changes to the code we've provided, and the assembly instructions listed here may not match exactly. Have fun, and experiment!

 
Step 1.
Depending on how you've installed the aluminum channel on your BRAT, you may have to change it.

For the Mech project, you'll need to make sure the aluminum channel is oriented as shown in Figure 1. If yours is different, you'll have to rebuild it.


Figure 1.

 
Step 2.
After rebuilding, make sure your bot looks like Figure 2. If it does, move on to Step 3.


Figure 2.


Step 3.
Attach an ASB-24 bracket to the aluminum channel as shown. Use 2-56 screws and nuts.

The bracket will be off-center, but the servo horn will be center aligned.


Figure 3.

 
Step 4.
Attach a suitable servo to the ASB-24; we used an HS-645. In our experience, the turret was a bit shaky with an HS-475 or HS-485.

Remove the servo horn. This servo will rotate the gun platform turret. Plug the servo in to P11 on the Bot Board II. A wiring diagram is shown below.


Figure 4.

 
Step 5.
For our gun platform turret, we used the add-on base rotate (ABR-01). A MPSH-01 will support the camera, while a HUB-08 attached to ASB-06 will support the guns.

Use 2-56 screws and nuts to attach the brackets as shown using the innermost holes. You will need to use a 5/64" drill bit to add holes for the outermost screws as shown. Do this carefully! Make sure everything is aligned properly before drilling!

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


Figure 5.


Step 6.
The guns we used can be purchased here. The website sells several versions of this gun. Make sure you get the "airsoft barrel mechanism" version, NOT the "IR barrel mechanism" version. Remember, if you use different guns, you may have to modify the code, and our assembly instructions may not work for you.

Wiring instructions are shown in Figure 12. Don't worry about connecting the guns until you get there.

We had to drill the center hole of the HUB-08s to .25" to accommodate mounting the guns we used. The gun's mounting posts have ridges that need to be filed or cut down, in order to fit into the HUB-08.

We attached our guns to the HUB-08s using epoxy. Hold or clamp the gun tightly to the hub, and make sure to give it plenty of time to set before moving on.


Figure 6.

 
Step 7.
Use the servo horn screw to attach the gun platform turret to the HS-645 servo.

This completes the mechanical assembly. Because every servo is unique in its center position, we need to calibrate the software to the servos. To do this, follow the next steps.


Figure 7.


Step 8.
Make sure your Bot Board is set up as shown in Table 8 and Figure 8.

You MUST have the buttons enabled in order to proceed.

Bot Board I/O Connection
P4 Left Ankle
P5 Left Knee
P6 Left Hip
P7 Right Ankle
P8 Right Knee
P10 Right Hip
P11 Turret Rotation
Bot Board II Jumper Settings
Enable A, B, and C buttons
VS I/O Groups 4-7 and 8-11
Enable SPKEN (Speaker Enable)

Table 8.

 

 
Figure 8.


Step 9.
Download and install the BASIC Micro Studio. Download the BRAT Servo Offset Finder program, and load it into the IDE.

Program the Atom Pro, and follow these instructions to find your robot's offsets.

  • Press A to decrease the servo offset by 5us.
  • Press C to increase the servo offset by 5us.
  • Press B to change which servo is being manipulated, and to save your offsets. The order of the program is shown in Figure 9.

Note, if you have the Speaker enabled, when you press the B button you will hear a short tone. The tone will raise in pitch when you change from servo to servo, and will lower in pitch and be longer when you get back to Start.


Figure 9.

 
Step 10.
Place the robot in a position as close to neutral as possible, and turn it on. Your robot should go to and hold the neutral position, and should resemble figures 10-1 through 10-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.

Use the A, B, and C buttons to straighten the BRAT as shown in Figures 10-1, 10-2, and 10-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.

After you've cycled through the servos and adjusted them to match Figures 10-1 through 10-3, pressing the B button again will save your servo offset values to the Atom Pro's EEPROM.


Figure 10-1.



Figure 10-2.


Figure 10-3.

 
Step 11.
Now download the PS2 BRAT Mech Code v1.2, load it into the IDE, and program your BRAT.
 
Step 12.
Now it's time to wire the guns up. This step will need to be done for each gun. Refer to Figure 12 for a wiring diagram. Use heat shrink at your discretion.

The gun's black motor wire goes directly to ground. The red wire goes one side of the PicoSwitch. From the other side, run a wire from the PicoSwitch to + on the Bot Board II.

For the motor's internal switch, cut a 24" servo extender cable in half and strip some from the end of the cable. Strip about a finger's width extra on the RED wire, and solder a 10k resistor onto the wire. 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 of the switch.

Bot Board II New Mech 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.


Step 13.
The PS2 control commands are shown in Table 13.

The command set has changed slightly from the one in the PS2 control tutorial. Make sure you read the list carefully.

PS2 Button Command
Left Joystick Walk forward/backward and turn
Right Joystick Aims gun platform
X Return robot to home position
/\ Toggles switch connected to P0
L1 Shoot with left gun
R1 Shoot with right gun
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 13.

 
Step 14.
We used the TRENDnet TV-IP110W camera. There are many choices as far as camera goes. You want a lightweight IP (NOT 2.4GHz) wireless camera.

We removed the camera's outer casing to make it lighter, and used double-sided foam tape to attach it to the MPSH-01.

Our camera is powered by a 7.4vdc LiPo battery with a 5vdc switching regulator.


Figure 14.

 
Step 15.
There are a lot of ways to make ammo holders. We found some tiny tupperware containers at a local dollar store, cut holes to match the guns, and use double-sided foam tape to secure them to the guns.


Figure 15.

Tags:
Created by Eric Nantel on 2024/07/03 09:21

Recently Visited

Copyright RobotShop 2018