Simple Hexapod Robot Using Arduino


This Simple Hexapod Robot is more like a downgrade from my last robot. The quadruped robot I was trying to build didn’t actually quite work though I spent quite a lot of time, but I have unfortunately underestimated the difficulty. So I am stepping back, and start from something easier, a Simple Hexapod Robot that uses Arduino.

I originally thought Hexapod Robot are not easier, as they have 6 legs and therefore more complicated in the programming. It turned out to be wrong because it’s much easier to balance as there are 6 legs. When it’s walking, we don’t need to worry about the center of mass and so on in order to balance, we just need to think about where to place the next leg in order to move.

Simple Hexapod Robot Showcase

First Robot Motion, Legs flexibility:

Control the Simple Hexapod Robot From my computer

Complete Robot Commands (Custom Command Script)

Parts that I used

  1. Arduino
  2. 12 x 9g servos
  3. 4 x AA Battery
  4. Battery Holder
  5. bread board
  6. Styrene Sheet

Optional:

  • A Large Capacitor for power supply (can’t remember the value, i think it was around 1uC)
  • Power Switch.

I was controlling the robot via serial cable from the computer, so no controller required.

First Week Working on the Simple Hexapod Robot

It’s the first time I ever used Styrene plastic and I just in love with it… so flexible, particularly for building small robots like this one.

Although it could take a while to cut and get good at it, but it’s definitely a very economic choice for people with small budget!

Here is a very good site selling them, it’s the cheapest I have found so far in the UK (let me know if you know anywhere else cheaper ;-)
Styrene Sheet (Plasticard) from Station Road Baseboards)

In this one, I basically reused all the servos and parts from the Stalker, the only things I need to rebuild was the robot body and the legs..

Mini can be controlled by a VB program via USB connection, more detail can be found here:

https://oscarliang.com/visual-basic-arduino-through-usb/
See Second Video from the top.

Week 2 of the Simple Hexapod Robot Adventure

Further modifications to the leg:


The new robot leg design brings better stability because they are tougher and lighter, more importantly it looks cooler!

I have also wrote a few more commands files, works quite well ; ) see 3nd video from the top.
That’s it! no more simple hexapod robot updates, I will modify it into 3DOF per leg, and start to think about IK and trigonometry!

Check here for the 3DOF Hexapod robot

https://oscarliang.com/arduino-hexapod-robot/

Simple Schematic of the servo, arduino and batter connection.

IMAG0670

If you want to discuss or share your ideas, just comment down below.

