top of page
Search

How to Control MyActuator RMD-X V4 Actuators over CAN Bus with Raspberry Pi and Python (2-DOF Robot Arm Guide)

Sep 30
6 min read

Overview

MyActuator RMD-X V4 actuators are integrated robot joints that combine a frameless BLDC motor, a planetary gearbox, a FOC servo driver and dual absolute encoders in one housing, controlled over CAN bus or EtherCAT. This guide shows how to build a 2-DOF robot arm with an RMD-X6-60 V4 shoulder and an RMD-X4-36 V4 elbow, driven from a Raspberry Pi with about 40 lines of Python. Robotechminds is the exclusive authorized distributor of MyActuator products in India, and both actuators are available at Robotechminds.ai.

Project Inspiration & Real-World Application

Hobby servos and stepper-plus-gearbox joints hit a wall fast: no torque feedback, backlash, and position that drifts the moment the load changes. That is why humanoid, quadruped and cobot teams have moved to quasi-direct-drive and planetary "smart actuators" that report position, speed, current and temperature on every command.

The catch is the learning curve. Most builders buy their first MyActuator joint and then lose a week to CAN wiring, bitrates and byte layouts. This guide removes that week. You will:

  • Size the joints with real torque math instead of guesswork.

  • Wire a clean CAN bus with correct termination and power rails.

  • Command absolute position and read live telemetry from Python using SocketCAN.

The same pattern scales directly to 6-DOF arms, humanoid legs and pan-tilt payload gimbals, because every RMD-X joint speaks the same CAN protocol.

Components Required from Robotechminds

  • MyActuator RMD-X6-60 V4 Planetary Actuator (shoulder): 48 V, 19.612:1 planetary reduction, 20 N·m rated / 60 N·m peak torque, 17-bit input and output encoders, EtherCAT and CAN, 0.82 kg – Buy on Robotechminds

  • MyActuator RMD-X4-36 V4 Planetary Actuator (elbow): 24 V, 36:1 planetary reduction, 11.5 N·m rated / 34 N·m peak torque, 17-bit input / 18-bit output dual encoder, EtherCAT and CAN, 0.36 kg, 55 mm diameter – Buy on Robotechminds

  • Upgrade option – MyActuator RMD-X8-120 V4 Planetary Actuator: the next step up for humanoid hips, knees and heavy-payload shoulders – Buy on Robotechminds

You also need:

  • Controller: Raspberry Pi 4 or 5 running Raspberry Pi OS.

  • CAN interface: a SocketCAN-compatible USB-to-CAN adapter or an MCP2515-based CAN HAT.

  • Power: one 48 V DC supply for the X6-60 and one 24 V DC supply for the X4-36, each sized for the joint's peak current, with an inline fuse and an emergency-stop switch.

  • Cabling: twisted-pair CAN cable and two 120 Ω termination resistors (skip one if your adapter has built-in termination).

Step-by-Step Implementation Guide

  1. Size your joints before you buy: Static holding torque is mass × 9.81 × horizontal distance from the joint axis. For a 0.4 m upper arm and 0.3 m forearm carrying a 1 kg payload, the elbow sees about 3.7 N·m (1 kg at 0.3 m plus a 0.5 kg forearm at 0.15 m). The RMD-X4-36 V4 is rated at 11.5 N·m, so you get roughly 3× margin. The shoulder carries the payload at 0.7 m, the 0.36 kg elbow actuator at 0.4 m, the 0.5 kg forearm at 0.55 m and a 0.6 kg upper arm at 0.2 m, which totals about 12.2 N·m. The RMD-X6-60 V4 is rated at 20 N·m continuous with 60 N·m peak for acceleration, which is the right fit. Size to rated torque for holding and to peak torque for motion.

  2. Assign motor IDs: Every joint on one CAN bus needs a unique ID from 1 to 32. Connect each actuator on its own to a PC, open the MyActuator PC debugging tool, and set the shoulder to ID 1 and the elbow to ID 2. Confirm the CAN bitrate is 1 Mbps on both, and make sure the actuators are in CAN mode, not EtherCAT.

  3. Wire the bus and power: Run CAN_H and CAN_L as one linear daisy chain: Raspberry Pi adapter, then shoulder, then elbow. Place a 120 Ω terminator only at the two physical ends of the chain, never in the middle, and never wire the bus as a star. Feed the X6-60 from the 48 V rail and the X4-36 from the 24 V rail, and tie the supply grounds to the CAN adapter ground so all nodes share a common reference. Put the e-stop in the power path, not in software.

  4. Bring up SocketCAN on the Raspberry Pi: Install the tools and start the interface at 1 Mbps.

sudo apt update && sudo apt install -y can-utils python3-can
sudo ip link set can0 up type can bitrate 1000000
candump can0   # leave this open in a second terminal to watch traffic
  1. Understand the frame format: RMD-X actuators receive single-motor commands on standard CAN ID 0x140 + motor ID and reply on 0x240 + motor ID, with 8 data bytes per frame. The absolute position command 0xA4 carries a max speed as uint16 in bytes 2–3 (1 dps/LSB) and the target angle as int32 in bytes 4–7 (0.01°/LSB), both little-endian. The 0x9C status command replies with temperature (1 °C/LSB), torque current (0.01 A/LSB), speed (1 dps/LSB) and output-shaft angle (1°/LSB).

  2. Write the Python controller: Save this as arm.py. It moves both joints to a target pose, then prints telemetry.

