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

I think it’s because of the computational power of the Arduino just isn’t good enough to do pure floating point IK cacluation. I will need to think of a way to balance between accuracy and computational load.

[box color=”#985D00″ bg=”#FFF8CB” font=”verdana” fontsize=”14 ” radius=”20 ” border=”#985D12″ float=”right” head=”Major Components in Project” headbg=”#FFEB70″ headcolor=”#985D00″]Arduino[/box]

For more detail: Arduino Hexapod Robot

About The Author

Ibrar Ayyub

I am an experienced technical writer with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation, and engineering. I have a clear and simple writing style and am skilled in using infographics and diagrams. I am a great researcher and is able to present information in a well-organized and logical manner.

Follow Us:
Scroll to Top