Close

Not quite dead

A project log for Hexapod

Building a hexapod for under $500 from cheap parts.

8bithalfadder8bithalfadder 07/24/2017 at 06:100 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 projects that I think people would be interested in. If you have any questions please feel free to send me a PM or comment and I'd be happy to post more information.

Discussions