Robodyssey Mini Roach User manual

2
2. Mini Roach Kit Contents
1Roach Body 6 Center Servo Support
2Primary Legs (4) 7 Small Screw Bag
3Center Legs (2) 8 Linkage Bag
4Servos (3) 9 Pivots and Spacer Bag
5Roach Head 10 Long Linkages

3
Part 7 Small Screw Bag
18 6-32 3/8inch screws (4)
18 4-40 3/8inch button heads (4)
18 4-40 ¼ inch button heads (2)
18 6-32 ¼ inch button heads (8)
Part 8 Linkage Bag
11 Nylon Ball Sockets
12 Steel Ball Ends
13 2-56 Nuts
14 Mid (3) and short (1) Threaded Rod
Part 9 Pivots and Spacer Bag
15 Female Binder Post (6)
16 Male Binder Screws (6)
17 1/8x ¼ inch Nylon Washers (6)

4
3Assembly Instructions
Assembly of the Mini Roach kit will take you about 60 minutes. Be sure to
look up the proper part for each step, indicated by the number next to the
part name which corresponds to the pictures in “Mini Roach Kit Contents.”
Some Basic tool and supplies are required for assembly, including:
-Phillips Screwdriver
-Needle Nose Pliers
-Regular Screwdriver
-Allen Wrenches
Leg Preparation
Figure 1
Figure 2
Figure 3
Lay out and arrange the body and legs.
Attach Ball Pins (12) using the Small Nuts (13) to the
holes in the Center Legs (3). Note that one leg has two
ball pins, while the other only has one. Assemble as
shown in Figures 2 & 3. Take care not to over-tighten
the ball pins.

5
Figure 4
Figure 5 Figure 6
Figure 7
Figure 8
Now attach six Ball Pins (12) using the Small Nuts (13)
to the holes in the Primary Legs (2). Note that one pair
of legs has two ball pins each, while the other pair only
has one ball pin per leg in the innermost hole.
Assemble as shown in Figure 4.
Insert a Female Binder (15) as shown in Figure 5
and 6.
Place 1/8 Nylon Washer (17) over the Binding Post
(15). See Figure 7
Place a Side Leg (2) over the Binding Post (15) and
Washer(17). Pay close attention to the orientation of
the roach. The front of the Roach has two small head
mounting holes. A front leg has only one ball joint.
See arrows in Figure 8.

6
Figure 9
Figure 10
Figure 11
Figure 12
Secure the leg in place with the threaded portion of the
Binding Post (16). As shown in Figures 9 and 10. Care
should be taken as to not over tighten the screw. The leg
should be able to turn with little resistance.
Repeat the above steps until all 4 Side Legs (2) are installed.
As shown in Figure 11.
Insert the smooth sided portion of the Binding Post (15)
into the center holes of the Roach. Make sure the
Binding Post opening points toward the front of the
Roach as shown in Figure 12.

7
Figure 13
Figure 14
Figure 15
Place a 1/8 inch Nylon Washer (17) over the Binding
Post (15). See Figure 13.
Start by attaching the leg that has only one ball pin.
Orient the leg such that the ball pin points toward the
back of the Roach body. The back of the Roach body is
the end with the rectangular openings cutout for servos.
Then, use a long screwdriver to gently tighten the
threaded portion of the binding post while securing the
backside from rotating as shown in Figure 14.
Repeat the above step with the remaining leg as shown
in Figure 15.
Always check the free movement of the legs. The legs should be able to swing
freely without much side to side play. If the leg moves with much resistance, simply
loosen the binding screw securing that leg. If the leg flops around loosely, simply
tighten the binding screw. Binding post can ware over time. They are commonly
available at most hardware stores or building centers.

8
Attaching the Leg Linkages
Figure 16
Figure 17
Figure 18
Figure 19
Servo mounting instruction
Attach the two Mid Legs together as shown in Figure 17.
Start by attaching two Ball End Sockets (11) to either side of a
Mid Length threaded rod (14) as shown in Figure 16.
It is likely you will have some adjustments to make in
the length of the linkage. As indicated by the arrow in
Figure 18, this robot has one leg off the ground. By
tightening the Ball End Sockets on the rod, the overall
length becomes shorter. Tweak with the rod length until
a perfect balance is attained and all six legs are on the
ground as shown in Figure 19.
Note: It is not recommended to rotate any servo by turning the horn!
Robodyssey recommends centering servos electronically. See appendix A for a simple
software routine to center servos connected to a Robodyssey advanced motherboard
equipped with a Basic X processor. Always exercise caution when running a servo the first
time. An overdriven servo may strip its gears on the first run.

9
Figure 20
Figure 21
Attach the last centered servo to the back of the Center Servo Support piece (6)
using four 6-32 x 3/8 inch screws (18) as shown in Figures 22 and 23. Be sure to test
the orientation of the servo prior to setting it in. The servo needs to have its drive
spline on the opposite side of the free Center Leg ball. Take a look at Figure 24. The
arrow points to the leg that has the available ball.
Figure 22 Figure 23
Repeat with the other side. You should now have a robot
that looks like the one in Figure 21.
Insert a centered Servo (4) into one of the rectangle cut
outs in the rear of the Roach. Secure it in place with four
6-32 button head screws (21). See Figure 20

10
Figure 23
Figure 24
Figure 25
Connecting the linkages
Screw two nylon Ball Socket Ends (11) onto either end of a Long threaded rod (10)
as shown in Figure 26.
Figure 26
Attach and secure the Center Servo with four 4-40 3/8
inch button head screws (19) as seen in Figure 25.
Place a servo horn with a ball securely attached to the
center hole on the servo spline. With the servo in center,
place the horn over the shaft such that the horn points in
the direction of the arrow. Be sure to secure the horn in
place with a small servo screw.
Center Servo in place. Note: the arrow points to the leg
with the attachment ball. If the Servo horn is on the
same side as the available ball, the robot will not
function. See Figure 24.

11
Figure 27
Figure 28
Using two 2-56 nuts (13), secure balls (12) onto two servo horns. We prefer to use the middle
holes on the horns. Outer holes will increase speed but decrease torque.
BlueBird Servo Horns Hitec Servo Horns (Note: 2 pieces)
Figure 29
Secure the Side Leg Servo horns and balls onto the Servos as shown in Figures 30 and 31.
Be certain to have the horns pointing as strait up as possible without rotating the servo
from its center position.
Repeat the above step until both sides are complete as
shown in Figure 28.
Place the Roach on a flat surface and position the legs
perpendicular to the body and parallel to each other.
Snap one end of the long threaded rod on one of the
inner balls. Adjust the length of the bar by tightening
or loosening the ball socket ends until the bar is the
right length to secure the legs together while
maintaining their position. See Figure 27.

12
Figure 30 Figure 31
Figure 31
Attach the linkage first to one side then to the other as shown in Figures 32 and 33.
As before, adjust the length of the rod so that as the servo arm stays in its mid point,
the leg stays in its mid point as well.
Figure 32 Figure 33
Figure 34
Figure 35
Attach two Ball End Sockets (11) to either side of a
short length threaded rod (14) as shown in Figure 34.
Attach two Ball End Sockets (11) to either side of a Mid
length threaded rod (14) as shown in Figure 31.
Attach the linkage as shown in Figure 35. As before,
adjust the length of the rod so that as the servo arm
stays in its mid point, the leg stays in its mid point
as well.

13
Figure 36
Attaching a Robodyssey Advanced Motherboard (RAMB).
(If optionally equipped)
Figure 37
Figure 38
Attach the Head (5) with two 4-40 ¼ inch screws (20) as
shown in Figure 36.
Place three ¼ inch nylon spacers on the back of the
Roach. Note: Only two will line up with holes in the front.
The third is just floating on the back and is used to hold
the board away from the aluminum. See Figure 37.
Attach the RAMB with two 4-40 ½ inch screws.
Plug the Servos into the RAMB. Make sure the signal
(the lightest colored wire) is closest to the processor
chip and the ground wire is on the edge of the board.

14
Figure 39
Figure 40
Figures 41 and 42 show the mounting of the Robodyssey adjustable Sharp bracket.
Figure 41 Figure 42
Place the Velcro strap through the body as shown in
Figure 40.

15
Plug in a battery and YEA! Your Done!
Appendix A
Servo centering code
PulseOut sends a signal out the pin X for whatever time (in this case 0.0015 sec)
‘*****************************************************************
Option Explicit
Public Sub Main()
Dim j as Integer ‘ Number of pulses the servos receives
For j = 1 to 20 ‘ Get 20 pulses..plenty to move them
Call PulseOut(5, 0.0015, 1) ‘ Servo connected to Basic X pin 5, Pin 0 on RAMB
Call PulseOut(6, 0.0015, 1) ‘ Servo connected to Basic X pin 6, Pin 1 on RAMB
Call PulseOut(7, 0.0015, 1) ‘ Servo connected to Basic X pin 7, Pin 2 on RAMB
Sleep(0.02) ‘ Time between pulses
Next
End Sub
‘*****************************************************************************
Sample walking code
'********************************************************

