Mini Hexapod

Autonomous Figure 8 (So Far)

This is a hexapod I've been working on for a while. It's a kit from Paul K. The hexapod uses HobyKing HXT900 servos. I was able to get the robot to successfully walk autonomously in a figure 8 pattern with all three legs on a side pointing the same direction (straight out). When I moved the corner legs so their starting positions were 60 degree from their neighboring legs, my IK code didn't work correctly. The hip angle of the leg is one of the parameters in the IK equation. I must of something in my equation incorrect since the equally spaced angle version of my code makes the robot dance in place.

There exists perfectly good IK code for this hexapod, but I've always wanted to see if I could figure the IK equations out on my own so I haven't used the other code yet. It seems like there are only a few hours a day that my brain works well enough to make some sense of the equations involved so I haven't yet fixed my IK code to deal with this 60 problem.

Paul K. sent gave me this hexapod hardware. Paul K. makes all sorts of cool stuff and I assume was looking for some feedback about a hexapod kit he was considering selling. Paul had seen my Popsicle stick hexapod (inspired by OddBot's "Chopsticks"). While my Popsicle stick robot was woefully under powered, I guess it showed Paul I was interested enough in hexapods that I'd probably complete his kit.

 

As Bajdi mentioned on his Bafdupod 996R page, finding regulators to power all those servos can be a problem. I'm presently using a pair of Dimension Engineering regulators. I use one regulator for three legs of the robot.

I've fond some other regulators that seem to work well and cost a lot less on ebay. I may switch to use these other regulators if they don't weight much more than the DE version.

I have a really cool four joystick remote from Paul K. I plan to use with this robot. I want to get the kinks out of my IK algorithms before I make the robot remote controlled so I'll likely wait a bit before adding an XBee for the remote.

I had previously planned to use Nordic nRF24L01+ module as a remote, but Paul's remote is made for the XBee and it doesn't have enough spare I/O pins to control a nRF24L01+ SPI interface.

Hopefully I'll have this robot walking again soon.

Update: 15 September 2014

I'm rewriting the program controlling the hexapod. I decided to use the equations posted by Aniss1001 in this new program. All my previous IK equations were ones I derived myself and I'm not completely sure they were correct.

I added a video testing the new equations. The robot appears to be walking correctly. I'll probably change the stance of the robot to place less torque on the servos. As the robot walks now, there's a lot of jitter but I think some of it will be reduced if I place less strain on the power supply.

I hope to add some better (and more interesting than the ones posted so far) soon.

Update: 25 September 2014

The new video shows the robot being controlled remotely. While the remote I'm using is really cool, the amount of control I presently have over the robot is very limited. I can kind of control the speed of the robot and I can also control the direction the robot travels.

I'm using a Q4 remote control made expressly for controlling hexapods by Quantum Robotic Inc.. The Q4 was part of a successful Kickstarter project.

Paul Krasinski who had previously given me the hexapod kit also gave me a Q4 remote. The Q4 is pretty darn cool.

The Q4 uses a Propeller microcontroller so I've been writing my own software for the remote. Writing the remote's software was harder than I had thought it would be. Trying to come up with an intuitive menu system for all these buttons and switches while displaying the output on a 2 line LCD as been a challenge. Right now, I'm not having the remote do anything complicated. It just packs the joystick data into a pack similar to that used by the PlayStation 2 controller and transmits the data to the robot.

As you can see near the end of the latest video, I still have some bugs in the code.

I may be having interference from the new switching regulators I'm using. I'll need to add some code to stop the hexapod if new transmissions aren't being received. I don't want the robot to just continue walking if no new commands are coming in.

I recently changed the coordinate system I use to keep track of position and angles. I had been using a xyz system with the x-axis pointing out from the robot's right side with the y-axis pointing out the front of the robot. The z-axis was positive above the robot.

After reading trough one of the navigation papers bdk6 posted, I decided to switch to the "NED" system. NED stands for North, East, Down.

One benefit from using NED is it's much easier to convert between a navigation heading with north being zero degrees and the direction the robot should travel.

I feel like my time spent programming this robot is now being spent more productively since I can use the same code written for this robot with my larger "Halloween Hex". I just use separate header files for the two robot. The header files include data about the center positions of the servos and the length of the robot's limbs and body.

Hopefully, I can come up with some fun way for these two hexapods to interact with one other.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I made a video showing the hexapod rotating and attempting to do other things but only the rotation portion of the code is working well right now.

I don't like the video enough to add it to the robot post but if any of you are interested in see the current state of the program you can watch a portion (or all if you'd like) of this video.

Edit: I forgot to mention, after making the video I weighed the hexapod as configured in the video. The total weight was 629.7g. The robot is heavier than it should be. I was using a 2,200mAh 2S LiPo pack but a 800mAh pack is a more appropriate size. I have some appropriate batteries on their way from HobbyKing.

The 15A regulator is probably oversized. I should be able to reduce the weight by using a lighter regulator.

Nice work, Duane! 

The walking gait is very smoothly. And what a cool controller!

awesome bot!  I got a question that may be a bit unrelated, but I see that you are using a Propeller.  I was actually given a Propeller a couple months ago (as well as a BS2), and unlike Arduino where there are a ton of resources to get started, it's a little more difficult with the Propeller.

So - do you have any recommendations?  I'll even pick up a good e-book if you can recommend one.  I'm really interested in thinking about using multi-core for some fuzzy logic systems.  Kinda a mini-watson where every core does a computation and then the main system "votes".  But I don't even know if that's beyond the scope of the Propeller.

Thanks in advance.

Yes, I'm a big fan of the Propeller. Here's a link to one of my ramblings on the topic.

I've listed some education resources in post #3 of my "index".

Here's a list of some Propeller boards I think would work well in a robot.

thanks so much.  I'm going to try to give my Propeller a spin (pun intended) this weekend and see what I can do!

Had the same issue with my hexapod Duane. I also had to search for the optimal stride. I actually wrote some code so I could change the stride with my remote control. I'm actually a bit amazed that yours walks so well using those small plastic gear servos. I assume your bot is pretty light?

I just weighted my bot and it's 444g with the parts used in the last video.

I'm also a bit surprised the little servos worked as well as they did. I'm working on adding a remote now. Hopefully I'll be able to adjust the stride with the remote so I can also "tune" the hexapod's stride.

Edit: I initially forgot to include the weight of the voltage regulators. The two regulators weigh a total of 11g. I've added this weight to value listed above. 

I had removed the regulators as a way of turning power off to the servos so I could work on the remote communication section of the program.

It looks great! With this range of legs it can be really fast!

I'll probably reduced the length of the stride. The test video shows the legs jittering a lot from straining to hold those long reaching strides. I think the servos looked like they were happier when I used short strides in my earlier figure 8 video.

I think the figure 8 video was made with the robot taking 40mm strides and my recent test walk video used 80mm strides. I do think there's something cool looking about the long strides (even if they are a bit wobbly).

I wonder if it would improve if you had a power supply that gives more ampers? But then the servos get hot and can even fry, so not sure.

What is the C rating of the battery pack?