MSR-H01 Hexapod + µ24-HexEngine Integration Guide
Updated: 24-Nov-2010

Read first: Safety First!

If you plan on using an p.Brain-µ24-HexEngine with your MSR-H01 hexapod, this guide will help you get up and running as quickly as possible, without having to fully understand all of the configuration settings of the HexEngine.

Print this 6 page document with the following settings: Paper A4 or Letter, Margins 0.4", Scale 66%. tested in IE7 & Firefox 3.0.1

Index
Number02 p.Brian-µ24 & Battery Switch Harness
Number02 Servo Leads & Battery
Number02 HexEngine & Terminal Communications
Number02 HexEngine Configuration
Number02 Hexapod Calibration
Number02 Waking The Hexapod!
Number02 Hexapod First Steps!
clr mms_logo

MSR-H01 Hexapod
Diagram (1) - MSR-H01 Hexapod with servos plugged into p.Brain-SMB mounted in body.

 

Servo Leads & Switch Harness

Number02 p.Brain-µ24 & Battery Switch Harness

Take a look at diagram (2) opposite and familiarize yourself with the layout of the p.Brain-µ24. We will use the following connectors in this quick start guide.

  • Servo pin headers, 6 off 4x3 way 0.1" pitch
  • CN3 The servo and logic power (green terminal block).
  • CN4 The RS232 terminal port (black RJ11 4/4)
  • JP2 The serial configuration jumper
  • JP1 The power configuration jumper

Your p.Brain-µ24 should be installed in your hexapod, with CN3 towards the posterior. JP1 should have a jumper in place in order to use the servo power supply as the logic power supply. We will be using the RJ-232 serial connector for configuration, so JP2 should have a jumper in the R position.

If you have a switch harness, install this now in the either the left or right switch hole just in front of the middle legs in the top body plate. Route the switch leads back to the posterior of the body. Strip the the ends without a connector on them and insert into CN3 power terminal, pin 3 for the VS red (positive) and pin 1 for the GND black (negative) as sown in diagram (2).

 

 
 

p.Brain-SMB
Diagram (2) - p.Brain-µ24 layout.

p.Brain-SMB + HexEngine
Diagram (3) - p.Brain-µ24 module.



Number02 Servo Leads & Battery

Next we need to route the servos to the correct servo plug on the p.Brain-µ24 and plug them in. Take time to work out the best way to route the servo leads, and make sure each lead has enough length so as not to impede leg movement or become pinched by moving parts.

Plug your servos into the p.Brain-µ24 servo connectors using diagram (4) opposite to map to the servo numbering on the p.Brain-µ24 PCB (See the numbers on the p.Brain-µ24 PCB on the inside of each 4x3 servo connector). When plugging the servo into the PCB, make sure the black lead is towards the outside edge of the PCB. Note: servo connectors 1,5,9,16,20,24 are not used for the legs. Pan & Tilt servos are listed at the bottom of the table.

Now plug your power source into your switch harness, the battery does not have to be in the body cavity at this point, but you may wish to insert the battery through the back legs, under the p.Brain-µ24. Make sure the power to the p.Brain-µ24 is off.

Note: your power source should be 4.8 or 6.0 Volts, such as a 4 or 5 cell NiMh battery pack or suitable power supply. If you are using a battery pack, make sure the pack is charged.

clr
MSR-H01 Servo Layout
Diagram (4) - MSR-H01 hexapod servo number map.
p.Brain-µ24
Channel
Leg Servo
2 Right Anterior Coxa
3 Right Anterior Femur
4 Right Anterior Tibia
6 Right Middle Coxa
7 Right Middle Femur
8 Right Middle Tibia
10 Right Posterior Coxa
11 Right Posterior Femur
12 Right Posterior Tibia
13 Left Posterior Coxa
14 Left Posterior Femur
15 Left Posterior Tibia
17 Left Middle Coxa
18 Left Middle Femur
19 Left Middle Tibia
21 Left Anterior Coxa
22 Left Anterior Femur
23 Left Anterior Tibia
1 Pan Servo
24 Tilt Servo

 

