Close
0%
0%

Hexapod

Building a hexapod for under $500 from cheap parts.

Similar projects worth following
The goal of this project is to build a cheap hexapod from parts sourced online. Designing a power and control system will be necessary, and then developing software to control it. Currently the hardware side is finished, and I am working on developing software to autonomously control it through a neural network.

The general idea is to use the PI and camera to perform the inverse kinematic equations and to perform obstacle avoidance, this information is passed onto the servotor32 board to set the servo positions according to the IK equations. Everything will be powered from the 5000mAh RC battery which I'm installing a protection circuit onto to prevent overdischarge. The 7.4V from the battery is stepped down to 5V from the adjustable switching power regulator. 

husky.jpg

Dog Tax

JPEG Image - 1.20 MB - 07/24/2017 at 06:26

Preview

underbelly.jpg

This is a picture of the Robot with only the motor control board and bluetooth serial module.

JPEG Image - 1.57 MB - 07/24/2017 at 06:26

Preview

powesupply.jpg

This shows the modifications made to a PC powersupply to use it to power the hexapod.

JPEG Image - 1.19 MB - 07/24/2017 at 06:26

Preview

View all 10 components

  • Not quite dead

    8bithalfadder07/24/2017 at 06:10 0 comments

    So after over three years I thought maybe I should post a bit more information about what went wrong with this project, what worked, and where things currently stand. 

    First, all of the parts worked as advertised after assembly. I wired up all power related components using 12 Guage automotive hookup wire with some random crimp on banana plugs I had laying around. To provide power I have used a couple of different systems. The first was a PC power supply modified to provide power when not plugged into a motherboard. All of the ground and 5V lines were then wired into matching banana plugs. This provided enough power for all of the servers, as well as the motor controller board, and at one point the Raspberry Pi too.  The second system was the LiPo battery connected to a board designed to prevent overcharge and discharge of the battery. This was then run through the DC-DC converter, and provided a clean 5V for all of the electronics. This worked well, unfortunately I never did get to do any testing on how long the battery would last. 

    Immediately after completing the construction I was able to start testing the software side. I like writing all of my own code, and using as few libraries as possible, and that is what resulted in several months of very little progress being made. I wrote and rewrote that system a couple of times, I was able to get the math for single leg control down fine, but when I started adding in multiple legs, and body rotations things started breaking down. After I gave up on a completely hand written solution I started looking into premade solutions, but I kept encountering issues with those as well. 

    At about that time life got in the way of working on this project and it sat on a shelf for quite a while.  I pulled it out today to see if it still worked, and try and revive it. The LiPo battery is toast, turns out leaving them off a charge for years at a time isn't good for them, so that had to go. I then pulled all of the power regulating circuitry out leaving just the servotor32 and the bluetooth to serial module. After hooking it up to the same modified power supply and installing tera term on my laptop I was able to get the servos moving by manual control over the serial link. 

    About two years ago I started writing my own implementation of a Recurrent Neural Network, that is big enough that it deserves it's own project, but the quick version is that I read a few whitepapers and implemented my own versions of what they describe the vast majority comes from this whitepaper:  http://nn.cs.utexas.edu/downloads/papers/stanley.ec02.pdf  I ended up creating a system of saving and loading neural networks from xml files, wrote a full simulation system for the network, and wrote a separate system that generates networks through genetic evolutionary methods. So now I've got a robot without a brain, and a pile of software that's good at emulating mathematical functions after a bit of training. The next thing I'm planning on doing is teaching a network to control an individual leg. Providing it inputs as the x,y,z coordinate that I want the end of the leg to be at, and having the network generate the angle that each joint should be at. Comparing the position the leg would be at given those angles, to a solution provided using my simple inverse kinematics solution will provide a function to determine fitness for training the network.

    Long term I will end up using a combination of evolved and hand written parts of a network to achieve control of the whole robot, but I think it should be possible to evolve efficient walking methods using only an accelerometer and a gyroscope as inputs. I think going forward techniques like this will allow for autonomous systems in remote locations to better handle changing conditions that a hardcoded guidance and control system could using traditional methods. 

    I'm going to try and keep this up to date a little better, and put up a few more...

    Read more »

  • Problems arise.

    8bithalfadder03/09/2014 at 07:07 1 comment

    oday saw the completion of the hardware assembly. The whole frame is together with all servos mounted. Unfortunately they shorted me one size m3 screw, so I had to go to Lowe's to get another, and they only had flat head screws. Now my OCD has me twitching any time I see the top plate. There was also no way included to mount the bottom plate to the top, so I found some 6" aluminum tubes, cut them down to 2 inches each and ran a 3" bolt through them to hold the two plates together. The only thing left that I'm not happy with is the servo mounts for the coxa, they only attach to one of the body plates, that puts more stress on the coxa servo than I'd like, but there is no easy way to add in a bearing on the other side. I may end up trying to printsomething off at the local hackerspace, but I didn't leave much room to work with with the small standoffs.

    The other major problem that arose today is the voltage regulator. It doesn't regulate. It puts out the same voltage that you put into it. Also it smells of burnt electronics. Dead on arrival so I'm working with the ebay seller to try and get a replacement. In the meantime I'm going to be using a PC power supply as a power supply for the servos during testing. 

    The servo controller is sitting in the PO box waiting for me to pick it up, so tomorrow I can start testing my control software, and calibrating the servos. 

    Some testing with the PI shows that it can just manage to power the usb wifi adapter without having to use a powered hub, so I may just use it as a really overpowered wireless serial adapter for the servos. That would simplify the software development for the motions.

  • Assembly

    8bithalfadder03/07/2014 at 19:34 0 comments

    Yesterday two of the larger packages arrived, which include the servos and the chassis. Naturally I had to start putting it together. You can see in the pictures my arduino powered servo centering jig, I figured it would be a good idea to have all of the servos centered before I start putting them all into the chassis.

    I was pleasantly surprised to find that the servos themselves are of decent quality, as advertised they have all metal gears, although they don't quite reach the 180 degrees of motion they advertised. 

    While I would love to have started using the LiPo battery the regulator hasn't arrived yet, so I used a wall wart to provide the 5V for centering the servos.

    I looked into using openCV with the PI and from what I can tell it may not be fast enough to perform the object avoidance that I was hoping for, even if that's the case I can still use it as a piloting camera over wifi to get that "I'm riding in a walking robot" feeling.

  • Parts Ordered

    8bithalfadder03/04/2014 at 04:07 1 comment

    So the parts are all ordered, and have started trickling in. I'm hoping to have the IK code finished before it's time to start the assembly. So far I have the code written for the individual leg movements, next up is the code for calculating the leg starting positions from the body rotation matrix.

