The Complete H3/H3-R Tutorial (Mini-ABB) v1.0

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

The Complete H3/H3-R Tutorial v1.0

Updated 04/30/2009.

The purpose of this guide is to use the PowerPod program to calibrate the servos and create a custom Basic Atom 28 program for PS2 remote control. You will also be able to create a program for autonomous or serial 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 the Madcatz, Pelican, Hiteck and Lynxmotion wireless controllers. However, we cannot guarantee that future versions of the non-Lynxmotion controllers will work.

Hardware:
  - SSC-32 / Bot Board / BASIC Atom 28
  - PS2 Cable / PS2 Wireless Controller -OR- RC-Style Stick Radio
  - Hexapod 3 / 3-R

Software:
  - PowerPod (download)
  - Basic Micro Atom IDE
    - Note, only ver 2.2.1.1, 5.3.0.0, and 5.3.1.3 are supported.
    - Note, if your Basic Atom chip has a "Rev-D" label on the bottom, you must use IDE v5.3.1.3.

Resources:
  - Close-up of SSC-32 (eh3r11.jpg)
  - Close-up of Bot Board (eh3r12.jpg)


Image of AH3-R.
 

Image of BH3-R.
 

Image of BH3.

Image of CH3-R.
 


Step 1.
Download the PowerPod program from here. Just unzip the zip file and run the setup.exe file. This will automatically create an icon on your desktop so you can open PowerPod. When the program is opened, click on "Help" and review the manual. It's a good idea to familiarize yourself with the interworkings of the program before proceeding with the tutorial.

Figure 1.
Step 2.
Set the robot up on a stand such as a CD spindle. Connect the DB9 cable to your PC and to the SSC-32. If your PC does not have a serial port, you can use a quality USB-to-Serial adapter cable. Install a 6vdc battery to the quick-connect cable. You can turn on the power to verify that the green LED on the SSC-32 lights up. Note, this 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 valid data. After that, it will blink when receiving data. The servos may jump but will not hold position yet. Consult the PowerPod manual if you have trouble connecting.
 

Figure 2-1.

Figure 2-2.
 
Step 3.
Click "All=1500" to enable the servos. The robot's legs should move quickly into position as in Figures 2-1 or 2-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.

Figure 3.

Step 4.
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 the knee to form a perfect right angle. (See Figures 4-1 and 4-2.)

We are assuming that you have your servos plugged into the appropriate pins, according to the assembly guide. Select the servo channel 0 by clicking on the radio button below it. Click once on the Offset slider bar to select it, but don't move it! You will move it using the arrow keys on your keyboard for greater accuracy. Start tapping one of the arrow keys slowly until you notice the associated joint move on the robot. After all joints are adjusted to your liking you can save the .hcf file.

Note, the image in PowerPod represents the inline version, but the servo channels are the same for the round version.


Figure 4.
 

Figure 4-1.

Figure 4-2.
 
Step 5.
Open the master .pmp program. "H3 VX.36 - Master.pmp" is the current version as of the writing of this document.

IDE: Choose the appropriate version.
Control: PS2, Autonomous, or Serial.
H3 Legs: 3DOF-A, 3DOF-B, 3DOF-C, or 3DOF (Old).
H3 Body: Round or inline.
PS2 sticks dead zone: Small, Normal, Large.
Tibia Angle: + values set foot tip away from knee. Value of +20 recommended for 3DOF-C leg.
Auto Legs Down: If enabled, lowers lifted tripod after period of inactivity.

Remember to click save to update your config file! Then click on "Build Basic Program" to create your custom program.


Figure 5.
 
Step 6.
We're now done communicating with the SSC-32 from a PC, so we need to change the settings to communicate with a Basic Atom 28. Change the baud rate jumpers on the SSC-32 to 38.4 kbaud. Remove the DB9-enable jumpers and install the DC-01 with the narrow (0.1") spaced connector on the TTL serial communication posts. The black wire is closest to the edge of the board, and the yellow wire is on RX.

Figure 6.
 
Step 7.
For the round chassis, remove the 3/8 x 4-40 screws that hold the SSC-32 in place. Install the Bot Board as illustrated in Figure 7 using the same screws. Attach the red and black wires from the SSC-32 to the VS input, with black on (-) and red on (+).

