Thursday, March 20, 2014

Chaining Dynamixel XL-320 Servos with AX-12

I've been experimenting with the XL-320 servos. Their small size and low cost make them perfect for actuating the non load bearing parts of a robot. For example, a pan/tilt camera and hand grippers. Ideally I'd like to chain the XL-320s to the existing AX-12s in my robot to save weight and space. There are a few problems though:

  • They require 7.5v versus 12v.
  • They use a Molex Micro-Latch connector instead of the Spox

I decided to build a small board that lowers the voltage and adapts the connector types. It was a little tricky finding a efficient voltage regulator that was small and powerful enough. The people on the Trossen Robotics Forums helped though. Finally settled on the SR05S7V2.

Wiring was straight forward:

AX-12 Data -> XL-320 Data
AX-12 GND -> XL-320 GND -> SR GND
AX-12 VDD -> SR V-IN
XL-320 VDD -> SR V-OUT

Some pictures.



  1. I know this is old, and maybe you've abandoned this blogspot already, but i wanna ask if CM-730 from darwin op can detect XL-320?
    Thanks in advance

  2. If it works with the AX-12's then it will work with the XL-320, they use the same exact protocol.

    You just need to change the voltage from 12v to 7.4v

    1. hello sir, i have try this with 2 battery and 2 OpenCm. battery 3 cell for Ax-12 and battery 2cell for XL-320. But why only xl-320 that was running. and AX-12 only get power but not data. would you like to explain to me. whats wrong with this?

    2. The point of this project was to only use one battery. A 12v battery. If you are using two batteries at the same time then there is some confusion.

    3. my wiring like this :
      (+)12v battery to (+) AX-12
      (-)12v battery to (-)7.4v battery & to (-)AX-12 & (-)XL-320
      data AX-12 to data XL-320 and data of OpenCM.

      what do you thing about this? would you like to explain to me, what should i do, if i dont have the regurator?

    4. or what do you thing if i use 5V for XL-320? so i can use ubec regurator for this system.

    5. Your setup should work. Did you assign the AX-12 and the XL-320 different IDs? If they are using the same ID there will be a conflict.

      I don't know if XL-320 will work at 5v, you'd have to check the specs.

    6. yes. i have check the ID. AX-12 use ID13 and XL-320 use ID6

    7. but if i use only one kind of servo, it is work. but if i combine both of them, only one kind of servo that was working.

    8. This comment has been removed by the author.

  3. This comment has been removed by the author.

  4. This comment has been removed by the author.

  5. Hello Aaron
    I'm doing a project that I want the AX-12a and XL-320 to work with Arduino Mega and IC: 74LS241N

    They work separately, but not together.

    TX = 1
    Rx = 0
    Data = 2

    Voltage AX 12a = 12 V. 1Mb.
    Voltage XL 320 = 7.4 V. 1Mb.

    Ax 12a program:

    //------------------------Libreria Servos Dymnamixel AX-12----------------------------

    //-------------------------Declaracion De Variables-----------------------------------
    int vservo = 1023; // velocidad movimiento de los dedos (0-1023)

    void setup(){
    Dynamixel.begin(1000000,2); //Velocidad datos 1Mbps Pin Rx=0 Tx=1 Control 2 Servos

    Dynamixel.setEndless(1,OFF); // Desconecta la rueda de los servos
    Dynamixel.setEndless(2,OFF); // Desconecta la rueda de los servos
    Dynamixel.setEndless(3,OFF); // Desconecta la rueda de los servos
    Dynamixel.setEndless(4,OFF); // Desconecta la rueda de los servos
    Dynamixel.setEndless(5,OFF); // Desconecta la rueda de los servos



    void loop(){
    Dynamixel.moveSpeed(1,200,vservo); // Id, Posicion (0-1023), Velocidad (0-1023)
    delay (1000);
    delay (1000);

    Program XL 320:

    // ========================================
    // Dynamixel XL-320 Arduino library example
    // ========================================

    // Read more:

    #include "XL320.h"

    XL320 robot; // Name your robot (Si no no funciona¡)

    #include // Si desea utilizar Software Serial, descomente esta línea.
    SoftwareSerial mySerial(0, 1); // (RX, TX) // Set the SoftwareSerial RX & TX pins

    void setup() {


    robot.setJointSpeed(10, 1020); // Indica la Velocidad del servo XL320 (0-1023)


    void loop() {

    robot.moveJoint(10,1023); // (id,angulo (0-1024))


    I beg you inform me how to make it work together.

    Thank you so much

  6. Hard to say, I used a OpenCM 9 for my project. Not sure if that's the difference.