User’s Manual 2006-06-14 Closer to Real, AX-12 Dynamixel
DYNAMIXEL AX-12 Contents 1. Summary 1-1. Overview and Characteristics of AX-12 Page 2 1-2. Main Specifications Page 3 2. Dynamixel Operation 2-1. Mechanical Assembly Page 4 2-2. Connector Assembly Page 5 2-3. Dynamixel Wiring Page 6 3. Communication Protocol 3-1. Communication Overview Page 9 3-2. Instruction Packet Page 10 3-3. Status Packet Page 10 3-4. Control Table Page 12 4. Instruction Set and Examples 4-1. WRITE_DATA Page 19 4-2. READ_DATA Page 20 4-3.
DYNAMIXEL AX-12 1. Dynamixel AX-12 1-1. Overview and Characteristics of AX-12 Dynamixel AX-12 The Dynamixel series robot actuator is a smart, modular actuator that incorporates a gear reducer, a precision DC motor and a control circuitry with networking functionality, all in a single package. Despite its compact size, it can produce high torque and is made with high quality materials to provide the necessary strength and structural resilience to withstand large external forces.
DYNAMIXEL AX-12 1-2. Main Specifications AX-12 Weight (g) 55 Gear Reduction Ratio 1/254 Input Voltage (V) Final Max Holding Torque(kgf.cm) Sec/60degree at 7V at 10V 12 16.5 0.269 0.196 Resolution 0.35° Operating Angle 300°, Endless Turn Voltage 7V~10V (Recommended voltage: 9.6V) Max.
DYNAMIXEL AX-12 2. Dynamixel Operation 2-1. Mechanical Assembly Frames Provided The two frames provided with AX-12 are shown below. OF-12SH OF-12S OF-12SH Installation The OF-12SH (hinge frame) can be installed on the AX-12 as the following. Exploded view OF-12S Installation Assembled The OF-12S (side mount frame) can be installed on the AX-12 as the following. The OF12S can be mounted on any of the three faces (left, right, or under side) of the AX-12 body as needed.
DYNAMIXEL AX-12 2-2 . Connector Assembly Assemble the connectors as shown below. Attach the wires to the terminals using the correct crimping tool. If you do not have access to a crimping tool, solder the terminals to the wires to ensure that they do not become loose during operation.
DYNAMIXEL AX-12 2-3. Dynamixel Wiring Pin Assignment The connector pin assignments are as the following. The two connectors on the Dynamixel are connected pin to pin, thus the AX-12 can be operated with only one connector attached. PIN1: GND PIN2: VDD PIN3: Data PIN1: GND PIN2: VDD PIN3: Data Wiring Connect the AX-2 actuators pin to pin as shown below. Many AX-12 actuators can be controlled with a single bus in this manner.
DYNAMIXEL bioloid AX-12 A robot can be built using only the CM-5 controller and a number of AX-12 actuators. An edutainment robotic kit named “Bioloid” is available which is based on the CM-5 controller and the AX-12 actuators. An example of a robot built with Bioloid For details, please refer to the Bioloid manual. Connection to UART 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.
DYNAMIXEL AX-12 • When the DIRECTION_PORT level is High: the signal TxD is output as Data • When the DIRECTION_PORT level is Low: the signal Data is input as RxD Half Duplex UART A multi-drop method of connecting multiple Dynamixel actuators to a single node is possible by using the half duplex UART. Thus a protocol that does not allow multiple transmissions at the same time should be maintained when controlling the Dynamixel actuators.
DYNAMIXEL AX-12 3. Communication Protocol 3-1. Communication Overview Packet The main controller communicates with the Dynamixel units by sending and receiving data packets. There are two types of packets; the “Instruction Packet” (sent from the main controller to the Dynamixel actuators) and the “Status Packet” (sent from the Dynamixel actuators to the main controller.
DYNAMIXEL AX-12 3-2. Instruction Packet The Instruction Packet is the packet sent by the main controller to the Dynamixel units to send commands. The structure of the Instruction Packet is as the following. Instruction Packet OXFF 0XFF ID LENGTH INSTRUCTION PARAMETER1 …PARAMETER N CHECK SUM The meanings of each packet byte definition are as the following. 0XFF 0XFF The two 0XFF bytes indicate the start of an incoming packet. ID The unique ID of a Dynamixel unit.
DYNAMIXEL AX-12 The meanings of each packet byte definition are as the following. 0XFF 0XFF The two 0XFF bytes indicate the start of the packet. ID The unique ID of the Dynamixel unit returning the packet. The initial value is set to 1. LENGTH The length of the packet where its value is “Number of parameters (N) + 2” ERROR The byte representing errors sent from the Dynamixel unit. The meaning of each bit is as the following.
DYNAMIXEL 3-4.
DYNAMIXEL Control Table AX-12 The Control Table contains information on the status and operation of the Dynamixel actuator. The Dynamixel actuator is operated by writing values to its control table and its status is checked by reading values off its control table. RAM and EEPROM The data values for the RAM area will be set to the default initial values whenever the power is turned on. However, the data values for the EEPROM area are non-volatile and will still remain even after the power is turned off.
DYNAMIXEL Address 0x05 AX-12 Return Delay Time. The time it takes for the Status Packet to return after the Instruction Packet is sent. The delay time is given by 2uSec * Address5 value. Address 0x06,0x07,0x08,0x09 Operating Angle Limit. Sets the Dynamixel actuator’s operating angle range. The Goal Position needs to be within the range of: CW Angle Limit <= Goal Position <= CCW Angle Limit. An Angle Limit Error will occur if the Goal Position is set outside this range set by the operating angle limits.
DYNAMIXEL AX-12 In the case of an instruction which uses the Broadcast ID (0XFE) the Status Packet will not be returned regardless of the Address 0x10 value. Address 0X11 Alarm LED. If the corresponding Bit is set to 1, the LED blinks when an Error occurs.
DYNAMIXEL Address 0x18 AX-12 Torque Enable. When the power is first turned on, the Dynamixel actuator enters the Torque Free Run condition (zero torque). Setting the value in Address 0x18 to 1 enables the torque. Address 0x19 LED. The LED turns on when set to 1 and turns off if set to 0. Address 0x1A~0x1D Compliance Margin and Slope. The compliance of the Dynamixel actuator is defined by setting the compliance Margin and Slope. This feature can be utilized for absorbing shocks at the output shaft.
DYNAMIXEL Address 0x20,0x21 AX-12 Moving Speed. Sets the angular velocity of the output moving to the Goal Position. Setting this value to its maximum value of 0x3ff moves the output with an angular velocity of 114 RPM, provided that there is enough power supplied (The lowest velocity is when this value is set to 1. When set to 0, the velocity is the largest possible for the supplied voltage, e.g. no velocity control is applied.) Address 0x24,0x25 Present Position.
DYNAMIXEL AX-12 Goal Speed Setting BIT 15~11 10 Value 0 Turn Direction 9 7 6 5 4 3 2 1 0 Speed Value Turn Direction = 0 : CCW Direction Turn, Range 8 Load Direction = 1: CW Direction Turn Each data has a valid minimum and maximum values. Write instructions made outside of these valid ranges will return an error. The following table summarizes the data range for each register. 16 bit data registers are indicated with two bytes (L) and (H).
DYNAMIXEL AX-12 4. Instruction Set and Examples The following Instructions are available. Value Num ber of Param eter No action.
DYNAMIXEL AX-12 Instruction Packet : 0XFF 0XFF 0XFE 0X04 0X03 0X03 0X01 0XF6` ID LENGTH INSTRUCTION PARAMETERS CHECKSUM Because it was transmitted with a Broadcast ID (0XFE), no status packets are returned. 4-2.
DYNAMIXEL AX-12 execution timing is different. When the Instruction Packet is received the values are stored in the Buffer and the Write instruction is under a standby status. At this time, the Registered Instruction register (Address 0x2C) is set to 1. After the Action Instruction Packet is received, the registered Write instruction is finally executed.
DYNAMIXEL Example 3 AX-12 Obtaining the status packet of the Dynamixel actuator with an ID of 1 Instruction Packet : 0XFF 0XFF 0X01 0X02 0X01 0XFB` ID LENGTH INSTRUCTION CHECKSUM The returned Status Packet is as the following Status Packet : 0XFF 0XFF 0X01 0X02 0X00 0XFC ID LENGTH ERROR CHECKSUM Regardless of whether the Broadcasting ID is used or the Status Return Level (Address 16) is 0, a Status Packet is always returned by the PING instruction. 4-5.
DYNAMIXEL AX-12 4-6. SYNC WRITE Function Used for controlling many Dynamixel actuators at the same time. The communication time decreases by the Synch Write instruction since many instructions can be transmitted by a single instruction. However, you can use this instruction only when the lengths and addresses of the control table to be written to are the same. Also, the broadcasting ID needs to be used for transmitting.
DYNAMIXEL AX-12 5. Example For the following examples, we assume a Dynamixel actuator with an ID of 1 in Reset status and that the Baud rate is 57142 BPS.
DYNAMIXEL AX-12 Instruction Packet Instruction = WRITE_DATA, Address = 0x05, DATA = 0x02 Communication ->[Dynamixel]:FF FF 00 04 03 05 02 F1 (LEN:008) <-[Dynamixel]:FF FF 00 02 00 FD (LEN:006) Status Packet Result NO ERROR It is recommended to set the Return Delay Time to the minimum value allowed by the Main Controller.
DYNAMIXEL Example 13 AX-12 Setting the maximum torque to 50% of its maximum possible value for a Dynamixel actuator with an ID of 0 Set the MAX Torque value located in the ROM area to 0x1ff which is 50% of the maximum value 0x3ff.
DYNAMIXEL AX-12 Communication ->[Dynamixel]:FF FF 00 05 03 18 01 01 DD (LEN:009) <-[Dynamixel]:FF FF 00 02 00 FD (LEN:006) Status Packet Result NO ERROR You can verify the Torque Enabled status by trying to move the output of the actuator by hand. Example 17 Setting the Compliance Margin to 1 and Compliance Slope to 0x40 for a Dynamixel actuator with an ID of 0 Compliance The Angle Error and Torque Output can be represented with the following graph.
DYNAMIXEL AX-12 Instruction Packet Instruction = WRITE_DATA, Address = 0x1A, DATA = 0x01, 0x01, 0x40, 0x40 Communication ->[Dynamixel]:FF FF 00 07 03 1A 01 01 40 40 59 (LEN:011) <-[Dynamixel]:FF FF 00 02 00 FD (LEN:006) Status Packet Result NO ERROR n The Compliance Slope takes effect with discrete steps of 2 (n is integer). Thus any Compliance value between 0x11 and 0x20 has identical effects.
DYNAMIXEL Example 20 AX-12 Lock all addresses except for Address 0x18 ~ Address0x23 for a Dynamixel actuator with an ID of 0 Set Address 0x2F (Lock) to 1. Instruction Packet Instruction = WRITE_DATA, Address = 0x2F, DATA = 0x01 Communication ->[Dynamixel]:FF FF 00 04 03 2F 01 C8 (LEN:008) <-[Dynamixel]:FF FF 00 02 00 FD (LEN:006) Status Packet Result NO ERROR Once locked, the only way to unlock it is to remove the power. If an attempt is made to access any locked data, an error is returned.
DYNAMIXEL AX-12 Appendix Half duplex UART Half duplex UART is a serial communication protocol where both TxD and RxD cannot be used at the same time. This method is generally used when many devices need to be connected to a single bus. Since more than one device are connected to the same bus, all the other devices need to be in input mode while one device is transmitting.
DYNAMIXEL AX-12 When changing the direction, the TXD_SHIFT_REGISTER_EMPTY_BIT must be checked. The following is an example program that sends an Instruction Packet.
DYNAMIXEL AX-12 C Language Example : Dinamixel access with Atmega128 /* * The Example of Dynamixel Evaluation with Atmega128 * Date : 2005.5.11 * Author : BS KIM */ /* * included files */ #define ENABLE_BIT_DEFINITIONS //#include #include #include #include #include
DYNAMIXEL AX-12 // --- Gloval Variable Number --volatile byte gbpRxInterruptBuffer[256]; byte gbpParameter[128]; byte gbRxBufferReadPointer; byte gbpRxBuffer[128]; byte gbpTxBuffer[128]; volatile byte gbRxBufferWritePointer; TxDString("\r\n\n Example 4. LED OFF -- Any Key to Continue.
DYNAMIXEL AX-12 while(1); } bTimeout = 0; for(bCount = 0; bCount < bRxPacketLength; bCount++) { ulCounter = 0; while(gbRxBufferReadPointer == gbRxBufferWritePointer) { if(ulCounter++ > RX_TIMEOUT_COUNT1) { bTimeout = 1; break; } } if(bTimeout) break; gbpRxBuffer[bCount] = gbpRxInterruptBuffer[gbRxBufferReadPointer++]; } bLength = bCount; bChecksum = 0; void PortInitialize(void) { DDRA = DDRB = DDRC = DDRD = DDRE = DDRF = 0; //Set all port to input direction first.
DYNAMIXEL AX-12 } /* Print value of Baud Rate.
DYNAMIXEL Connector AX-12 Company Name : Molex Pin Number: 4 Model Number Male Female Molex Part Number 22-03-5045 50-37-5043 Old Part Number 5267-03 5264-03 Temperature range : -40°C to +105°C Contact Insertion Force-max : 14.7N (3.30 lb) Contact Retention Force-min : 14.7N (3.30 lb) www.molex.com or www.molex.co.jp for more detail information Female Connector Male Connector Pin No.
DYNAMIXEL AX-12 Dimension CM-5 Dedicated AX-12 control box. Able to control 30 AX-12 actuators.