EH3 & EH3-R / ServoPod / PS2 Wireless Control Rev. 2.

Updated 09/27/2005

This project is based on code that was written and modified by Mike Keesling and Randy Dumse. Thanks guys!

This software has been verified to work with the MadCatz wireless Playstation 2 controller only.

The robot's motion can be controlled either with the MadCatz Playstation 2 controller or from the serial port on the ServoPod. We will publish the format for the serial port control soon. In the meantime this tutorial will use only the MadCatz Playstation 2 controller.


Image of Hexapod 3 & 3-R.

 
Step 1.
In order to control the robot we need an input device. Plug in the Playstation 2 controller connector cable as shown in Figure 1. You can also refer to Table 1-1. Then plug the controller receiver module into the connector cable. Make sure you have fresh batteries in your controller.
 
Connect to...

ServoPod J1 Pin Number & Description

Connect to...
PS2 - GRN +VIN P1 P2 SOUT  
  GND P3 P4 SIN  
  RST' P5 P6 ATN'  
PS2 - YLW +5V P7 P8 GND PS2 - BLK
PS2 - BRN PA0 P9 P10 PB0  
PS2 - ORN PA1 P11 P12 PB1  
PS2 - BLU PA2 P13 P14 PB2  
PS2 - BLK PA3 P15 P16 PB3  
PS2 - VIO PA4 P17 P18 PB4  
  PA5 P19 P20 PB5  
  PA6 P21 P22 PB6  
  PA7 P23 P24 PB7  
Table 1-1

Figure 1.
 
Step 2. Download the Program
Download the program from Table 2-1. Now go to the terminal program. By typing [alt] D the terminal program will bring up an Open File Dialog. Just click to where you have put the EH3-R program and click Open. It will then be transferred to the ServoPod. FYI, you can then do one of the following three options to start the program.

Type STARTUP
Press Reset on the ServoPod
Cycle the ServoPod's power

Download

Description

eh3rpsx1.txt ServoPod walking code
(Round only)
eh3ipsx1.txt ServoPod walking code
(Inline only)
eh3irpsx.txt ServoPod walking code
(Directive for Inline or Round)
eh3rpsxr.txt ServoPod walking code
(I and R, with rotate)
Table 2-1
 
Step 3. Use the Program
Make sure your PS2 controller is turned on. Turn on the ServoPod. Press the Analog / Digital button on the MadCatz controller to put it into Analog mode. This is verified by the illumination of the red LED.

Now select a gait, use the Triangle button for a Tripod gait. The robot should start walking right away. Use the Up and Down on the D-pad (the cross-shaped pad on the left) to adjust the body height. Use the Left and Right on the D-pad to adjust the leg lift. The speed and direction are controlled by using the Right joystick. A light touch on the joystick will provide you with the best results.

Button

Gait / Function

Triangle (Video) Tripod (Three up at a time)
Circle (Video) Circular (One up at a time)
X (Video) Opposite (One up at a time)
Square (Video) Opposite (Two up at a time)
R1 Faster Square
R2 Faster Circle
L1 Faster X
L2 Faster Triangle
D-pad Up / Down Body height
D-pad Left / Right Leg lift
Right Joystick Speed and Direction
Table 3-1
 
Step 4. Serial Commands
Make sure your ServoPod is connected via the serial port. You may want to set the bot on something so that the feet aren't touching the ground. Turn on the ServoPod. The screen should say the following:

WALKER CODE EH-3R
STAND UNTIL GAIT SELECTED AND MOVEMENT COMMANDED
COMMAND MODE KEYBOARD UNTIL RETURN <CR>

Note, you must use CAPITAL letters for all commands; lower case won't work. Now select a gait. Use the "G" key followed by 1-8 for different gaits. Ex: "G3" would be gait three. "G0" (g-zero) is stop, and "GO" (g-oh) is resume with previously selected gait. If no gait has been selected before "GO" (g-oh) is commanded, then gait 1 will be used.

The robot should start walking right away. Use the "W" and "Z" keys to adjust the body height. Use the "A" and "S" keys to adjust the leg lift (reach). Use the "I" and "M" keys to adjust the speed (stride). Use the "J" and "K" keys to adjust the direction (vector).

Active Key

Function

+
-         
N/A
N/A
W
A         
          S
Z
HEIGHT increase by .05
REACH decrease by .05
REACH increase by .05
HEIGHT decrease by .05
R
D         
          F
C
N/A (rotation)
N/A (rotation)
N/A (rotation)
N/A (rotation)
Y
G         
          H
B
N/A
Pick gait. (See text.)
N/A
N/A
I
J         
          K
M
STRIDE increase by .05
VECTOR decrease by .05
VECTOR increase by .05
STRIDE decrease by .05
Table 4-1