View all 4 project logs

Enjoy this project?

Share

Discussions

ActualDragon wrote 01/28/2017 at 21:44 point

i am also building a hexapod, and noted the servos you used. it must be coincidence, but i just happen to be using the same ones. have you ever had them "freeze" up on you, where they wouldn't move? that happened to one of mine, i took it apart and everything but couldn't find anything wrong, and before i order more, was wondering if this was normal?

  Are you sure? yes | no

davedarko wrote 01/28/2017 at 23:09 point

In a servo I had the motor contacts shortened on the motor casing once - which is the same as a break. Servo just blocked, after taking it apart and putting it back together carefully it worked again.

  Are you sure? yes | no

ActualDragon wrote 01/29/2017 at 01:12 point

i thought of that, when i took it apart it ran w/o the case fine, but i put it's lid back on and it still didn't work. i did that a couple of times, and finally gave up. i was just thinking maybe it was the servo

  Are you sure? yes | no

Duane Degn wrote 02/02/2015 at 22:22 point

It appears we are both using the same base frame for our hexapods. It looks like your kit didn't include flanged bearing to use where the legs pivot from the body. I think it would be a good idea to add these bearings. Here's a link to a post about installing the bearings.

http://forums.parallax.com/showthread.php/157497-Halloween-Hex?p=1294337&viewfull=1#post1294337

I've seen these bearing for sale several places. Let me know if you need help finding them.

Here's a link to my hexapod project:

https://hackaday.io/project/3996-halloween-hex

I think I might have used a couple of the machine screws which were included in the kit but most of the nuts and bolts were the wrong size. I used hardware purchased from Micro Fasteners to put the robot together. You might want to think about using alternate (and all matching) hardware to appease your OCD. : )

Your robot might benefit from having more bolts holding the pieces together. I see you're using two of the four screw positions when attaching the various pieces to the servo horns. I think using all four positions would provide a more secure connection and IMO using all four machine screw positions looks better than when only two machine screws are used.

Your voltage regulator looks just like the ones I'm using. I heard so many horror stories about regulators getting hot and burning out, I decided to play it safe and use two 15 amp switching regulators. The regulators appear to be working so far. I may try using a single regulator in the future to see if one of these regulators can provide enough current to power all the servos.

I'm very interested to learn about the programs you're using on the Raspberry Pi. So far I'm using a single Propeller microcontroller as the brains of my hexapod but I'm seriously considering adding a Raspberry Pi to my robot to allow more advanced programming.

  Are you sure? yes | no

Garrett Herschleb wrote 09/23/2014 at 19:50 point
You might find that the PyUltimateRobot controller software works well for your control and IK. This is posted on SourceForge

  Are you sure? yes | no

The Big One wrote 04/22/2014 at 14:23 point
Looks like fun! When / if I add a third DOF to my hexapod, I will start using IK to calculate the leg position. Until that time, I just use preset positions. See http://hackaday.io/project/770-Stubby-the-Hexapod if you are interested.

  Are you sure? yes | no

Eric Evenchick wrote 03/09/2014 at 23:27 point
Wow, that's a lot of servos. Looking forward to seeing how you coordinate them.

Curious to hear your review of the chassis after using it for a little while. It looks like a pretty good price.

  Are you sure? yes | no

8bithalfadder wrote 03/09/2014 at 23:33 point
All in all the quality isn't bad. Like I mentioned in the last update though there are some things that prevent it from being a complete kit. The black finish on the pieces isn't bad, it is in all of the mouny holes and there aren't any drips or scratches (that I haven't put there myself) the only complaint is that the aluminum stock they used wasn't sanded before they were cut or painted. I'll try and post a picture of that soon.

  Are you sure? yes | no

8bithalfadder wrote 03/08/2014 at 06:03 point
I have not, honestly this is the first legged robot I've built, and the first project to use enough servos to require a separate servo controller.

  Are you sure? yes | no

George Sapkin wrote 03/07/2014 at 22:25 point
Have you used SSC-32 or compatible boards before? I'm curious how Servator32 compares to them.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates