Fabrication...

Here are some links that may help once I move onto fabricating the various pieces required to build the hexapod’s body. This is a simple 4 legged walking robot that was machined from an A4 piece of 4mm ply wood. This is the guy’s website, with more details of how he produced the robot. And this is the Dutch prototyping lab that he used to laser cut the pieces. Finally, this is an interesting link to David Buckley’s walking robots page.

Linkfest...

A collection of links that I’ve been using recently for research. Servos and robotics Hitec HS-422 Servo. The servos I currently have; likely not suitable for use as actual leg servos due to lack of torque. Useful link as www.superdroidrobots.com has links to the spec sheet for the servo and a selection of different spec servos with corresponding prices. More useful to me than the actual Hitec website as that doesn’t list relative prices.

Fundamental design flaw in the servo controller code

In my opinion there’s a fundamental design flaw in the both the 8 channel and the 64 channel servo controller firmware that I’ve presented. Both allow the serial data handling code to take priority over the PWM generation code. This means that there is no way to guarantee that the PWM generation code will produce a perfect pulse train in the presence of configuration changes being sent to the controller via the serial port.

Atmel ATtiny2313 Servo Controller v0.2 - source code

Here’s the source code to the 64 channel ATtiny2313 servo controller. Note that you’ll need to use up to 8 CD74HCT238E, or equivalent, demultiplexer chips and that you can adjust the number of servos that you can control in steps of 8 using as many or as few CD74HCT238E chips as you want. If you only want 8 channels then you can do this without any demultiplexer chips; see here for source code to the 8 channel version.

64 channel servo controller...

I’ve been experimenting with the servo controller that I developed for the ATtiny2313 here and the demultiplexing chips that I mentioned here. The result is a 64 channel servo controller that seems to work pretty well. Right now I haven’t breadboarded all 64 channels, I have two of the CD74HCT238E chips connected to the ATtiny but I/O pins and he firmware would drive 8 of them if they were connected to give 64 channels.

Atmel ATtiny2313 Servo Controller v0.1 - source code

The jitters and general instability of the hacked together simple servo controller (see here) for the ATtiny2313 were, it seems, down to the fact that the internal clock wasn’t stable enough and this caused enough timing issues to throw the PWM off enough to jiggle the servo position around rather than hold it steady. This morning my external 4MHz crystals arrived and after changing the processor’s fuse bits to accommodate the change in clock source everything was fine and the code started behaving itself.

CD74HCT238E

My progress has been slow over the past couple of weeks because a) I’ve been rather busy with other things and b) an order of components has gone missing in the post. The order contains some 4mhz crystals and therefore my server controller firmware testing has been on hold as I’d like to remove the potential clock instability as a potential cause of the controller jitters before continuing my debugging.

Atmel ATtiny2313 Servo Controller v0.1

This morning I tested the first version of my custom servo controller. It’s currently heavily based on the source for 16 channel servo controller that I’ve mentioned before. What I did was simply adjust that source for my target processor and the fact that I’m using it with a 4Mhz internal clock rather than the more standard “RS232 baud rate friendly” 3.6864 MHz that the original code used. The main changes were to the reduce the controller from 16 channels to 8 since the ATtiny2313 doesn’t have enough pins to run 16 channels and to adjust the general setup to account for the new processor.

AVR Studio 4

I’ve been spending some time getting to know AVR Studio 4, especially the simulation and debugging functionality. It’s a very functional and very useful free development suite that can be downloaded from Atmel from here. As I mentioned a while back I have had a C compiler and development and programming tool chain set up for a while now but I hadn’t got around to working out how to debug the code.