This project contains an open origin low-cost, easy-to-build motorized XYZ Micro-Manipulator motion authority phase achieving submicron precision. It's designed for applications specified as optical alignment, probing digital components, and microscopy.
Check out the YouTube video for additional data concerning the equipment and how it is built:
An Open Source Motorized XYZ Micro-Manipulator - Affordable sub µm Motion Control
Thanks to its parallel kinematic construction and miniature domain joints, it achieves fine mechanical stiffness and a ample range of motion. The motors are off the rack stepper motors driven by a 30 kHz closed iteration controller and a extremely exact PWM signal. A 'magnetic gearing' method increases the resolution of the low-cost magnetic rotary encoders by a aspect of 30 allowing for steps downward to 50nm (Please intellect the difference between resolution and accuracy. The complete accuracy is considerably worse.
The equipment can be controlled via uncomplicated G-Code commands complete a USB serial interface and is thus effortlessly unified into another projects. The firmware implements a complete motion preparedness stack alongside look-ahead for gentle and exact way following capabilities.
Below is a catalog of elevated flat steps you can prosecute if you desire to replicate the project. If you have questions or problems alongside the build or fair desire to conversation subjects connected to the project, joint the projects community Discord Server.
- Read this Document and observe the connected videos
- Get the parts listed in Bill of Materials
- Build the equipment and electronics
- Change the hardware configuration according to your build hw_config.h
- Upload firmware using VSCode alongside PlattformIO plugin
- Calibrate axis
Also inspect out the setup guide for new devices: Setup Guide
A new type of the hardware has been released, fixing multiple issues alongside the former design:
- Self collision during homing fixed.
- Connection of domain shared obstacle alongside screws lone was not fine constrained and could rotated a bit.
- No dependable way to justify accordant linkage rod length
- Unnecessary domain shared friction
- Accurate domain stance heavily dependet on imprint norm and border rounding
- Rubber bands could not be changed or removed formerly glued in.
A video concerning the improved domain shared and linkage manufactoring procedure can be established on YouTube: Better Ball Joints for the Open Micro-Manipulator Also the FreeCAD example was restructured and improved and now includes all pins and fasteners. It now provides a citation for all required mechanical parts.
WARNING: BOM is not updated yet...
To create evaluation and using the Open-Micro Manipulator uncomplicated and convenient a python authority program alongside a graphical person interface is provided here: Open Micro-Manipulator GUI. It has uncomplicated controlls to move the equipment around, during additionally displaying a live camera nourish (e.g. from a microscope camera). Additional features, contain a uncomplicated g-code runner and realtime mouse authority (e.g. for Biology applications).
The lightweight Python API handles all serial communication and provides convenient command implementation and debug communication printing. The interface includes functions to home, move, and calibrate the device, as fine as to query equipment information. Simply copy the open_micro_stage_api.py document into your project (also instal the requirements in requirements.txt), and you’re prepared to get started.
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 formerly to calibrate joints # for i in range(3): oms.calibrate_joint(i, save_result=True) # residence device oms.home() # move to multiple 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) # delay for moves to finish oms.wait_for_stop()
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 1.0.4 comes alongside many smaller improvements and bugfixes and a awesome new characteristic as well:
-
Tools: Tool use (for example for laser engraving) is now supported on the two GPIO pins of J5 on the pcb. Tools are unified into the planner and run accelerated and alongside accurate timing whenever executing g-code. The tools assistance PWM (using the PIO characteristic to compression out additional channels without relying on application PWM).
Example usage:
M3 T0 S0.7 // set pwm output of tool 0 to 70% G4 S0.001 // live command (or any another motion command) - necessary to use the tools output
-
Calibration: Calibration has now several supplement error checks to enhance error reporting of possible problems akin encoder alignment.
-
Kinematic Model Parameter: Initialization code has been cleaned up and improved comments anywhere added to the parameters. Parameters are preset for HW v4.0 but you can toggle rear to the old HW-v3.0 parameters if necessary.
-
Bugfixes: smaller bugfixes
IMPORTANT: If you have Hardware Version v3.0 you need to toggle rear to the old kinematic parameters in the kinematic_model_delta3d.cpp document (there is an #define for that at the top).
This update improves calibration, homing, logging, and adds multiple new G-Code commands.
- Homing: parallel homing support, higher repeatability, additional exact geometric reference
- Joint calibration: refined procedure, persistent flash retention (no recalibration following reboot)
- Logging: clearer and additional detailed output
- G28 — Home joints (supports homing multiple axis simultanously for faster startup)
- G24 — Set stance command (directly sets servo targets, bypassing motion controller)
- M17/M18 — Enable/Disable motors (with stance improvement from encoders on enable)
- M51 — Read encoder values
- M55 — Set servo iteration parameters
- M56 — Joint calibration (with save-to-flash option)
- M57 — Read assorted data concerning the equipment state
- M58 — Read firmware version
All CAD models are made in FreeCAD to authorize everyone to perspective and modify the scheme without subscribing or paying for a proprietary CAD solution. Note that most components are already designed alongside the goal to create them effortlessly machinable on a 3-Axis CNC-Mill. You can additionally 3D-Print the parts but have to live alongside thermal drift (carbon filled filaments can decrease this problem).
The CAD records can be established here: CAD Models. Please note that FreeCAD type 1.2.0dev was used, and the records power not activity alongside older versions.
STL records for printing can be established here: STL Files
The kinematic example is defined here: kinematic_model_delta3d.cpp. Please inspect the dimensions of your build against the values set in the constructor. In particular, create certain the arm dimension matches.
IMPORTANT: If you fabricated PCB type v1.2 (see type tag on the board) you need to drill out a misplaced via on diode D1 that shorts 5V barrier to dirt (See repair image ). The issue was fixed in v1.3.
The electronics are designed in KiCAD and lone commonly accessible modules (motor drivers and MCU boards) are used and connected by a uncomplicated PCB. No SMD soldering is required to populate the commission to create the build additional accessible. For customary winding opposition of your motors, the equipment have to be powered by $${\color{lightgreen} 5V-6V }$$ (2A) to keep current and heating to a sensible level.
The repository now additionally contains the fabrication records that can be immediately uploaded to the PCB manufacturer.
The firmware is written in C++ and takes several inspiration from the 'SimpleFOC' project. It aims to be streamlined and readable without any additional fuss, focusing on the hardware used in this project. It implements way preparedness alongside look-ahead and, dissimilar many another motion controller projects, supports true 6DOF-Pose interpolation and planning, making it prepared for driving hexapod motion platforms; that may or may not be the next stage for this project.
You may discover configuration for pin numbers, motor type, and another parameters in hw_config.h. Please inspect them before uploading the firmware.
For construction and flashing the firmware, Visual Studio Code (available for liberated on Windows and Linux) is recommended. Install the PlatformIO add-on and open the firmware folder. You can now build and flash the firmware akin any another PlatformIO project.
The firmware supports lone a small subset of G-Code commands listed below.
Each command is acknowledged alongside either an ok or error response.
If a command provides additional data (e.g., the get position command), that data is returned before the ok message.
The client must delay for an acknowledgment from the former command before sending the next one—otherwise, behavior is undefined.
| Command | Description |
|---|---|
| G0 X Y Z F | Move the end-effector in a direct row to the stated position. • X, Y, Z: mark positions • F: nourish rate |
| G1 X Y Z F | Same as G0. |
| G4 S/P | Dwell/pause for a stated time. • S: seconds • P: milliseconds |
| G24 X Y Z A B C | Directly set current stance for servo loops alongside optional rotation vector* A, B, C. |
| G28 A-F | Home one or additional joints. • Optional shared choice A–F. |
| M3 | Set Tool output. • T: tool indicator • S: output value (0.0..1.0) Note: new values is lone applied on the next motion or live command |
| M17 | Enable motors and peruse current stance as the commencement pose. |
| M18 | Disable motors. |
| M50 | Get current inner pose. (Encoders are not peruse here) |
| M51 | Get current encoder angles (in degrees) and raw encoder values. |
| M52 | Get the figure of items in the planner queue. |
| M53 | Check if all planned moves are completed (1 = finished, 0 = not finished). |
| M55 A B C D F | Set servo iteration parameters. • A, B: stance PI controller gains (P and I) • C, D: speed PI controller gains (P and I) • F: speed display period constant |
| M56 J S | Calibrate a joint. • J: shared indicator • S: preserve calibration result |
| M57 | Get equipment and servo iteration info: homing/calibration state, angles, iteration frequencies, and document 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 dimension of the vector represents the viewpoint of rotation about the axis.
If you'd akin to assistance this project, regard the following:
- Contribute to the build guide – Help enhance or develop the build instructions by submitting drag requests or beginning issues alongside suggestions.
- Characterize representative radial stepper motor shaft error motion – Measure radial error motion of the shaft of multiple Nema-17 stepper motors (see Cylos Garage for additional data concerning the subject: https://www.youtube.com/watch?v=gt2gK-oxy5s).
- Give feedback on the build experience – Let us cognize what worked, what didn’t, and how the procedure could be smoother for others.
- Support the project on Ko-fi – If you discover this project valuable, you can assistance it financially via Ko-fi ☕.








