/u/7434365
/joeiddon

Hexapod

Note: This project was put on hold due to mechanical failures. We hope to revisit it soon.

Hexapods are six-legged robots that scuttle along the ground. I attempted a similar project by myself (see here), but as that creation only had four legs, it was very unstable when walking, but it was really fun to make. That as why I suggested we try and construct one with six legs in the hope that it would be more stable - allowing us to mount additional accessories on it.

So once we were agreed on the aim for this second project, we began by designing the frame. It needed to be strong, and since we have an amazing laser cutter available to us at school, it would be silly to not get some use out of it!

In order to laser cutter a shape out of acrylic, you need to send the machine instructions for what to cut. These instructions are generated by the computer (all we needed to do was tune the settings slightly to get a smooth cut) so the only task was to create a design.

The software we had available to us is called 2D Design and turned out to be really intuitive to use.

We then cut it out, here's a video:

Now that we had the frame, it was time to work on the electronics.

The design was based around the idea that each leg had two servos - making 12 in total. The type of servo we decided to use was the sg92r which has a reasonable torque of 2.5kg/cm and were relatively cheap (roughly two pounds each).

However, an issue was that the Arduino board which we were planning on using only has 14 GPIO pins, which is enough, but would have restriced what we could add to the robot in the future. For this reason, we also got the PCA9685 servo driver. This board is great as it has its own dedicated processor that accepts signals for the positions of the motors over serial and then handles the rest (the pulse width modulation) itself. This has many advantages: we free up our Arduino processing power, we will have more pins to work with and connecting the servos would be really easy (the board comes with pre-installed headers ready for up to 16 different servos).

This is what the situation looked like with all the motors hooked up:

The next step was to use a glue-gun to secure everything together and program the first movements.

At first, it looked promising...

...but we soon encountered a problem. Namely, after about 30 seconds of executing a pre-defined sequence of movements, the entire system would just halt and behave iratically. Either the servos would stop entirely, or only one or two would contrinue to work.

In spite of this issue, we started to write the code (available on GitHub here) to make the hexapod walk.

Here is a picture of our (terrible) plan for that:

However, after tinkering with the board and the code for many a week, we were on the verge of giving up since the aforementioned problem of the eratic behaviour was impossible to work with. Amongst other things, we even tried eliminating the PCA9685 servo controller board entirely and dedicated a GPIO pin to each individual servo (this took a fair amount of soldering work!), but to no avail.

In a final attempt to salvage the project, I bagged it up and took it home so I can spend a weekend trying everything I could think of. This included wiring in capcitors to remove any noise in the pulse width modulation and using a ridiculously high-current 15A power supply to eliminate the possibility of it failing due to overloading its power source. Again, there was no change, the hexapod just kept stopping and "jittering".

The furthest I got was a brief walk, but it was hardly impressive since it could barely keep itself stable as there was no time to tune the angles.

We then re-grouped the following week and tried some final debugging. Finally we discovered at least part of the cause. It turned out that a couple of the servos had been mechanically damaged (probably from when we mucked up the initial angles and rammed the legs into the main body :/). And due to these servos being unable to reach their desired positions, they were disrupting the power distribution to the others and breaking the whole system. Unfortunately I did not get a video showing this strange behaviour, but it was evident to us that when we disconnected enough servos, it would behave less randomly.

However, since a significant proportion of them were damaged, we kind of reached a dead end. I put an order in for 6 more servos (that would come in useful anyway if not used for this), but we still don't know whether the servos were the only cause of the issue (I suspected not).

So, in addition to the fact that some of us would soon be going off on study leave (followed by an extended summer break), we settled on putting the hexapod to rest and would start something new the next academic year.

It was a shame to invest so much time into a project which had a disapointing outcome, but we did learn lots - especially how useful the laser cutter could be - so it was still useful and definetely fun to work on. I also have hope that once are next project is well underway, some of us can re-visit the hexapod and give the new motors a proper go.