Hexapoduino: Tiny Hexapod 3D Printed, Arduino Controlled




Introduction: Hexapoduino: Tiny Hexapod 3D Printed, Arduino Controlled

A few time ago, i found out a 3d printed Micro-Hexapod on Thingiverse.
I started to work on it in the following ways:
- create new accessories/components 3D printable
- explore the possible ways to drive this hexapod.

Here the results:
- a parametric battery holder that fits perfectly on it, without screws
- a parametric pen holder that transforms this hexapod in a drawbot!
- you can drive this hexapod via bluetooth, from your smartphone (here you can find also an Android App!) or from your PC
- you can drive this hexapod by using your nunchuk
- the hexapod can act as a light follower (thanks to 2 LDR)

Now you'll see how to build a full working hexapod!

Step 1: BOM

You need the following PRINTED PARTS:
1x Micro-Hexapod
http://www.thingiverse.com/thing:5156 (by ljon)
http://www.thingiverse.com/thing:34796 (remixed by carlosgs)
files: body.stl & legs.stl

1x battery clip for 4AA
http://www.thingiverse.com/thing:109807 (by me)
file: battery_clip_4AA.stl

1x Pen Holder 
http://www.thingiverse.com/thing:110331 (by me)
files: PenHolder_hexapoduino_front.stl & PenHolder_hexapoduino_back.stl

You can eventually print an insect head / smile / other to put in front of the hexapod, to personalize it.

You need also the ELECTRONIC PARTS:
1x Arduino Mini or Arduino UNO (or compatible)
3x Microservo 9G
4x AA batteries (better if rechargable)

Then, if you want to make a light follower robot, you need:
2x LDR
2x 10K resistor

If you want to drive you robot using a nunchuk, you need:
1x nunchuk
1x nunchuk adapter (you can buy it or you can remove from an old / broken wiimote)
1x 10K resistor

If you want to drive you robot via bluetooth, you need:
1x HC-05 (or compatible) bluetooth module
1x 2K2 resistor
1x TS2950 33 (or compatible) voltage regulator 

Step 2: Build the Hexapod

Build the hexapod is really easy.
You can fix the servo motors to the plate using hot glue.
Then using few m3 screws (6), nuts (6) and washers (12), you can fix the legs to the plate.

Use hot glue also to fix the legs to the servo motors.

Step 3: Connect Motors to Arduino and Power

Then you need to connect the servo motors to Arduino.
Servo motors have 3 pin:
- the red one is for power / vcc (5V)
- the black one is for ground (GND)
- the white one is for the signal that drives the motor itself

The central servo motor has to be connected to Arduino pin D2
The right servo motor has to be connected to Arduino pin D3
The left servo motor has to be connected to Arduino pin D4

That's all.

As already told, you can use Arduino UNO or Arduino MINI, and the steps are exactly the same.
If you want to use the Arduino Mini, look at the commented photo.
All the pin usable in this project  are explained.

Once connected the servo motors to Arduino, you can fit your Arduino Mini in the plate.

Then you need to power Arduino and the servo motors.

You can choose a 9v battery or 4AA batteries (that is better).
In this case, you need to prepare the battery holder, creating the circuit that serializes the batteries.

Step 4: First Test! ...and Assemble All the Pieces!

It's time to do the first test.

The library to use with Arduino is ArduSnake:
Download and install it.

If you don't know how to install a new library on Arduino, follow this guide:

You can use for test the code available here:
released by Thingiverse user carlosgs

Upload that skecth into your Arduino and you'll see the first steps of your hexapod :)

If you don't know how to upload sketch into your Arduino Mini, you can follow the "Programming" section here:

If the test is OK, we can proceed to learn how to drive our hexapod!

Before that, you need to upload the full featured code!

All is available (updated) here:

anyway i attach here the Arduino sketch.

After upload, assemble all the pieces: put the battery holder in the top of the plate.
You can block it simply with a rubber!

Step 5: Hexapod As a Light Follower (thanks to 2 LDR)

For this step you need:
2x LDR
2x 10K resistor

The connections are quite simple, you can look at the attached schema (LDR connection).
You can secure the 2 LDR on the top of the hexapod, to grant more light as possible.

If you point a heavy light in front of your hexapod, it will start to increase its speed.
If you point a light on the left LDR, it will turn left.
If you point a light on the right lDR, it will turn right. 
If you cover the LDRs, the hexapod will stop.

You can see in the images a monster head:)
This "mask" is based on http://www.thingiverse.com/thing:4412
This is one of the ways to customize the hexapod!
Thanks gnolo!

Step 6: Drive Your Hexapod by Using a Nunchuk

For this step you need:
1x nunchuk
1x nunchuk adapter (you can buy it or you can remove from an old / broken wiimote)
1x 10K resistor

The connections are quite simple, you can look at the attached schema (Nunchuk connection).

I reuse a connector from an old and broken WiiMote.
The 10K resistor between GND and pin D9 is used by Arduino to "see" that there's a Nunchuk connected (if you look at the skcteh you can understand how!).

