Difference between revisions of "DDSM210"

From Waveshare Wiki
Jump to: navigation, search
Line 54: Line 54:
 
*Single-wheel load: 10kg
 
*Single-wheel load: 10kg
  
To be continued....
+
 
 +
==Motor Interface and Cable Order==
 +
[[File:DDSM115-A.jpg|200px]]
 +
<div style="margin:2px auto;float:left;">
 +
{| style="border-collapse: collapse;border:1px solid #cccccc;color: #5e5e5e;margin: auto;"
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Signal Cable (ZH1.5*4P)
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Name
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Type
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Description
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | 1
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | GND
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Signal GND
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Negative Electrode
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | 2
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | A
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA+
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 485 bus A
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | 3
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | B
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA-
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 485 bus B
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | 4
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | /
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | /
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Reserved
 +
|}
 +
</div>
 +
<div class="sep0px"></div>
 +
 
 +
[[File:DDSM115-B.jpg|200px]]
 +
<div style="margin:2px auto;float:left;">
 +
{| style="border-collapse: collapse;border:1px solid #cccccc;color: #5e5e5e;margin: auto;"
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Power cable (XH2.54*2P)
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Name
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Type
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Description
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | 1
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | VCC
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Power input
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Rated 18V DC
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | 2
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | GND
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Ground
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Negative Electrode
 +
|}
 +
</div>
 +
<div class="sep0px"></div>
 +
<br />
 +
==How To Use==
 +
*The simple control method is only used to verify the working principle of the motor and to do some simple tests. For the specific method, please refer to the chapter on the communication protocol.
 +
