3D Printed 18DOF Hexapod




Introduction: 3D Printed 18DOF Hexapod

About: Croatian student currently studying mechatronics. I enjoy doing projects, especially with my 3d printer.


In this instructable, I will show you how I made this hexapod robot.When I was designing it my main goal was to make it small,3d printable, and it needed to look good on top of that.At this moment it is controlled with a PS2 controller but it has more than enough capabilities to be reworked to work autonomously.

Hexapod has all his electronics enclosed in his body and batteries are hidden with lids. So I wanted to hide as much of wires as I could to give it more organic look.

It needs a lot of parts to make it, and with his size, a lot of that is squeezed inside or needs some rework, but with a lot of time and patience you can build it. ;)

Some data for this build will be on my GitHub so I will link it here.

Step 1: Gather All Parts


  1. ZIPPY Compact 850mAh 2S 25C Lipo Pack Link
  2. Turnigy 5V/6V 5A Heli-UBEC for Lipoly Link
  3. Lynxmotion SSC-32U USB Servo Controller Link
  4. Lynxmotion PS2 Controller V4 Link
  5. Meduino Mega2560 R3 Pro Mini Link
  6. 9V Battery Holder Clip Link
  7. 18xMG905 metal gear Servo Link
  8. M3*6mm, M3*10mm, M3*25mm and M2*5mm Screws

You will also need a drill(1,5mm 2,5mm and 3mm drill bits), screwdrivers, double-sided mounting tape, soldering iron, battery charger (needs to be able to charge lipo battery), superglue, small zip ties,Rubber Bumpers


Servos I used to have metal gears and they are a little bit less crappy than plastic ones.Servos work on 5-6 volts and 18 of them draw around 4 amps constantly while the robot is working. that is why I went with 5A UBEC from hobby king. I tried some cheaper ones from eBay but they just didn't work. You can use any battery of similar size, it just needs to be 2S or more(7,4 volts or more) and able to provide more than 5 amps.Servo controller is lynxmotion SSC32-U and you don't have a lot of picking here, almost all hexapods on internet use this one or older version.So Arduino. I had that small version of Arduino mega laying around and was not using it for anything special so I decided to use it , and on top of that I will try to make it autonomous in future and add some more functions that will require more memory and IO. it should be possible to use Arduino pro mini or Arduino nano BUT you will need to use different code that uses software serial because mega has more than one serial port.PS2 controller and receiver should work if you buy them from eBay or anywhere else because we will take apart receiver and will not use those custom made connectors that it comes with it if you order from lynxmotion or RobotShop.

Step 2: 3D Print Parts

You will need to print all these parts.Support is needed for 9V battery holder,coxas and the battery lid. I printed with PLA and 0.2 layer hight. ALL parts need to be printed once EXCEPT:

  • 6xTibia
  • 6xFemur
  • 3xCoxa
  • 3xCoxa mirror
  • 2xFront holder

Step 3: Drill 3D Printed Parts

Pictures above show you all parts you will need to print and sizes of holes you will need to drill in them. those holes are there already but they are undersized.

NOTE: you will also need to drill the second and fourth hole on the servo horns with 1,5 mm drill bit.

Step 4: Center All Servos

We will need to center all servos before we start assembling legs.There are 2 methods and results are the same.First, you can use SSC-32 Servo Sequencer Utility.Plug 3 servos to pins 0,1,2 on ssc32 and set values in the program to 1500. After you did that attach servo horns so they are perpendicular to the largest face of the servo.After that attach set screws. Servos for one leg should look like first picture and servos for the second leg should look like the second picture.Repeat this until you center all servos and have 6 pairs of 3 servos.

The second method is to plug servos to Arduino and use a simple sketch to center them.It should look something like this:

Servo myservo; 