16
'************************ROACH**************************
'Mini Roach - Hexapod w/ Forward Sharp Sensor
'@ Version 1.0
'@ Author: Brian Patton
'@ Last Updated: Oct 15, 2003
'********************************************************
'************* Declare Constants ************************
Public Const LeftServo As Byte = 6 ‘ Left servo connected to RAMB pin 1
Public Const RightServo As Byte = 5 ‘ Right servo connected to RAMB pin 0
Public Const CenterServo As Byte = 7 ‘ Center Servo connected to RAMB pin 2
Public Const IRPin As Byte = 13
Public Const LeftServoMin As Single = 0.0019 ' Amount Back
Public Const LeftServoMid As Single = 0.0015
Public Const LeftServoMax As Single = 0.0011 ' Amount Forward
Public Const RightServoMin As Single = 0.0011 ' Amount forward
Public Const RightServoMid As Single = 0.0015
Public Const RightServoMax As Single = 0.0019 ' Amount Back
Public Const CenterServoLeft As Single = 0.0012 ' Rise in Right Leg
Public Const CenterServoMid As Single = 0.0015
Public Const CenterServoRight As Single = 0.0017 ' Rise in Left Leg
Public Const ServoCommandSleep As Integer = 10 ' 10 x 1/512 second =0.0195sec
Const ServoPulses As Byte = 15
'********************************************************
'************* Declare Variables ************************ **
Public LeftServoPos As Single
Public RightServoPos As Single
Public CenterServoPos As Single
Public SensorValue As Integer
Public SensorAve As Integer
Dim i As Byte
Dim j As Byte
Dim ContinueForward As Boolean
'********************************************************
'************* Main *************************************
Sub Main() 'Start of Main Program
Sleep(3.0)
ContinueForward = True
Do
If ContinueForward = True Then
LeftServoPos = LeftServoMin
RightServoPos = RightServoMax
CenterServoPos = CenterServoRight
Call CheckSensors()
Call SendServoCommands()
LeftServoPos = LeftServoMax
RightServoPos = RightServoMin
CenterServoPos = CenterServoLeft
Call CheckSensors()
Call SendServoCommands()
Else
Sleep(1.0)
End If
Loop
End Sub 'Main Program
'******************************************************
'****************** Check Sensors *********************
Sub CheckSensors()

17
SensorValue = GetADC(IRPin)+GetADC(IRPin)+GetADC(IRPin)
' Get three IR readings
SensorAve = Sensorvalue \ 3 ' Divide them by 3 to get the average
' Helps eliminate some error
Debug.Print CStr(SensorAve) ‘ Print value on the screen
If Sensorave > 500 Then ' See if something is too close
Call TurnRight ' Call right
End If
' End of too close scenario
If Sensorave < 250 Then ' See if something is too far like an edge
Call Backup
Call TurnLeft ' Call right
End If ' End of too far scenario
End Sub
'********************************************************
'***** Turn left ****************************************
Sub TurnLeft()
Dim i As Byte
For i=1 To 3
CenterServoPos = CenterServoLeft
RightServoPos = RightServoMin
LeftServoPos = LeftServoMin
Call SendServoCommands()
CenterServoPos = CenterServoRight
RightServoPos = RightServoMax
LeftServoPos = LeftServoMax
Call SendServoCommands()
Next
End Sub
'********************************************************
'***** Turn right ***************************************
Sub TurnRight()
Dim i As Byte
For i=1 To 3
CenterServoPos = CenterServoLeft
RightServoPos = RightServoMax
LeftServoPos = LeftServoMax
Call SendServoCommands()
CenterServoPos = CenterServoRight
RightServoPos = RightServoMin
LeftServoPos = LeftServoMin
Call SendServoCommands()
Next
End Sub
'********************************************************
'******** Backup ****************************************
Sub Backup()
Dim i As Byte
For i=1 To 3
CenterServoPos = CenterServoLeft
RightServoPos = RightServoMax
LeftServoPos = LeftServoMin
Call SendServoCommands()
CenterServoPos = CenterServoRight
RightServoPos = RightServoMin
LeftServoPos = LeftServoMax
Call SendServoCommands()
Next
End Sub
'********************************************************
'******** Center Legs ***********************************
Sub CenterLegs()

18
CenterServoPos = CenterServoLeft
RightServoPos = RightServoMid
Call SendServoCommands()
CenterServoPos = CenterServoRight
LeftServoPos = LeftServoMid
Call SendServoCommands()
CenterServoPos = CenterServoMid
Call SendServoCommands()
Sleep(2)
End Sub
'********************************************************
'******** Send Commands to Servos ***********************
Sub SendServoCommands()
Dim j As Byte
For j = 1 to ServoPulses
Call PulseOut(CenterServo, CenterServoPos, 1)
Sleep(ServoCommandSleep)
Next
For j = 1 to ServoPulses
Call PulseOut(LeftServo, LeftServoPos, 1)
Call PulseOut(RightServo, RightServoPos, 1)
Call PulseOut(CenterServo, CenterServoPos, 1)
Sleep(ServoCommandSleep)
Next
End Sub
Table of contents