Posts from 2009
-
:
Welcome
Hi, my name is Len Holgate and this is a blog about my new project to design and build a hexapod robot; a mechanical vehicle that walks on six legs… By day I design and build high performance TCP and UDP servers for the Windows … -
:
A-pod, an ant inspired hexapod
This is the kind of thing that I mean when I say ‘hexapod robot’. I particularly like the head and mandibles. More details can be found here: http://forums.trossenrobotics.com/showthread.php?t=2762 and here: … -
:
Micromagic systems
Micromagic systems do robotics and animatronics for the film and tv industry and have quite a nice selection of hexapod robots. It’s especially interesting to see the evolution of their robots here. Their latest stuff is very … -
:
Servos with status feedback
I saw these Dynamixel DX servos mentioned on Trossen Robotics this morning, see here. They’re interesting because they have a richer interface than the normal hobby servos that I’ve been looking at and they provide a multidrop … -
:
Useful links and suppliers
So far most of my more interesting components have been purchased from Cool Components mainly because they’re UK based and they stocked stuff I was interested in. I found them via SparkFun which is a treasure trove of fun; … -
:
Pulse width modulation for servo position control
First some basics: servo motors are what I’ll be using to provide movement for the robot. Each leg will consist of at least three servo motors (1 at the knee and two at the hip). As you’ll see from the wikipedia link above, … -
:
The servos are twitching
My package from Cool Components arrived this morning. My choice of prototyping equipment was quickly validated when I plugged together the Arduino and the Pololu servo controller board, plugged in the servos and servo power supply, … -
:
Prototype leg v0.1
I spent a little time at the weekend putting together my three servos into a prototype leg. The idea is that this very quick and very dirty little experiment should give me some more avenues to explore; and something to show people. I had … -
:
Thoughts on the proto leg
The prototype leg has some fairly major failings from a mechanical point of view. The only part that may eventually find its way into a weight bearing leg is the lower leg where the cut out around the knee servo provides ample support for … -
:
First steps in embedded programming; first build the hardware...
This week I managed to scrape together some time to play with some of the non prototype bits and pieces that I purchased for this project. First off was breadboarding a MAX232 chip so that I could talk via my PCs serial port to my … -
:
More thoughts on the proto leg
I adjusted my quick and dirty servo controller program to calculate the number of moves required for the servo that needed to move furthest and then spread the movement of the other servos across the same number of moves. So, given that the … -
:
Once more with feeling
Having decided that the graduated servo positioning method was the way to go to allow for leg sensors to work correctly I started thinking about leg sensors. Here’s a new lower leg with three switches, one on the foot, one to the … -
:
Books for programming an AVR micro
So far I’ve bought three AVR programming books. AVR: An Introductory Course, Programming and Customizing the AVR Microcontroller and Atmel AVR Microcontroller Primer: Programming and Interfacing (Synthesis Lectures on Digital Circuits … -
:
The servo controller problems weren't power supply noise...
I’ve been testing the new leg with one power supply for the servos and one for the electronics and all is working well. I expect that all would be working well if I were using a single power supply for both, as long as I was using the … -
:
Arduino multiple serial disappointment
Tonight I took a look at the ‘software serial’ support in the Arduino. I can’t say I’m that impressed… The Arduino has a built in hardware UART (a hardware serial port) which works as expected. It allows you … -
:
I may have been a little harsh...
After a little more debugging this morning I’m coming to the conclusion that I may have been a little harsh on the Arduino’s software serial port. More when I know more, but I think it’s more of a flow control issue with … -
:
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 … -
:
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 … -
:
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 … -
:
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 … -
:
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 … -
:
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 … -
:
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. … -
:
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 … -
:
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 … -
:
Chiara hexapod
This is rather nice; Chiara Robot from Carnegie Mellon University’s Tekkotsu lab (via HackedGadgets.com). -
:
Redesigning the servo controller firmware
As I mentioned here, there’s a fundamental design problem with the two versions of the ATTiny2313 servo controller firmware that I’ve presented so far (see the 8 channel source code and the 64 channel source code). The timing … -
:
A timer driven PWM servo controller
As I mentioned recently, the original servo controller firmware that I posted was flawed and wasn’t suitable to use as a base for the more complex servo control code that I want to add to the controller. The new firmware follows the … -
:
A timer driven PWM servo controller - part 2
In part1 of this timer driven PWM servo controller I built some code which uses Timer1 in the ATTiny2313 to generate 64 PWM signals. The code in part 1 worked from hard-coded dummy data. The code presented here shows how we can create the … -
:
A timer driven PWM servo controller - part 3
This is part three of a series of articles about the servo controller that I’m building for use in the hexapod robot that I intend to build. The first two articles in the series have presented the timer driven PWM generation code and … -
:
A timer driven PWM servo controller - part 4
The time has finally come to put all of the code from the last three parts of this article together to form a complete serial configured, 64 channel, PWM servo controller for the ATTiny2313 and several CD74HCT238Es. Here’s a recap of … -
:
ATTiny2313 24 channel servo controller schematic
Here is a schematic for a 24 channel version of the ATTiny2313 servo controller. You can expand the number of channels up to the full 64 by adding additional CD74HCT238Es where each additional MUX chip is connected to the next available pin … -
:
Tweaking the servo controller
The 64 channel serial servo controller that I’ve been developing works pretty well for me but most of my development and testing was done in the AVR studio simulator. Once I actually started working with my hardware again I noticed a … -
:
What's next?
I now have an easy to extend PWM servo controller and the next job on my list of things to do is extend it so that it supports the functionality that I feel I need for correct control of my hexapod’s legs. As I mentioned here, … -
:
Extending the servo controller
To be able to implement the new commands for the servo controller I need to adjust the data that we use to control the servos. Right now we have a single byte per servo and that byte contains a value between 0 and 254 which represents the … -
:
All the problems of multi-threading without the threads
One of the problems of moving from the simple three byte SSC style control system to a system where we can do clever things with multiple servos at once is that the data required to do these clever things is bigger than the data required to … -
:
Asynchronous serial responses
Part of the new functionality that I’m developing for the serial servo controller for my hexapod robot is for the servo controller to take its time in moving a servo from where it is at the moment to where I want it to be. The idea … -
:
Registers, stack usage and timing
So far the servo controller development has been reasonably straight forward; once various design issues were considered and once I’d got my head around building the hardware and learning AVR assembly language. However I expect that … -
:
And then switch to the ATMega168...
The new functionality in my servo control takes more memory to implement due to the more complex state that we need to maintain for each servo. The simple controller could support up to 64 PWM channels on the ATTiny2313, the more advanced … -
:
Prototype fabrication
As I mentioned back in April after I’d put together my first prototype leg, “the prototype leg has some fairly major failings from a mechanical point of view”. Ideally the real legs will be designed and cut from sheet … -
:
Moving forward
Due to work pressure and then holidays and then more work pressure I had to take a break from the servo controller for a couple of weeks. Most of the code changes that I had previously been discussing have been implemented and I’m now … -
:
New servo controller commands
The new 64 channel ATMega168 serial servo controller accepts the following commands. All successful commands are echoed back. Parameters are validated and errors are indicated with an error response of [0xFF] [badParamIndex] [Command echo] … -
:
ATMega168 64 channel servo controller
This is the source code for the latest version of the 64 channel servo controller as detailed here. This is an ATMega168 version of the controller that was originally developed for the ATtiny2313 but which was ported to the ATMega when I … -
:
Storing data in the eeprom of an ATMega168
Some of the new commands that I have planned for the servo controller will require that I load and save persistent settings from the ATMega’s eeprom. Having spent a little time looking at the example code in the datasheets it seems … -
:
I seem to have developed something remarkably similar to the SSC 32
I was looking for information to help me decide which servos to buy for the legs; wondering about torque and cost and whatever when I followed a link to the Lynxmotion site and came across the documentation for their SSC 32 servo … -
:
Serial communications issues
I’ve just spent a while tracking down a but which ended up being in my PC based control software rather than in the serial servo controller firmware. The symptoms of the problem were that my servo controller would suddenly to process … -
:
Flow control is the key?
I posted a question about my serial communications issues over on AVRFreaks and so far the answers have been pointing in the direction of including some form of formalised flow control. This makes sense. I’ve yet to decide if hardware … -
:
New design please...
Having discussed my serial communication issues on AVRFreaks I’ve decided that I need a new design for the servo controller. My current design is very successful in doing what I set out to do, which was to give priority to the PWM … -
:
Almost there....
Work on the latest version of the serial servo controller is going well. I’d accumulated a pile of random nice to have ideas, some of which then necessitated some other ideas, and then there was the one must have command (the one … -
:
Moving multiple servos at once
The final command for my serial servo controller is the most complex. The idea behind it is that with a hexapod leg you will want to be able to move the leg to a new position where the new position requires all three of the servos that … -
:
After the servo controller
The work on turning my excel spreadsheet into AVR assembler code which can move multiple servos to arrive at their target locations at the same time is proceeding well. I have the required code operating in a stand alone environment in the … -
:
Integrating the multi-move command
I’m in the process of integrating the stand alone code that implements my ‘multi-servo move’ command and the rest of the controller. It’s harder than it should be, probably because I’m not experienced enough … -
:
Unit testing AVR assembly language
Way back at the beginning of this journey I mentioned the fact that I’d quite like to be able to use some of the development disciplines that I use in my day job during the development of the firmware for my hexapod. Now that … -
:
Repeatable Unit Testing with AVR Assembler and AVR Studio
As I mentioned yesterday the servo controller project has got to the point where being able to unit test the code would be useful to me. In my day job as a C++ server developer I’ve been using unit tests for several years and most of … -
:
Testing, Testing...
The AVR assembly language unit tests that I spoke of last week are going well. I decided to explore the idea of unit testing by writing tests for the easier to test aspects of the serial protocol code and then, as this went well, I decided … -
:
Relative branch out of reach
The test code for the serial command processing code for my serial servo controller is turning out to be the largest piece of assembly language that I’ve written. This means that all of a sudden I’m coming across “Relative … -
:
ChipHacker.com
For those of you interested in the kind of thing that this blog is about you might also find ChipHacker.com useful. It’s a ‘stackoverflow’ for embedded programming and electronics people. Hopefully it will become a useful … -
:
Testing backwards
It’s taken me almost a month but I’m finally back to working on integrating the multiple servo move command into the rest of the code. Well, the integration was done long ago, unfortunately the debugging was the bit that was … -
:
Back to JIT testing
The latest version of the serial servo controller is now fully operational (I’ll upload the source code shortly). There are still some bugs that I’m finding but the work I put in to getting the unit tests in place makes fixing … -
:
ATMega168 64 channel servo controller with 'advanced' servo commands
This is the AVR Studio project and assembly language source code files for the latest version (v7.0) of my 64 channel serial servo controller. This is the latest version of the ATMega168 version of the code which includes all of the new … -
:
New soldering iron...
I decided to treat myself to an early christmas present and bought a 60W temperature controlled soldering station (a ZD-916 which I got from Maplin). All I can say is WOW. Suddenly I can solder neatly rather than making a smeary mess. The … -
:
Sensing servo torque
Whilst playing around with my servo controller I realised that the power used by a servo goes up considerably when it’s under heavy load (such as when it’s pressing against the table and still trying to move). I can, …