DYNAMIXEL Motor
Dynamixel智能馬達是模組化形式,採用菊鏈多串接方式。這讓用戶可以輕鬆地更改和添加馬達關節,以獲得所需的扭力和自由度。
DYNAMIXEL Motor 有的是使用TTL,有的是使用RS485的訊號來做控制
而XL430-W250 則是使用TTL訊號來做控制
控制器 <----------TTL-------------> DYNAMIXEL Motor (XL430-W250 )
TTL 共有3個Pin
Data ---- 5V
VDD ---12V
GND
所謂TTL 訊號控制可以看成是UART的半雙工模式,即出去(TX)和進來(RX) 都是走同一個TTL 的Data訊號
UART TX -----------------------> TTL Data
UART RX <----------------------- TTL Data
PC <------UART over USB------ > U2D2 <-----TTL----> XL430-W250,
PC可使用U2D2 來控制DYNAMIXEL
關於U2D2
U2D2 is a small size USB communication converter that enables to control and operate DYNAMIXEL with PC.
Ports | Description |
---|---|
4Pin UART | Convert USB and UART |
3Pin TTL Level | Connect to DYNAMIXEL with 3Pin TTL Level Communication |
4Pin RS-485 | Connect to DYNAMIXEL with 4Pin RS-485 Communication |
Status LED | Display status of Power supply, TxD(Data write) and RxD(Data Read) |
Micro-B USB | Connect to the PC with USB cable |
關於 Dynamixel XL430-W250 Servo
XL430-W250 servo 規格:
(TurtleBot3 Burger 漢堡款用之馬達)
– MCU 單晶片: ST Cortex-M3 (STM32F103C8 @ 72Mhz, 32Bit)
– 位置感測器: Contactless absolute encoder (12Bit, 360°)
– 馬達: Cored Motor
– 傳輸速度: 9,600 bps – 4.5 M bps
– 控制演算法: PID 控制
– 解析度: 0.088° (=360°/4,096)
– 操作模式:
• 速度控制
• 位置控制(0-360°)
• 延伸位置控制(多圈旋轉)
• PWM 控制(電壓控制)
– 重量: 57.2g
– 尺寸(W x D x H): 28.5 x 34 x 46.5 mm
– 齒輪比: 258.5 : 1
– 靜止轉距:
• 1.0N.m(9.0V, 1.0A)
• 1.4N.m(11.1V, 1.3A)
• 1.5N.m(12.0V, 1.4A)
– 無負載速度:
• 47 rpm(9.0V)
• 57 rpm(11.1V)
• 61 rpm(12.0V)
– 操作溫度: -5 ~ +72℃
– 工作電壓: 6.5V – 12.0V (建議 11.1V)
– 待機電流: 52 mA
– 指令訊號: Digital Packet
– 通訊介面:
• Half Duplex Asynchronous Serial Communication (8bit,1stop, No Parity)
– 連結(實體層):
• TTL Level Multidrop Bus (3-pin 串接式連結)
– 可用編號: 253 ID (0-252), 可串接
– 訊號回授: 位置, 速度, 負載, 即時 Tick, 軌跡, 溫度, 輸入電壓等
– 材質: 工程塑材
– 數據如有變更,請以原廠規格為準
– 位置感測器: Contactless absolute encoder (12Bit, 360°)
– 馬達: Cored Motor
– 傳輸速度: 9,600 bps – 4.5 M bps
– 控制演算法: PID 控制
– 解析度: 0.088° (=360°/4,096)
– 操作模式:
• 速度控制
• 位置控制(0-360°)
• 延伸位置控制(多圈旋轉)
• PWM 控制(電壓控制)
– 重量: 57.2g
– 尺寸(W x D x H): 28.5 x 34 x 46.5 mm
– 齒輪比: 258.5 : 1
– 靜止轉距:
• 1.0N.m(9.0V, 1.0A)
• 1.4N.m(11.1V, 1.3A)
• 1.5N.m(12.0V, 1.4A)
– 無負載速度:
• 47 rpm(9.0V)
• 57 rpm(11.1V)
• 61 rpm(12.0V)
– 操作溫度: -5 ~ +72℃
– 工作電壓: 6.5V – 12.0V (建議 11.1V)
– 待機電流: 52 mA
– 指令訊號: Digital Packet
– 通訊介面:
• Half Duplex Asynchronous Serial Communication (8bit,1stop, No Parity)
– 連結(實體層):
• TTL Level Multidrop Bus (3-pin 串接式連結)
– 可用編號: 253 ID (0-252), 可串接
– 訊號回授: 位置, 速度, 負載, 即時 Tick, 軌跡, 溫度, 輸入電壓等
– 材質: 工程塑材
– 數據如有變更,請以原廠規格為準
出廠設定:
– ID = 1– Baud Rate: 57,600bps (請依需要, 自行變更 ID 及 Baud Rate)
The Control Table is a structure of data implemented in the device. Users can read a specific Data to get status of the device with Read Instruction Packets, and modify Data as well to control the device with WRITE Instruction Packets.
Control Table 內容有記錄在EEPROM區域及RAM區域改寫EEPROM區域的值會一直記錄著, 而RAM區域馬達重置後值會回到初始值
修改EEPROM值, 要先將Torque Enable (位置64)設為0,才能修改
Control Table of EEPROM Area
Address | Size (Byte) | Data Name | Access | Default Value | Range | Unit |
---|---|---|---|---|---|---|
0 | 2 | Model Number | R | 1,060 | - | - |
2 | 4 | Model Information | R | - | - | - |
6 | 1 | Firmware Version | R | - | - | - |
7 | 1 | ID | RW | 1 | 0 ~ 253 | - |
8 | 1 | Baud Rate | RW | 1 | 0 ~ 7 | - |
9 | 1 | Return Delay Time | RW | 250 | 0 ~ 254 | 2 [μsec] |
10 | 1 | Drive Mode | RW | 0 | 0 ~ 1 | - |
11 | 1 | Operating Mode | RW | 3 | 0 ~ 16 | - |
12 | 1 | Secondary(Shadow) ID | RW | 255 | 0 ~ 252 | - |
13 | 1 | Protocol Type | RW | 2 | 1 ~ 2 | - |
20 | 4 | Homing Offset | RW | 0 | -1,044,479 ~ 1,044,479 | 1 [pulse] |
24 | 4 | Moving Threshold | RW | 10 | 0 ~ 1,023 | 0.229 [rev/min] |
31 | 1 | Temperature Limit | RW | 72 | 0 ~ 100 | 1 [°C] |
32 | 2 | Max Voltage Limit | RW | 140 | 60 ~ 140 | 0.1 [V] |
34 | 2 | Min Voltage Limit | RW | 60 | 60 ~ 140 | 0.1 [V] |
36 | 2 | PWM Limit | RW | 885 | 0 ~ 885 | 0.113 [%] |
44 | 4 | Velocity Limit | RW | 265 | 0 ~ 1,023 | 0.229 [rev/min] |
48 | 4 | Max Position Limit | RW | 4,095 | 0 ~ 4,095 | 1 [pulse] |
52 | 4 | Min Position Limit | RW | 0 | 0 ~ 4,095 | 1 [pulse] |
63 | 1 | Shutdown | RW | 52 | - | - |
Control Table of RAM Area
Address | Size (Byte) | Data Name | Access | Default Value | Range | Unit |
---|---|---|---|---|---|---|
64 | 1 | Torque Enable | RW | 0 | 0 ~ 1 | - |
65 | 1 | LED | RW | 0 | 0 ~ 1 | - |
68 | 1 | Status Return Level | RW | 2 | 0 ~ 2 | - |
69 | 1 | Registered Instruction | R | 0 | 0 ~ 1 | - |
70 | 1 | Hardware Error Status | R | 0 | - | - |
76 | 2 | Velocity I Gain | RW | 1,000 | 0 ~ 16,383 | - |
78 | 2 | Velocity P Gain | RW | 100 | 0 ~ 16,383 | - |
80 | 2 | Position D Gain | RW | 4,000 | 0 ~ 16,383 | - |
82 | 2 | Position I Gain | RW | 0 | 0 ~ 16,383 | - |
84 | 2 | Position P Gain | RW | 640 | 0 ~ 16,383 | - |
88 | 2 | Feedforward 2nd Gain | RW | 0 | 0 ~ 16,383 | - |
90 | 2 | Feedforward 1st Gain | RW | 0 | 0 ~ 16,383 | - |
98 | 1 | Bus Watchdog | RW | 0 | 1 ~ 127 | 20 [msec] |
100 | 2 | Goal PWM | RW | - | -PWM Limit(36) ~ PWM Limit(36) | - |
104 | 4 | Goal Velocity | RW | - | -Velocity Limit(44) ~ Velocity Limit(44) | 0.229 [rev/min] |
108 | 4 | Profile Acceleration | RW | 0 | 0 ~ 32,767 0 ~ 32,737 | 214.577 [rev/min2] 1 [ms] |
112 | 4 | Profile Velocity | RW | 0 | 0 ~ 32,767 | 0.229 [rev/min] |
116 | 4 | Goal Position | RW | - | Min Position Limit(52) ~ Max Position Limit(48) | 1 [pulse] |
120 | 2 | Realtime Tick | R | - | 0 ~ 32,767 | 1 [msec] |
122 | 1 | Moving | R | 0 | 0 ~ 1 | - |
123 | 1 | Moving Status | R | 0 | - | - |
124 | 2 | Present PWM | R | - | - | - |
126 | 2 | Present Load | R | - | -1,000 ~ 1,000 | 0.1 [%] |
128 | 4 | Present Velocity | R | - | - | 0.229 [rev/min] |
132 | 4 | Present Position | R | - | - | 1 [pulse] |
136 | 4 | Velocity Trajectory | R | - | - | 0.229 [rev/min] |
140 | 4 | Position Trajectory | R | - | - | 1 [pulse] |
144 | 2 | Present Input Voltage | R | - | - | 0.1 [V] |
146 | 1 | Present Temperature | R | - | - | 1 [°C] |
168 | 2 | Indirect Address 1 | RW | 224 | 64 ~ 661 | - |
170 | 2 | Indirect Address 2 | RW | 225 | 64 ~ 661 | - |
172 | 2 | Indirect Address 3 | RW | 226 | 64 ~ 661 | - |
… | … | … | … | … | - | - |
218 | 2 | Indirect Address 26 | RW | 249 | 64 ~ 661 | - |
220 | 2 | Indirect Address 27 | RW | 250 | 64 ~ 661 | - |
222 | 2 | Indirect Address 28 | RW | 251 | 64 ~ 661 | - |
224 | 1 | Indirect Data 1 | RW | 0 | 0 ~ 255 | - |
225 | 1 | Indirect Data 2 | RW | 0 | 0 ~ 255 | - |
226 | 1 | Indirect Data 3 | RW | 0 | 0 ~ 255 | - |
… | … | … | … | … | - | - |
249 | 1 | Indirect Data 26 | RW | 0 | 0 ~ 255 | - |
250 | 1 | Indirect Data 27 | RW | 0 | 0 ~ 255 | - |
251 | 1 | Indirect Data 28 | RW | 0 | 0 ~ 255 | - |
578 | 2 | Indirect Address 29 | RW | 634 | 64 ~ 661 | - |
580 | 2 | Indirect Address 30 | RW | 635 | 64 ~ 661 | - |
582 | 2 | Indirect Address 31 | RW | 636 | 64 ~ 661 | - |
… | … | … | … | … | - | - |
628 | 2 | Indirect Address 54 | RW | 659 | 64 ~ 661 | - |
630 | 2 | Indirect Address 55 | RW | 660 | 64 ~ 661 | - |
632 | 2 | Indirect Address 56 | RW | 661 | 64 ~ 661 | - |
634 | 1 | Indirect Data 29 | RW | 0 | 0 ~ 255 | - |
635 | 1 | Indirect Data 30 | RW | 0 | 0 ~ 255 | - |
636 | 1 | Indirect Data 31 | RW | 0 | 0 ~ 255 | - |
… | … | … | … | … | - | - |
659 | 1 | Indirect Data 54 | RW | 0 | 0 ~ 255 | - |
660 | 1 | Indirect Data 55 | RW | 0 | 0 ~ 255 | - |
661 | 1 | Indirect Data 56 | RW | 0 | 0 ~ 255 |
如何使用
可以下載 R+ Manager 2.0 進行測試 (baudrate : 57600) 先使用工具操作
參考如下說明
*更多關於 R+ Manager 2.0 操作手冊
控制協定
PC或控制器 <-----------Protocol 2.0------------> DYNAMIXEL Motor
兩邊之間的通訊協定 DYNAMIXEL Protocol 2.0
DYNAMIXEL SDK
DYNAMIXEL SDK supports various programming languages such as C, C++, C#, MATLAB, LabVIEW, Python and Java in order to help developing DYNAMIXEL control software. DYNAMIXEL SDK provides a bundle of functions/methods that can be used for operating DYNAMIXEL with protocols in the form of digital packet. DYNAMIXEL SDK is free to download from GitHub.step1 下載DYNAMIXEL SDK
git clone https://github.com/ROBOTIS-GIT/DynamixelSDK.git
step 2 在rapsberry pi上安裝 DYNAMIXEL library libdxl_sbc_c.so
cd ~/DynamixelSDK/c/build/linux_sbc
make
sudo make install
step 3: 執行範例程式
~/DynamixelSDK/c/example/protocol2.0/read_write/linux_sbc
make
./read_write
Note: 原始碼都要經過修改以配合使用的馬達型號
// This example is designed for using a Dynamixel PRO 54-200, and an USB2DYNAMIXEL.
// To use another Dynamixel model, such as X series, see their details in E-anual(emanual.robotis.com) and edit below "#define"d variables yourself.
// Be sure that Dynamixel PRO properties are already set as %% ID : 1 / Baudnum : 1 (Baudrate : 57600)
沒有留言 :
張貼留言