You can drive you Hexapod using the joystick on the top of the Nunchuk.
The C button increases the speed, and the Z button decreses the speed

Step 7: Drive Your Hexapod Via Bluetooth!

For this step you need:
1x HC-05 (or compatible) bluetooth module
1x 2K2 resistor
1x TS2950 33 (or compatible) voltage regulator

To understand what is HC-05 bluetooth module, and how works, you can look at the guide which i published in Arduino Forum about 1 year ago:
there are 3 main section:
- hardware connection
- AT programming
- bt serial communication.
The problem is that guide is in italian language :) but there are a lot of pictures and code (i promise: i'll translate it in english).

Anyway, the connections are quite simple, you can look at the attached schema (HC-05 connection).

You need this module working as Slave, and with UART speed at bps 38400.

I made a connector based on the connections described on the schema.
I can attach to one end the BT module, and to the other end the header on the Arduino Mini .

I've developed a simple application that runs on Android < 4.2
I used AppInventor:
that is a very particular and easy development environment, maintained by the MIT!
I attached here an image of the frontend (here running in an emulator), and 2 images of the backend (you can see also the codeblock programming!).
I attached also the source of the application: you need an AppInventor account (that is free) to upload and use it!

Step 8: Hexapod Starts to Draw!

For this final step you need the Pen Holders.

These pen holders are designed (by me :)) to fit perfectly on the supports of the battery holder.

You can secure them using a rubber for each.

Then you only need to fit 1 (front) or 2 pens (front & rear), and let the hexapod free to move and move again and turn and so on.
Hexapod moves with oscillations, so the drawings are very particular!

Here a video:

More photos and video are available in my g+ gallery:

I've entered this instructable in the Arduino Contest and the Remote Control Contest.
If you enjoyed the post, please vote!
3D Printing Contest

Finalist in the
3D Printing Contest

Arduino Contest

Participated in the
Arduino Contest

Toy Contest

Participated in the
Toy Contest

Battery Powered Contest

Participated in the
Battery Powered Contest

Remote Control Contest

Participated in the
Remote Control Contest

Be the First to Share


    • Chocolate Challenge

      Chocolate Challenge
    • Home and Garden Contest

      Home and Garden Contest
    • Digital Fabrication Student Design Challenge

      Digital Fabrication Student Design Challenge



    3 years ago

    So it walks perfectly thanks for that but the Bluetooth app doesn't detect any Bluetooth devices, is the app still functioning properly or is this from my end ?


    3 years ago

    hello sir,we are working on it.but we are having issues with the code.will u please suggest us.


    4 years ago

    ------------------------ English ---------------------------

    1. I think your robot is great, he has a few for my robotics classes. When we configure the "setO ()" of each servo, it works perfectly, but when disconnecting from the PC and connecting it to its power, the servos lose their and change their initial angle, so they go back to walking badly, they will adjust each servo , I do not know what else to try, any song was fantastic, thank you very much.

    PS: I have taken the liberty of creating one more piece and modify the legs to avoid the silicone and to be able to support legs and servomotors.

    -------------------- Spanish -----------------

    1.me parece genial tu robot, he impreso unos cuantos para mis clases de robótica. Cuando configuramos el "setO()" de cada servo, funciona perfectamente, pero al desconectar del pc y conectarlo a su alimentación, los servos pierden su configuración y cambian su angulo incial, por lo que vuelven a caminar mal, hay que volver a ajustar cada servo, no se que mas probar, cualquier ayuda sería fantástica, muchas gracias.

    PD: me he tomado la libertad de crear una pieza mas y modificar las patas para evitar la silicona y poder aguantar patas y servomotores.

    modificacions hexapoduino.jpg

    Reply 4 years ago

    Hi Sergio, thanks for your comment.

    The hexapod movement is based on the ArduSnake oscillator library by Juan Gonzalez-Gomez.

    You can find his repository here: https://github.com/Obijuan/ArduSnake.

    I think he's the better person to which ask for any issue on that.

    Btw it never happened to me, sorry for your robots!

    And your designs are interesting, why don't you upload them on thingiverse?




    Reply 5 years ago

    Hi and sorry for the late reply.

    The bluetooth has no code at all, it's a sort of "serial bridge". The code is in the Arduino Mini!


    8 years ago on Step 8

    Hi and thanks :)
    Yes, in the video i'm controlling it via bt.
    Anyway, it draws the "star" simply turning left (or right) continuosly.


    8 years ago on Step 8

    This is a very cool robot, looking forward to start building it, but in the video are you controlling ir via bluetooth?


    8 years ago

    where can I purchase the chassis? I don't have a printer.


    Reply 8 years ago on Introduction

    Hi, maybe www.shapeways.com can help you!

    Another way is to subscribe to reprap Forum:
    and ask there for the printing: someone will help you!


    8 years ago on Introduction

    Wicked awesome. Im a big fan of minimal design with maximum potential, and you totally nailed it. Great work!