Skip to main content

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.

warning

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

Specifications

ItemDetails
Operating Voltage5 V (XL-330) ~ 24 V (PRO / X Series)
Maximum Current1 A(Arduino), 10 A (Terminal Connector)
danger


DANGER
(Ignoring these warnings may cause serious injury or death)

  • Never place items containing water, flammables/open flames, or solvents near the product.
  • Never place fingers, arms, toes, and other body parts near product during operation.
  • Cease operation and remove power from the product if the product begins to emit strange odors, noises, or smoke.
  • Keep product out of reach of children.
  • Check input polarity before installing or energizing wiring or cables.
warning


CAUTION
(Ignoring these warnings may cause mild injury or damage to the product)

  • Do not insert blades or other sharp objects during product operation.
warning


ATTENTION
(Ignoring these warnings may cause minor injury or damage to the product)

  • Do not disassemble or modify the product.
  • Do not drop the product or apply strong impacts.
  • Do not connect or disconnect DYNAMIXEL cables while power is being supplied.

Supported DYNAMIXEL

DYNAMIXEL Series
AXAX-12WAX-12+/12AAX-18F/18A
RX 1RX-10RX-24FRX-28RX-64
DX 1DX-113DX-116DX-117
EX 1EX-106+
MXMX-12WMX-28, MX-28(2.0)MX-64, MX-64(2.0)MX-106, MX-106(2.0)
XLXL320XL430-W250XL330-M077
XL330-M288
2XL430-W250
XCXC330-T288
XC330-T181
XC330-M288
XC330-M181
XC430-W150
XC430-W240
XC430-T150BB
XC430-T240BB
2XC430-W250
XMXM430-W210XM430-W350XM540-W150XM540-W270
XHXH430-W210
XH430-W350
XH430-V210
XH430-V350
XH540-W150
XH540-W270
XH540-V150
XH540-V270
XDXD430-T210-R
XD430-T350-R
XD540-T150-R
XD540-T270-R
XWXW430-T333-R
XW430-T200-R
XW540-T140-R
XW540-T260-R
PRO HH42-20-S300-RH54-100-S500-RH54-200-S500-R
PRO MM42-10-S260-RM54-40-S250-RM54-60-S250-R
PRO L 1L42-10-S300-RL54-30-S500-RL54-30-S400-RL54-50-S500-RL54-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)
PHPH42-020-S300-RPH54-100-S500-RPH54-200-S500-R
PMPM54-060-S250-RPM54-040-S250-RPM42-010-S260-R

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

Layout

warning

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

Pin No.Pin NameDescription
0HW UART RXDXL_RX
1HW UART TXDXL_TX
2HW UART DIRDXL_DIR(DXL_TX_EN)
7SW UART RXCaution2 SoftwareSerial
8SW UART TXCaution2 SoftwareSerial
ItemDescriptionNote
DYNAMIXEL PortTTL, TTL(XL-320), RS485Caution3
Power SwitchPower SW (DYNAMIXEL Port Power Switch)-
UART SwitchUART SW (Upload or DYNAMIXEL Select Switch)Caution1
Jumper CapPower Source SelectionRead 'Connecting Power'
  • DXL_RX (0), DXL_TX (1) : Hardware serial port to communicate with DYNAMIXEL.
  • DXL_DIR(2) : Flow control of DYNAMIXEL packet.
  • The hardware serial port is used to communicate with DYNAMIXEL, therefore, [RC-100] or [LN-101] has to be connected to the software serial communication port(SW TX/RX) via Arduino pin 7 and 8.
warning

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.
  1. 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

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.

  1. Use USB Port
  • When you use other arduino boards except Uno and Mega, use the serial monitor via USB port.
  1. 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).
  1. 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 VINDisconnect VIN
  • The power input is divided as follows depending on whether the jumper cap is connected or not.

    1. Connect VIN : Power supply using with Arduino's SMPS connector
    2. Disconnect VIN : Power supply using DYNAMIXEL shield's power input connector. Can not use power from arduino.
  • Since DYNAMIXEL power can not be connected to the USB power of the Arduino board, you need to connect the external power.

  • When using the power input connector, be sure to check the polarity of the power supply.

Switches

Upload Switch

  • For DYNAMIXEL control, the hardware serial port of the arduino board is used. Because the downloading is done to the same port, the two ports may collide. Therefore, to download, use serial port switch to move to upload position and download.
  • After the download is completed, the switch must be moved to DYNAMIXEL position for DYNAMIXEL control. If it is not moved, DYNAMIXEL will not work.

DYNAMIXEL Power Switch

  • It is a switch that can turn on / off the power of DYNAMIXEL connector.

DYNAMIXEL Shield Libraries

DYNAMIXEL2Arduino Library : GitHub Repository
DYNAMIXEL Shield Library : GitHub Repository

Features

  • Compatible to Arduino boards
  • Support dynamixel protocol 1.0/2.0
  • Up to 16 DYNAMIXEL's can be controlled (Typically, each motor(XL-320 or XL430-W250) consumes 0.4 ~ 0.6A of current)
  • Support SynWrite function
  • Support RC-100 library
  • Serial communication using software serial library
  • DYNAMIXEL Shield library(v0.1.0 or above) requires DYNAMIXEL2Arduino library

Install Library

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

  • Using the Library Manager
  • Importing a .zip Library
  • Manual installation

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.

warning

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

warning

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

ItemTTLRS-485XL-320 (TTL)
Pinout1 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 TerminalJST SEH-001T-P0.6JST SEH-001T-P0.6MOLEX 50212-8000
Wire Gauge for DYNAMIXEL21 AWG21 AWG24 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

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

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

Download