Using the Module 13.2 BLDC Driver (ODrive Module) ・ 使用 Module 13.2 BLDC Driver (ODrive Module)
M5StackのModule 13.2 BLDC Driver (ODrive Module)をコントローラーに接続する最小構成。配線とBOMつき。
この構成をエディタで開く・編集する →| 部品 | 役割 | ポート | リンク・価格 |
|---|---|---|---|
| M5Stack Core2 | Controller | grove_i2c, grove_analog, grove_uart, mbus | official page — $46.9 |
| Module 13.2 BLDC Driver (ODrive Module) | module | uart, mbus, terminal_block | official page |
M5Stack Core2とModule 13.2 BLDC Driver(ODrive Module)を使って、ブラシレスDCモーター(BLDCモーター)を制御するための配線ガイドです。M-Bus経由でCore2とモジュールを接続し、UART通信でモーターを駆動します。
# M5Stack Core2 + Module 13.2 BLDC Driver (ODrive Module)
# Wiring: Core2 M-Bus -> BLDC Driver M-Bus
# BLDC motor connected to terminal block (U,V,W)
# Power: 12-24V DC to BLDC Driver
import time
from machine import UART, Pin
# UART on M-Bus (Core2 default UART2 on pins 13,14)
uart = UART(2, baudrate=115200, tx=13, rx=14)
# ODrive simple command: set velocity mode and run
# For a real ODrive, you'd use the ODrive library.
# Here we send a minimal ASCII command to spin motor.
def set_velocity(v):
# v in turns per second
cmd = "v {}\n".format(v)
uart.write(cmd)
# Start motor spinning slowly
set_velocity(1.0) # 1 turn per second
while True:
time.sleep(1)
# You can add more control logic here
この作り方はAIが構成から生成したものです(未検証)。通電前に配線とコードをご確認ください。
この構成はAIが実在するM5Stack部品から設計し、ポート互換をサーバで検証したものです。編集・共有できます。
エディタで開く →UnitKit は M5Stack® 製品向けの非公式ツール。作りたいものを書くと、部品リストと配線図が出ます。