Arduino Controlled Hexbug Spider

35K1227

Intro: Arduino Controlled Hexbug Spider



This is a small walking robot that uses an Arduino nano & an ultrasonic sensor for range finding.  I started off purchasing a small plastic walking robot with a IR remote control, they are available at radioshack for $25.00.  With this you can make the robot autonomous & obstacle avoiding.  My project began by opening the casing,  I found two IC's on the control board, a motor controller & on the other side a small processor.

I was able to find a PDF file for the motor controller which is a ST1155A (low voltage, bi-directional motor driver), using this I was able to write a small program for the Arduino.  In order to control the motor driver I would need to remove the processor on the other side which is surface mounted to the board.  To do this I ordered a product called, "Chipquick", which is a low temperature solder for removing SMD (Surface Mount) components.  There are lots of videos on how to use the chipquick and I found it easy to work with.  Now for the most complicated step of the process, you need to attach four wires to four pins on the motor driver.  These pins are tiny & I used magnet wire which worked great for me & suggest using.

This is the PDF file for the motor driver in case you are interested:
http://www.siti.com.tw/product/spec/Motor/ST1155A.pdf

This is how the motor driver operates.  There is an input pin on each side & if you send it a HIGH signal it turns one way. If you send it a LOW signal it reverses the motor direction.  Also there is an enable pin on each side, to turn the motor on send a HIGH signal, and to turn it off send a LOW signal.  All of this is explained in the datasheet for the motor driver but I figured it would be worth mentioning.  So the four pins on interest on this chip are IN1 (input 1), IN2 (input 2), ENA1 (enable 1), ENA2 (enable 2).  These pins will allow you to turn the motors on & off and set the direction that they travel in.

Motor Driver IC     -    Arduino Nano
-------------------------------------------
Pin 2, ENA1---------------Digital Pin 4
Pin 6, IN1------------------Digital Pin 2
Pin 13, ENA2 -------------Digital Pin 5
Pin 9, IN2------------------Digital Pin 3

In regards to power, the bot comes with three coin cell batteries that combined produce 4.5V.  The Arduino requires a range of 6V-12V.  To solve the power requirements I used the battery pack from the remote control that comes with it, it contains 2 coin cells producing 3V. I also cut the remote controls circuit board in half also & that is what connects the batteries together.  I connected the 3V battery pack in series with the batteries inside the robot to produce 7.5V.  By doing it this way 4.5V powers still connects to the motor control board and 7.5V is connected the the VIN (voltage input) on the Arduino along with ground.  The ultrasonic ping sensor is connected to the 5V line on the Arduino. There are two switches, one comes with the robot and still controls power running to the motor controller.  The other switch is connected in between the 3V battery pack & the Arduino's VIN Connection. 

Part/Cost List:
Hexbug Spider Robot     ~$25.00  Radioshack
Arduino Nano                 ~$35.00  Frys Electronics or Online
Parallax Ultrasonic Ping  ~$29.99  Radioshack
SPST swtich                   ~$1.00    Radioshack or Online
_______________________________________________
Total:                               ~$100.00 after tax



7 Comments

Replace the Parallax Ping with a HC-SR04 and you save yourself atleast 25$.

I hadn't seen those Hexbot spiders before - That's a pretty neat hack.

Are there just the two motors in there?  How are they connected to the legs.  I can't work it out from your video and the Hexbug one.
You are correct there are two motors inside. One controls the legs & the other controls the head. Both motors are connected to a series of plastic gears to handle walking mechanically. It has 360 degree movement of the head and can walk in any direction, you can also turn and move forward/backward at the same time.

Thanks for the reply.
So, does the head rotation modify the leg movement to allow it to turn?
(I think I'm going to have to buy one of these #;¬)
It's really interesting how it works but not as simple as one might think.

I believe the toy is based off something called a, "Jamius’ walking mechanism" after the guy who came up with it I think.

There is a youtube video & in the comments the inventor describes how it works.
http://www.youtube.com/watch?v=is7x_atNl94

I hope this answers your question & have fun.
Fascinating. THIS is a good video.
It's amazing how he gets that degree of articulation and movement from 2 motors whereas most other designs I've seen use several servos.  (I've ordered one #;¬)