void setup() {
void loop() {

Step 5: Assemble the Legs

First, attach servos to Tibia and coxa like shown on the first picture. Servos will be screwed in with screws you get with them.Before you place Coxa servo make sure you placed M3 10mm screw in the hole on the bottom of coxa part. After that place servo so its shaft is concentric to screw.After that attach 4x M2 5mm screws at the femur and apply some superglue like shown in the picture above( apply it on both holes where servo horns will be attached).After you applied glue attach femur to servo horns and screw in those 4 M2 screws.Repeat this process until you have 3 legs for each side. If M3 10mm screw you attached on coxa and tibia is colinear you assembled leg correctly.

NOTE: 3 legs for left side should look like top picture while right side should look like the bottom picture.

Step 6: UBEC and Battery Holder

take a piece of double-sided mounting tape and stick UBEC to 9v battery holder like shown in the pictures, after that pull 9v battery clip thru the hole and secure it with a zip tie. Distance from battery clip and hole should be 2 cm.

Step 7: Receiver and Aruino

in this step, we will connect the receiver to Arduino.First, you will have to disassemble your PS2 receiver. After you disassembled it pins will be like on the second picture.After that you need to solder receiver pins to Arduino like this :

RECEIVER PINS --------------------ARDUINO PINS

CLK-------------------------------------------- pin 15

ATT(SEL)------------------------------------- pin 13

CMD------------------------------------------- pin 11

DAT-------------------------------------------- pin 9



Also, solder 1 long wire to GND and one long wire to vin, and solder one wire with female servo connectors to pins 18 and 19 on Arduino, we will need all that later.reassemble PS2 receiver without adapter part and I used isolation tape to secure wires on Arduino.After that attach back holding plate for Arduino (one with square hole). Attach it s the hole is facing top plate.Then take the double sided mounting tape and place some on Arduino and PS2 receiver.Position Arduino so you can plug the mini USB cable in it thru that hole on the back holding plate.Stick receiver to round side of the top plate.After you are done it should look something like the first picture.

Step 8: Top and Bottom Plate

First, attach 9v battery holder with UBEC to the bottom plate.Now connect vin and ground from Arduino to VL on ssc32u and connect 9V battery clip to VL on ssc32u.After that connect the output of UBEC to VL1 on ssc32u.Now place all holder plates to the bottom plate ( remove one from top plate you used to align Arduino and place it on bottom plate).Holder plates are secured by M3 10mm screws.Also, screw in SSC32U with M3 6mm screws.

Step 9: Shortening Servo Wires

This is really messy and time-consuming step. You will need to shorten servo wires for all Coxas and femurs by 10 cm.Solder 2 ends of cut wires and use heat shrink tubing to isolate them.

Step 10: Attaching and Connecting Legs

Now you will have to attach all servo connectors to ssc32u .first picture shows you where to connect every servo.After you are done with connecting try to make it look less messy by hiding any unnecessary wires in the body (use small zip ties to time multiple wires together, that will keep them in place.)

Step 11: Connecting Top and Bottom Plates

After you cleaned up all wiring cut UBEC input wires near the connector .Connect Pin 19 to Arduino to SSC32U TX and connect Pin 18 on Arduino to SSC32U RX. Now connect the top and bottom plates, and make sure to insert UBEC input wires in the hole o top plate. Align servo horns with associated holes on the top plate. After you did that screw in top and bottom plate with M3 10 mm screws and secure servos to top plate with M2 5mm screws.Now solder UBEC wires back together.

Step 12: Battery Hinge and Lock

Attach battery lock with 2 M3 6mm screws and attach battery hinge with 2 M3 6mm screws.

Step 13: Battery Lid

Attach battery lid to hinge with M3 25 mm screw.If everything works good, after you close the lid it should lock itself . to unlock it just pull battery lock.

Step 14: Upload the Code

Download newest Arduino IDE . Download code (Phoenix_Hex folder) from my GitHub repository. Add Phoenix_Hex folder to your Arduino library and open Arduino_Hex.pde in your Arduino ide. Compile the code with Arduino mega and upload the code to your hexapod.More info and updates will be on GitHub.

Step 15: ALL DONE

After you uploaded code you are done I guess.The picture above shows the function of all buttons on PS2 controller. Add batteries and check what it can do! If you make this robot share some pictures of it, especially if you make it in the different color.If you have any questions about this project feel free to message me here or leave a comment.

Step 16: Troubleshooting and Some Notes of Mine

NOTE 1-So I found out you should not run this robot more than 5 minutes.When I first built it I was testing it and playing around with it by switching 2 lipo battery packs maybe 30 minutes. If you do that you will kill your servos. I fried 2 of them and some others were not working really good.

NOTE 2-If your robot starts disconnecting and twitching all over the place recharge your lipo and try again if it still persists try replacing a 9v battery.

NOTE 3- If it is incapable of walking and falls to the ground while walking your legs are not calibrated.

NOTE 4- You NEED those rubber thingies on legs if you want to walk on anything other than carpets.

NOTE 5- Make sure your baud rate on ssc32u is correct (115200). If it is not there are instructions here on how to set it up.

Wireless Contest

Runner Up in the
Wireless Contest

Make It Move Contest 2017

Third Prize in the
Make It Move Contest 2017

Plastics Contest

Participated in the
Plastics Contest

Be the First to Share


    • Pocket-Sized Speed Challenge

      Pocket-Sized Speed Challenge
    • Metalworking Contest

      Metalworking Contest
    • Maps Challenge

      Maps Challenge

    11 Discussions


    Question 11 months ago on Step 16

    can i use sg90 servo motors? because i think your heavy motors are vibrating very much


    Answer 11 months ago

    you could but sg90 will vibrate too and they are much more easy to brake.


    1 year ago

    Great, nice project!!!

    But it`s impossible for me to run the GitHub Sketch...

    Many Errors.

    Can you help me?


    2 years ago

    A wonderful project, I always wanted to do this!


    2 years ago

    Great! :D


    2 years ago

    Great detail thank you!


    2 years ago

    Nice one, need to try this!
    Thanks for sharing, and I voted for you :)


    Reply 2 years ago

    thank you !


    2 years ago

    Nice bot and great first instructable! :)


    Reply 2 years ago

    thank you :D