The Complete H3/H3-R Tutorial (BotBoarduino) v2.0
The Complete H3/H3-R Tutorial
v2.0
Updated 06/07/2012 This guide applies to the BotBoarduino. The purpose of this guide is to use the Hexapod Calibration program to calibrate the servos and to program the Botboarduino for PS2 remote control. Note, we used the round hexapod for the images in the tutorial, however, everything still applies to the inline hexapod. Note, the PS2 control programs have been verified to work with our Lynxmotion wireless controllers. We cannot guarantee that non-Lynxmotion controllers will work. Hardware: Software: |
Image of AH3-R. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Image of BH3-R. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Image of BH3. |
Image of CH3-R. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 1. Set the robot up on a stand such as a CD spindle. Connect the USB cable to your PC and to the Botboarduino. Power up the robot. Verify that the green LED on the Botboarduino and SSC-32 light up. Note, the SSC-32's LED is NOT a power indicator. Its purpose is to light up, indicating that the SSC-32 is functioning properly. It will remain lit until it receives serial data. After that, it will blink when receiving data. The servos may jump but will not hold position yet. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Figure 1-1. |
Figure 1-2. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 2. Remove the TX and RX jumpers from the lower-right corner of the SSC-32, and plug the unmodified end of the cable in. Yellow on TX, red on RX, and black on ground. Plug in some extra lengths of 18-24awg wires to VL on the SSC-32, with the 9vdc battery clip. These will be used to run power to the BotBoarduino. |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 3. We need to set up the SSC-32 to communicate with the BotBoarduino. Remove the DB9-enable jumpers and install the unmodified end of your 6" servo extender cable on the TTL serial communication posts. The black wire is closest to the edge of the board, and the yellow wire is on RX. See the schematic below for detailed information. |
Figure 3. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 4. Remove the 3/8 x 4-40 screws that hold the SSC-32 in place. Install the BotBoarduino as illustrated in Figure 4 using the same screws. Attach the red and black wires from the SSC-32 to the VL input, with black on (-) and red on (+). Plug the red wire of your modified cable into pin 12 and the yellow wire to pin 13. Install the Playstation 2 cable as illustrated in Figure 4-1. Note: Refer only to Figure 4-1 for connection information. The cable colors in the picture may be outdated. If your cable's colors do not match the diagram, you can find a complete listing of possible colors here.
|
Figure 4. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Schematic.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 5. Download the Program Extract the .zip file to a folder named "BotBoarduino_CH3R_PS2". The folder name IS required. Open BotBoarduino_CH3R_PS2.ino in the arduino software, turn on the robot, and click upload (the small arrow pointing to the right.) Please note that in some cases you may have to reverse the Attention/Command/Data connector for the PS2 receiver to function with the BotBoarduino |
Figure 5. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 6. At this point, the robot is able to move around. However, since the legs are not calibrated, it will look very sloppy. Download the Hexapod Calibration program to calibrate the robot's legs here. Just unzip the zip file and run the installer. This will automatically create an icon on your desktop so you can easily run it. |
Figure 6. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 7. Click "All=1500" to enable the servos. The robot's legs should move quickly into position as in Figures 8-1 or 8-2, and should hold this position. If the legs move into position but suddenly go limp, this is an indication of a low battery. A low battery can't deliver the required current, causing the SSC-32 to reset. Another clue that this is happening is the SSC-32's green LED will be on steady, as it is upon powerup. If the legs are holding position but look radically different, then a mistake may have been made in the assembly. To correct this, you can remove the center servo horn screw, pull the servo horn off the servo, reposition it, and press it back on the servo. Then replace the servo horn screw. Don't worry if the legs are off a little bit (under 15°) as this will be corrected in the servo offset procedure. Note, you can click on "inline" if you do not have a circular chassis for a more accurate visual representation. |
Figure 7. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 8. We will now begin to use the servo offset adjustment to fine-tune the alignment of the leg joints. The goal is to align the leg to be perpendicular to the chassis and for the knee to form a perfect right angle. (See Figures 8-2 and 8-3.) We are assuming that you have your servos plugged into the appropriate pins, according to the assembly guide. Select a hip servo by clicking on the corresponding radio button. Move the Offset slider around until the joint is aligned. You can move it using the scroll wheel or arrow keys for fine tuning. After aligning the hip servo, move on to the next closest servo to the body. Finally adjusting the knee servo last. Align the rest of the robot's legs in this manner. When you move to another servo, the previous one is marked as red to show your progress.
|
Figure 8-1. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Figure 8-2. |
Figure 8-3. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 9. Mount the PS2 cable to the chassis. We used some double-sided foam tape to stick the PS2 cable on the bottom of the robot as shown. This makes it easier to swap controllers if needed. |
Figure 9. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Step 10. Controlling the
Robot The default is Walking mode 1. Use the Left joystick to move the robot around without turning (this is called "translation"), and the Right joystick rotates the robot as it moves. Up and Down on the D-Pad increases or decreases the height of the body. The Triangle button puts the body at 35mm from the ground. The Circle button puts the body onto the floor in a 'resting' position. Press Triangle or Up on the D-Pad to raise the body. There are four special "body moves" functions that are triggered by pressing L1, L2, Circle, or X. While in one of these modes, the hexapod does not walk. The joysticks and some buttons change function depending on which mode is toggled on; see Table 10 for details. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
PS2 Controls Table 10. |