AX-12+ Library

I've been working with the AX-12+ servos from Dynamixel and have been using six of them in a configuration to simulate the hind legs of a robot dog.

The problem I've found is that every so often the AX-12+ will not respond to a command and the program will hang. I'm aware that in the most recent library incarnation this has been addressed to some degree by adding a timeout etc. but as I am going to make a PCB up for this project anyway I thought I would modify the library to try to see if this problem could be rectified.

Looking at the datasheet the first thing I try is to dispose of the half-duplex part of the library and use the recommended circuit straight from the datasheet. This is shown below:

/media/uploads/ms523/ax12.png

So after getting and wiring up the ICs onto a breadboard I start modifying the library. For this new library I need to replace the half-duplex object with a full-duplex object and add in an extra DigitalOut object to select the direction of the buffer.

I also strip out all the methods that I don't plan on using and strip out extra functionality to simplify the library wherever possible. What I'm left with is a bare-bones library that has two basic methods:

  1. Move AX-12+ servo to a new position
  2. Read current position of an AX-12+ servo

I figure that once I have set up the servo to run at the correct voltage, angle limits and ID (which I can do with the current library) then this is all the functionality I need - and it should be a fraction of the size of the full library.

The final effort can be found here


Please log in to post comments.