*It is recommended to use [https://www.waveshare.com/usb-to-rs485.htm USB to RS485] for the device with a USB interface to control the servo.
 +
*You can refer to the signal line table [[#Motor Interface and Cable Order]] for the signal cable wiring and pin definition. Connect the DATA+ of the motor to the A+ of the converter, connect the DATA- of the motor to the B- of the converter, and the GND of the motor signal cable. Connect to the GND of the converter (it is recommended to connect GND, but if your RS485 interface does not have GND, you can leave it unconnected).
 +
*For the wiring of the power cable, refer to the power cable table [[#Motor Interface and Cable Order]] above for the pin definition. The VCC of the power cable is connected to the positive pole of the 18V DC power supply (the voltage range of 5S LiPo is sufficient), and the GND of the power line is connected to the negative pole of the 18V DC power supply. Since the power of the motor is relatively large, the power supply needs to have enough power to drive the motor to work normally.
 +
*Download OSDA open-source serial port assistant.
 +
**[https://objects.githubusercontent.com/github-production-release-asset-2e65be/207280557/8ea12800-fb5c-11e9-8d9a-7b2dc9df16ed?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221110T115428Z&X-Amz-Expires=300&X-Amz-Signature=9c5cc1b20c2842fb8b860761a6394ba0ba817f95ed0f829145ec3bbfed3ea8c2&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=207280557&response-content-disposition=attachment%3B%20filename%3DOSDA_Windows_Framework_V3.5.0_x86.exe&response-content-type=application%2Foctet-stream x86 Github download link]<br />
 +
**[https://objects.githubusercontent.com/github-production-release-asset-2e65be/207280557/8e089180-fb5c-11e9-9381-12f62da70188?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221110%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221110T115556Z&X-Amz-Expires=300&X-Amz-Signature=b2b572f531620884ce10fbc2794f537fad092138d17ce5ee6c984c24bbbdb31f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=207280557&response-content-disposition=attachment%3B%20filename%3DOSDA_Windows_Framework_V3.5.0_x64.exe&response-content-type=application%2Foctet-stream x64 Github download link]
 +
*Run the OSDA open source serial port debugging assistant, select the serial port of the device, select 115200 for the baud rate, check Hex to accept, check Hex to send, and then open the serial port to send commands to the motor.
 +
[[File:DDSM115 spec10.jpg]]
 +
*Note that the motor will start to rotate after some commands are sent. Do not touch the rotating parts of the motor. If you do not have suitable structural parts to install the motor, be sure to prepare for power failure at any time, and do not give high-speed commands.
 +
*The following is the 485 communication instruction set:
 +
1. Switch to velocity loop (02), <font color="#FF0000">this command has no feedback.</font><br />
 +
01 A0 00 00 00 00 00 00 00 <font color="#FF0000">02</font><br />
 +
2. For additional feedback, query the motor mode<br />
 +
01 74 00 00 00 00 00 00 00 04<br />
 +
3. Brake command, valid in speed loop mode.<br />
 +
01 64 00 00 00 00 00 <font color="#FF0000">FF</font> 00 D1<br />
 +
4. ID setting(<font color="#FF0000">01</font>), send the command five times in a row<br />
 +
AA 55 53 <font color="#FF0000">01</font> 00 00 00 00 00 00<br />
 +
5. ID query<br />
 +
C8 64 00 00 00 00 00 00 00 DE<br />
 +
6. Current loop command(<font color="#FF0000">-32767~32767</font> corresponds to -8A~8A)<br />
 +
01 64 <font color="#FF0000">F8 30</font> 00 00 00 00 00 08 (-2000)<br />
 +
01 64 <font color="#FF0000">EC 78</font> 00 00 00 00 00 D3 (-5000)<br />
 +
01 64 <font color="#FF0000">D8 F0</font> 00 00 00 00 00 78 (-10000)<br />
 +
01 64 <font color="#FF0000">00 00</font> 00 00 00 00 00 50 (0)<br />
 +
01 64 <font color="#FF0000">07 D0</font> 00 00 00 00 00 27 (2000)<br />
 +
01 64 <font color="#FF0000">13 88</font> 00 00 00 00 00 A7 (5000)<br />
 +
01 64 <font color="#FF0000">27 10</font> 00 00 00 00 00 57 (10000)<br />
 +
7. Velocity loop commands(<font color="#FF0000">-330~330 rpm</font>)<br />
 +
01 64 <font color="#FF0000">FF CE</font> 00 00 00 00 00 DA (-50rpm)<br />
 +
01 64 <font color="#FF0000">FF 9C</font> 00 00 00 00 00 9A (-100rpm)<br />
 +
01 64 <font color="#FF0000">00 00</font> 00 00 00 00 00 50 (0rpm)<br />
 +
01 64 <font color="#FF0000">00 32</font> 00 00 00 00 00 D3 (50rpm)<br />
 +
01 64 <font color="#FF0000">00 64</font> 00 00 00 00 00 4F (100rpm)<br />
 +
8. Position loop commands(<font color="#FF0000">0~32767</font> corresponds to 0~360°)<br />
 +
01 64 <font color="#FF0000">00 00</font> 00 00 00 00 00 50 (0)<br />
 +
01 64 <font color="#FF0000">27 10</font> 00 00 00 00 00 57 (10000)<br />
 +
01 64 <font color="#FF0000">4E 20</font> 00 00 00 00 00 5E (20000)<br />
 +
01 64 <font color="#FF0000">75 30</font> 00 00 00 00 00 A7 (30000)<br />
 +
<br />
 +
 
 +
==Communication Protocol==
 +
*Baudrate: 115200
 +
*Data bits: 8bit
 +
*Stop bit: 1bit
 +
*Parity bit: none
 +
*Data length: 10 bytes
 +
*Reply form: one question and one answer
 +
*Rate: up to 500Hz
 +
*In current loop mode: -32767~32767 corresponds to the range -8~8A (non-motor current range), the data type is signed 16-bit
 +
*In speed loop mode: -330~330, unit rpm, data type signed 16-bit
 +
*In position loop mode: 0~32767 corresponds to 0°~360°, data type unsigned 16 bits
 +
*Steps:
 +
<pre>
 +
①Set the motor ID (save when power is off)
 +
②Set the motor mode (current loop, speed loop, position loop, the default is speed loop)
 +
③Send the given value
 +
</pre>
 +
*CRC8 value:
 +
**The value after the CRC8 check is performed on the values DATA[0]~DATA[8].
 +
**CRC algorithm: CRC-8/MAXIM
 +
**Polynomial: x8 + x5 + x4 +1
 +
**The verification product stage can use this website to calculate the check digit: https://crccalc.com/
 +
*Protocol 1: drive motor to rotate
 +
Send to the motor:<br/>
 +
<div style="margin:2px auto;float:left;">
 +
{| style="border-collapse: collapse;border:1px solid #cccccc;color: #5e5e5e;margin: auto;"
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Data Field
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[0]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[1]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[2]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[3]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[4]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[5]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[6]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[7]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[8]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[9]
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Content
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | ID
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0x64
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Velocity/current/given position high 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Velocity/current/given position low 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Acceleration time
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Brake
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | CRC8
 +
|}
 +
</div>
 +
<div class="sep0px"></div>
 +
Motor feedback:<br/>
 +
<div style="margin:2px auto;float:left;">
 +
{| style="border-collapse: collapse;border:1px solid #cccccc;color: #5e5e5e;margin: auto;"
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Data Field
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[0]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[1]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[2]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[3]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[4]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[5]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[6]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[7]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[8]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[9]
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Content
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | ID
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Mode value
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Torque current high 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Torque current low 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Velocity high 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Velocity low 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Position high 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Position low 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Error code
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | CRC8
 +
|}
 +
</div>
 +
<div class="sep0px"></div>
 +
*Acceleration time: valid in the speed loop mode, the acceleration time per 1rpm, the unit is 0.1ms. When it is set to 1, the acceleration time per 1rpm is 0.1ms. When it is set to 10, the acceleration time per 1rpm is 10*0.1 ms=1ms. When set to 0, the default is 1, and the acceleration time per 1rpm is 0.1ms.
 +
*Brake: 0XFF other values do not brake, valid in speed loop mode.
 +
*Protocol 2: get other feedback.
 +
Send to the motor: <br/>
 +
<div style="margin:2px auto;float:left;">
 +
{| style="border-collapse: collapse;border:1px solid #cccccc;color: #5e5e5e;margin: auto;"
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Data Field
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[0]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[1]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[2]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[3]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[4]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[5]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[6]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[7]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[8]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[9]
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Content
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | ID
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0x74
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | CRC8
 +
|}
 +
</div>
 +
<div class="sep0px"></div>
 +
Motor feedback:<br/>
 +
<div style="margin:2px auto;float:left;">
 +
{| style="border-collapse: collapse;border:1px solid #cccccc;color: #5e5e5e;margin: auto;"
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Data Field
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[0]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[1]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[2]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[3]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[4]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[5]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[6]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[7]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[8]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[9]
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Content
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | ID
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Mode value
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Torque current high 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Torque current low 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Velocity high 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Velocity low 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Winding temperature
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | U8 position value
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Error code
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | CRC8
 +
|}
 +
</div>
 +
<div class="sep0px"></div>
 +
*U8 position value: 0~255 corresponds to 0~360°
 +
*Winding temperature: ℃
 +
*Error code:
 +
<div style="margin:2px auto;float:left;">
 +
{| style="border-collapse: collapse;border:1px solid #cccccc;color: #5e5e5e;margin: auto;"
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Error Code
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | BIT7
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | BIT6
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | BIT5
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | BIT4
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | BIT3
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | BIT2
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | BIT1
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | BIT0
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Content
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Save
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Save
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Save
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Troubleshooting
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Stall error
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Phase overcurrent error
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Overcurrent error
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Sensor error
 +
|}
 +
</div>
 +
<div class="sep0px"></div>
 +
For example, the error code 0x22, that is 0b00000010, means an overcurrent error.<br/>
 +
*CRC8 value:
 +
The value after performing CRC8 check on the value DATA[0]~DATA[8].<br/>
 +
CRC algorithm: CRC-8/MAXIM<br/>
 +
Polynomial: x8 + x5 + x4 + 1<br/>
 +
*Motor mode switches sending protocol:
 +
<div style="margin:2px auto;float:left;">
 +
{| style="border-collapse: collapse;border:1px solid #cccccc;color: #5e5e5e;margin: auto;"
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Data Field
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[0]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[1]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[2]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[3]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[4]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[5]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[6]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[7]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[8]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[9]
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Content
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | ID
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0xA0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Mode value
 +
|}
 +
</div>
 +
<div class="sep0px"></div>
 +
Mode value:<br/>
 +
0x01:set the current loop<br/>
 +
0x02:set the velocity loop<br/>
 +
0x03:set the position loop<br/>
 +
The rotating velocity of the motor must be lower than 10rpm when switching to the position loop.<br/>
 +
*Motor ID set the sending protocol:
 +
<div style="margin:2px auto;float:left;">
 +
{| style="border-collapse: collapse;border:1px solid #cccccc;color: #5e5e5e;margin: auto;"
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Data Field
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[0]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[1]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[2]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[3]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[4]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[5]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[6]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[7]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[8]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[9]
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Content
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0xAA
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0x55
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0x53
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | ID
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
|}
 +
</div>
 +
<div class="sep0px"></div>
 +
Note: When setting the ID, please ensure that there is only one motor on the bus. It is only allowed to be set once each time the power is turned on. The motor can be set after receiving 5 ID setting instructions.<br/>
 +
*Motor ID query the sending protocol:
 +
Send to the motor:<br/>
 +
<div style="margin:2px auto;float:left;">
 +
{| style="border-collapse: collapse;border:1px solid #cccccc;color: #5e5e5e;margin: auto;"
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Data Field
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[0]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[1]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[2]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[3]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[4]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[5]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[6]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[7]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[8]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[9]
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Content
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0xC8
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0x64
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | 0
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | CRC8
 +
|}
 +
</div>
 +
<div class="sep0px"></div>
 +
Motor feedback:<br/>
 +
<div style="margin:2px auto;float:left;">
 +
{| style="border-collapse: collapse;border:1px solid #cccccc;color: #5e5e5e;margin: auto;"
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Data Field
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[0]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[1]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[2]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[3]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[4]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[5]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[6]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[7]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[8]
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | DATA[9]
 +
|-
 +
! style="border:1px solid #cccccc;text-align:center;padding:5px;" | Content
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | ID
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Mode value
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Torque current high 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Torque current low 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Velocity high 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Velocity low 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Position high 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Position low 8 bits
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | Error code
 +
| style="border:1px solid #cccccc;text-align:center;padding:5px;" | CRC8
 +
|}
 +
</div>
 +
<div class="sep0px"></div>
 +
Note: Please ensure that there is only one motor on the bus when querying the ID.
 +
 
 +
==Protection Rules==
 +
1. Bus overcurrent protection threshold: 3A, trigger shutdown protection after overcurrent occurs, and release after 5S.<br/>
 +
2. Motor over-temperature protection threshold: 80°C, the protection will be released when the temperature is lower than the threshold by 5°C.<br/>
 +
3. Phase current protection threshold: 4.6A, trigger shutdown protection after overcurrent occurs, and release after 5S.<br/>
 +
4. Locked rotor protection: the blocked rotor lasts for more than 5S to trigger the protection, and it will be released after 5S.<br/>
 +
==Installation Guide==
 +
*The direct drive servo hub motor is installed with rubber tires when leaving the factory. The pattern of the rubber tires has directions. You can remove the three M2.5*8 inner hexagon screws on the front black cover. After removing the black cover, After that, you can take down the rubber tire, and then change the angle to install the tire.
 +
*The mounting threaded hole of the motor mounting section is M2.5, 6mm deep, and positioned as an outer circle with a diameter of 15.2mm and a flat position with a diameter of 8mm. Please select the appropriate screws for installation.
 +
[[File:DDSM115 spec777.jpg]]
  
 
=Support=
 
=Support=
 
{{Servicebox1}}
 
{{Servicebox1}}

Revision as of 01:24, 7 April 2024

DDSM210
DDSM210.jpg

UART Communication Port
{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

Overview

Based on an integrated development concept, DDSM210 (Direct Drive Servo Motor) integrates an outer rotor brushless motor, encoder, and servo drive into a high-reliability permanent magnet synchronous motor. Its compact structure, convenient installation, stable operation, small size, and large torque make it particularly suitable for applications in the following direct drive fields: robot joints, small AGV drive wheels, self-balancing vehicle drive wheels, and development vehicle platforms for advanced robot projects.

Through optimization of pole number, slot type, air gap, permanent magnet material, and other related parameters, the motor ensures greater torque output, the smaller torque fluctuations, and achieves direct drive at low speeds with large torque, providing users with high-performance direct drive application solutions.

The driver compatible with this motor utilizes the Field Oriented Control (FOC) algorithm, coupled with the motor's built-in high-precision sensor, to achieve precise control of the motor and better noise reduction. The driver features a complete and reliable motor On-board Diagnostics (OBD) monitoring mechanism and protection functions, ensuring the safe and reliable operation of the motor.

Simultaneously, we provide an open-source structural model for this model of direct drive servo motor, which can be downloaded from the "Resources"-"Open Source Structure" section at the bottom.

Usage Precaution

  1. Please confirm whether the operating voltage is the voltage specified in this article before use.
  2. Please make sure the motor is used under the specified environment range (-25℃~45℃), the motor over-temperature protection threshold is 80°C, and the protection is released when the temperature is lower than 5°C.
  3. Please avoid immersing the motor in water, otherwise, it may cause abnormal operation or damage to the motor.
  4. Please ensure that the wiring is correct and stable before use to avoid poor contact.
  5. Please refer to the installation instructions before using the motor to ensure that the motor is installed correctly and firmly.
  6. Please refer to the installation instructions before using the motor to ensure that the external output part of the motor is installed correctly and firmly.
  7. Please avoid damage to the wire during use, otherwise, it may cause abnormal operation or damage to the motor.
  8. Do not touch the rotating part of the motor during use to avoid injury.
  9. When the motor outputs high torque, it will generate heat. Do not touch the motor to avoid burns.
  10. Do not disassemble the motor without permission, otherwise, it may cause abnormal operation or damage to the motor, and may bring safety hazards.

Features

  • Ultra-low noise.
  • High precision and zero-backlash.
  • Fast response, direct drive without delay.
  • Integrated motor and driver, compact structure, and high integration.
  • Supports UART communication, for obtaining motor feedback information such as position, speed, current, error code, etc.
  • With Hall position detection, over-current protection, etc.
  • Supports electric brake.
  • No drive mechanical friction, drive efficiency close to 99.99%.

Parameters

  • No-load speed: 210±11rpm
  • No-load current: 0.15A
  • Rated speed: 98rpm
  • Rated torque: 0.25Nm
  • Rated current: 1.1A
  • Locked-rotor torque: 0.85Nm
  • Locked-rotor current: ≦3.8A
  • Input voltage: 9 ~ 28VDC
  • Operating temperature -25~45℃
  • Total weight: 216g
  • Encoder resolution: 4096
  • Relative precision: 1024
  • Noise level: ≦40dB(A)
  • Single-wheel load: 10kg


Motor Interface and Cable Order

DDSM115-A.jpg

Signal Cable (ZH1.5*4P) Name Type Description
1 GND Signal GND Negative Electrode
2 A DATA+ 485 bus A
3 B DATA- 485 bus B
4 / / Reserved

DDSM115-B.jpg

Power cable (XH2.54*2P) Name Type Description
1 VCC Power input Rated 18V DC
2 GND Ground Negative Electrode


How To Use

  • The simple control method is only used to verify the working principle of the motor and to do some simple tests. For the specific method, please refer to the chapter on the communication protocol.
  • It is recommended to use USB to RS485 for the device with a USB interface to control the servo.
  • You can refer to the signal line table #Motor Interface and Cable Order for the signal cable wiring and pin definition. Connect the DATA+ of the motor to the A+ of the converter, connect the DATA- of the motor to the B- of the converter, and the GND of the motor signal cable. Connect to the GND of the converter (it is recommended to connect GND, but if your RS485 interface does not have GND, you can leave it unconnected).
  • For the wiring of the power cable, refer to the power cable table #Motor Interface and Cable Order above for the pin definition. The VCC of the power cable is connected to the positive pole of the 18V DC power supply (the voltage range of 5S LiPo is sufficient), and the GND of the power line is connected to the negative pole of the 18V DC power supply. Since the power of the motor is relatively large, the power supply needs to have enough power to drive the motor to work normally.
  • Download OSDA open-source serial port assistant.
  • Run the OSDA open source serial port debugging assistant, select the serial port of the device, select 115200 for the baud rate, check Hex to accept, check Hex to send, and then open the serial port to send commands to the motor.

DDSM115 spec10.jpg

  • Note that the motor will start to rotate after some commands are sent. Do not touch the rotating parts of the motor. If you do not have suitable structural parts to install the motor, be sure to prepare for power failure at any time, and do not give high-speed commands.
  • The following is the 485 communication instruction set:

1. Switch to velocity loop (02), this command has no feedback.
01 A0 00 00 00 00 00 00 00 02
2. For additional feedback, query the motor mode
01 74 00 00 00 00 00 00 00 04
3. Brake command, valid in speed loop mode.
01 64 00 00 00 00 00 FF 00 D1
4. ID setting(01), send the command five times in a row
AA 55 53 01 00 00 00 00 00 00
5. ID query
C8 64 00 00 00 00 00 00 00 DE
6. Current loop command(-32767~32767 corresponds to -8A~8A)
01 64 F8 30 00 00 00 00 00 08 (-2000)
01 64 EC 78 00 00 00 00 00 D3 (-5000)
01 64 D8 F0 00 00 00 00 00 78 (-10000)
01 64 00 00 00 00 00 00 00 50 (0)
01 64 07 D0 00 00 00 00 00 27 (2000)
01 64 13 88 00 00 00 00 00 A7 (5000)
01 64 27 10 00 00 00 00 00 57 (10000)
7. Velocity loop commands(-330~330 rpm
01 64 FF CE 00 00 00 00 00 DA (-50rpm)
01 64 FF 9C 00 00 00 00 00 9A (-100rpm)
01 64 00 00 00 00 00 00 00 50 (0rpm)
01 64 00 32 00 00 00 00 00 D3 (50rpm)
01 64 00 64 00 00 00 00 00 4F (100rpm)
8. Position loop commands(0~32767 corresponds to 0~360°)
01 64 00 00 00 00 00 00 00 50 (0)
01 64 27 10 00 00 00 00 00 57 (10000)
01 64 4E 20 00 00 00 00 00 5E (20000)
01 64 75 30 00 00 00 00 00 A7 (30000)

Communication Protocol

  • Baudrate: 115200
  • Data bits: 8bit
  • Stop bit: 1bit
  • Parity bit: none
  • Data length: 10 bytes
  • Reply form: one question and one answer
  • Rate: up to 500Hz
  • In current loop mode: -32767~32767 corresponds to the range -8~8A (non-motor current range), the data type is signed 16-bit
  • In speed loop mode: -330~330, unit rpm, data type signed 16-bit
  • In position loop mode: 0~32767 corresponds to 0°~360°, data type unsigned 16 bits
  • Steps:
①Set the motor ID (save when power is off)
②Set the motor mode (current loop, speed loop, position loop, the default is speed loop)
③Send the given value
  • CRC8 value:
    • The value after the CRC8 check is performed on the values DATA[0]~DATA[8].
    • CRC algorithm: CRC-8/MAXIM
    • Polynomial: x8 + x5 + x4 +1
    • The verification product stage can use this website to calculate the check digit: https://crccalc.com/
  • Protocol 1: drive motor to rotate

Send to the motor:

Data Field DATA[0] DATA[1] DATA[2] DATA[3] DATA[4] DATA[5] DATA[6] DATA[7] DATA[8] DATA[9]
Content ID 0x64 Velocity/current/given position high 8 bits Velocity/current/given position low 8 bits 0 0 Acceleration time Brake 0 CRC8

Motor feedback:

Data Field DATA[0] DATA[1] DATA[2] DATA[3] DATA[4] DATA[5] DATA[6] DATA[7] DATA[8] DATA[9]
Content ID Mode value Torque current high 8 bits Torque current low 8 bits Velocity high 8 bits Velocity low 8 bits Position high 8 bits Position low 8 bits Error code CRC8
  • Acceleration time: valid in the speed loop mode, the acceleration time per 1rpm, the unit is 0.1ms. When it is set to 1, the acceleration time per 1rpm is 0.1ms. When it is set to 10, the acceleration time per 1rpm is 10*0.1 ms=1ms. When set to 0, the default is 1, and the acceleration time per 1rpm is 0.1ms.
  • Brake: 0XFF other values do not brake, valid in speed loop mode.
  • Protocol 2: get other feedback.

Send to the motor:

Data Field DATA[0] DATA[1] DATA[2] DATA[3] DATA[4] DATA[5] DATA[6] DATA[7] DATA[8] DATA[9]
Content ID 0x74 0 0 0 0 0 0 0 CRC8

Motor feedback:

Data Field DATA[0] DATA[1] DATA[2] DATA[3] DATA[4] DATA[5] DATA[6] DATA[7] DATA[8] DATA[9]
Content ID Mode value Torque current high 8 bits Torque current low 8 bits Velocity high 8 bits Velocity low 8 bits Winding temperature U8 position value Error code CRC8
  • U8 position value: 0~255 corresponds to 0~360°
  • Winding temperature: ℃
  • Error code:
Error Code BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0
Content Save Save Save Troubleshooting Stall error Phase overcurrent error Overcurrent error Sensor error

For example, the error code 0x22, that is 0b00000010, means an overcurrent error.

  • CRC8 value:

The value after performing CRC8 check on the value DATA[0]~DATA[8].
CRC algorithm: CRC-8/MAXIM
Polynomial: x8 + x5 + x4 + 1

  • Motor mode switches sending protocol:
Data Field DATA[0] DATA[1] DATA[2] DATA[3] DATA[4] DATA[5] DATA[6] DATA[7] DATA[8] DATA[9]
Content ID 0xA0 0 0 0 0 0 0 0 Mode value

Mode value:
0x01:set the current loop
0x02:set the velocity loop
0x03:set the position loop
The rotating velocity of the motor must be lower than 10rpm when switching to the position loop.

  • Motor ID set the sending protocol:
Data Field DATA[0] DATA[1] DATA[2] DATA[3] DATA[4] DATA[5] DATA[6] DATA[7] DATA[8] DATA[9]
Content 0xAA 0x55 0x53 ID 0 0 0 0 0 0

Note: When setting the ID, please ensure that there is only one motor on the bus. It is only allowed to be set once each time the power is turned on. The motor can be set after receiving 5 ID setting instructions.

  • Motor ID query the sending protocol:

Send to the motor:

Data Field DATA[0] DATA[1] DATA[2] DATA[3] DATA[4] DATA[5] DATA[6] DATA[7] DATA[8] DATA[9]
Content 0xC8 0x64 0 0 0 0 0 0 0 CRC8

Motor feedback:

Data Field DATA[0] DATA[1] DATA[2] DATA[3] DATA[4] DATA[5] DATA[6] DATA[7] DATA[8] DATA[9]
Content ID Mode value Torque current high 8 bits Torque current low 8 bits Velocity high 8 bits Velocity low 8 bits Position high 8 bits Position low 8 bits Error code CRC8

Note: Please ensure that there is only one motor on the bus when querying the ID.

Protection Rules

1. Bus overcurrent protection threshold: 3A, trigger shutdown protection after overcurrent occurs, and release after 5S.
2. Motor over-temperature protection threshold: 80°C, the protection will be released when the temperature is lower than the threshold by 5°C.
3. Phase current protection threshold: 4.6A, trigger shutdown protection after overcurrent occurs, and release after 5S.
4. Locked rotor protection: the blocked rotor lasts for more than 5S to trigger the protection, and it will be released after 5S.

Installation Guide

  • The direct drive servo hub motor is installed with rubber tires when leaving the factory. The pattern of the rubber tires has directions. You can remove the three M2.5*8 inner hexagon screws on the front black cover. After removing the black cover, After that, you can take down the rubber tire, and then change the angle to install the tire.
  • The mounting threaded hole of the motor mounting section is M2.5, 6mm deep, and positioned as an outer circle with a diameter of 15.2mm and a flat position with a diameter of 8mm. Please select the appropriate screws for installation.

DDSM115 spec777.jpg

Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)