Dynamixel Servos

Makers who have begun to outgrow introductory robotics and have started to research more powerful systems may be familiar with the Dynamixel series of servo motors. The Dynamixel has a number of advantages over the common RC Servos that are typically used in RC airplanes and beginner-level robotics projects. In general, they add functionality and flexibility at the cost of added complexity and a slight loss of cost efficiency, making them ideal for robotics projects that are beginning to outgrow the hobby stage.

Pros:

  • Lightweight for their torque: just half the weight of a metal geared RC servo of the same weight (great for robot arms that have to lift their own weight).
  • Single  Bus: all the motors in the system can be attached to the same network bus, with each motor only responding to instructions marked with its specific address. No more rats nest of cables!
  • Programmable: Dynamixels contain an internal memory you can modify to change their speed, range of angles, and address. They can also return data about their operation to be used by their controller system
  • Mistake-proof: temperature and over-voltage protection is built in and will automatically shut down the motor when overstressed, rather than shredding their own gearing like an RC servo.
  • Wide Operating Rotation: 300˚ or higher, compared to the maximum 180˚ of virtually every RC servo.
  • Continuous Rotation Mode: most dynamixels can disengage their gearing on command and rotate freely, though they lose their servo functions when doing so.
  • Scalable: the cheapest dynamixel (the AX-12) costs $45 and has 212 oz-in of torque, but more expensive models can go all the way to 1,400 oz-in and use the same network and instruction set, making it easy to upgrade cheap prototypes into much more powerful systems.

Cons:

  • Cost/Torque Disadvantage: the $45 AX-12 has 212 oz-in of torque, compared to 277.6 oz·in on a $18 LewanSoul LD-20MG metal-geared RC servo.
  • Increased Complexity: the cost of all those extra features. Because they are programmable and use a UART network instead of PWM, Dynamixel motors require specialized controllers and custom libraries to run, making projects that use them significantly more complex.

A Direct Comparison:

To provide a specific comparison to reference, here’s a direct comparison of the similarly priced Dynamixel AX-12 and the FEETECH FT5121M and FEETECH FT5335M from Pololu:

Stat AX-12 FT5121M  FT5335M
Voltage  12V  7.4V  7.4V
Torque  212 oz·in  285 oz·in  550 oz·in
Speed  0.169 sec/60°  0.12 sec/60˚  0.18 sec/60˚
Weight  55g  60g  180g
Size  32 x 50 x 40 mm  40.5 × 20.5 × 37.5 mm  62.8 × 32.5 × 55.9 mm
Rotation  300° or Continuous Turn  180˚  180˚
Price  $44.90 $49.95  $39.95

As can be seen, the stats between the AX-12 and FT5121M are pretty close, so you don’t pay much of a premium for the extra features on the AX-12. With larger motors, you can also note the tradeoff between power and weight – note how the FT5335M’s higher torque comes at the cost of being almost twice as heavy, making it less practical for something like a robotic arm despite its power.

Getting Started:

What you’ll need:

[link] AX-12
[link] Arbotix-M Microcontroller
[link] 5V FTDI Cable *UartSBee also works but it’s more expensive
[link] 12 V power supply *also available on Amazon
[link] 2.1/5.5mm Jack to 2.5/5.5mm Plug Adapter *optional, depending on power supply
[link]  Power hub 1 (6 way, no capacitor) *optional
[link] Power hub 2 (4 way with capacitor) *optional

I’m not going to do a full tutorial of how to do the initial setup of the Arbotix-M unit, since Trossen Robotics already has a really good one here:

Initial Setup Tutorial

However, there are still some things to keep an extra close eye on! Here are some recap notes on potential issues:

  • This tutorial requires Arduino 1.6 or higher. I found that all the example code works fine in Arduino 1.8, the latest version as of this post.
  • While the Arbotix-M is programmed with Arduino, it does not have the USB port that most Arduinos have, and must be programmed through an FTDI cable! I missed this the first time I set up the platform and it delayed my project by a week. Don’t make the same mistake I did.
  • You can extend the Dynamixel communication bus using one of the two extension units above. They can also take in extra power so you don’t overdraw your power supply when you’ve got a lot of motors, and one has an extra capacitor to buffer the power line.
  • Both the Arbotix-M and the communication bus extenders both have power jacks that are 2.5×5.5mm, like an Arduino. However, most 12V power supplies, including the ones on their website are 2.1×5.5mm and will not fit. You need a 2.1 to 2.5 converter, also listed in the above parts list. Double check!
  • Don’t miss the Setting Dynamixel IDs part 2 of the  at the bottom, which gets you set up with the Dynamanager Java application. You need to do this to use more than 1 servo on your network bus, otherwise they’ll all respond at once!

Example:

Once you’re set up with a network of servos with different addresses, and have tested each motor with AXSimpleTest to make sure they work, here’s a quick Arduino sketch to let you test it out:

//import ax12 library to send DYNAMIXEL commands
#include <ax12.h>
int addr = 0;
int location = 0;

void setup()
{
 Serial.begin(9600);
}
 
void loop()
{
 while (Serial.available() > 0) 
 {
 
  //look for valid integers for brightness and store to storage variables
  addr = Serial.parseInt();
  location = Serial.parseInt();
  
  Serial.print("Motor: ");
  Serial.print(addr,DEC);
  Serial.print(" Location: ");
  Serial.println(location,DEC);
 
  //look for the newline in the serial stream:
  if (Serial.read() == '\n') {
   //constrain values to fall within viable angle range
   location = constrain(location, 0, 1024); //limit 1024 for ax12s, 4095 for mx64
 
   Serial.println("#############");
   Serial.println("Comm Established with address " + String(addr));
   SetPosition(addr,location); //set the position of servo at address
   delay(1000); //wait for servo to move
 
   int temp = ax12GetRegister(addr,AX_PRESENT_TEMPERATURE,1);
   Serial.println("current temperature");
   Serial.println(temp);
   int pos = GetPosition(addr);
   Serial.println("current position");
   Serial.println(pos);
   Serial.println("current error");
   Serial.println(ax12GetLastError());
  
  }
 }
}

To use it, type in the address of the motor you want to move, followed by a number from 0 to 1024 representing the angle you want. Make sure your serial monitor appends a newline on send, and hit enter – that specific motor in the network should move. For instance, typing 2,512 should move motor #2 to about the halfway point of its total rotation at 150˚.

If each motor in your system works, you should be all set to start implementing them into more complex projects.

Leave a Reply

Your email address will not be published. Required fields are marked *