Arduino Hexapod Robot

Arduino Hexapod Robot

Arduino Hexapod Robot Design

I will show you how to build an arduino hexapod robot, from building the body, to how to implement the algorithm. To learn about the implementation of the algorithm, read this first, if you are not sure what is IK, read this.



Arduino Hexapod Robot

I ordered parts from a robot frame manufacturer, but they will take a while to arrive. So I decided before that, I will build a smaller version Arduino Hexapod Robot using plastic to implement the algorithms.

Most of the parts in this project would be inherited from the 2DOF Arduino Hexapod Robot, except the base.

This is link of the 2DOF Arduino Hexapod Robot:
Here are the results:

I wanted to make a servo interface with the shield I bought off ebay for Arduino Hexapod Robot, which would making it so easy to install the servos without making a mess. In theory i could use 48 servos on a Mega board, but I only soldered 20 servo ports, just to keep wires tidy and compact. I need only 18 servos for the legs and possibly 2 for the sensors anyway.

I am leaving some space on the right hand side of the board to put a adjustable voltage regulator in, as I am planning to use 8xAA batteries, or 3 lipo 11V batteries in the future.


Redesigned and made another base, with smaller diameter and larger thickness. the Previous one was too thin that it actually bends a little when it’s standing.

found that when casting float to int, numbers are floor rounded e.g 4.4 = 4, 4.8 also = 4. which would introduce round-off error. need to implement number casting function to resolve this.

int FloatToInt(float input){
                // this is an alternative to cast number directly, to avoid floor rounding
                int temp = (int)input; // floor-rounded input
                float dif = input – (float)temp;             //
                if (dif < 0.5)            return temp;
                else                          return temp+1;

Also there is another problem with responding speed. I check the resulted in the C++ code against the simulation excel spreadsheet, found the error margin is quite big, because I was using int for all the calculations. I then change all of them into float. Although it works on the robot, but the responding time increased quite obviously, also the Arduino Hexapod Robot movement become unstable.

Arduino Hexapod Robot circuit


Read more: Arduino Hexapod Robot

Leave a Comment

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