Edit on GitHub

Introduction

DYNAMIXEL Shield was created to use RC-100 and DYNAMIXEL on arduino board. We provide dynamixel library for DYNAMIXEL Shield, it can help you to use DYNAMIXEL easily.

This product does not contain Arduino Board. Arduino Board should be purchased separately.

Specifications

Item Details
Operating Voltage 5 V (XL-330) ~ 24 V (PRO / X Series)
Maximum Current 1 A(Arduino), 10 A (Terminal Connector)


DANGER
(May cause serious injury or death)

  • Never place items containing water, flammables, and solvents near product.
  • Never place fingers, arms, toes, and other body parts near product during operation.
  • Cut power off if product emits strange odors or smoke.
  • Keep product out of reach of children.
  • Check the power’s polarity before wiring.


CAUTION
(May cause injury or damage to product)

  • Comply with the operating environment such as voltage and temperature.
  • Do not insert sharp blades nor pins during product operation.


ATTENTION
(May cause injury or damage to product)

  • Do not disassemble or modify product.
  • Do not drop or apply strong shock to product.

Supported DYNAMIXEL

DYNAMIXEL Series          
AX AX-12W AX-12+/12A AX-18F/18A    
RX 1 RX-10 RX-24F RX-28 RX-64  
DX 1 DX-113 DX-116 DX-117    
EX 1 EX-106+        
MX MX-12W MX-28, MX-28(2.0) MX-64, MX-64(2.0) MX-106, MX-106(2.0)  
XL XL320 XL430-W250 XL330-M077
XL330-M288
2XL430-W250  
XC XC330-T288
XC330-T181
XC330-M288
XC330-M181
XC430-W150
XC430-W240
XC430-T150BB
XC430-T240BB
2XC430-W250    
XM XM430-W210 XM430-W350 XM540-W150 XM540-W270  
XH XH430-W210
XH430-W350
XH430-V210
XH430-V350
XH540-W150
XH540-W270
XH540-V150
XH540-V270
 
XD XD430-T210-R
XD430-T350-R
XD540-T150-R
XD540-T270-R
     
XW XW430-T333-R
XW430-T200-R
XW540-T140-R
XW540-T260-R
     
PRO H H42-20-S300-R H54-100-S500-R H54-200-S500-R    
PRO M M42-10-S260-R M54-40-S250-R M54-60-S250-R    
PRO L 1 L42-10-S300-R L54-30-S500-R L54-30-S400-R L54-50-S500-R L54-50-S290-R
PRO H(A) H42-20-S300-R(A) H54-100-S500-R(A) H54-200-S500-R(A)    
PRO M(A) M42-10-S260-R(A) M54-40-S250-R(A) M54-60-S250-R(A)    
PH PH42-020-S300-R PH54-100-S500-R PH54-200-S500-R    
PM PM54-060-S250-R PM54-040-S250-R PM42-010-S260-R    

1 RX, DX, EX series are by default disabled and require config.h modification in DYNAMIXEL2Arduino to be used.

Layout

The DYNAMIXEL Shield has the same pin position as Aruduino UNO. To find the pinout diagram, see Arduino Offical page.

Pin No. Pin Name Description
0 HW UART RX DXL_RX
1 HW UART TX DXL_TX
2 HW UART DIR DXL_DIR(DXL_TX_EN)
7 SW UART RX Caution2 SoftwareSerial
8 SW UART TX Caution2 SoftwareSerial
Item Description Note
DYNAMIXEL Port TTL, TTL(XL-320), RS485 Caution3
Power Switch Power SW (DYNAMIXEL Port Power Switch) -
UART Switch UART SW (Upload or DYNAMIXEL Select Switch) Caution1
Jumper Cap Power Source Selection Read ‘Connecting Power’

Caution1 When uploading firmware using USB port, you should switch the UART SW(SW_2) to Upload mode. When you select the UART SW (SW_2) to DYNAMIXEL mode, you can use DYNAMIXEL but USB port.
Caution2 If you are using a board that does not support SoftwareSerial(like SAMD, etc..), you cannot use pins 7 and 8 for UART purposes.
Caution3 TTL, TTL (XL-320) and RS485 connectors are all connected in parallel in one serial.

Use of Serial Monitor with DYNAMIXEL Shield

DYNAMIXELShield uses serial pins (0,1) which are the same pins as Arduino Uno / Mega. When using the serial monitor, it may cause unexpected issue with data in the board due to a port conflict.

In order to prevent the board from the port conflict, be sure to read How to Use Serial Monitor with DYNAMIXEL Shield carefully.

How to Use Serial Monitor with DYNAMIXEL Shield