For both chassis styles, make sure that the ABC buttons / LED jumpers are removed. Install the following jumpers: VS=VL, speaker enable, VL to I/O 4-7 bus. Install the DC-01 to I/O P15, where black is closest to the outside of the board and yellow is on the I/O pin. Consult the manual for the Bot Board if needed.


Figure 7.
 
Step 8.
Install the Playstation 2 cable as illustrated in Figure 8-1 and 8-2.


Figure 8-1.


Figure 8-2.

Step 9.
Use some double-sided foam tape to stick the PS2 cable on the bottom of the robot as shown. This will make it easier to swap controllers if need be.

Figure 9.
 
Step 10.
Download the BASIC Atom IDE. Install and run the IDE to allow programming the chip.

Connect the serial data cable to the PC's serial port. This can be recognized by having 9 pins that stick out. Connect the other end of the serial data cable to the Bot Board's DB9 port. Note, you can also use a BAFO BF-810 or IOGear USB-to-Serial adaptor.


Figure 10.
 
Step 11. Download the Program
Download the program from the PowerPod program into the BASIC Atom IDE. Program the Atom.
Install the PS2 controller receiver into the PS2 cable on the robot, and apply power. If all is well, you should hear a few short beeps, the legs should snap to position, and slowly lift the body up. Then the two tripods will lift and lower once. At this point, if you properly calibrated the servo offsets, the legs should be perfectly aligned. Remove power to the robot.
 
Figure 11.

Step 12. Controlling the Robot
Make sure your PS2 controller is turned on. The software switches the controller to analog mode. However, some controllers may need to be put into analog mode manually. Apply power to the robot. If you hear a continuous beeping, the PS2 controller is not connected to the Atom properly or is not functioning. You can test the controller with a Playstation 2 to verify that it is working.

The shoulder buttons (L1, L2, R1, and R2) are used to adjust the height, leg lift, and gait speed quickly. The "Tile Floor" setting (L1) uses a fast speed and slightly lower leg lift. "Tall Grass" (R1) uses maximum ride height and leg lift, and slower speed. "Body Low" (R2) lowers the robot's ride height.

The default is Walking mode. Use the Right joystick to move the robot around without turning (this is called "translation"). The Left joystick's X-Axis (horizontal) rotates the robot as it moves. The Left joystick's Y-Axis (vertical) changes the robot's ride height (L3 locks ride height). The Triangle button lowers the body to the ground then turns off all the servos; press Triangle again to turn the servos back on and reset to default settings. The Circle button returns the robot to setup position (all servos at 1500mS). The X button triggers the robot's attack, and Square prompts the robot to learn to fly. You can limit the speed of walking via Left and Right on the D-Pad. Up and Down on the D-Pad increases or decreases the amount of leg lift. Start toggles extra leg lift at the knee (knee angle shift).

Press Select to switch between Walking mode and Body Move mode. In Body Move mode, the right joystick moves the body horizontally (two axis rotation). The left joystick has four different formats. Mode 0 affects height and rotation. Mode 1 affects height and side-to-side tilt. Mode 3 affects front-to-back tilt and rotation. Mode 4 affects two axis tilt.

By attaching a servo to Pin 31 on the SSC-32, the servo will automatically pan in the direction of walking. The default is limited to 180° using a standard servo, and will mirror the direction when walking backwards. If a 360° geared servo is used, the software can be configured to use the entire range of motion by uncommenting that section of the program.

By attaching servos to Pins 29 and 30 on the SSC-32, a manual pan and tilt or Little Grip (rotate, open/close) can be added. Use R1/R2 and L1/L2 to control the servos. Note, this function is only available in Body Move Mode.

Button

Walking Mode (default)

Select Switch modes
Right Joystick Speed and Direction for translation
Left Joystick X-Axis: Rotational movement
Y-Axis: Ride height
L1 Preset: Tile Floor
L2 Preset: Default
L3 Locks ride height
R1 Preset: Tall Grass
R2 Preset: Body Low
R3 Horn
Start Knee angle shift
(Max ground clearance)
D-Pad L and R Left: Speed increase
Right: Speed decrease
(Fast <- Normal -> Slow)
D-Pad U and D Up: Leg lift increase
Down: Leg lift decrease
/\ Triangle Lowers body, then removes servo pulses. Press again to return to walk mode (cold start).
O Circle All servos = 1500mS
X "Attack Mode"
[] Square "Learning to Fly"

