
DMBOTs DM-J4340 Joint Motor
The DMBOTs DM-J4340 is a high-performance joint motor with integrated dual encoders and driver, ideal for robotic arms, cobots, AGVs, and modular robots. Featuring a compact form factor and reliable control, it supports CANopen, PWM, and serial communication. Perfect for industrial automation, education, and research environments.
DM-J4340-2EC Robotic Actuator Motor Specifications
Parameter Category | DM-J4340-2EC (24V) | DM-J4340-2EC (48V) |
Rated Torque | 9 Nm | 9 Nm |
Peak Torque | 27 Nm | 27 Nm |
No-Load Max Speed | 52 rpm | 100 rpm |
Rated Current | 2.5 A | 2.5 A |
Peak Current | 8 A | 8 A |
Outer Diameter | 57 mm | 57 mm |
Height | 53.3 mm | 53.3 mm |
Weight | ~362 g | ~362 g |
Encoder | Dual 14-bit magnetic encoder | Dual 14-bit magnetic encoder |
What These Parameters Mean
- 9 Nm Torque: Enough to easily drive a 5–10 kg robotic arm joint.
- 27 Nm Peak Torque: Can handle short bursts of ‘heavy-duty’ operations, like lifting a relatively heavy load.
- Dual 14-bit Encoder: Provides very high positioning accuracy, so the motor moves smoothly with almost no ‘shaking’ during motion.
Three Operating Modes – Like Switching ‘Driving Styles’
MIT Mode – ‘Smart Driving’
Example Cases
p_des = 0.0; // Position not controlled
v_des = 20.0; // Target speed = 20 rad/s
kp = 0.0; // Disable position loop
kd = 1.0; // Speed loop gain
t_ff = 0.0; // No feedforward torque
// MIT Mode Example Command
p_des = 0.0;
v_des = 0.0;
kp = 0.0;
kd = 0.0;
t_ff = 2.0; // Apply 2 Nm torque
Position-Velocity (Cascaded Position) Mode — imilar to ‘Autonomous Navigation’
- The outer loop is the position loop, whose output serves as the setpoint for the velocity loop.
- The velocity loop output serves as the setpoint for the inner current loop, which controls the actual current output. The control block diagram is as follows:
p_des
is the target position for control.v_des
is used to limit the maximum absolute speed during motion.
p_des = 1.57 rad
), but you want to limit its speed. You can set a maximum speed v_des
. The motor will then reach the target smoothly following the sequence: accelerate → constant speed → decelerate.1.57 rad
) while limiting the maximum speed to 5 rad/s:
// Position-Velocity Mode Command Example
p_des = 1.57; // Target angle 90°
v_des = 5.0; // Maximum speed 5 rad/s
kp = 50.0; // Position loop gain
kd = 1.0; // Velocity loop damping
t_ff = 0.0; // No additional torque feedforward
- High precision
- Smooth motion
- Suitable for robot joint movements, e.g., slow grasping with a robotic arm
- Slightly slower response
- Not suitable for scenarios requiring ‘lightning-fast’ movements
- When using the recommended parameters from the debugging assistant, good control accuracy can be achieved and the motion remains relatively smooth, though the response time is longer.
- Besides
v_des
, you can also configure acceleration and deceleration values. Increasing them may reduce oscillations during motion. - Units:
p_des
in rad,v_des
in rad/s, data type: float. - The damping factor must be a positive number greater than 0. For reference, see the notes for Velocity Mode.
Velocity Mode — Similar to ‘Cruise Control’
- For example, if you want a wheeled robot to move continuously at 50 rad/s, you can simply set
v_des = 50
, and the motor will maintain that speed steadily.
// Velocity Mode Command Example
p_des = 0.0; // Position is not controlled
v_des = 50.0; // Constant speed 50 rad/s
kp = 0.0; // No position loop control
kd = 4.0; // Damping factor, recommended value
t_ff = 0.0; // No additional torque feedforward
- The damping factor
kd
should be set between 2.0 and 10.0, with 4.0 recommended. - If too small, the motor will oscillate.
- If too large, the motion will feel sluggish.
v_des
unit is rad/s, data type float.- When using the debugging assistant to automatically calculate parameters, the damping factor must be a positive number greater than 0.
- A too-small damping factor may cause speed oscillation and overshoot, while a too-large damping factor may increase rise time. The recommended value is 4.0.
- Maintains a stable, constant speed
- Simple and effective for tasks like wheeled robot motion
How to ‘Talk’ to the Motor: CAN Communication
- Receive Frames: Control data sent to the motor, e.g., ‘move to 90°’ or ‘maintain 50 rad/s speed.’
- Feedback Frames: Status data sent by the motor back to the controller, e.g., ‘I’m at 45°, my speed is 20 rad/s, temperature is 60°C.’
Feedback Frame
- Position (POS): Current motor angle
- Velocity (VEL): Current speed
- Torque (T): Current output torque
- MOS Temperature (T_MOS): Average temperature of the MOSFETs on the driver
- Rotor Temperature (T_Rotor): Average temperature of the motor coils
- Error Code (ERR): Status like overcurrent, overvoltage, overtemperature
feedback message | D[0] | D[1] | D[2] | D[3] | D[4] | D[5] | D[6] | D[7] |
MST_ID | ID|ERR<<4 | POS[15:8] | POS[7:0] | VEL[11:4] | VEL[3:0]|T[11:8] | T[7:0] | T_MOS | T_Rotor |
- ID indicates the controller ID, taking the lower 8 bits of the CAN_ID.
- ERR indicates the status, corresponding to the following types:
- 0 — Disabled
- 1 — Enabled
- 8 — Overvoltage
- 9 — Undervoltage
- A — Overcurrent
- B — MOS Overtemperature
- C — Motor Coil Overtemperature
- D — Communication Lost
- E — Overload
- POS indicates the motor position information.
- VEL indicates motor velocity information.
- T indicates motor torque information.
- T_MOS indicates the average temperature of the MOS on the driver, in ℃.
- T_Rotor indicates the average temperature of the motor’s internal coil, in ℃.
- The position uses 16-bit data.
- Velocity and torque both use 12-bit data.
- Temperatures are in °C
Control Frames
MIT Mode
control message | D[0] | D[1] | D[2] | D[3] | D[4] | D[5] | D[6] | D[7] |
ID | p_des [15:8] | v_des [11:4] | v_des[3:0]| Kp[11:8] | VEL[3:0]|T[11:8] | Kp [7:0] | Kd [11:4] | Kd[3:0]| t_ff[11:8] | t_ff[7:0] |
- ID equals the set CAN ID value.
- P_des: desired position
- V_des: desired velocity
- Kp: position proportional gain
- Kd: position derivative gain
- T_ff: desired torque
- Position uses 16 bits (2 bytes)
- Velocity uses 12 bits
- Kp uses 12 bits
- Kd uses 12 bits
- If CAN ID = 0x01, and you want the motor to move to a certain position with a specific velocity and torque, you would encode these five parameters into the 8-byte frame according to the bit allocation above and send it via the CAN bus.
Control Frame in Position-Velocity Mode
control message | D[0] | D[1] | D[2] | D[3] | D[4] | D[5] | D[6] | D[7] |
0x100+ID | p_des | v_des |
- Frame ID: the set CAN ID plus an offset of 0x100.
- P_des: desired position, in floating-point format, low byte first, high byte last.
- V_des: desired velocity, in floating-point format, low byte first, high byte last.
- Velocity here represents the maximum speed during trapezoidal acceleration, i.e., the speed in the constant-speed segment.
- Suppose your motor’s CAN ID is
0x01
. - The control frame ID for position-velocity mode will be
0x101
(0x100 + 0x01
). - If you want the motor to move to position
100.0
with a maximum velocity of50.0
, you encodeP_des = 100.0
andV_des = 50.0
into the CAN frame (low byte first, high byte last) and send it to ID0x101
.
Control Frame in Velocity Mode
control message | D[0] | D[1] | D[2] | D[3] |
0x200+ID | v_des |
- Frame ID: the set CAN ID plus an offset of 0x200.
- V_des: desired velocity, in floating-point format, low byte first, high byte last.
- Suppose your motor’s CAN ID is
0x01
. - The control frame ID for velocity mode will be
0x201
(0x200 + 0x01
). - If you want the motor to run at a speed of
50.0
units/s, you encodeV_des = 50.0
into the CAN frame (low byte first, high byte last) and send it to ID0x201
.
Practical Example
- Use a USB-CAN tool and set the baud rate to 1 Mbps.
- Send a control frame:
- CAN ID:
0x01
(assuming motor ID = 1) - Data: pack
P_des
,V_des
,Kp
,Kd
, andT_ff
into the 8-byte frame.
- If the motor shakes or vibrates, check the damping (Kd) and maximum speed settings.
- Watch the temperature to avoid long-term overload and overheating.
How to Debug a Motor: Check It Like a ‘Health Check’
- Power: Connect a 24V or 48V power supply using an XT30 connector.
- Communication: Connect the CAN interface to your computer.
- Serial port: Use a GH1.25 3-pin cable to connect to the PC.
- If the motor feels too ‘aggressive’ when starting, you can reduce the acceleration parameter in the Debug Assistant. The motor will then rotate more smoothly and gently.
- Power: 24V/48V → XT30 connector
- Communication: CAN H, CAN L → USB-CAN → Computer
- Open Damy Debug Assistant → Select port → Connect
- Click ‘Real-Time Monitoring’ to see:
- Motor speed
- Temperature curves
- Torque changes
50 rad/s
. The motor will run at its maximum speed, and you can see the real-time curves on the interface.Motor Safety and Protection Features
- Driver Over-temperature Protection: triggers at 120℃; if exceeded, the motor exits ‘enable mode’.
- Motor Over-temperature Protection: adjustable based on usage; recommended not to exceed 100℃. Exceeding this will also exit ‘enable mode’.
- Over-voltage Protection: adjustable based on usage. Recommended limits:
- 24V motor: ≤32V
- 48V motor: ≤52V Exceeding these values will exit ‘enable mode’.
- Under-voltage Protection: if power supply drops below the set threshold (recommended ≥15V), the motor exits ‘enable mode’.
- Over-current Protection: adjustable based on usage; recommended ≤9.8A. Exceeding this will exit ‘enable mode’.
- Communication Loss Protection: if no CAN commands are received within the set period, the motor will automatically exit ‘enable mode’, preventing uncontrolled operation.
- Run the motor under a heavy load (e.g., hang a 5 kg weight).
- If the temperature rises toward the limit (e.g., 100℃ for the motor), the motor will automatically stop and return an error code.
- The Debug Assistant will show alerts, helping prevent damage.
How to Use the DMBOTs DM-J4340 Joint Motor
- Hardware SetupConnect a 24V or 48V power supply.
- Connect the CAN bus to your controller or PC.
- (Optional) Use a serial cable for monitoring.
- Software Setup
- Install the DMBOTs Debug Assistant.Open it, select the correct port, and connect.
- Set parameters like position, speed, and torque.
- Operation Modes
- Position Mode: precise joint movement
- Speed Mode: control motor speed
- Torque Mode: control output force
- Testing
- Run the motor and watch the feedback in the software (position, speed, temperature).
- Adjust parameters as needed.
- Safety Protections
- Over-temperature, over/under-voltage, over-current, and communication loss protections automatically stop the motor to prevent damage.
DMBOTs DM-J4340-2EC Robotic Actuator Motor
- Want smooth motion or precise robotic joints? Use Position-Velocity Mode.
- Want stable speed or to drive a wheeled chassis? Use Velocity Mode.
- Want flexible control or to write your own code? Use MIT Mode.
Your blog is a constant source of inspiration for me. Your passion for your subject matter is palpable, and it’s clear that you pour your heart and soul into every post. Keep up the incredible work!
Your writing is like a breath of fresh air in the often stale world of online content. Your unique perspective and engaging style set you apart from the crowd. Thank you for sharing your talents with us.