Content#
Update Log:
2026.02.02: Initialize the debugging process of Damiao Motor.
2026.02.02:Update ID settings for CAN fast calibration and improve the complete steps for setting the zero point
Please be sure to use the official supporting host computer software provided by Damiao (such as DM_Motor_Tool)! An incorrect version may result in garbled parameter readings or the inability to enter the enabled mode.
1. Software and Hardware Preparation#
1.1 Software Environment#
- Debugging Tool: DM_Motor_Tool (this document is based on v1.8.0.1 version), or you can directly use the attached USB to CAN.zip.
Open source address: https://gitee.com/kit-miao/dm-tools
Running Prompt: If Windows prompts "Running Risk", please click "More info" and select "Run anyway".

1.2 Hardware Connection#
Data Transmission: Insert the USB to CAN adapter into the PC.
Power Supply Connection: Connect the power supply via the XT30 interface.
- ⚠️ Strongly recommended : Use an adjustable regulated power supply during the debugging phase , and turn on the current-limiting protection to prevent short circuits.
Voltage Matching : Confirm the rated voltage of the motor (e.g., DM-J4340P-2EC in this article supports 48V), strictly prohibit overvoltage, and it is recommended to choose a current limit of 3A.
Wire sequence verification:
- Power cord: Reverse connection of positive and negative poles is strictly prohibited.
- CAN Bus: Follow H to H, L to L. If communication fails, prioritize cross-checking the wire sequence.
❗ Safety Warning:
- Hot plugging under power is strictly prohibited: Instantaneous sparks generated by live operation can easily lead to interface carbonization and even puncture the MCU, causing the motor to be scrapped.
- Correct Plugging and Unplugging: When plugging or unplugging the terminal, hold the plastic housing to apply force; direct brute force pulling on the wire harness is strictly prohibited.

2. New Motor Initialization Process#
2.1 Establish Communication#
- Status Confirmation: After power-on, the motor indicator light should illuminate the red light.

- Serial Port Identification: Click the refresh button in the "Communication Settings" section and select the corresponding COM port.

- Connection Feedback: Click "Open Serial Port", and the right information bar will print the initial basic data of the motor power-on.

2.2 Encoder Calibration (Calibration)#
Calibration is divided into two stages, and it is necessary to ensure that the motor is in theno-load state:
- Motor-side encoder calibration:
- In the "Calibration" column (default motor side), click "Start Calibration".

Calibration Data view, and the system will automatically extract core physical parameters such as the number of motor pole pairs.


- Output Shaft Encoder Calibration :
- Manually switch to the "Output Shaft Encoder" option, click Calibrate again, and wait for completion.

2.3 Parameter Calibration#
- Operation Path: Enter "Parameter Settings" -> Click "Parameter Calibration".

Physical Preparation: Key! During this calibration, the motor will perform rapid forward and reverse rotations. Please make sure to firmly hold the motor by hand or use a vise to secure it to prevent the motor from flying off.
Result Confirmation: After calibration is completed, all key control parameters will be automatically backfilled into the parameter field.

3. ID Configuration and Zero Point Setting#
3.1 Modify Motor ID#
The communication ID of Damiao Motor follows a specific offset logic: Master ID = Slave ID + 0x10 .
Example: If the
Slave IDis set to0x01, then theMaster IDmust correspondingly be0x11.Serial Port Writing Steps:
- Enter the target ID in the ID input box on the debugging interface.
- Click "Settings" to perform the write operation.
- Verification Test: Manually clear the Master/Slave ID data on the interface, then click "Read". If the value just set can be correctly echoed, it indicates that the write was successful.

CAN Mode Quick Connect:
The default Slave ID of the motor at the factory is
0x01.Switch to CAN mode, enter
0x01to directly connect.If you need to modify the ID, simply follow the above writing steps.


3.2 Calibrate Zero Position (Zero Position)#
Note: After the motor is installed on the robot joint, due to the mechanical zero position limitation, this operation must be repeated.
Operation:
- Enable Motor: In the "Motor Mode" column, click the "Enable" button. Wait for the motor status indicator to turn green, then confirm that the motor has been enabled normally
- Rotate to the mechanical zero position Manually or through program control, rotate the motor to the target zero position of the mechanical structure.
- Save the zero point configurationClick the "Save Zero Point" button on the interface, wait for the number of CAN transmissions to change, and the saving and activation of the zero point will be completed.
- Disable Motor: In the "Motor Mode" column, click the "Disable" button. Wait for the motor status indicator light to turn red, and confirm that the motor has been disabled normally.

IV. Motor Firmware Update (Firmware Update)#
4.1 Preparation Work#
Official Firmware Library: https://gitee.com/kit-miao/motor-firmware
Core Principle: Before flashing, carefully read the official update instructions.Cross-series and cross-hardware version flashing is strictly prohibited, otherwise it may cause permanent damage to the motor drive layer (bricking).
4.2 Read the current version#
Before programming, the hardware base version of the motor must be confirmed:
Connect to the host computer and open the serial port.
Check the hardware and firmware status in the information bar:
- Hardware Version: e.g.,
V3.0(make sure the downloaded firmware supports this hardware version). - Firmware Version: e.g.,
6117(major version number). - Sub-Version: e.g.,
4(sub-version number).
- Hardware Version: e.g.,

4.3 Firmware Download and Matching Logic#
When downloading the firmware, please follow the "first two digits match" principle to determine the motor model match:
- Case Description:
- The current version number is
6117. 61represents the model code (e.g., DM-J4340P-2EC),17represents the current iteration versionV17.- Taboo: It is strictly prohibited to attempt to flash firmware that does not start with
61in the first two digits.
- The current version number is

4.4 Burning Process#
- Select Firmware: Click the "Firmware Selection" button to load the downloaded
.binor related format files.

Secondary verification : Reconfirm whether the model, voltage, and hardware version in the file name are consistent with the physical motor.
Execute programming:
- Click "Start Upgrade".
- Do not power off or disconnect the data cable during programming!
Result Confirmation:
- Wait for about 5 seconds. When the serial port message area posts back "Update firmware completed!!!" , it indicates that the upgrade was successful.
- Subsequently, the motor will be reinitialized.