Button

Body Move Mode

Select Switch modes
Right Joystick Move body horizontally
(two axis translation)
Left Joystick (See text)
L3 Change Left Joystick function
(See text)
R3 Horn
D-Pad L and R Left: Speed increase
Right: Speed decrease
(Fast <- Normal -> Slow)
D-Pad U and D Up: Leg lift increase
Down: Leg lift decrease
(Affects Walking mode only)
/\ Triangle Lowers body, then removes servo pulses. Press again to return to walk mode (cold start).
O Circle All servos = 1500mS
X "Attack Mode"
[] Square "Learning to Fly"
Table 12.

Step 13. Autonomous Program Information
You can use this program to create your own autonomous program or integrate your own remote control code. Just edit the lines in movequery sub routine. The variables that effect the motion of the robot are as follows:

Walking speed is defined by the XSpeed and YSpeed variables. The XSpeed variable has a range of 120 (forward) to -120 (backwards). The YSpeed variable has a range of 120 (right) to -120 (left). Rotation is named Steering. It's not really steering because if you try to turn while both XSpeed and YSpeed are 0, the robot will rotate in place. The range is 20 (right) to -20 (left) for steering and the speed of rotation is proportional to the value. The body height is set by the Height variable and also has a range of -25 to 25.

For this version, to alter the LegUpShift (leg lift), you can utilize a range of 20 (close to floor) to 70 (about 2.5" from floor). If LegUpShift > 45 the tripod Gait is modified to allow extra vertical movement and GaitSpeed is limited to 8-4 range. Also, you'll have to move the body higher (by setting Height to -15 or -20 for example). If LegUpShift is close to 70 it's recommended to use a 8-5 range for GaitSpeed. (If GaitSpeed is too fast, there won't be time for the extra vertical movement.)

To use it like a car, decrease XSpeed (from 0 to -120) to go forward, then use the steering variable to turn, this way, the "head" will always look straight in the direction it walks. To use crab walk use only XSpeed and YSpeed. The Head will always look in the same direction when controlled this way.

 
Step 14. RC-Stick Radio RC (Requires Atom PRO)
Note, this program is for the round chassis only!

This customer-submitted program is a modification of Laurent's code for PS2 control converted to be used with an RC-style stick radio remote control.

This program is verified to work with a Multiplex Royal Evo 9 (and probably 12). There are many different types of RC transmitters, and every type has its own limitations. We do not know if other types of RC controllers will work.

This program uses a 6 channel RC receiver. When one function (rotation, height etc.) of the robot is assigned to one RC channel, only 6 functions can be controlled. That is not enough. The basic functions, rotation and transition (2 axis), will be on dedicated channels. RC1 and RC2 for forward/backward and left/right, RC4 for rotation. The rest of functions should be controlled by only 3 RC channels. 2 RC channels code function and last RC channel provides value for height or legupshift or speed. One three state switch on the transmitter has been assigned to RC channel 5, one three state switch to RC channel 6 and one slider to RC 3. See Table 14-2 for details on these functions. It is quite complicated but with experimentation you should be able to understand how it works.

Download

Description

eh3r6pro.zip RC Stick Radio Program
Table 14-1
 

RC5

RC6

Description

Note
2 2 Do nothing Both 3-State switches are in middle position
2 1 Attack pos --
2 3 Standby pos --
1 2 Do nothing --
1 1 Speed +,- RC3 provides value for speed change
1 3 Legupshift +,- RC3 provides value for legupshift change
3 2 Do nothing --
3 1 Fly pos --
3 3 Height +,- RC3 provides value for height change
Table 14-2
 
Step 15. Alternate Powering Configurations
Consult the documentation for the Bot Board and SSC-32 to explore different options for powering the servos and electronics. 6vdc is the recommended voltage for the servos. A single 9vdc battery can be used to power all of the VL (5vdc logic) regulators. This will increase the run time as the servo batteries still have sufficient power for the servos even after the voltage is too low to power the VL regulators. Experiment and have fun. 
Tags:
Created by Eric Nantel on 2024/07/03 09:20
Copyright RobotShop 2018