Results 1 to 10 of 10

Thread: OpenCM9.04 and Dynamixel AX-12A

  1. OpenCM9.04 and Dynamixel AX-12A

    I am having a hard time setting up a brand-new OpenCM9.04 board with one Dynamixel AX-12A actuator. The board is working great and i can upload new code, communicate with serial (even via bluetooth on UART2, etc.) but I can't get the board to control the motor.

    Here's the example code

    Code:
    #define DXL_BUS_SERIAL1 1  //Dynamixel on Serial1(USART1)  <-OpenCM9.04
    
    
    Dynamixel Dxl(DXL_BUS_SERIAL1);
    
    
    void setup() {
      Dxl.begin(3);
    }
    
    
    void loop() {  
      Dxl.writeWord(1, 30, 100); //set ID
      digitalWrite(BOARD_LED_PIN, LOW);
      delay(1000);
      Dxl.writeWord(1, 30, 1000);//set ID
      digitalWrite(BOARD_LED_PIN, HIGH);    
      delay(1000);
    }
    The board is externally powered through a 11.1V battery and I strictly followed the wiring diagram as indicated by Robotis.



    I can't get the motor to turn. Just to make sure. The motor is completely new and should by default have the ID 1 and 1Mbps baudrate.

    Am I overseeing an obvious mistake? Thanks for any help!

  2. #2
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,285
    Images
    27
    Rep Power
    275

    Re: OpenCM9.04 and Dynamixel AX-12A

    Default baudrate of AX series dynamixels is 1Mbps, but you are trying to use Dxl.begin(3) when it should be Dxl.begin(1).
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  3. Re: OpenCM9.04 and Dynamixel AX-12A

    Changed the code, but still nothing happens. I've checked the V+ and GND and the voltage is at around 12V.

    Using the buspirate and a Logicsniffer software, I tried to listen to the TTL port.



    The little peaks in the picture have a period width of 200us. The time range of the entire screenshot is about 800ms (just to give you an idea). When hitting refresh, I am getting the peaks at different positions, so I would guess that the TTL communication is working, but the motor is still not responding/turning?

  4. Re: OpenCM9.04 and Dynamixel AX-12A

    In the screenshot above my sampling frequency was too low. Here's a zoom onto one data package sent through TTL. The period width seems to be 10us which equates to 100kHz. But shouldn't the baudrate be 1000kHz?


  5. #5
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,285
    Images
    27
    Rep Power
    275

    Re: OpenCM9.04 and Dynamixel AX-12A

    If you are actually sampling at a sufficiently high rate to actually capture the packets, then - assuming I did the math correctly - the two packets you send should be:
    writeWord(1, 30, 100)
    Code:
    0xFF 0xFF 0x01 0x05 0x03 0x1E 0x64 0x00 0x74
    writeWord(1, 30, 1000)
    Code:
    0xFF 0xFF 0x01 0x05 0x03 0x1E 0xE8 0x03 0xED
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  6. Re: OpenCM9.04 and Dynamixel AX-12A

    I did manage to get it work. I had to use Dxl.begin(3) though since I noticed with the logic analyser that anything below was giving less baudrate than 1Mbps.

    Click image for larger version. 

Name:	Screenshot-2.jpg 
Views:	1394 
Size:	5.8 KB 
ID:	6160

  7. #7

    Re: OpenCM9.04 and Dynamixel AX-12A

    A few things:

    The "Dxl" object uses protocol version 2, which is only recognized by XL-320 and Dynamixel Pro servos.
    The "Dxl" object uses a different baud rate numbering -- "3" means 1 Mbps.
    If you don't see the wire being high (positive) on the logic analyzer when nothing is sending, something is wrong. The board should idle the wire high.
    You can change the "Dxl" object to version 1 protocol with setPacketType(DXL_PACKET_TYPE1) but the baud mapping is still the same.
    // Dynamixel 2.0 Protocol -> 0: 9600, 1: 57600, 2: 115200, 3: 1Mbps

    The t_AX_XL320_Mixed sample sketch in the ROBOTIS_OpenCM install shows you how to talk to the AX servos.

  8. #8
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,285
    Images
    27
    Rep Power
    275

    Re: OpenCM9.04 and Dynamixel AX-12A

    Quote Originally Posted by jwatte View Post
    A few things:

    The "Dxl" object uses protocol version 2, which is only recognized by XL-320 and Dynamixel Pro servos.
    The "Dxl" object uses a different baud rate numbering -- "3" means 1 Mbps.
    If you don't see the wire being high (positive) on the logic analyzer when nothing is sending, something is wrong. The board should idle the wire high.
    You can change the "Dxl" object to version 1 protocol with setPacketType(DXL_PACKET_TYPE1) but the baud mapping is still the same.
    // Dynamixel 2.0 Protocol -> 0: 9600, 1: 57600, 2: 115200, 3: 1Mbps

    The t_AX_XL320_Mixed sample sketch in the ROBOTIS_OpenCM install shows you how to talk to the AX servos.
    ...great... So, v1.0.2 is not actually built from the github repo. Yep, such open.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  9. Re: OpenCM9.04 and Dynamixel AX-12A

    Quote Originally Posted by tician View Post
    ...great... So, v1.0.2 is not actually built from the github repo. Yep, such open.
    Last time I looked, all the example and library source code was in the robotis zip file except for the libcs3 chunk.

    What part of OpenCM are you looking for in a github repository?

  10. #10
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,285
    Images
    27
    Rep Power
    275

    Re: OpenCM9.04 and Dynamixel AX-12A

    I was expecting at least one of the github repos that I'd been working from exclusively since the v0.9.8 release to have been synced to contain the most recent versions of the core, libraries, examples, and bootloader.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. OpenCM9.04 IDE Problems
    By vehemens in forum Robot Computers
    Replies: 18
    Last Post: 01-29-2017, 06:24 AM
  2. Question(s) Control AX/RX Dynamixel with Roboplus task with OpenCM9.04 type C + OpenCM 485 EXP
    By kongguan in forum DYNAMIXEL & Robot Actuators
    Replies: 0
    Last Post: 04-22-2015, 04:21 AM
  3. Question(s) OpenCM9.04 ROM Overflow
    By horchler in forum Robot Computers
    Replies: 0
    Last Post: 08-18-2014, 05:10 PM
  4. Robotis OpenCM9.04 need help.
    By Hari in forum Robot Computers
    Replies: 38
    Last Post: 03-10-2014, 11:21 AM
  5. Robotis OpenCM9.04
    By TXBDan in forum Robot Computers
    Replies: 9
    Last Post: 01-28-2014, 09:26 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •