Gearotons M17: NEMA 17 ที่รวม Motor, Driver, Controller และ Encoder
ถ้าทำเครื่องจักรหรือ Robot หนึ่งแกน ปกติเราอาจต้องเลือก Motor, หา Driver ที่เข้ากัน, สร้าง Motion Control และถ้าต้องการ Closed-loop ก็ต้องเพิ่ม Encoder เข้าไปอีก แต่ Gearotons M17 เลือกย่อส่วนประกอบเหล่านี้ เข้าไปอยู่ในตัว Motor ขนาด NEMA 17 เดียว
ผลลัพธ์คือ Integrated Servomotor ที่รับไฟ DC และสื่อสารกับ Host ผ่าน RS-485 โดย Motion Controller และ Closed-loop PID ทำงานอยู่ภายในตัว Motor พร้อม Library สำหรับ Python, Arduino และ ESP32 รวมถึง Firmware และ Hardware Design ที่เปิด Source ให้ศึกษาได้
- Gearotons M17 รวม Motor + Driver + Motion Controller + Encoder ไว้ในตัวเดียว
- ใช้ STM32G0 Arm Cortex-M0+ เป็น MCU ในระบบควบคุม
- Closed-loop PID ถูกระบุประมาณ 32 kHz โดย Documentation ใน Repository ระบุ 31.25 kHz
- รองรับไฟ 12–24 V DC
- สื่อสารกับ Host ผ่าน RS-485 ที่ 230400 baud
- หลาย Motor สามารถ Daisy-chain อยู่บน Bus เดียวกันได้
- แต่ละ Motor มี 64-bit Unique ID และ 1-byte Alias
- มี 4 ขนาด: M17-34, M17-40, M17-48 และ M17-60
- Rated Maximum Speed ระบุ 560 RPM แต่ Developer Documentation รายงาน Unloaded Test ราว 516 RPM
- มี Python Library, Arduino/ESP32 Library, Firmware, PCB Files และ MCP Server
Gearotons M17 คืออะไร?
M17 คือ Integrated Servomotor ในรูปทรงมาตรฐาน NEMA 17 ที่ Gearotons ออกแบบให้ส่วนประกอบหลักของ Motion Axis อยู่ภายในตัว Motor มากที่สุด
ระบบประกอบด้วย:
- Motor
- Motor Driver
- Motion Controller
- Magnetic Encoder
ตัว Controller ใช้ MCU ตระกูล STM32G0 และทำ Closed-loop Control ภายใน ทำให้ Host ไม่ต้องสร้าง Position Loop เองทุก Cycle แต่สามารถส่ง Motion Command ไปให้ Motor ประมวลผลต่อได้
ทำไมการรวม 4 ระบบไว้ในตัวเดียวถึงน่าสนใจ?
Motion Axis แบบทั่วไปอาจต้องมี Board และ Connection หลายจุด ตั้งแต่ Driver, Encoder Interface, Controller ไปจนถึง Wiring ระหว่างแต่ละส่วน
Motor → Driver → Motion Controller → Host พร้อม Encoder Feedback ที่ต้องต่อกลับเข้าระบบ
Motor + Driver + Controller + Encoder อยู่ในตัวเดียว แล้วคุยกับ Host ผ่าน Power + Data
ข้อดีเชิง Architecture คือ Host สามารถทำงานในระดับ “สั่งให้ Axis เคลื่อนที่” แทนการ Generate Pulse หรือจัดการ Feedback Loop ทั้งหมดด้วยตัวเอง
ผู้ผลิตยังระบุว่า Closed-loop Operation มีประสิทธิภาพด้านพลังงานดีกว่า Conventional Stepper แต่ควรอ่านเป็น Manufacturer Claim เพราะ Source ที่ใช้ไม่ได้ให้ Independent Efficiency Benchmark หรือเปอร์เซ็นต์การประหยัดที่ใช้เปรียบเทียบแบบมาตรฐาน
Closed-loop ต่างจาก Stepper ทั่วไปอย่างไร?
Stepper แบบ Open-loop ทั่วไปมักถูกสั่งด้วยจำนวน Step โดย Controller คาดว่าตำแหน่งจริงของ Motor จะตามคำสั่งไป แต่ไม่มี Position Feedback มายืนยันตลอดเวลาว่า Shaft อยู่ตรงไหนจริง
M17 มี Magnetic Encoder ในตัว จึงสามารถใช้ Position Feedback ป้อนกลับเข้าสู่ Closed-loop PID ที่รันอยู่ภายใน Motor
Host ส่ง Motion Command
STM32G0 ประมวลผลคำสั่ง
คำนวณ Correction จาก Target และ Feedback
ขับ Motor ตาม Output ของ Controller
เกิดการเคลื่อนที่จริง
อ่านตำแหน่งจริงแล้วส่ง Feedback กลับเข้าสู่ Control Loop
CNX และ Marketing Material เรียก Loop นี้ว่า 32 kHz ขณะที่ Documentation ใน Repository ระบุค่าละเอียดเป็น 31.25 kHz จึงสามารถมอง 32 kHz เป็นค่าที่ถูกปัดเพื่อสื่อสารให้อ่านง่าย
M17 ทั้ง 4 รุ่นต่างกันอย่างไร?
| Model | Torque ที่ Source ระบุ | Body Height | Weight | Rated Power ตาม CNX |
|---|---|---|---|---|
| M17-60 | 0.65 N·m | 59.7 mm | 470 g | 26.4 W |
| M17-48 | 0.55 N·m | 48.7 mm | 360 g | 26.4 W |
| M17-40 | 0.42 N·m | 40.1 mm | 285 g | 26.4 W |
| M17-34 | 0.28 N·m | 33.5 mm | 210 g | 24.0 W |
ทุกรุ่นใช้ Face ขนาด 42.2 × 42.2 mm, Shaft Diameter 5 mm และ Official Documentation ระบุ Shaft Length 20.6 mm
560 RPM ต้องอ่านอย่างไร?
Main Source และ Product Material ระบุ Maximum Speed 560 RPM สำหรับ M17 Series
แต่ Documentation ใน Official Repository ให้ Context เพิ่มว่า 560 RPM เป็น Datasheet Rating และเป็น Default Maximum Velocity Limit ใน Firmware
Developer Documentation ยังรายงานการวัดแบบ Unloaded ได้ความเร็วสูงสุดประมาณ 516 RPM ใน Test ที่ระบุ
Documentation ยังเตือนว่าเมื่อ Command ความเร็วสูงกว่าระดับที่ Motor สามารถทำได้จริง Tracking Error จะเพิ่มขึ้น และระบบสามารถหยุดด้วย Position-deviation Error แทนการฝืนไปถึงความเร็วที่สั่ง
RS-485 และ Daisy-chain ทำงานอย่างไร?
M17 ใช้ RS-485 ที่ 230400 baud เป็น Host Interface หลัก และ Bus เดียวกันสามารถใช้เชื่อม Motor หลายตัวแบบ Daisy-chain ได้
แต่ละ Motor มี 64-bit Unique ID จากโรงงาน และยังสามารถกำหนด 1-byte Alias เพื่อใช้ Addressing บน Bus ได้ง่ายขึ้น
Official Documentation ระบุ Alias สำหรับ Motor ที่ 0–251 และมี Broadcast Alias 255
ต่อกับ Raspberry Pi, Arduino และ ESP32 ได้อย่างไร?
Gearotons ระบุว่า Software Stack รองรับ Host หลายแบบ ตั้งแต่ Raspberry Pi, Mac และ PC ไปจนถึง Arduino และ ESP32
Concept การเชื่อมต่อคือ Host ต้องมีทางสื่อสารกับ RS-485 Bus ของ M17
Application หรือ Python Library
แปลงการเชื่อมต่อของ Host ไปยัง RS-485 Bus
230400 baud
แต่ละตัวมี Unique ID / Alias
สำหรับ Arduino หรือ ESP32 Official Library ใช้ UART ร่วมกับ RS-485 Transceiver แล้วส่งคำสั่งผ่าน Serial Interface
Python และ Arduino สั่ง Motion แบบไหน?
จุดที่ทำให้ M17 ต่างจากการขับ Stepper แบบ Pulse คือ Software Library สามารถสั่ง Motion ในระดับสูงกว่า เช่นกำหนดจำนวนรอบและช่วงเวลาในการเคลื่อนที่
Python Example
Official Repository มีตัวอย่างเปิด Serial Port, Enable MOSFET แล้วสั่ง Trapezoid Move
import time, servomotor
servomotor.open_serial_port()
m = servomotor.M3(
"X",
time_unit="seconds",
position_unit="shaft_rotations"
)
m.enable_mosfets()
m.trapezoid_move(1.0, 1.0)
time.sleep(1.1)
m.disable_mosfets()
servomotor.close_serial_port()
Arduino / ESP32 Example
#include <Servomotor.h>
void setup() {
Servomotor motor('X', Serial1);
motor.setPositionUnit(
PositionUnit::SHAFT_ROTATIONS
);
motor.setTimeUnit(
TimeUnit::SECONDS
);
motor.enableMosfets();
motor.trapezoidMove(
2.0f,
3.0f
);
delay(4000);
Serial.println(
motor.getPosition()
);
}
void loop() {}
ทำไม M17 ไม่ใช่ STEP/DIR Drop-in Replacement?
จุดนี้ Official GitHub ระบุไว้ค่อนข้างตรง: M17 ไม่ใช่ Motor ที่นำไปแทน NEMA 17 เดิมในเครื่อง แล้วต่อ STEP/DIR จาก Driver Board เดิมได้ทันที
M17 ต้องการ Serial Bus และ Host ที่ส่ง Motion Command ตาม Protocol ของ Gearotons
ประเด็นนี้สำคัญโดยเฉพาะงาน CNC หรือ 3D Printer ที่ Controller Board เดิมออกแบบมาให้ Generate STEP/DIR โดยตรง
MCP Server ทำให้ AI สั่ง Motor ได้อย่างไร?
Gearotons มี First-party MCP Server ที่เชื่อม Software Assistant เข้ากับ Motor Command Stack
แต่สิ่งนี้ไม่ได้หมายความว่า AI รันอยู่ภายใน Motor เพราะ Motor ยังคงทำ Closed-loop Control ผ่าน Firmware ของตัวเอง
รับคำสั่งภาษาคน
แปลง Tool Call ไปยัง Servomotor Software Stack
สร้าง Motor Command
ส่งคำสั่งไปยัง Motor ที่ Address ระบุ
Motion Controller ภายใน Motor จัดการการเคลื่อนที่จริง
Official Repository ยังระบุว่า MCP Server สามารถรันด้วย Simulated Motor ได้หากไม่ได้ต่อ Hardware ซึ่งเหมาะสำหรับศึกษาวิธีเรียก Tool ก่อนทดลองกับ Motor จริง
Open Source ถึงระดับไหน?
Repository ของ Gearotons ไม่ได้ให้เฉพาะ Library สำหรับ Host แต่เปิดส่วนสำคัญของ Stack ไว้หลายระดับ
| ส่วน | สิ่งที่ Repository มี |
|---|---|
| Firmware | STM32G0 Motor Firmware |
| Bootloader | Bootloader สำหรับ STM32G030 / STM32G031 |
| PCB | Schematic, Board Layout และ STEP Model ของ Controller Board |
| Python | Library, Example, Test และ Characterisation Script |
| Arduino / ESP32 | C++ Library และ Example |
| API Docs | Python และ Arduino API Documentation |
| Motor Tests | Test และ Production Test Tools |
| MCP | First-party MCP Server แยก Repository |
Official README ระบุว่า Hardware, Firmware และ Software ใน Repository ใช้ MIT License
M17 เหมาะกับงานแบบไหน?
ผู้ผลิตเสนอ Use Case ไว้หลายกลุ่ม เช่น:
- Robotics
- CNC
- Automation
- Scientific Instruments
- Testing Jigs
- 3D Printers
- Education และ Motion-control Project
จุดร่วมของงานเหล่านี้คือมี Motion Axis ที่ต้องการ Position Feedback และการควบคุมตำแหน่ง โดยไม่อยากแยก Driver, Encoder Interface และ Motion Controller ออกเป็นหลาย Board
Power และ Safety ที่ต้องรู้
Official Source ระบุ Operating Supply ที่ 12–24 V DC และตัว Motor มี Protection ในระบบ ได้แก่:
- Over-current protection
- Over-voltage protection
- Over-temperature protection
M17 มี IP Rating IP20 และ Documentation ระบุเป็นอุปกรณ์สำหรับ Indoor Use
Self-calibration ทำให้ Shaft หมุน
Documentation ของผู้ผลิตเตือนให้ปลด Load และให้ Shaft หมุนได้อย่างอิสระก่อนทำ Calibration เพราะ Motor จะเกิดการเคลื่อนที่ระหว่างกระบวนการ
Deceleration สามารถส่งพลังงานกลับ Supply ได้
Developer Documentation ระบุว่า การ Decelerate Load ที่มี Inertia สูง หรือการหมุน Shaft จากแรงภายนอกขณะ Motor มีไฟ สามารถ Regenerate Energy กลับไปยัง Power Bus และเพิ่ม Bus Voltage ได้
ดู ESP32 Controlled Smart Servos Demo
วิดีโอจาก Electromaker แสดงการสาธิต Smart Servo โดย Tom Rodinger ผู้ก่อตั้งบริษัท ในบริบทของ Maker Faire Shenzhen 2025
Maker ได้อะไรจาก Gearotons M17?
1. Motion Control ไม่จำเป็นต้องเริ่มจาก STEP/DIR เสมอไป
M17 แสดงอีก Architecture หนึ่ง ที่ Host ส่ง Motion Command ผ่าน Serial Bus แล้ว Controller ใกล้ Motor เป็นผู้จัดการการเคลื่อนที่
2. Closed-loop ทำให้ตำแหน่งจริงกลับเข้าระบบควบคุม
Encoder ทำให้ Controller ไม่ต้องอาศัยเพียงจำนวน Command ที่เคยส่ง แต่มี Feedback จาก Shaft จริงกลับมาประกอบการควบคุม
3. Multi-axis สามารถมองเป็น Network ได้
การใช้ RS-485 และ Address ต่อ Motor เปลี่ยนภาพจาก “หนึ่ง Driver ต่อหนึ่ง STEP/DIR Pair” ไปเป็นหลาย Axis ที่สื่อสารอยู่บน Bus เดียวกัน
4. Open Source ทำให้เห็น Stack ตั้งแต่ Host ถึง Firmware
Project เปิดทั้ง Python, Arduino, Firmware และ PCB จึงเหมาะสำหรับคนที่อยากศึกษาว่า Motion Command ถูกส่งและประมวลผลอย่างไรในแต่ละ Layer
5. AI เป็น Interface เพิ่ม ไม่ใช่ Replacement ของ Control Loop
MCP Server ทำให้ AI Assistant เรียก Motor Command ได้ แต่ Real-time Closed-loop Control ยังคงเกิดใน Firmware ของ Motor ซึ่งเป็นการแบ่งหน้าที่ที่สำคัญระหว่าง High-level Command กับ Real-time Motion Control
โปรเจกต์นี้มีหลายส่วน แนะนำอ่านต้นฉบับควบคู่กัน
FAQ: คำถามที่พบบ่อย
1. Gearotons M17 คืออะไร?
เป็น Integrated NEMA 17 Servomotor ที่รวม Motor, Driver, Motion Controller และ Encoder ไว้ในตัวเดียว
2. ใช้ MCU อะไร?
Main Source ระบุ STM32G0 Arm Cortex-M0+ สำหรับระบบควบคุมภายใน Motor
3. M17 เป็น Closed-loop หรือไม่?
ใช่ มี Magnetic Encoder ในตัว และใช้ Closed-loop PID สำหรับควบคุม Motor
4. PID Loop ทำงานเร็วแค่ไหน?
Marketing Material ระบุประมาณ 32 kHz ขณะที่ Official Repository Documentation ให้ค่าละเอียดเป็น 31.25 kHz
5. ใช้ไฟกี่โวลต์?
Source ระบุ Operating Supply 12–24 V DC
6. M17 สื่อสารกับ Host แบบไหน?
ใช้ RS-485 ที่ 230400 baud
7. ต่อ Motor หลายตัวบน Bus เดียวกันได้หรือไม่?
ได้ M17 รองรับ Daisy-chain ผ่าน RS-485 และแต่ละ Motor มี Unique ID และ Alias สำหรับ Addressing
8. ใช้กับ Raspberry Pi ได้หรือไม่?
ได้ ผู้ผลิตระบุ Raspberry Pi, Mac และ PC เป็น Host ที่รองรับผ่าน Software Stack โดยทั่วไป Host ต้องเชื่อมกับ RS-485 Interface ที่เหมาะสม
9. ใช้กับ ESP32 หรือ Arduino ได้หรือไม่?
ได้ Repository มี Arduino/ESP32 C++ Library และ Example สำหรับส่งคำสั่งไปยัง Motor ผ่าน RS-485
10. ใช้ STEP/DIR ได้โดยตรงหรือไม่?
Official GitHub ระบุว่า M17 ไม่ใช่ STEP/DIR Drop-in และต้องใช้ Serial Bus กับ Host ที่ส่ง Motion Command
11. M17 หมุนได้ 560 RPM จริงไหม?
560 RPM เป็น Rated Maximum Speed ที่ Product Material ระบุ ขณะที่ Developer Documentation รายงาน Unloaded Test ประมาณ 516 RPM ในการทดสอบที่ระบุ
12. มี Gearotons M17 กี่ขนาด?
Source ระบุ 4 รุ่น: M17-34, M17-40, M17-48 และ M17-60
13. M17 กันน้ำหรือไม่?
Source ระบุ IP20 และ Indoor Use จึงไม่ควรตีความว่าเป็น Motor สำหรับสภาพเปียกหรือ Outdoor
14. มี Source Code หรือไม่?
มี Official Repository รวม Firmware, Bootloader, Python Library, Arduino Library, PCB Files, API Documentation และ Test Tools
15. AI สามารถสั่ง Motor ได้จริงหรือ?
Gearotons มี First-party MCP Server ที่ทำให้ AI Assistant เรียก Motor Tools ผ่าน Software Stack ได้ แต่ Closed-loop Real-time Control ยังคงทำงานใน Motor Firmware
16. ราคาเท่าไร?
CNX Software รายงาน ณ วันที่เผยแพร่บทความว่า M17 อยู่ราว $20–$35 ตามขนาด และ USB-to-RS-485 Adapter ถูกกล่าวถึงที่ประมาณ $10 แต่ราคา Availability และ Shipping สามารถเปลี่ยนได้ ควรตรวจสอบ Store ต้นฉบับอีกครั้ง
17. เหมาะกับ 3D Printer หรือ CNC ทุกเครื่องไหม?
ผู้ผลิตระบุ CNC และ 3D Printer เป็น Use Case แต่ M17 ไม่ใช่ STEP/DIR Drop-in และ Source ไม่ได้ยืนยัน Compatibility กับ Controller Board ทุกชนิด
18. มี Encoder Resolution หรือ Position Accuracy เท่าไร?
ในข้อมูลที่ใช้สำหรับบทความนี้ Source ไม่ได้ให้ค่าที่เราล็อกไว้สำหรับ Encoder Resolution, Position Accuracy หรือ Repeatability จึงไม่สร้างค่าดังกล่าวขึ้นเอง
References / แหล่งข้อมูลต้นฉบับ
จาก Motor ธรรมดา สู่ Motion Axis ที่คุยผ่าน Network ได้
Gearotons M17 เป็นตัวอย่างที่น่าสนใจของการนำ Motor, Embedded Controller, Feedback Sensor และ Serial Communication มารวมกันจน Host สามารถสั่งงานในระดับ Motion ได้โดยตรงมากขึ้น
หากกำลังทำ Robotics, Motion Control หรือ Automation สามารถสอบถามทีม Globalbyte เรื่อง ESP32, Arduino, Raspberry Pi, RS-485 Interface, Development Board และอุปกรณ์ที่เหมาะกับ Project ได้