Stackforce X Series Motors Getting Start
This article will introduce how to get started with Stackforce series motors and how to use them with C++ and Python on the reComputer Jetson Super.

Specification
Here's the completed table with all parameters filled in for all motor models:
| Parameter | 6010 | 8108 |
|---|---|---|
| Rated Voltage | 24V | 24V |
| Rated Current | 10.5A | 7.5A |
| Rated Power | 240W | 180W |
| Rated Torque | 5 Nm | 7.5 Nm |
| Peak Torque | 11 Nm | 22 Nm |
| Rated Speed | 120 RPM | 110 RPM |
| Maximum Speed | 270 RPM | 320 RPM |
| Gear Ratio | 8:1 | 8:1 |
| Communication protocol | MIT Protocol | MIT Protocol |
| Control Modes | Position, Velocity, Torque Control | Position, Velocity, Torque Control |
| Outer Diameter | 80 mm | 97 mm |
| Thickness | 47 mm | 46 mm |
| Weight | 392 g ±10% | 395 g ±5% |
| Phase Resistance | 0.48 Ω ±10% | 0.439 Ω ±10% |
| Phase Inductance | 368 μH ±10% | 403 μH ±10% |
Main Features
- High Torque Output
- MIT Mode Control
- Magnetic Encoder Feedback
- Compact and Lightweight Design
- Support for High-Speed CAN Bus Communication
- Versatile Applications
Getting Started Guide
Preparations Before Use
On a PC with Windows System
- Product Manual.
- Download VOFA.
The motor’s CANID and CANMode are both modified via serial port. The motor is shipped with a default CANID of 0x01 and CANMode of CAN2.0 at 1Mbps.
Serial Port Wiring
Connect V, G, T, R to the VCC (3.3V), GND, RX, TX of the serial communication module respectively (RX and TX should be cross-connected). As shown in the figure below:

Modifying CANID
Set the serial port baud rate to 1Mbps.

The CANID to be sent is 0x**, and the set ID is 0x**, with a maximum limit of 0x7F. After successfully setting the CANID, the following log will be printed:

Modifying CAN Mode
Send CANMODE:0 or CANMODE:1 via the serial port.
CANMODE:0 represents CAN2.0 mode (1Mbps), while CANMODE:1 represents CANFD mode (5Mbps).
Successful modification of CAN mode is shown in the figures below:


Using reComputer Mini Jetson Orin to Control Motors
The most common CAN communication interfaces for motors on the market are XT30 (2+2) and JST connectors. Our reComputer Mini Jetson Orin and reComputer Robotics devices are equipped with dual XT30 (2+2) interfaces and CAN interfaces based on JST, providing seamless compatibility.
reComputer Mini:

reComputer Robotics

For more detailed information on CAN usage, please refer to this wiki.
Enabling CAN Interface
Step 1: Before using CAN0 and CAN1, please remove the bottom cover and set the two 120Ω terminal resistors to the ON position.

Turn off the toggle switch of the 120Ω CAN communication terminal resistor integrated on the motor.

If the Recomputer Mini has not set the 120Ω terminal resistor to ON, you can choose to turn on the toggle switch of the motor's CAN communication terminal resistor.
Step 2: Connect the motor directly to the CAN0 of the reComputer Mini via the XT30 (2+2) interface.

Since the CAN interface design of the reComputer Mini is opposite to that of the motor’s CAN interface, manual soldering is required to reverse the data lines.



Considering the high voltage and current required by the motor, it is recommended to purchase a 24V 300W power adapter to power the reComputer Mini for driving a single motor. If more motors need to be connected, a higher-power power adapter can be purchased according to the requirement.

This power supply is only for single-motor learning and testing. For multiple motors, please design a separate power board and isolate the power supply of Jetson from the motor power supply to avoid high current passing directly through Jetson.
Enabling Jetson CAN Communication
Open a terminal and enter the following command to pull the GPIO pin high to activate CAN0:
gpioset --mode=wait 0 43=0
If using CAN1 with the JST interface, pull pin 106 high.
gpioset --mode=wait 0 106=0
Keep this terminal open, start a new terminal, and configure CAN0.
sudo modprobe mttcan
sudo ip link set can0 type can bitrate 1000000
sudo ip link set can0 up
Setting Up Python and C++ Environment
Step 1: Clone the SDK.
git clone https://github.com/Seeed-Projects/Stackforce-Motor-SDK.git
Step 2: The driver SDK requires the following dependencies. For Debian Linux, they can be installed via the following commands:
sudo apt-get install -y build-essential cmake
sudo apt install linux-modules-extra-5.15.0-1025-nvidia-tegra # For Jetson Jetpack 6.0
If Python bindings are needed, additionally install Python 3, pip, and pybind11:
sudo apt-get install -y python3 python3-pip python3-pybind11 python3-setuptools
After installing the dependencies, follow the steps below to install the driver SDK as a C++ library or a Python package. Both will use CMake to compile the C++ code.
Using C++ for Control
cd build
cmake ..
make
The compiled executable will be located at build/sfmotor_control. Run the program:
./sfmotor_control
The program defaults to controlling the motor with ID 0x01. During operation, you can input the target angle value (in radians) via the keyboard. It also receives feedback data on the motor’s angle and angular velocity.
Using Python for Control
The Python script is located in the script/ directory and can be run directly without compilation.
python main.py
The program defaults to controlling the motor with ID 0x01. During operation, you can input the target angle value (in radians) via the keyboard. It also receives feedback data on the motor’s angle and angular velocity.
Tech Support & Product Discussion
Thank you for choosing our products! We are here to provide you with different support to ensure that your experience with our products is as smooth as possible. We offer several communication channels to cater to different preferences and needs.