Dynamixel AX12 Servo

This little beast is a highly featured piece of kit. It's not the cheapest servo money can buy, but it is certainly very versatile, and delivers a serious bang for your buck.

AX12

Hello World!

Import program

00001 #include "mbed.h"
00002 #include "AX12.h"
00003 
00004 int main() {
00005 
00006     AX12 myax12 (p9, p10, 1);
00007 
00008     while (1) {
00009         myax12.SetGoal(0);    // go to 0 degrees
00010         wait (2.0);
00011         myax12.SetGoal(300);  // go to 300 degrees
00012         wait (2.0);
00013     }
00014 }

AX12 AX12

Library

Import library

Public Member Functions

AX12 (PinName tx, PinName rx, int ID, int baud=1000000)
Create an AX12 servo object connected to the specified serial port, with the specified ID.
int SetMode (int mode)
Set the mode of the servo.
int SetBaud (int baud)
Set baud rate of all attached servos.
int SetGoal (int degrees, int flags=0)
Set goal angle in integer degrees, in positional mode.
int SetCRSpeed (float speed)
Set the speed of the servo in continuous rotation mode.
int SetCWLimit (int degrees)
Set the clockwise limit of the servo.
int SetCCWLimit (int degrees)
Set the counter-clockwise limit of the servo.
int SetID (int CurrentID, int NewID)
Change the ID of a servo.
int isMoving (void)
Poll to see if the servo is moving.
void trigger (void)
Send the broadcast "trigger" command, to activate any outstanding registered commands.
float GetPosition ()
Read the current angle of the servo.
float GetTemp (void)
Read the temperature of the servo.
float GetVolts (void)
Read the supply voltage of the servo.

Datasheet

AX12 Datasheet (PDF)

Tech Specs

The headline features of the AX12 are:

  • 55g
  • 7v - 10v supply
  • 900mA maximum current
  • 16.5kg/cm Holding torque
  • 300 degree or continuous rotation
  • Half duplex serial (8-N-1) interface, up to 1Mbps
  • Feedback for position, temperature, load, voltage etc

It is really mechanically sound too, and comes with a mounting plate, a bracket to fit to the spindle and plenty of nuts and bolts to bolt it all together. It has been designed so that one servo canbe mounted on the spindle of another so you can do multple degrees of freedom just by mounting them on eachother.

Development Notebook Page

If you want to read more details about the development of this library, the full write-up can be found at :

AX12 Notebook page


All wikipages