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 use in robotics. 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 CapabilitiesARC 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 AccessoryThis plugin requires a cable accessory to easily connect your servo to the EZ-B. The cable includes RX and TX if you want to READ servo positions. There are instructions below for connecting the servo to READ positioning.
EZB Controller TypesThere are a few different EZB controllers that each have their hardware configuration. We cover the controllers and what UART should be used below.
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. Connecting TX and RX ports to read servo data with bi-directional communication would be best. On the EZ-Robot EZ-B v4, it’s port D5 (TX) and D6 (RX) 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 OverviewThere 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 for transmitting 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.
VoltageMost 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 common issue is insufficient power.
Servo IDThe Dynamixel Servos each have 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.
Servo LEDsThe LEDs on the dynamixel servo can be controlled using the EZ-Script ControlCommand(). View the Cheat Sheet to see the available ControlCommand syntax for the Dynamixel plugin when editing a script.
Control CommandsThis robot skill supports several control commands. The most useful are the WriteRam commands. These allow the user to send a command directly to the servo RAM. These control commands are not required to use this robot skill, as these are added for advanced users. To use the robot skill and move servos, follow the instructions on this manual page to assign Dynamixel servos IDs to ARC Vx servos.
controlCommand("Dynamixel", "SetLED", Port, true|false); controlCommand("Dynamixel", "TorqueEnable", Port, true|false); controlCommand("Dynamixel", "WriteRamByte", Port, Address, Value); controlCommand("Dynamixel", "WriteRamInt32", Port, Address, Value); controlCommand("Dynamixel", "WriteRamUInt16", Port, Address, Value);
Each WriteRam ControlCommand() specifies the size of the value. This is because control table addresses require a value size (byte, int32, uint16). Check the control table command manual for the variable size it accepts.
For example, this command will set the goal position of an AX-12 servo on port V1 (id 1) to 512.
controlCommand("Dynamixel", "WriteRamUInt16", v1, 30, 512);
The parameters you need for the control commands are identified in the image below when viewing the control table. Notice the SIZE parameter, which determines the WriteRamXXXX to use. If the size is 1, the WriteRamByte will be used. If the size is 2, the WriteRamUInt16 will be used. If the size is 4, the WriteRamIn32 will be used.
Video Demo With Robotis ArmThis video uses a Robotis Dynamixel arm and XM430 servos with an OpenCM9.04 controller.
Troubleshooting Dynamixel ServosIf the servos are not responding, verify the physical connection is correct. Next, confirm adequate power is provided to the servo. 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 InstructionsOnce 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
Connect to your I/O controller.
Add the robot skill by selecting the Project tab and Add Robot Skill.
The Dyamixel robot skill will be added to your project. Press the Config gear icon to load the configuration screen.
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.
Specify what port the servo is connected to on the controller. It is essential to follow this recommendation. The plugin has blue question boxes (and throughout the ARC software) to assist your robot development. Using the blue question marks and reading the content is recommended to understand what options do.
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 servo 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.
After you have enabled your servos, press Save
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 by the respective Vx (virtual) servo ID.
Press the GEAR icon to configure the horizontal servo robot skill.
Now, use the sliders to specify the Min and Max position you wish this servo to move and press Close.