Arduino Hexapod Robot

Summary of Arduino Hexapod Robot


This article describes the design and development of an Arduino hexapod robot, focusing on building the physical body and implementing inverse kinematics (IK) algorithms. The author initially used plastic parts to prototype due to delays in receiving ordered components. A custom servo interface shield was created to manage up to 20 servos (18 for legs and 2 for sensors). Challenges included issues with number rounding in code, computational load of floating-point calculations on Arduino, and mechanical stability of the robot base. Optimizations were considered to balance accuracy and performance.

Parts used in the Arduino Hexapod Robot Design:

  • Arduino Mega board
  • Servo motors (18 for legs, 2 for sensors)
  • Servo interface shield (custom PCB with 20 servo ports)
  • Adjustable voltage regulator (planned for battery power management)
  • 8xAA batteries or 3 LiPo 11V batteries (power sources)
  • Plastic parts for robot body prototype
  • Robot frame (ordered, to arrive later)

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.

china_iconChina_icon

中文翻译:http://blog.oscarliang.net/arduino-liu-zhua-kun-chong-liu-zhua-shou-ji-yuan-dai-ma/

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:
[31/Jan/2012]

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.

===========================================
Update
28/01/2012

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.

Major Components in Project
Arduino

For more detail: Arduino Hexapod Robot


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

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

Scroll to Top