HexEngine Terminal


Number02 HexEngine Terminal Communications

Before continuing with the hexapod configuration, you will need to prop your hexapod up so that the legs can't reach the floor. To do this I suggest using one or two CD stack towers or similar as in diagram (7). What ever you use, make sure the hexapod is stable, and that the feet can't touch the ground when the femur is parallel to the ground and the tibia perpendicular to the ground (the calibration position diagram (8) )

Plug the p.Brain-RJ232 lead diagram (5) into CN4 and to an available COM port on your computer. Now you will need to launch your choice of terminal software, such as hyperterm, or the recommended terraterm for windows which can be downloaded free here.

Once you have your terminal software running, select the COM port you have plugged the p.Brain-RJ232 lead into and set the baud rate to: 115200, No Parity, 8 Data bits, 1 Stop Bit, do not worry about flow control. Switch on power to your hexapod. You should see a green LED on the p.Brain-µ24 slowly flashing. At the same time a screen similar to that shown in diagram (6) should appear in the terminal screen. If you do not see the HexEngine terminal screen, check the following:

  1. If the green or red LED on the HexEngine are not slowly blinking or illuminated: Switch off the power to the hexapod and check your power source is correctly connected. If you are using a battery, check it is fully charged.
  2. If you are using a dual supply for servo power VS and logic power VL, make sure both power supplies have their grounds connected to the GND terminal. If you are using a single supply VS, make sure JP2 is in place to supply VL from VS.
  3. If the green LED on the µ24 module is slowly flashing: check that your p.Brian-RJ232 lead is plugged in correctly at both ends. Make sure JP1 is in the 'R' position. Make sure you are selecting the correct COM port within your terminal software and the port is OPEN. Double check the port speed and configuration within the terminal software. power cycle the hexapod once you have made these checks.

Once you have established communications with the HexEngine and have a screen similar to the one in diagram (6) please move to the next step, HexEngine Configuration.

clr

p.Brain-RJ232
Diagram (5) - p.Brain-RJ232 DB9 to RJ11 serial lead.

 

HexEngine - Terminal
Diagram (6) - HexEngine Terminal Screen.

 

Tip:

TerraTerm will support up to 16 serial ports, COM1 to COM16, however, only COM1 to COM4 are listed by default, to change this you will need to edit the "TERATERM.INI" file located in the TeraTerm install directory. First make a backup copy of the file, then open the file in a text editor and make the following changes: Find "MaxComPort=4", Change to: "MaxComPort=16". To set the default port number find: "ComPort=1", change to: "ComPort=n" Where n is the port number you require. You can also set the default baud rate, find "BaudRate=9600" and change to "BaudRate=115200". And finally to tell TeraTerm to always open a serial port, find "Port=" and change to "Port=serial".

 

 


Number02 HexEngine Configuration

Now we are going to set up the basic geometry and configuration settings for the MSR-H01 hexapod within the HexEngine. Fortunately there is a built in configuration file for the MSR-H01 which greatly simplifies the procedure. First we need to enter into configuration mode, when the µ24-HexEngine boots up, it is automatically in control mode.

Entering Configuration Mode
Type @@@ followed by at least a one second pause, do not hit any other key after the last @. You should then see a message indicating that the HexEngine is now in configuration mode, if you do not get this message, check the following below:

  1. Try entering the @@@ sequence again.
  2. check that your p.Brian-RJ232 lead is plugged in correctly at both ends. Make sure JP1 is in the 'R' position. Make sure you are selecting the correct COM port within your terminal software and the port is OPEN. Double check the port speed and configuration within the terminal software. power cycle the hexapod once you have made these checks.
  3. Once you are in configuration mode, proceed to Configuring Geometry below.

Note: If you loose power at any point during the configuration or calibration process, you will need to re-enter configuration mode as described above.

