项目介绍

justlovescience/MKS-XDRIVE-MINI 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,目前获得 156 个 Star、23 次 Fork。

仓库全名
justlovescience/MKS-XDRIVE-MINI
Star 数
156
Fork 数
23
未关闭 Issue
1

README 摘要

MKS XDRIVE Mini FOC Driver: Full Setup Guide & Firmware A comprehensive guide for the MKS XDRIVE Mini, a cost-effective, high-performance FOC driver for robotics. This repository contains configuration files, unbricking procedures, and multi-driver CAN bus setup instructions. 📺 Video Tutorial Watch the step-by-step video guide here: MKS XDRIVE Mini Full Instruction & Setup 🚀 Quick Start (Windows) Follow these…

完整内容见 GitHub 原始 README 或本页 。

常见问题

MKS-XDRIVE-MINI 用什么语言开发?

主要使用 C++ 编写,目前有 156 个 Star。

如何获取 MKS-XDRIVE-MINI 的源码?

可以直接克隆仓库:git clone https://github.com/justlovescience/MKS-XDRIVE-MINI.git,默认分支为 main;安装与运行步骤见仓库 README。

MKS-XDRIVE-MINI 最近还在维护吗?

仓库最近一次更新为 5月1日,当前有 1 个未关闭 Issue;Star 数为 156,可作为社区活跃度的参考。

关于

Full guide for MKS XDRIVE Mini FOC driver. Learn to configure CAN IDs, fix ghost axis conflicts, and unbrick with ST-Link. Includes ESP32 & Arduino setup.

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

C++

README

MKS XDRIVE Mini FOC Driver: Full Setup Guide & Firmware

main

A comprehensive guide for the MKS XDRIVE Mini, a cost-effective, high-performance FOC driver for robotics. This repository contains configuration files, unbricking procedures, and multi-driver CAN bus setup instructions.


📺 Video Tutorial

Watch the step-by-step video guide here: MKS XDRIVE Mini Full Instruction & Setup


🚀 Quick Start (Windows)

Follow these steps to configure your driver using the ODrive tool:

  1. Install Python: Download from python.org.
    • Important: Select “Add python.exe to PATH” during installation.
  2. Install ODrive Tool: Open PowerShell and install the ODrive package version 0.5.1.post0.
  3. Configuration: Run odrivetool in your terminal. Use the commands provided in the my_config.txt file.
  4. Motor Tuning: Ensure you set your pole pairs correctly. For example, for an LA8308 170kV motor, you would enter: odrv0.axis0.motor.config.pole_pairs = 20 Note: Calculate this by counting your motor magnets and dividing by 2.

🛠 Hardware & Compatibility

  • Web GUI Interface: For a visual setup, use this Awesome WEB GUI.
  • Arduino/ESP32 Setup: Ensure your board has CAN support.
    • For ESP32, place the ODriveEsp32Twai.hpp adapter in your arduino/libraries/OdriveArduino/src folder.
  • macOS Support: odrivetool is functional on Mac, but the GUI is currently unsupported.

⚠️ Critical Notes & Troubleshooting

1. Avoid Bricking the Driver

  • Do NOT use the “upgrade” command in odrivetool. This driver ships with modified v0.5.1 firmware; standard upgrades will brick the device.
  • Unbricking: If bricked, you must use an ST-Link programmer. You can find dumped original firmware in this repository, you will need ST-linkV2 to unbrick.

2. CAN Bus Conflicts (Multi-Driver Setup)

By default, the MKS XDRIVE Mini acts like a dual-axis ODrive. This causes CAN ID conflicts when connecting multiple drivers.

  • The Fix: Change the “ghost” Axis1 to a “listen-only” ID to clear the bus by setting: odrv0.axis1.config.can_node_id = 63

3. Firmware Versions

Current testing shows that updating to v0.5.6 may result in motor inactivity (likely due to different pin assignments for the DRV8301). Stick to v0.5.1 for now.


🔌 Wiring & Schematics

ESP32-S3 Connection Diagram

esp32_s3_two_drivers_schematic

Disclaimer: This repository is a community-made guide. I have no affiliation with the manufacturer.

评论

暂无评论