VEX Robotics - Hexbug Spider - Beyond the basics


In this post I want to talk about Hexbug Spider programming, electric/electronic components and various findings related to this robot.

1. Motors

- geared down DC motors

- form factor - the motor enclosure and shaft are mechanically compatible with VEX IQ construction system.

- connector to Brain - motors are connected to the Brain with a custom three pins connector. Orientation of this connector is not critical, it can be inserted both ways with the only effect of reversed motors operation.

- operating voltage - from my measurements was 4.3Volts, which is the voltage supplied by the 3 X AA batteries from the Brain box.

- operation mode - motors are powered from Brain box and can be turned in both directions at two speeds each. Possible states are:

                          - STOP

                          - Speed 1 - lower

                          - Speed 2 - higher (I don't have RPM numbers yet) 

2. Sensor

- form factor - the sensor enclosure is mechanically compatible with VEX IQ construction system.

- connector to Brain - IR sensor is connected to the Brain box with a custom three pins connector. Orientation of this connector is important, it can NOT be inserted both ways. This connector have different shapes for each pin in order to prevent (or at least to make it harder) a wrong connection.

- operating voltage: 3V

- detection range: 40-50 cm

- operation mode - when robot runs in autonomous mode, the IR sensor become operational. I did not pick any readings on “Signal” pin when robot is in manual mode.

If no obstacle is detected the voltage between “+3V” pin and the “Signal” pin is zero.

When a detection occured, the voltage between “+3V” pin and the “Signal” pin become +3V. So that means this sensor’s output is HIGH when an obstacle is detected and LOW when it don’t sense anything, the output is not a continuous analog voltage.

3. Brain

- form factor - the Brain enclosure is mechanically compatible with VEX IQ construction system. Unfortunately the compatibility is only mechanical because VEX IQ connectors are different from Hexbug ones and I assume communication between components is different too.

- connectors - Brain have four connectors, two for motors and two for sensors, although only one sensor is used in this case. Also the Brain box have a bidirectional 2.4GHz wireless link with the Remote Controller.

- operating voltage - 3xAA batteries, so around 4.5V.

- operation mode - Brain box have a push button for Start/Stop and a green LED for status. After power up, Brain looks for the Remote Controller and after the link is established the status LEDs of both Brain and controller blink synchronously.

- programming - for programming the Brain box include a DIP switch, which is a group of six on/off micro switches used to modify the robot behavior when running in autonomous mode.

Instructions manual did not include the programming guide but it can be found on Hexbug website, I put it bellow.


At this point things became a little more complicated, starting with instructions manual itself. There are two contradictory images about motors connection:

and this one:

The connectors for motors are switched from one picture to the other. I choose the second picture to connect motors.

Unfortunately none of the switches combinations from programming sheet match robot behaviour.

To enter autonomous mode, on Remote Controller move de mode selector switch to position "A" and power the Brain box. To start the robot, move up Right controller button, towards the [ > ] (play) sign. To pause the robot in autonomous mode, move Right button down, towards the [ | | ] (pause) sign.

Next I'll show you some useful combinations I found during programming test:

Brain ports configuration:

   - IR sensor -> Sensor port 1 

   - walking motor -> Motor port 1

   - turning motor -> Motor port 2

- Setting no. 1


   What it does:                                           What should it do acc. to programming sheet:

- Motor 1 (walk) - Stop                                            Motor 1 (walk) - Stop

- Motor 2 (turn) - Stop                                             Motor 2 (turn) - Start

Setting no. 2


What it does:                                           What should it do acc. to programming sheet:

- Motor 1 (walk) - Stop                                            Motor 1 (walk) - turn slow

- Motor 2 (turn) - turn slow                                       Motor 2 (turn) - Start

Setting no. 3


What it does:                                           What should it do acc. to programming sheet:

- Motor 1 (walk) - Reverse                                            Motor 1 (walk) - reverse

- Motor 2 (turn) - Stop                                                  Motor 2 (turn) - Start

I'll continue testing with motors connectors swaped to see if I can get more useful combinations or match somehow the programming sheet.



Swap motors connectors did not help. Somehow I expect that because even stop commands did not match.

After a couple of hours of testing I managed to compile a detailed list of DIP switch combinations, see it bellow:


The most useful combinations are :

      - No.4, No.13 and No.14  - this is the best obstacle avoidance mode so far because direction is changed in small steps.

      - No.3 - this is a fair obstacle avoidance mode, direction is changed in big steps.

      - No.2, No.8 and No.63 - when sensor activity is detected robot start to move backwards but head is not turned. If sensor activity is detected again, walking direction is changed again, that means robot start moving forward again.

       - No.5, No.62 and No.64 - when sensor activity is detected robot stops and wait until obstacle is removed then continue moving forward.

      The other combinations I found so far does not generate useful behaviors for Spider mode. However, applications of this kit are not restricted only to Spider build. If someone is going to build something else from this kit, the combinations which are not good for Spider may be useful for these builds. Bellow is a brief map of DIP switch combinations:


    In this update I want to discuss a little about mechanical side. The mechanical side of this robot is quite simple and efficient using only 2 motors and 4 gears to drive six legs. Legs are split in two interleaved groups of three legs each.

    To achieve the gait, one group of 3 legs is lift off the ground and moved forward, whilst the robot is sustained by the other group of 3 legs. Then the first group is put on the ground and the other one is lifted and moved forward and then the whole cycle is repeated.

     As long as all legs are on the ground, weight is equaly distributed on legs and internal mechanics. But when one group of legs is raised from the ground, the whole weight of robot rest only on the axles of the two large gears. These axles are made from a quite soft plastic and bend under robot weight. This leads in some cases to friction with chassis and only partial contact between gears. If axles will be made from a stronger material these effects will be significantly diminished.




I see the best practice is to "park" the robot on all six legs to avoid gears axles stay in bent position for too long.

This post is a work in progress and I'll update it as soon as I have something new.

 All the best


This is great!

Superb exploratory work buddy!

I had spotted the confusing motor connection images and wasn’t sure which one to follow; I think I opted for the first one ha ha!

I really can’t wait to get the last leg on and to get playing researching! :slight_smile:

Thank you! I know this is a little old now but I got a set of the Vex 4 in 1 for a good price on eBay and am enjoying building each one. Your work on the DIP switches is helpful so again, thank you!