Configuring Geometry
From within your terminal window, type the following list of commands: Note: each command is shown in blue upper case for clarity and followed by the ENTER key, comments are in brackets and should not be typed:

  • CONFIG (Enters configuration menu)
  • MSRH01 (Recalls MSR-H01 hexapod configuration)
  • Y (Selects YES to load MSR-H01 configuration)
  • EXIT (Exit configuration menu)
  • Y (Selects YES to save new configuration changes)

You have now configured your MSR-H01 hexapod geometry and should be back in the main terminal menu, if your configuration was successfully you should see the name "MSRH01" will be displayed under "micromagic systems ltd" at the top of the main menu. If this is not the case, repeat the configuration steps above.

Now configuration is complete, move to Hexapod Calibration.

 
 

MSR-H01 Calibration
Diagram (7) - MSR-H01 placed on CD tower in calibration position


Number02 Hexapod Calibration

Leg calibration is a very important step in the set up process, the more time spent during calibration the better your hexapod will move!

Enter the calibration menu by typing "CALIBRATE" and hitting the ENTER key. A new menu should appear and look something like diagram (7). Within this menu each joint on each leg is calibrated at a set position shown in diagram (9) and diagram (10).

All Coxa joints are calibrated at 90° to the Y axis of the body (See diagram (10)) The femur joints are calibrated parallel to the floor and the tibia joints are calibrated perpendicular to the floor (See diagram (9)).

You will see towards the top right hand side of the screen there is a leg organization table showing the anterior (front) and posterior (rear) of the hexapod, with the six legs numbered around the body. This is a top view of the hexapod, therefore leg 1 corresponds to the front right leg. You can use the number keys 1 to 6 to select the desired leg to calibrate.

Lets start by calibrating leg 1. Note: At this point your hexapod should be suspended off of the ground so that none of the legs can come in contact with the floor.

  1. Select desired leg by tapping the appropriate number key. I suggest starting with leg 1: tap '1'.
  2. Press the '+' key to globally enable servos. Note if at any point things are going wrong! press the '-' key to disable all servos, or switch the hexapod off, you can always come back to the calibration screen and start again. Remember, the '+' key is also the '=' key on a standard keyboard, so you need hold down SHIFT and tap the '+' key, or press the dedicated '+' key on the numerical keypad.
  3. Now you have six keys in three pairs to trim the leg position, Coxa trim = 'A' & 'Z', Femur trim = 'S' & 'X', Tibia trim = 'D' & 'C'. As soon as you press one of the three pairs of keys, the corresponding joint will spring into action! for this reason its a good idea to have the leg in an approximate calibration position. press these keys in this order: 'D', 'S', 'A'. You should have seen the leg fire up, Tibia, Femur and Coxa.
  4. Coxa trim: look down on the top of your hexapod, and check to see if the coxa is at 90° to the Y axis as in diagram (9). If this is not the case, use the 'A' key to drive the coxa forward and the 'Z' key to drive the coxa back until it is at right angles with the Y axis.
  5. Femur trim: take a look at the front of the hexapod and check that the femur is parallel to the ground, if it is not, use the 'S' key to move the femur up, and the 'X' key to move the femur down until parallel
  6. Tibia trim: the tibia should be at right angles with the femur, or perpendicular to the ground, if it is not use the 'D' key to move it out, and the 'C' key to move it in.
  7. Once you are happy with the leg calibration, hold down 'SHIFT' and press the 'F' key. Press 'Y' when prompted to save the calibration file.
  8. Now repeat steps 1 to 7 for each leg on the hexapod. each time you move to the next leg, the previous leg is powered off, so you can gently manipulate it out of the way if necessary.

Once calibration of all legs are complete, exit the calibration menu by holding down 'SHIFT' and pressing 'Q'. When prompted if you wish to save the calibration file, press 'Y'.

 

