Let's Make Robots!

My First Hexapod

Hopefully wander around and avoid obstacles

I have built a couple of rudimentary 2-wheeled rovers before, nothing special, but I really fancied trying a hexapod.  So here it is/will be.  It will be an autonomous 2 DOF hexapod, with the primary "brain" being an Atmega 328 with Arduino bootloader, and a separate servo controller based on a pic16f74. All parts are going to be made myself, mostly to reduce cost, no Lynxmotion SES brackets or similar.

Servo Controller: 

Based upon a pic16f74 @ 20mhz, and programmed in SourceBoost BoostBasic (because it's free and I'm lazy), this was built from parts I had already.  It accepts a very rudimentary set of commands over serial, sent in a 3-byte block with a following "run" character, and a buffer for 24 characters (8 commands).  The commands consist of a start-byte (255), the servo to control (1-20) and the angle (10-170').  The "run" character is 254. It has a DIL switch for setting the baud rate or test mode, which sets all servos to 90' every 5 seconds.

It has an unregulated supply for the servos, a regulated (5V) supply for logic, or the ICSP programming headers can be used to send a 5V supply.  There is a MAX232 on board, with headers for either rs232 or TTL level signals.

Servo Controller

In my limited testing, it seems to run fine.  Originally I had a 4mhz crystal for testing (all I had at the time), but this wasn't very accurate on the timings.

[Update] spent a BIG portion of last weekend working on the code for the servo controller. Now it supports setting a duration for the move, like the SSC-32 - any servo move (bar the first), can be made to take a set period of time, in 1/10ths of a second.  Should help with some of the gait timings.

[Update - 28/02] Got the slow moves working really well now, except ran out of RAM on the pic16f74, and can only control up to 16 servos; fortunately that's enough for now. I've got some pic16F77 to try (double the RAM, but the free compiler won't accept it :( I will include the schematics and code when I'm happy with them

 

 

Servo Brackets:

I've built 6 of the 12 servo brackets that I need for the legs.  Here are the steps I used to make them:

 

Step 1: Cut 100mm of aluminium angle, 30mm x 20m. Anneal this, allow to cool, then mark the narrow side at 10mm and 50mm.

  Step 1

 

Step 2: Cut the short side out to the 50mm line, and 10mm line. The short cut end should cut into the wide side about 10mm to, to end up like:

2

 

Step 3: Bend the short end to 90 degrees. Then trim this to ~5mm. I kept it long in the first instance to aid the bending.

34

 

Step 4: Bend the long end at the 50mm mark, then again at 70mm.  This last bed is the tricky one, I had to get a block of steel angle trimmed to 20mm to bend around.

56

 

Step 5: Test the fit of your servos

7

6 of the little buggers:

8


Step 6: Mark the bottom of the bracket, directly opposite the servo horn, and drill for the pivot.  I'm using m4 screws for the pivots. 

910

 

The long side of the angle will need trimming by a few mm to give some clearance, I'll using strong, thick foam double-sided tape to affix the servos in place when it's all finished.

 

Legs:

So far, I've finished the prototype for one leg.  I've used 6mm Sintra(?) for the leg itself, and 20mm alu strip for the extension from the front-to-back pivot servo.  So far it seems like it should all work, although it's going to need quite a bit of clearance to lift these things.

Leg 1

Leg 2

 

Body:

[Update 28/02] Busy weekend.  Made the body, two sheets of 3mm Sintra cut with the scroll saw, and 50mm standoffs made from 8mm Nylon rod, drilled and tapped for m3 screws.  I've completed and painted three of the legs, and got them loosely fitted too, to test.  I think that the Hitec HS322-HD aren't going to be quite strong enough for the "knee" joints, so I think I'll go with the HS-48HB instead.  Tested a few moves via the serial connection on the PC, so far so good (video above).

 

3 legs

 

[Update 15/04] been busy working with strength issues on the servos.  The planned HS-322HDs for the knee joints have been replaced with stronger HS-485HBs, but I still had to shorten the legs to reduce the load.  He's turning out to be a bit heavier than I anticipated.  After much tweaking, prodding and playing I've come to the conclusion that a significant part of my trouble has been around the use of standard AA NiMH batteries for power; they just can't get the juice out quick enough to drive 12 servos.  I've now got a nice fat 3700mAh NiMH battery pack, rated at 30A max discharge rate.  Initial testing looks like this should make a huge difference. 

I've also added springs to the legs pulling inwards, which reduces the effort for the servos to keep the 'bot standing, although it does increase the effort to lift the legs.  A bit like these: http://bit.ly/ddzlgz . This should help reduce the standing load on the servos.

[Update 24/04] it's alive! (video above) still a few issues with the servo controller but it's getting better. I'm waiting on a delivery of some 220ohm resistors to hopefully help there.  The control is a ridiculously basic VBScript program, but it gets things moving. There's still a lot of work to do on the gait however.

I'm also thinking of simplifying the leg arrangement, and making the femur (?) shorter and single-sided only to reduce forces and weight; hopefully the standard servo horns have enough strength to support the full weight without upgrading to metal horns. Below is a close-up of the spring-loaded legs.

 

Spring loaded

Comment viewing options

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

What he tries to say, I think, is that the reason why your servo's are fighting to keep the legs in place is because your legs are mounted very wide. I'll explain with the next picture which I've just drawn in paint, so sorry for the quality :D

Force in pod's legs

In the picture above, everything starts with the mass of your robot, this mass multiplied by the earths gravition gives you the amount of force that your pod puts on the floor. This gravitational force is divided between the legs and in the picture above this force is shown by the vector Fz. This force is divided over the two parts of the leg: vectors F1 and F2. These two forces are pushing the legs sidewards (F3 and F4) as well as downwards (pink vector without a name).

The force we are interested in is the force that pushes your two pieces of leg away from eachother (and thus make the servo fight to keep it's position) or in other words: F3 and F4. The bigger these are, the more force has to be applied by the servo's to keep te legs in the right position.

When you mount your legs less wide (or more vertical), F3 and F4 will become smaller (I hope you can see that, otherwise I'll make a new drawing).

Hope this helps.

 

PS: if you add a spring the servo would still be fighting, but now in the opposite direction ;)

Thanks, that really helps to clear things up.  I think I can do something there.  I was never really happy with the legs anyway, think they look good but don't work as well as I'd hoped.

I think I will concentrate on getting him to move as-is first, which he is somewhat managing, and then have a look at optimising the leg design.

Sorry, after thinkikng it through again, the springs would probably help a bit to keep the legs from being pushed sideways, but what you must consider with them is that they will make your servo fight to extend the legs... unless the springs are very weak, and not enough to keep the legs from sliding outwards on there own

The springs I've got are pretty weak, but they do seem to help. Hopefully I should be able to get some video of staggering this weekend.

I,m ansolutely looking forward to seeing this beast doing some real work :)