42 thoughts on “Simple Hexapod Robot Using Arduino

  1. Sakya

    Hi oscar i know its been along time since u made this but could u pls help me with the codeing for 12 servo hexapod like this.i just want it to move forwards with just the arduino code.thx?

    Reply
  2. Dj_Garfield

    So cute ! What a very great build you did Oscar !!!
    You are also a clever DIY builder !! This is what I like :)
    When I will be less overbooked , I will come back to the building of an automated arm , I did a kind of this for my end of school year :)
    Actualy the stuff to build some of great things are more than affordable and DIY make this more affordable :)

    Reply
    1. Oscar Post author

      i used to have so much free time, i can just build anything in my mind… not so much time now due to the multicopter hobby :D

      Reply
  3. Joseph F

    Hi,

    Thank you for publishing your work. I was wondering what type of connectors are you using to connect all the servos to the Battery Pack? Are there any existing one-to-many connectors? I was trying to avoid building my own customized one.

    Thank you.

    JF

    Reply
  4. Joel

    Hi Orcar,

    First and foremost I want to thank you for sharing your work, this is really good. I’m planning to build an hexapod like this one. I’ve been reading several forums and powering the servos seems to be an issue, but you just used 4AA batteries and from the videos you posted there was no major problems with the servos, so I wonder if you faced any issue on this area.

    By the way, did you evaluate to use a servo controller to reduce the number of pins used by the Arduino? Any thoughts on this area?

    Thanks in advance for your feedback.

    Reply
    1. Oscar

      Hi Joel

      for 12 9g servos, 4 AA batteries are enough. But you might be better off using Lipo because they have larger current output and weights lighter.
      I don’t see the point of using servo controllers. they are generally over-priced.

      You can totally make a servo shield using standard Arduino Uno Shield and header pins. If you don’t like soldering, you can also use breadboard and some cables.

      thanks
      Oscar

      Reply
  5. Stéphane

    Hi Oscar, after a long vacation, I finally finished the structure of my hexapod, I give you pictures, what do you think? I’ll change the batteries and improve cable management!
    for programming with Arduino I’m really a beginner, can you help me? because I do not know where to start! I would like to drive with a wii nunchuk.
      thank you soon.

    http://zupimages.net/up/3/642078016.jpeg

    http://zupimages.net/up/3/1594015566.jpeg

    http://zupimages.net/up/3/2119962959.jpeg

    Reply
    1. Oscar

      Hi Stephane

      i just replied in the forum. I don’t know if you get notifications when I replied in the forum, can you let me know?

      thanks
      Oscar

      Reply
  6. Stéphane

    hi Oscar
    thank you for your answer, yes, my robot has 12 servo (your hexapod inspired me) I’m still down with my machines, so I have not finished the legs ^ ^ I’m a little worried about the future of the programming with the Wii controller, because I am a beginner in Arduino! I congratulate you on your new topics on your blog, they are great!

    Reply
    1. Oscar

      Hi Stephane

      Thanks for sharing the pictures!
      Looks great! :-D
      Your cable management skill is much better than mine! very tidy indeed!
      is your robot going to be a 12DOF Hexapod robot? (2 servo per leg?)

      Reply
  7. Stéphane

    hi Oscar, I have not had much time to advance on the hexapod. ^ ^ I sent you a picture of my first Arduino with a shield that I just finished this afternoon, I’m stuck at the moment because I miss cable! for the structure, I have not moved forward because I can not find the aluminum has a good price, I will order the styrene, I give you some news soon

    http://zupimages.net/up/3/1179859189.jpg

    Reply
  8. Stéphane

    yet not I started on Friday when I have received all my parts to properly take all measures I’m sending you pictures soon promised

    Reply
  9. Stéphane

    hi oscar, I just bought the electronic parts of the robot and the structure I build everything myself, I think working on Plexiglas because it is free for me in my work, but I research small aluminum plates

    Reply
  10. Stéphane

    hello oscar, how are you since the time? I just made my order for my hexapod I give you news very soon ^ ^!

    Reply
    1. Oscar

      hello Stephane, it’s great to hear you have finally bought the hexapod :-)
      I have been busy with the Raspberry Pi, hopefully I can use it with the Arduino to do more complex projects.

      what hexapod chassis have you bought? I am thinking of buying a new chassis as well when I have the money :-D

      Reply
  11. Stéphane

    ok, thank you for your reply, I will build the robot next month and I would give the new very fast, thank you so much! see you soon

    Reply
  12. Stéphane

    ^ ^ Thanks, for the programming I hesitate between the autonomous robot with an infrared sensor or control solution with your nunchuck wii, your control over your tutorial is easy to put into practice for beginners? but for now I’ll attandre my salary to buy the components ^ ^

    Reply
    1. Oscar

      Every robot should be autonomous at the end, that’s why we call them robot right? :-)
      But to get started, user control would be useful, to test, understand and correct the movements, before you begin programming complex AI.

      For user control, my favourite cheap options are:
      1. serial console using a USB cable (cost: free)
      2. wii nun chuck (cost: less than 5 US dolars?)

      for 1. there are many tutorials on the internet, you can search it.
      for 2. it might be a little difficult to understand how Nun-chuck work at first, but once you learned it, you can apply it to many other robot projects as well.

      Reply
    1. Oscar

      Very good connection, that’s what I meant and i think it should work.
      I have heard about fritzing, it is a good software, i will give it a try next time!

      Reply
  13. Stéphane

    hello and thank you for your answer, I’ll try to make a schematic of frizing this weekend and send it to you if you agree? how we can talk about my possible mistake ancore thank you and goodbye

    Reply
    1. Oscar

      Hi Stephane, any of the pin 1 to 12 can be used to control the servo.
      the LED is probably a power indicator that I used, not necessary.

      Sorry for the lack of information about this project, this was my second robot ever so it wasn’t documented properly.

      for simple Schematic, i have uploaded a picture, hope that helps you :-)

      Reply
      1. Stéphane

        hi oscar, I think your great project for your second robot for my schematic I can send it by email? or another method? for pin I need a pin? and no 12 pin?

        I am very happy can learn with your help thank you again

      2. Oscar

        Hi Stephane, email would be fine. it’s [email protected] (delete the x)

      3. Stéphane

        great, I thank you for your schema I’ll compare it to mine, for my schematic with arduino fritzing I use is a very practical software.

  14. Stéphane

    hi Oscar, thank you for for your great blog, I’m beginning in robotics then a few months and I would like your construir hexapod robot simply because I find it great for beginners
    can you detail your electrical installation to run your robot? The Arduino Uno is a she? you use another card? thank you and see you soon. Stéphane

    Reply
    1. Oscar

      Hi Stephane,

      The electrical connection is very simple.

      you are right, I used an Arduino Uno. There is no other cards, but I put a empty shield on top of the Arduino, so I can leave all the connection on the shield and swap the arduino board if I want. this is not necessary.

      I have 12 servos connected to the Arduino Uno. The Vcc and Gnd of the servo are connected to external power source, e.g. 4 x AA battery. But remember to link the battery ground to your Arduino ground, so the servo understand the signal from the arduino.

      I also had a couple of large capacitors connected at the power source, to smooth out output current, but this is not really necessary. You might consider adding another 4 x AA battery connected in parallel, so you have the same voltage but more current.

      Reply
      1. Stéphane

        hello and thank you for your answer, I’ll try to make a schematic of frizing this weekend and send it to you if you agree? how we poura discuss my possible mistake ancore thank you and goodbye. stéphane

      2. Stéphane

        Hi Oscar, here is my first drawing, I think I can adruino taken when the robot is disconnect my pc, I do not understand how to connect servo to ardruino mass and external power supply. I saw your picture on it there leds? I connected two servo because we see nothing on the schematic with cables of 12 servos, so if I understand that I do the same for others and I plug the servos on pins 1 to 12 adruino.

        I exuse in advance if my schematic is not correct (I’m a beginner ^ ^)

        (Ps: I’m a fan of stalker and COLOSS SC2 ^ ^ …)

        big thank for your help

  15. Yanbo

    Hi Oscar,

    The robots you made are really amazing. I am very new to robot and plan to make a robot for my son. I am very interested in the Arduino Hexapod Robot you made. Would you mind sharing with me a list of parts that I need to buy?

    Your help would be greatly appreciated.
    Yanbo

    Reply
    1. Oscar

      Hi Yanbo,

      I am glad you like it.
      The parts that I have used in this robots are:

      1. Arduino
      2. 12 x 9g servos
      3. 4 x AA Battery
      4. Battery Holder
      5. bread board
      6. Styrene Sheet

      Optional:
      – A Large Capacitor for power supply (can’t remember the value, i think it was around 1uC)
      – Power Switch.

      I was controlling the robot via serial cable from the computer, so no controller required.
      Hope it helps, and hope your son and you are going to have a good time building robots! :-)

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you Robot? *

I don't look at blog comments very often (maybe once or twice a week), so if you have any questions related to multirotor please post it on this forum IntoFPV.com... You're likely to get a response from me faster on there.