import can, struct, time

bus = can.interface.Bus(channel="can0", interface="socketcan")
SHOULDER, ELBOW = 1, 2

def send(motor_id, data):
    bus.send(can.Message(arbitration_id=0x140 + motor_id, data=data, is_extended_id=False))
    deadline = time.time() + 0.05
    while time.time() < deadline:
        msg = bus.recv(timeout=0.01)
        if msg and msg.arbitration_id == 0x240 + motor_id:
            return msg
    return None

def move_to(motor_id, degrees, max_dps=60):
    # 0xA4 absolute position: [cmd, 0, speed_lo, speed_hi, angle(int32, 0.01 deg/LSB)]
    return send(motor_id, struct.pack("<BBHi", 0xA4, 0x00, max_dps, int(degrees * 100)))

def status(motor_id):
    r = send(motor_id, bytes([0x9C, 0, 0, 0, 0, 0, 0, 0]))
    if r and r.data[0] == 0x9C:
        temp, iq, speed, angle = struct.unpack("<bhhh", bytes(r.data[1:8]))
        return {"temp_C": temp, "current_A": iq * 0.01, "speed_dps": speed, "angle_deg": angle}

def stop(motor_id):
    send(motor_id, bytes([0x81, 0, 0, 0, 0, 0, 0, 0]))

def shutdown(motor_id):
    send(motor_id, bytes([0x80, 0, 0, 0, 0, 0, 0, 0]))

try:
    for pose in [(30, 45), (60, 90), (0, 0)]:
        move_to(SHOULDER, pose[0], max_dps=45)
        move_to(ELBOW, pose[1], max_dps=60)
        for _ in range(20):
            print(status(SHOULDER), status(ELBOW))
            time.sleep(0.1)
finally:
    for m in (SHOULDER, ELBOW):
        shutdown(m)
    bus.shutdown()
  1. Test safely: Run the first test with the arm links removed and a low max_dps such as 20. Watch the current_A value: if a joint holds a static pose near its rated current, your load is too high or your lever arm too long. Add the links, clamp the base, and only then raise speed. Keep a hand on the e-stop for every first run.

  2. Scale up to ROS 2: Once raw CAN works, move to a community ROS 2 driver such as the open-source myactuator_rmd package with a ros2_control hardware interface, so MoveIt can plan trajectories across all joints. For more than a handful of joints at kHz update rates, switch the V4 actuators to EtherCAT mode.

Technical Specifications & Comparison

Feature / Spec

MyActuator RMD-X6-60 V4

MyActuator RMD-X4-36 V4

Hobby Servo + Gearbox

Supply voltage

48 V

24 V

5–8 V

Reduction ratio

19.612:1 planetary

36:1 planetary

Spur gear train

Rated / peak torque

20 / 60 N·m

11.5 / 34 N·m

Typically under 3 N·m

Rated speed

153 RPM

83 RPM

Varies

Encoder

17-bit input + 17-bit output absolute

17-bit input + 18-bit output absolute

Potentiometer

Interface

CAN bus + EtherCAT

CAN bus + EtherCAT

PWM

Telemetry

Position, speed, current, temperature

Position, speed, current, temperature

None

Weight

0.82 kg

0.36 kg

Varies

Best joint

Shoulder, hip, knee

Elbow, wrist, neck

Grippers, small toys

Frequently Asked Questions (FAQ)

How do I control a MyActuator RMD-X V4 actuator over CAN bus?

Send 8-byte standard CAN frames at 1 Mbps to ID 0x140 plus the motor ID, and read replies on 0x240 plus the motor ID. A Raspberry Pi with a SocketCAN adapter and the python-can library is enough to send position, speed and torque commands.

Where can I buy MyActuator robot joint actuators in India?

Robotechminds is the exclusive authorized distributor of MyActuator products in India, supplying RMD-X, RMD-L, RH harmonic and CEM cycloidal actuators with GST invoices. Browse the full range at Robotechminds.ai.

What is the difference between the RMD-X6-60 V4 and RMD-X4-36 V4?

The RMD-X6-60 V4 is a 48 V, 60 N·m peak actuator built for high-load joints such as shoulders and hips. The RMD-X4-36 V4 is a compact 24 V, 34 N·m peak actuator for elbows, wrists and lighter arms.

Can I use MyActuator RMD-X V4 actuators with ROS 2?

Yes. Community open-source drivers such as the myactuator_rmd package (C++ with Python bindings, published on the ROS 2 index) talk to RMD-X actuators over CAN and can be wrapped in a ros2_control hardware interface.

Do MyActuator RMD-X V4 actuators need an external motor driver?

No. Each RMD-X V4 actuator has its FOC servo driver, dual absolute encoders and planetary reducer built in, so you connect only DC power and the CAN or EtherCAT bus.

Ready to Build Your Project?

Stop fighting backlash and blind servos. Robotechminds stocks a broad MyActuator lineup in India as the brand's exclusive authorized distributor, with GST invoicing, a 6-month replacement warranty and engineering support from our Hyderabad team.

Building a humanoid, quadruped or multi-axis arm and need bulk pricing or help picking joints? WhatsApp +91-6301030082 or email team@robotechminds.com for a project quote.

 
 
bottom of page