MicroManipulatorStepper README

项目的 README,来自 github.com/0x23/MicroManipulatorStepper。合并为一个 markdown 文件:README.md。

Open Micro-Manipulator

This project contains an open source low-cost, easy-to-build motorized XYZ Micro-Manipulator motion control platform achieving submicron precision. It's designed for applications such as optical alignment, probing electronic components, and microscopy.

Check out the YouTube video for more information about the device and how it is built:
An Open Source Motorized XYZ Micro-Manipulator - Affordable sub µm Motion Control

Image 1 Image 2

Thanks to its parallel kinematic structure and miniature ball joints, it achieves good mechanical stiffness and a large range of motion. The motors are off the shelf stepper motors driven by a 30 kHz closed loop controller and a very precise PWM signal. A 'magnetic gearing' approach increases the resolution of the low-cost magnetic rotary encoders by a factor of 30 allowing for steps down to 50nm (Please mind the difference between resolution and accuracy. The absolute accuracy is significantly worse.)

The device can be controlled via simple G-Code commands over a USB serial interface and is thus easily integrated into other projects. The firmware implements a complete motion planning stack with look-ahead for smooth and accurate path following capabilities.

Getting Started

Below is a list of high level steps you can follow if you want to replicate the project. If you have questions or problems with the build or just want to discuss subjects related to the project, join the project's community Discord Server.

  1. Read this Document and watch the linked videos
  2. Get the parts listed in Bill of Materials
  3. Order the PCBs: all production files (e.g. JLCPCB)
  4. 3D print the parts: all printable files (your own printer or e.g. JLCPCB)
  5. Build the device and electronics
  6. Change the hardware configuration according to your build hw_config.h
  7. Upload firmware using VSCode with PlatformIO plugin
  8. Calibrate axis

Also check out the setup guide for new devices: Setup Guide

Hardware Version 4.0

The current hardware version is 4.0. It fixes several issues of the previous design (v3.0):

A video about the improved ball joint and linkage manufacturing process can be found on YouTube: Better Ball Joints for the Open Micro-Manipulator Also the FreeCAD model was restructured and improved and now includes all pins and fasteners. It now provides a reference for all required mechanical parts.

Open Micro-Manipulator GUI

Open Micro-Manipulator GUI

To make testing and using the Open-Micro Manipulator easy and convenient a python control program with a graphical user interface is provided here: Open Micro-Manipulator GUI. It has simple controls to move the device around, while also displaying a live camera feed (e.g. from a microscope camera). Additional features, include a simple g-code runner and realtime mouse control (e.g. for Biology applications).

Open Micro-Manipulator GUI

🐍 Python-API

The lightweight Python API handles all serial communication and provides convenient command execution and debug message printing. The interface includes functions to home, move, and calibrate the device, as well as to query device information. Simply copy the open_micro_stage_api.py file into your project (also install the dependencies in requirements.txt), and you’re ready to get started.

Usage Example

from open_micro_stage_api import OpenMicroStageInterface

# create interface and connect
oms = OpenMicroStageInterface(show_communication=True, show_log_messages=True)
oms.connect('/dev/ttyACM0')

# run this once to calibrate joints
# for i in range(3): oms.calibrate_joint(i, save_result=True)

# home device
oms.home()

# move to several x,y,z positions [mm]
oms.move_to(0.0, 0.0, 0.0, f=10)
oms.move_to(3.1, 4.1, 5.9, f=26)
oms.move_to(0.0001, 0.0, 0.0, f=10)

# wait for moves to finish
oms.wait_for_stop()

API Functions (most relevant functions only)

connect(port, baud_rate=921600)
disconnect()
set_workspace_transform(transform)
get_workspace_transform()
home(axis_list=None)
calibrate_joint(joint_index, save_result)
move_to(x, y, z, f, move_immediately, blocking, timeout)
set_tool_output(tool_idx, output_value, immediate)
set_pose(x, y, z)
dwell(time_s, blocking, timeout)
enable_motors(enable)
wait_for_stop(polling_interval_ms, disable_callbacks)
set_max_acceleration(linear_accel, angular_accel)
set_servo_parameter(pos_kp, pos_ki, vel_kp, vel_ki, vel_filter_tc)

