Close
0%
0%

MKS XDrive Mini Guide: Set up, Tuning & Arduino

3kW FOC for $35. Setup guide for the MKS X Drive Mini, including tuning, CAN troubleshooting and ESP32/Arduino code

Similar projects worth following
I started a DIY robot dog project and quickly realized I’d need at least 12 FOC drivers for it—actually 16, since I’m going for a wheeled-quadruped design. At $150+ per unit for an ODrive, the electronics alone would cost between $1,800 and $2,400. That’s a total dealbreaker for me and most hobby builds. MJbots moteus makes it slightly more affordable, but it's still too expensive and significantly less powerful.
So, I decided to play "AliExpress roulette" and try the MKS X Drive Mini. It’s a $35 ODrive replica that claims 3kW of power on paper, but it ships with almost no documentation and several integration "surprises." Since I couldn't find a decent guide on how to actually use it, I decided to make one myself.
This was originally intended to be Part 1 of a larger "cheap robotics actuator" series, but the guide became so detailed that I decided to launch it as a standalone project.

Video instruction: 


The goal of this project is to take this poorly documented AliExpress driver and turn it into a DIY-ready component for a multi-axis robot.

1. Hardware Preparation & Mods

Before the driver is usable in a tight robot chassis, a few physical modifications are necessary:

  • Slimming the Profile: The stock screw terminals are far too bulky for a compact robot leg. I desoldered these and soldered motor wires directly to the PCB. For the power input, I switched to XT60 connectors, effectively cutting the board's total thickness in half.
  • Thermal Management: While the driver is rated for 3kW, the stock plate isn't enough for sustained high-torque tasks. I designed custom 3D-printed mounts and adapted standard aluminum heatsinks to fit the MOSFET thermal pads for better heat dissipation.
  • CAN Transceiver Fix: The popular SN65HVD230 CAN module used with these boards has a design flaw: the RS pin resistor value is too high, forcing the chip into "Listen Only" or standby mode. I desoldered this resistor and shorted the pads to 0 ohms, ensuring the transceiver stays active for two-way communication.

2. Software Configuration 

The MKS X Drive Mini runs legacy ODrive v3.6 firmware (v0.5.1), and currently, the software is the biggest barrier to entry. The original ODrive documentation is outdated since they go closed-source, and the official desktop GUI is broken - it  crashes on startup due to deprecated Python dependencies. While the command-line odrivetool is powerful, it is far too intimidating for most beginners.

  • The GitHub "Cheat Sheet": To fix this, I created a universal configuration file available on my GitHub. Instead of digging through hundreds of settings, you only need to update the motor pole pairs parameter.
  • Line-by-Line Setup: You can simply copy and paste the config from my repository into odrivetool line by line. This takes the guesswork out of the process and gets the motor spinning in minutes.
  • The "Ghost Node" Fix: Included in the config is the command to move the phantom "Axis 1" to CAN ID 63. This prevents the default ID 1 conflict that usually crashes multi-driver systems.

3. ESP32 / Arduino Integration

To control a complex 16-axis system, a centralized controller is required to sync all movements.

  • Communication: I used the ESP32-S3 hardware for its native CAN (TWAI) support.
  • Custom Bridge: Since the standard ODrive Arduino library doesn't support the ESP32's CAN implementation out of the box, I created a custom adapter bridge. You can find the code on my GitHub.
  • Performance: I am running the bus at a 500k baud rate. While it isn't CAN-FD, it provides enough bandwidth for multi-motor synchronization. I still need to investigate how the latency of standard CAN will affect sim-to-real precision for high-speed gaits.

4. Torque & Thermal Testing

I pushed these drivers using a high-torque test rig to find the actual limits of the $35 hardware.

  • Results: Using an LA8308 170KV motor, I achieved roughly 2 Nm of torque at 50A and 1.2 Nm at 25A.
  • Observations: The motor actually overheats much faster than the driver's MOSFETs. This proves the MKS has more power headroom than most hobby-grade motors can handle. The next step is to find even bigger, cheap motors to really see when this driver blows up!

half_bracket_for_3dprinting.3mf

3mf - 72.19 kB - 02/05/2026 at 13:29

Download

mks xdrive mini xt60.step

step - 4.95 MB - 02/05/2026 at 13:29

Download

mks xdrive mini.step

step - 6.57 MB - 02/05/2026 at 13:29

Download

  • 2 × MKS XDRIVE MINI FOC driver
  • 2 × LA8308 motor bldc motor
  • 1 × SN65HVD230 CAN module

View project log

Enjoy this project?

Share

Discussions

Does this project spark your interest?

Become a member to follow this project and never miss any updates