Connect and control Robotis Dynamixel Smart Servos to ARC. This open-source plugin converts the Virtual Servo ports on ARC (v0-v99) to control Robotis Dynamixel Servos.
How to add the Dynamixel robot skill
- Load the most recent release of ARC (Get ARC).
- Press the Project tab from the top menu bar in ARC.
- Press Add Robot Skill from the button ribbon bar in ARC.
- Choose the Servo category tab.
- Press the Dynamixel icon to add the robot skill to your project.
Don't have a robot yet?
Follow the Getting Started Guide to build a robot and use the Dynamixel robot skill.
How to use the Dynamixel robot skill
Connect and control Robotis Dynamixel Smart Servos with ARC, including Arduino and Robotis controllers. This open-source plugin converts the Virtual servo ports with any EZ-B (v0-v99) to control Robotis Dynamixel Servos. The servos supported are XL-320, AX-12, and XL430 compatible protocols. Dynamixel Servos are very different than regular hobby PWM servos. Firstly, they are considered much more professional due to their design, specifically for robotics use. Each Dynamixel servo contains a microprocessor. The microprocessor is told what position to move the servo into over TTL at the configured baud rate.
ARC Capabilities
ARC has many parameters that can be assigned to servo movements. When selecting a servo, these parameters are specified by script commands or in the Advanced menu of robot skills. This skill supports the following ARC parameters...- Servo position
- Speed
- Release
- Velocity
- Acceleration
Speed, Velocity, and Acceleration, etc.
When configuring the speed, velocity, and acceleration settings, the manual for the dynamixel servo model should be referenced. Different servos will use specific settings and ranges for these parameters. Check the servo manual for the required parameters, such as Speed. To view the manual for your dynamixel model, look here: https://emanual.robotis.com/docs/en/dxl/Cable Accessory
If you use this robot skill with an Arduino or EZ-Robot controller, you will require a modified cable to connect your servos to the microcontroller. If using a Robotis microcontroller, you do not need to make a specialized cable. The modified cable should connect the RX and TX to READ servo positions for bidirectional communication. Instructions for connecting the servo to READ positioning are below.EZB Controller Types
There are several different EZB controllers, each with its own hardware configuration. Below, we cover the controllers and what UART should be used.EZ-Robot IoTiny The IoTiny does not have a hardware UART, so it cannot read servo positions. This means you can use any digital ports to transmit servo positions to the servo. Connect any digital port of the IoTiny to the signal wire of the dynamixel connector.
Arduino/EZ-Robot EZB v4 Wiring For Reading Positioning Using this diagram, you must wire the servo to these controllers manually. It would be best to connect the TX and RX ports to read servo data with bidirectional communication. On the EZ-Robot EZ-B v4, ports D5 (TX) and D6 (RX) are for UART #1.
Robotis Open CM9.04 Controller The Robotis Open CM9.04 controller can support servos connected directly to itself or through the expansion board. If using only the controller, the UART #0 is used in ARC. If using the expansion board, UART #2 is used in ARC.
Robotis OpenCR Controller The Robotis OpenCR controller can support servos connected directly to the onboard connectors. This uses UART #2 in ARC, selecting UART #2 in the dynamixel robot skill config.
UART/Serial Port Overview
There are a few options for connecting the Dynamixel servos covered above. Here is a summary...EZB controllers without hardware UART (such as IoTiny) will use software serial pins to transmit servo positions only; they cannot read servo positions. With this setup, you can use any digital port.
EZ-Robot EZ-B v4 or Arduino Mega is UART #1 (port D5 & D6). But depending on how many UARTs EZB has, you can connect to any UART.
Robotis Open CM 9.04 without expansion board uses UART #0.
Robotis Open CM 9.04 with expansion board uses UART #2.
Robotis OpenCR uses UART #2.
Voltage
Most Dynamixel servo documentation states the operating voltage in the manual. Check the documentation for your dynamixel servo model to ensure your power source is sufficient. If you experience the unusual behavior of Dynamixel servos, the first standard issue is insufficient power.Servo ID
Each Dynamixel servo has a unique ID. Because they are chained together through one cable, each servo must be given a unique ID. Servos with the same ID will respond to the same commands and mirror their behavior. New Dynamixel Servos come pre-configured with the ID of 01. servo V0 relates to dynamixel ID:0, V1 is dynamixel ID:1, v2 is dynamixel ID:2, and so on...Using this configuration utility, you can assign new ID's to servos. You may also test the servo to ensure the ID was successful.
The address and value range are also displayed in the control tables.
Video Demo With Robotis Arm
This video uses a Robotis Dynamixel arm and XM430 servos with an OpenCM9.04 controller.Troubleshooting Dynamixel Servos
If the servos are not responding, verify that the physical connection is correct. Next, confirm that adequate power is provided to the servo. Finally, verify that this robot skill config selected the servo ID and correct type.If the XL430 or similar type servo is not responding, the torque may be disabled. This can be force-enabled by using the ControlCommand or releasing the servo. When the servo is released, it will automatically allow torque once it is instructed to move.
The configuration window of this robot skill has some tools for diagnosing the connection. You can use these diagnostic tools to verify a bi-directional communication with the servo. For example, you can use the PING or READ servo POSITION to confirm that the servo communicates bi-directional with the EZB.
Step by Step Instructions
Once the servo is wired and sufficient power is provided, you can use any robot skill in ARC that uses servos. It will work with Auto Position, Camera, WiiMote, Joystick, and more. This example will show you how to move a dynamixel servo with generic servo robot skills. Before following these steps, ensure you have this plugin installed.Step 1 Load ARC
Step 2
Connect to your I/O controller.
Step 3
Add the robot skill by selecting the Project tab and Add Robot Skill.
Step 4
Navigate to the servo tab and select Dynamixel. If the plugin has been successfully installed, you will see the Dynamixel plugin in the list.
Step 5
Your project will now have the Dyamixel robot skill. Press the Config gear icon to load the configuration screen.
Step 6
Enter the baud rate that matches your servo configuration. The servos have a baud rate specified or a default baud rate shipped from the factory. If you need to change the baud rate of the servo, use the Dyanmixel utility. You cannot change the baud rate of the servo in ARC. This value is the baud rate that the EZ-B will use to communicate with the dynamixel servo. This must match the baud rate of the servo.
Step 6a
Specify what port the servo is connected to on the controller. Following this recommendation is essential. The plugin has blue question boxes (and throughout the ARC software) to assist your robot development. It is recommended that you use the blue question marks and read the content to understand what options do.
Step 7
Each dynamixel servo will have a unique ID. Enable each ID for the servos by checking the respective box. When an ID is checked, the ARC software will use the Vx (virtual servos) corresponding with that ID. For example, if you enable Dynamixel ID #2, the ARC V2 servo will control it. Also, specify the protocol version of the servo. Different dynamixel models will use one of the two protocols. Consult the datasheet of the dynamixel servo to know what protocol it uses -or- contact Robotis for more information on using their product. Ensure you have entered the MAX resolution for that servo model to get the servo's full resolution. Each model has different resolutions or can be configured using the Dyanmixel utilities.
Step 8
After you have enabled your servos, press Save
Step 9
We will show you an example of how the servo can be moved. We will do this by using a generic horizontal servo robot skill. Press Project -> Add robot skill to return to the Add robot skill menu. Navigate to servo and select Horizontal Servo. Remember, any robot skill in ARC that uses servos can now control dynamixel servos using the respective Vx (virtual) servo ID.
Step 10
Press the GEAR icon to configure the horizontal servo robot skill.
Step 11
To configure this robot skill to use a virtual servo, select the servo to bring up the port dialog. This applies to all robot skills in ARC that use servos.
Step 12
Select the Virtual servo ID for your dynamixel servo from the list and press Close.
Step 13
Now, use the sliders to specify the Minimum and Maximum position you wish this servo to move, and press Close.
Control Commands for the Dynamixel robot skill
There are Control Commands available for this robot skill which allows the skill to be controlled programmatically from scripts or other robot skills. These commands enable you to automate actions, respond to sensor inputs, and integrate the robot skill with other systems or custom interfaces. If you're new to the concept of Control Commands, we have a comprehensive manual available here that explains how to use them, provides examples to get you started and make the most of this powerful feature.
Control Command Manual// Set the LED state of the servo to on or off by passing true or false
- controlCommand("Dynamixel", "SetLED", "ServoPort", "true|false")
// Enable or disable the torque, which releases the servo if disabled
- controlCommand("Dynamixel", "TorqueEnable", "ServoPort", "true|false")
//Read the number of bytes from the specified address of the servo port.
- controlCommand("Dynamixel", "ReadRam", "ServoPort", "Address", "BytesToRead")
// read a byte from the specified address of the servo port.
- controlCommand("Dynamixel", "ReadRamByte", "ServoPort", "Address")
// read a uint16 from the specified address of the servo port.
- controlCommand("Dynamixel", "ReadRamUInt16", "ServoPort", "Address")
// read a int16 byte from the specified address of the servo port.
- controlCommand("Dynamixel", "ReadRamInt16", "ServoPort", "Address")
// read a int32 from the specified address of the servo port.
- controlCommand("Dynamixel", "ReadRamInt32", "ServoPort", "Address")
// write a value byte to the ram at the specified address
- controlCommand("Dynamixel", "WriteRamByte", "ServoPort", "Address", "Value")
// write a value unsigned int16 to the ram at the specified address
- controlCommand("Dynamixel", "WriteRamUInt16", "ServoPort", "Address", "Value")
// write a value signed int32 to the ram at the specified address
- controlCommand("Dynamixel", "WriteRamInt32", "ServoPort", "Address", "Value")
// Returns the temp of the dynamixel servo at the specified port. (Returns Integer [-2,147,483,648 to 2,147,483,647])
- controlCommand("Dynamixel", "GetDynamixelTemp", "ServoPort")
// Returns the load direction from the servo at the specified port. (Returns String)
- controlCommand("Dynamixel", "GetDynamixelLoadDir", "ServoPort")
// Returns the load value from the servo at the specified port. (Returns Integer [-2,147,483,648 to 2,147,483,647])
- controlCommand("Dynamixel", "GetDynamixelLoad", "ServoPort")
// Returns the ping result of the servo. (Returns Boolean [true or false])
- controlCommand("Dynamixel", "GetDynamixelPing", "ServoPort")
Related Tutorials
Related Hack Events

DJ's Third Hack Night

DJ's 4Th Hack Event (Arduino, Bioloid, Lewansoul, And More)

Hacking Robotis Opencm 9.04 With Bioloid

Dj's 5Th Live Hack Session

DJ's 9Th Live Hack - Raspberry Pi + Dynamixel... Together...

The Lattepanda Robot Hack
Related Robots
Related Questions

Dynamixel With Ezbpi Server

Leap Motion Combine With ARC To Control In Space

Controlling Speed On Dynamixels.
Upgrade to ARC Pro
ARC Pro is more than a tool; it's a creative playground for robot enthusiasts, where you can turn your wildest ideas into reality.
Sweet! Thanks DJ!
Updated to support native Velocity and Acceleration for ARC 2021.06.11.00 or newer. See this release note: https://synthiam.com/Products/ARC/Releases/ARC-2021-06-11-00-Early-Access-Runtime-20634
Some new awesomeness! Thanks!
I'm having some strange behavior on Alan and Alena's dynamixels. The robots have not been on for several months and I needed to activate them for an interview. I updated to the latest build and updated the skill.
The servos power up and move for a moment, but they reach an odd start position and then they do not respond to input from touchpad or the sliders. It happens on both robots and the rest position is the same for both. I'll dive deeper into the issue tomorrow and make a video if I can't troubleshoot the issue.
You can turn on servo debugging to see what’s going on temporarily
also remember the global servo position limit is in a new place. It’s not global for arc. So if you had it set before, it will need to be set again
...ahhhh that's right, I forgot about the global setting...I bet that's it...I'll take a look! Thanks for the reminder!
I am having an issue that started with the latest revision. I had the dynamixels working, but when the acceleration and velocity settings were added it stopped responding. I am not sure if it is because of this but it did start exactly on that day. I am getting connection on ARC and I can see the green communication light flicker when I move a horizontal control, but the servos remain torqued off. I'm not sure what the global servo position is so maybe the solution is in your previous response. I just couldn't find anything called global servo limits anywhere. Could it be a baud rate issue? my servos are set to 1000000 baud* That is the speed that the OpenCM talks to the servo on and not the speed that the ARC software talks to openCM... that is set to 921600 on COMUSB connection settings page... not sure if I need DTR RTS enabled for this.... but like I said, it worked prior to the last change so Im guessing my settings should work. The Dynamixels do get power and the leds turn on and off with the script below so I know they are talking back and forth
The ezb baudrate and servo baudrate can be different. It’s okay because they’re different ports on different connections.
dtr and rts only need to be enabled if the ezb won’t connect at all. If the ezb is connecting, then it’s golden.
I’ll take a peek to see if the previous changes would affect anything. Stay tuned