Behavior Control
This control is developed by:
AvatarDJ Sures
Created October 15 2015
Updated 4 hours ago
Help Index


How To Download and Use This Control

  1. Make sure you have the latest version of EZ-Builder installed.
  2. Select Download This Control button below to download the file.
  3. Double click the downloaded file to open it.
  4. The installer will automatically add this control to EZ-Builder.
Download This Control

Connect and control Robotis Dynamixel servos to the EZ-B v4. This open-source plugin converts the Virtual servo ports on the EZ-B v4 (v0-v99) to control Robotis Dynamixel servos.

Cable Accessory
This plugin requires a cable accessory to easily connect your servo to the EZ-B v4 or IoTiny. You can find the cable accessory in EZ-Robot's store by clicking here

User-inserted image

There are two options for connecting the Dynamixel servos. The default option for the EZ-B v4 (not IoTiny) is UART 1 (port D5). The second option is low speed serial of any digital port for both EZ-B v4 and IoTiny. To reference the pins of the EZ-B, consult the tutorial for the EZ-B by clicking here.

*Note: we highly recommend using Hardware UART on the EZ-B v4 only. Do not use software UART on the EZ-B v4 for dynamixel servos. Only use software UART when using an IoTiny.

Most Dynamixel servo documentation states the operating voltage is between 9-12 volts, with optimal being 11 volts. Check the documentation for your dynamixel servo model to ensure your power source is sufficient. If you experience unusual behavior of Dynamixel servos, the first common issue is insufficient power. Symptoms will be flashing error LED's on the servos or non-operation.

Dynamixel servos are very different than regular hobby PWM servos. Firstly, they are considered much more professional due to their design which is specific for the 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.

Dynamixel v1 Protocol
The EZ-B v4 supports the use of Dynamixel servos using the version 1.

Dynamixel v2 Protocol
The EZ-B v4 supports the use of Dynamixel servos using the version 2.

*note: Both v1 and v2 protocol servos can be used at the same time. The configuration menu allows you to assign which protocol is used per port.

Servo ID
The 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 therefore mirror their behaviour. 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 LEDs
The LEDs on the dynamixel servo can be controlled using the EZ-Script ControlCommand(). View the Cheat Sheet when editing a script to see the available ControlCommand syntax for the Dynamixel plugin.

Optional Electrical Wiring
While we recommend using the Dynamixel servo Cable, you can optionally manually wire the servo yourself to the ez-b v4 or IoTiny using this diagram. If you wish to read servo data, you can also connect port D5 and D6 together.

Source Code

Step by Step Instructions
Once you have the servo wired, and sufficient power is provided, you can use any control in EZ-Builder that uses servos. This means it will work with Auto Position, Camera, WiiMote, Joystick, and more. In this example, we'll show you how to move a dynamixel servo with a generic servo control. Before following these steps, ensure you have this plugin installed.

Step 1
Load EZ-Builder
User-inserted image

Step 2
Connect to your EZ-B v4 or IoTiny controller
User-inserted image

Step 3
Add the control by selecting the Project tab and Add Control
User-inserted image

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.
User-inserted image

Step 5
The Dyamixel control will be added to your project. Press the Config gear icon to load the configuration screen.
User-inserted image

Step 6
Enter the baudrate that matches your servo configuration. The servos have a baud rate that can be specified, or a default baudrate shipped from factory. If you need to change the baudrate of the servo, use the Dyanmixel utility. You cannot change the baudrate of the servo in EZ-Builder. This value is the baud rate that the EZ-B will use to communicate with the dynamixel servo. This must match the baudrate of the servo.
User-inserted image

Step 6a
Specify what port the servo is connected to the EZ-B v4 or IoTiny. On an EZ-B, it is highly recommended to use a hardware UART. On the IoTiny, any digital port can be specified for use. It is important to follow this recommendation. There are blue question boxes in the plugin (and throughout the EZ-Builder software) to assist you robot development. It is recommended to use the blue question marks and read the content to understand what options do.
User-inserted image

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 EZ-Builder software will use the Vx (virtual servos) corresponding with that ID. For example, if you enable Dynamixel servo ID #2, the EZ-Builder 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. To get full resolution of the servo, also ensure you have entered the MAX resolution for that servo model. Each model has different resolutions, or it can be configured using the Dyanmixel utilities.
User-inserted image

Step 8
After you have enabled your servos, press Save
User-inserted image

Step 9
Now we will show you an example of how the servo can be moved. We will do this by using a generic horizontal servo control. Press Project -> Add Control to return to the add control menu. Navigate to servo and select Horizontal servo. Remember, any control in EZ-Builder that uses servos can now control dynamixel servos by the respective Vx (virtual) servo ID.
User-inserted image

Step 10
Press the GEAR icon to configure the horizontal servo control.
User-inserted image

Step 11
To configure this control to use a virtual servo, select the servo to bring up the port dialog. This applies to all controls in EZ-Builder that use servos.
User-inserted image

Step 12
Select the Virtual servo ID for your dynamixel servo from the list and press Close.
User-inserted image

Step 13
Now use the sliders to specify the Min and Max position that you wish this servo to move and press Close.
User-inserted image

You can now control the dynamixel servo with the horizontal servo control. To find out more about servos, consult the learn section of this website for activities on using your ez-robot product.

Source Code
Here is the sourecode for the plugin. If you wish to modify the code and create a fork, a new GUID and plugin name will need to be generated. Follow the plugin tutorial on how to do that. Here's the sourcecode:

DJ Sures
4 hours ago
The instructions for reading state the cable must be connected to both RX and TX. Please revisit the instructions above.
4 hours ago — Updated 4 hours ago
I’m not trying to read state. Therefore I’m just using one way communication using the starndard 3 prong ttl cord.  I’m just trying to get these new dynamixels to work with the plug in. 

As stated elsewhere I have 20 64mx dynamixels working in all my Alan and Alena’s robots no problem. 

It’s these new servos from Dynamixel I cannot get them to respond with the plug in.
4 hours ago
Why would the ping return “v1 not supported for protocol 2 yet”
DJ Sures
43 minutes ago
Ping requires two way communication. You can’t ping without expect a response
25 minutes ago — Updated 23 minutes ago
I just spliced into the signal line and added it to D4, when I press ping I get the same message. 

If I try to do anything protocol 2 related I get message “this function is not implemented for protocol v2. Please let us know on the ez robot forum community forum if you wish to use it” like if I try to reset to factory defaults or try and change baud or ID. Same message.