✨ Firmware v1.0.7

Firmware 1.0.7 includes several bugfixes and minor improvements.

Firmware v1.0.4

Firmware 1.0.4 comes with many smaller improvements and bugfixes and a great new feature as well:

IMPORTANT: If you have Hardware Version v3.0 you need to switch back to the old kinematic parameters in the kinematic_model_delta3d.cpp file (there is an #define for that at the top).

Firmware v1.0.1

This update improves calibration, homing, logging, and adds several new G-Code commands.

Improvements

New G-Code Commands

⚙ CAD-Files

All CAD models are made in FreeCAD to​ allow everyone to view and modify the design without subscribing or paying for a proprietary CAD solution. Note that most components are already designed with the goal to make them easily machinable on a 3-Axis CNC-Mill. You can also 3D-Print the parts but have to live with thermal drift (carbon filled filaments can reduce this problem).

FreeCAD Model

The CAD files can be found here: CAD Models. Please note that FreeCAD version 1.2.0dev was used, and the files might not work with older versions.

STL files for printing can be found here: STL Files

⚙ Kinematic Model

The kinematic model is defined here: kinematic_model_delta3d.cpp. Please check the dimensions of your build against the values set in the constructor. In particular, make sure the arm length matches.

⚙ Electronics

IMPORTANT: If you fabricated PCB version v1.2 (see version label on the board) you need to drill out a misplaced via on diode D1 that shorts 5V rail to ground (See repair image ). The problem was fixed in v1.3.

The electronics are designed in KiCAD and only commonly available modules (motor drivers and MCU boards) are used and connected by a simple PCB. No SMD soldering is required to populate the board to make the build extra accessible. For usual winding resistance of your motors, the device should be powered by $${\color{lightgreen} 5V-6V }$$ (2A) to keep current and heating to a reasonable level.

Image 1 Image 2

The repository also contains the fabrication files (Gerber + drill, zipped) that can be uploaded directly to a PCB manufacturer. All of them are collected in construction/v4_PCB_zip:

Board Zip Source Qty (see BOM)
Control board PrecisionStepperController3X_v1.3.zip electronics/control_board 1
Ball joint plate balljoint_plate_pcb_jlcpcb.zip balljoint_plate_pcb 6
Encoder board EncoderBoard.zip electronics/EncoderBoard.kicad_pcb 1
Ball alignment disc (rod length setting press tool) ball_alignment_disc_pcb.zip ball_alignment_disc_pcb 1

⚙ Firmware

The firmware is written in C++ and takes some inspiration from the 'SimpleFOC' project. It aims to be streamlined and readable without any extra fuss, focusing on the hardware used in this project. It implements path planning with look-ahead and, unlike many other motion controller projects, supports true 6DOF-Pose interpolation and planning, making it ready for driving hexapod motion platforms; that may or may not be the next step for this project.

You may find configuration for pin numbers, motor type, and other parameters in hw_config.h. Please check them before uploading the firmware.

Image 1 Image 2

Building and Flashing the Firmware

For building and flashing the firmware, Visual Studio Code (available for free on Windows and Linux) is recommended. Install the PlatformIO add-on and open the firmware folder. You can now build and flash the firmware like any other PlatformIO project.

⚙ G-Code Interface

The firmware supports only a small subset of G-Code commands listed below.
Each command is acknowledged with either an ok or error response.

If a command provides additional information (e.g., the get position command), that information is returned before the ok message.
The client must wait for an acknowledgment from the previous command before sending the next one—otherwise, behavior is undefined.

Command Description
G0 X Y Z F Move the end-effector in a straight line to the specified position.
• X, Y, Z: target positions
• F: feed rate
G1 X Y Z F Same as G0.
G4 S/P Dwell/pause for a specified time.
• S: seconds
• P: milliseconds
G24 X Y Z A B C Directly set current pose for servo loops with optional rotation vector* A, B, C.
G28 A-F Home one or more joints.
• Optional joint selection A–F.
M3 Set Tool output.
• T: tool index
• S: output value (0.0..1.0)
Note: new values is only applied on the next motion or dwell command
M17 Enable motors and read current pose as the start pose.
M18 Disable motors.
M50 Get current internal pose. (Encoders are not read here)
M51 Get current encoder angles (in degrees) and raw encoder values.
M52 Get the number of items in the planner queue.
M53 Check if all planned moves are finished (1 = finished, 0 = not finished).
M55 A B C D F Set servo loop parameters.
• A, B: position PI controller gains (P and I)
• C, D: velocity PI controller gains (P and I)
• F: velocity filter time constant
M56 J S Calibrate a joint.
• J: joint index
• S: save calibration result
M57 Get device and servo loop info: homing/calibration state, angles, loop frequencies, and file list.
M58 Get firmware version.
M204 L A Set linear and angular acceleration.
• L: linear acceleration
• A: angular acceleration

*Note: The communication protocol uses 3D vectors for rotations. The direction represents the rotation axis and the length of the vector represents the angle of rotation around the axis.

❤️ Support

If you'd like to support this project, consider the following:

Youtube Video

Watch the video Better Ball Joints for the Open Micro-Manipulator

MicroManipulatorStepper (0x23/MicroManipulatorStepper)

正在搜索数据库…

这是什么?这是一个开源、低成本、可自行组装的电动 XYZ 微操纵器运动控制平台,精度可达亚微米级,适用于光学对准、电子元件探测和显微镜相关应用。
这是一个软件,还是需要我自己动手组装的实物?这是一台实体硬件设备(步进电机、PCB,以及 3D 打印或 CNC 铣削的零件),需要你自己组装。它通过板载固件控制,并可选配 Python API 或图形界面,经 USB 串口连接。
我该如何组装并让它运行起来?阅读文档并观看组装视频,按照物料清单准备零件,组装机械结构和电子部分,根据你的装配情况修改 hwconfig.h,用 VSCode 中的 PlatformIO 烧录固件,最后校准各轴。
烧录和编译这个项目需要什么工具?你需要安装带有 PlatformIO 扩展的 Visual Studio Code,用于编译和烧录 C++ 固件;需要 FreeCAD 查看和修改机械 CAD 模型;电子部分需要使用 KiCAD 生成的 PCB 制板文件。可选的图形界面或 API 需要 Python。
50nm 的分辨率是不是就代表它有这么高的精度?不是——50nm 是通过编码器上的“磁齿轮”技巧实现的步进分辨率,但 README 明确警告,绝对定位精度远低于这个分辨率数值。
这个平台能达到多高的精度?分辨率和精度是一回事吗?“磁齿轮”方法可将廉价磁旋转编码器的分辨率提高 30 倍,使步进可低至 50nm,但绝对精度明显低于这个数值。
我能用 3D 打印代替 CNC 铣削来制作机械零件吗?可以,零件可以 3D 打印,但需要应对热漂移问题;与 CNC 铣削的零件相比,碳纤维填充的打印耗材可以减轻这一问题。
组装电子部分时需要进行贴片(SMD)焊接吗?不需要。PCB 只使用现成的电机驱动模块和单片机(MCU)模块,直接插到电路板上即可。
这个平台能扩展为驱动六足(hexapod)平台,而不只是简单的 XYZ 台吗?可以。固件已经支持真正的 6DOF(六自由度)位姿插值和运动规划,作者提到这可以作为未来六足运动平台的基础。
作者
0x23
大小
39.8 MB
星标
2.3K
更新
提交Nov 14
时长
1年
提交 · 90 天