Check the type of your arduino board, and select the either of listed solution to use Serial Monitor with DYNAMIXEL Shield.

  1. [Recommanded] #define DEBUG_SERIAL
    • See #define DEBUG_SERIAL in the DynamixelShield Examples in Arduino.
  2. Use UART port of DYNAMIXEL Shield ( AVR 8 bit board including Uno / Mega boards)
    • AVR 8 bit boards, such as Uno, and Mega, can use the serial monitor by using DYNAMIXEL Shield’s pins, which is read UART (See Layout)

    NOTE: Be sure to use SoftwareSerial Library to use the serial port with DYNAMIXEL Shield and AVR 8 bit boards as the port is designed for the use of general pins. Prefered Comunication Modules: BT-210, BT-410, LN-101.

  3. Use USB Port
    • When you use other arduino boards except Uno and Mega, use the serial monitor via USB port.
  4. Use USB to Serial converter
    • You can use either SoftwareSerial or HardwareSerial ways. See Arduino Reference page of Serial, and determine your board whether or not it support either of ways (SoftwareSerial or HardwareSerial).
  5. Use UART Port
    • DYNAMIXEL Shield contains UART pins: 7(RX), 8(TX). They are only compatible with AVR 8 bit board, such as Uno and Mega boards. In order to use this port, use other HardwareSerial pins instead of 7(RX), 8(TX). To determine wheather boards has HardwareSerial, and its pin numbers see Arduino Reference page of Comunication.

Connecting Power

Connect VIN Disconnect VIN

Switches

Upload Switch

DYNAMIXEL Power Switch

DYNAMIXEL Shield Libraries

DYNAMIXEL2Arduino Library : GitHub Repository
DYNAMIXEL Shield Library : GitHub Repository

Features

Install Library

There are three ways to add libraries to the Arduino IDE.

Each way is described in detail in the Arduino Official Guide, so please refer to it if necessary.
Below is an example of using the Library Manager.

Search for dynamixel shield from the Library Manager and install the latest version.

Click Install all to install the dependent library Dynamixel2Arduino.

If you have successfully installed both libraries, you’ll be able to find several examples of DynamixelShield in the examples.

Library API

DYNAMIXELShield(v0.1.0 or above)

WARNING : In order to use DYNAMIXEL Shield library(v0.1.0 or above), DYNAMIXEL2Arduino library must be installed.

Dynamixel2Arduino Class

Master Class

Dynamixel2Arduino class inherits below public functions from the Master class.

RobotisRemoteController Class

DynamixelShield(v0.0.5)

WARNING : This version of DYNAMIXEL Shield API is deprecated and not maintained anymore.

bool begin(uint32_t baud_rate = 57600, uint8_t protocol_version = DXL_PACKET_VER_2_0);

bool scan(void);
bool ping(uint8_t id = DXL_GLOBAL_ID);
bool addMotor(uint8_t id, uint8_t model);
bool setProtocolVersion(uint8_t version);
bool write(uint8_t id, uint16_t addr, uint8_t *p_data, uint16_t length, uint32_t timeout);
bool read(uint8_t id, uint16_t addr, uint8_t *p_data, uint16_t length, uint32_t timeout);

uint8_t getDxlCount(void);
uint8_t getDxlID(uint8_t index);
uint32_t getErr(void);
void clearErr(void);

bool reboot(uint8_t id);
bool reset(uint8_t id);

bool setID(uint8_t id, uint8_t new_id);
bool setBaud(uint8_t id, uint32_t new_baud);

bool ledOn(uint8_t id);
bool ledOff(uint8_t id);

bool torqueOn(uint8_t id);
bool torqueOff(uint8_t id);

bool setJointMode(uint8_t id);
bool setWheelMode(uint8_t id);

bool    setGoalPosition(uint8_t id, uint32_t position);
int32_t getGoalPosition(uint8_t id);
int32_t getCurPosition(uint8_t id);

bool    setGoalSpeed(uint8_t id, int32_t speed);
int32_t getGoalSpeed(uint8_t id);   
int32_t getCurSpeed(uint8_t id);  

bool    setGoalAngle(uint8_t id, int32_t angle);
int32_t getGoalAngle(uint8_t id);
int32_t getCurAngle(uint8_t id);

bool syncWriteBegin(void);
bool syncWriteEnd(void);

Reference

DYNAMIXEL Connectors

Item TTL RS-485 XL-320 (TTL)
Pinout 1 GND
2 VDD
3 DATA
1 GND
2 VDD
3 DATA+
4 DATA-
1 GND
2 VDD
3 DATA
Diagram
Housing
JST EHR-03

JST EHR-04

MOLEX 51065-0300
PCB Header
JST B3B-EH-A

JST B4B-EH-A

MOLEX 53253-0370
Crimp Terminal JST SEH-001T-P0.6 JST SEH-001T-P0.6 MOLEX 50212-8000
Wire Gauge for DYNAMIXEL 21 AWG 21 AWG 24 AWG

Communication Circuit

To control the DYNAMIXEL actuators, the main controller needs to convert its UART signals to the half duplex type. The recommended circuit diagram for this is shown below.

TTL Communication

TTL Circuit

NOTE: Above circuit is designed for 5V or 5V tolerant MCU. Otherwise, use a Level Shifter to match the voltage of MCU.

RS-485 Communication

RS-485 Circuit

NOTE: Above circuit is designed for 5V or 5V tolerant MCU. Otherwise, use a Level Shifter to match the voltage of MCU.

The power of DYNAMIXEL is supplied via Pin1(-), Pin2(+).
(The above circuit is built into DYNAMIXEL’s controller only)
In the above circuit diagram, the direction of data signal of TxD and RxD in the TTL Level is determined according to the level of DIRECTION 485 as follows:
In case of DIRECTION485 Level = High: The signal of TxD is output to D+ and D-
In case of DIRECTION485 Level = Low: The signal of D+ and D- is output to RxD