HexEngine Calibrate
Diagram (8) - HexEngine Calibration Menu.

 

Calibration 01

Diagram (9) - Hexapod Femur and Tibia calibration position.
Calibration 02

Diagram (10) - Hexapod Coxa Calibration Position.

 


 



Number02

Waking the Hexapod!

Your hexapod is just about ready to take its first steps! but we need to check that the calibration is correct. place your hexapod on a flat level surface with the legs roughly as positioned in diagram (11).

Now within the main terminal window type "WAKE" and press ENTER. All going well, your hexapod should stand up, and flex each leg into the position similar to diagram (1) at the top of this document. If your calibration was carried out successfully, each foot should be in contact with the ground, and taking approximately the same weight. This can be checked by gently grasping one foot at a time and gently moving the foot back and forth a few millimeters to see how much friction there is with the surface of the ground. If there is allot of difference between the ground contact and each foot, type "SLEEP" followed by the ENTER key, wait for your hexapod to power down and go back to the calibration process Number02.

If you are happy with the standing position and leg calibration, type "SLEEP" followed by the ENTER key and go to stage 7.

Note: the hexapod will automatically sleep after a given time interval of about 30 seconds. you can wake the hexapod up by typing "WAKE" and pressing the ENTER key.

clr

MSR-H01 Sleep
Diagram (11) - MSR-H01 Hexapod in sleep position.

 
 

Number02 Hexapod First Steps!

Now we are happy with the calibration and standing position will get the hexapod to walk using the built in simple control interface.

from the main terminal menu type "SIM CONTROL" followed by the ENTER key. You should now be in the Simple Control menu which should look like diagram (11). from within this screen you can control your hexapod much like a first person perspective game, using the keyboard keys: W,S,A,D,Q,E. Try the out! You can also change the hexapods gait using the number keys '1' to '4'.

This control method is a great way to get started and see what the HexEngine can do, but as the name suggests, this is the Simple Control technique, there is a more advanced control interface called the PIP protocol which gives control of body rotation, translation, proportional direction control and much more!

Note: When the p.Brain-µ24-HexEngine is powered up, it starts in this PIP control mode. If you are still in configuration mode and wish to switch back to control mode, from the MAIN menu type "PIP CONTROL" followed by the enter key.

Further information on the HexEngine configuration, PIP guide and control tutorials, see table (1):

This concludes the quick start guide

 
Configuration Guide (PDF) A guide to configuring the HexEngine
PIP protocol Guide (PDF) A guide to the PIP protocol used to send locomotion commands to the HexEngine.
PodControl Application (Zip File) Simple WIN32 application to test the various features of the HexEngine.
PodControl BB5 Project (Zip File) PodControl application project written in Borland Builder 5. Full source.
PodJoy Application (Zip File) HexEngine control application using joysticks
HexEngine Control VB.NET Project (Link) HexEngine Control application project & executable written in VB.NET by Paul Pemble
HexEngine + BS2p Tutorial 1(Link) Tutorial to demonstrate connecting a BS2p to a PS2 game pad and controlling the HexEngine via PIP commands.
HexEngine + BS2p Tutorial 2(Link) In this tutorial 2 way communications are established between the BS2p and the HexEngine, to demonstrate reading the I2C, ADC & DIO ports.
HexEngine + BS2p Tutorial 3(Link) In this tutorial, the BS2p uses two way comms to the HexEngine which is attached to an SRF08 range finder via I2C. The BS2p & SRF08 are used to add basic obstacle avoidance to the Hexapod.
HexEngine + BS2p Tutorial 4(Link) Basic obstacle avoidance using the setup from tutorial 3
HexEngine Control VB.NET Project (Link) HexEngine Control application project & executable written in VB.NET by Paul Pemble
HexEngine Java App. for PS3 controller (Link) untested The purpose of this program is to enable control of a MSR-H01 Hexapod through a Sony PS3 Six axis (or compatible) handheld controller.
By Peder Madsen

Table (1)