0x23/MicroManipulatorStepper: A sub-micrometer 3D movement management plattform. · GitHub

This venture incorporates an open supply low-cost, easy-to-build motorized XYZ Micro-Manipulator movement management platform attaining submicron precision.
It’s designed for functions similar to optical alignment, probing digital elements, and microscopy.
Check out the YouTube video for extra details about the gadget and the way it’s constructed:
An Open Source Motorized XYZ Micro-Manipulator – Affordable sub µm Motion Control
Thanks to its parallel kinematic construction and miniature ball joints, it achieves good mechanical stiffness and a wide variety of movement.
The motors are off the shelf stepper motors driven by a 30 kHz closed loop controller and a really exact PWM sign.
A ‘magnetic gearing’ strategy will increase the decision of the low-cost magnetic rotary encoders by an element of 30 permitting for steps all the way down to 50nm
(Please thoughts the distinction between decision and accuracy. The absolute accuracy is considerably worse.
The gadget will be managed by way of easy G-Code instructions over a USB serial interface and is thus simply built-in into different tasks.
The firmware implements a whole movement planning stack with look-ahead for clean and correct path following capabilities.
Below is a listing of excessive degree steps you may comply with if you wish to replicate the venture.
If you have got questions or issues with the construct or simply need to talk about topics associated to the venture,
joint the tasks neighborhood Discord Server.
- Read this Document and watch the linked movies
- Get the components listed in Bill of Materials
- Build the gadget and electronics
- Change the {hardware} configuration in keeping with your construct hw_config.h
- Upload firmware utilizing VSCode with PlattformIO plugin
- Calibrate axis
Also try the setup information for brand new units: Setup Guide
A brand new model of the {hardware} has been launched, fixing a number of points with the earlier design:
- Self collision throughout homing fastened.
- Connection of ball joint block with screws solely was not effectively constrained and will rotated a bit.
- No dependable means to make sure constant linkage rod size
- Unnecessary ball joint friction
- Accurate ball place closely dependet on print high quality and nook rounding
- Rubber bands couldn’t be modified or eliminated as soon as glued in.
A video in regards to the improved ball joint and linkage manufactoring course of will be discovered on YouTube: Better Ball Joints for the Open Micro-Manipulator
Also the FreeCAD mannequin was restructured and improved and now contains all pins and fasteners. It now supplies a reference for all required mechanical components.
WARNING: BOM just isn’t up to date but…
To make testing and utilizing the Open-Micro Manipulator straightforward and handy a python management program with a graphical person interface is supplied right here: Open Micro-Manipulator GUI.
It has easy controlls to maneuver the gadget round, whereas additionally displaying a dwell digital camera feed (e.g. from a microscope digital camera). Additional options, embrace a easy g-code runner and realtime mouse management (e.g. for Biology functions).
The light-weight Python API handles all serial communication and supplies handy command execution and debug message printing.
The interface contains features to dwelling, transfer, and calibrate the gadget, in addition to to question gadget info.
Simply copy the open_micro_stage_api.py file into your venture (additionally set up the dependencies in necessities.txt), and also you’re able to get began.
from open_micro_stage_api import OpenMicroStageInterface
# create interface and join
oms = OpenMicroStageInterface(show_communication=True, show_log_messages=True)
oms.join('/dev/ttyACM0')
# run this as soon as to calibrate joints
# for i in vary(3): oms.calibrate_joint(i, save_result=True)
# dwelling gadget
oms.dwelling()
# transfer to a number of 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)
# await strikes to complete
oms.wait_for_stop()
join(port, baud_rate=921600)
disconnect()
set_workspace_transform(remodel)
get_workspace_transform()
dwelling(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, fast)
set_pose(x, y, z)
dwell(time_s, blocking, timeout)
enable_motors(allow)
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 with many smaller enhancements and bugfixes and an excellent new characteristic as effectively:
-
Tools: Tool utilization (for instance for laser engraving) is now supported on the 2 GPIO pins of J5 on the pcb.
Tools are built-in into the planner and run quick and with appropriate timing when executing g-code.
The instruments help PWM (utilizing the PIO characteristic to squeeze out further channels with out counting on software program PWM).Example utilization:
M3 T0 S0.7 // set pwm output of instrument 0 to 70% G4 S0.001 // dwell command (or some other movement command) - mandatory to use the instruments output -
Calibration: Calibration has now some addition error checks to enhance error reporting of potential issues like encoder alignment.
-
Kinematic Model Parameter: Initialization code has been cleaned up and higher feedback the place added to the parameters. Parameters are preset for HW v4.0 however you may toggle again to the outdated HW-v3.0 parameters if mandatory.
-
Bugfixes: smaller bugfixes
IMPORTANT: If you have got Hardware Version v3.0 you have to change again to the outdated kinematic parameters within the kinematic_model_delta3d.cpp file (there may be an #outline for that on the prime).
This replace improves calibration, homing, logging, and provides a number of new G-Code instructions.
- Homing: parallel homing help, larger repeatability, extra correct geometric reference
- Joint calibration: refined process, persistent flash storage (no recalibration after reboot)
- Logging: clearer and extra detailed output
G28— Home joints (helps homing a number of axis simultanously for sooner startup)G24— Set pose command (straight units servo targets, bypassing movement controller)M17/M18— Enable/Disable motors (with pose restoration from encoders on allow)M51— Read encoder valuesM55— Set servo loop parametersM56— Joint calibration (with save-to-flash possibility)M57— Read numerous details about the gadget stateM58— Read firmware model
All CAD fashions are made in FreeCAD to permit everybody to view and modify the design with out subscribing or paying for a proprietary CAD answer.
Note that the majority elements are already designed with the aim to make them simply machinable on a 3-Axis CNC-Mill.
You may 3D-Print the components however need to dwell with thermal drift (carbon stuffed filaments can scale back this drawback).
The CAD information will be discovered right here: CAD Models.
Please observe that FreeCAD model 1.2.0dev was used, and the information may not work with older variations.
STL information for printing will be discovered right here: STL Files
The kinematic mannequin is outlined right here: kinematic_model_delta3d.cpp.
Please test the scale of your construct in opposition to the values set within the constructor. In specific, make certain the arm size matches.
IMPORTANT: If you fabricated PCB model v1.2 (see model label on the board) you have to drill out a misplaced by way of on diode D1 that shorts 5V rail to floor (See repair image ). The drawback was fastened in v1.3.
The electronics are designed in KiCAD and solely generally accessible modules (motor drivers and MCU boards) are used and related by a easy PCB. No SMD soldering is required to populate the board to make the construct further accessible.
For typical winding resistance of your motors, the gadget must be powered by
The repository now additionally incorporates the fabrication information that may be straight uploaded to the PCB producer.
The firmware is written in C++ and takes some inspiration from the ‘SimpleFOC’ venture. It goals to be streamlined and readable with none further fuss, specializing in the {hardware} used on this venture.
It implements path planning with look-ahead and, not like many different movement controller tasks, helps true 6DOF-Pose interpolation and planning, making it prepared for driving hexapod movement platforms; that will or will not be the subsequent step for this venture.
You could discover configuration for pin numbers, motor kind, and different parameters in hw_config.h. Please test them earlier than importing the firmware.
For constructing and flashing the firmware, Visual Studio Code (accessible free of charge on Windows and Linux) is really helpful.
Install the PlatformIO add-on and open the firmware folder. You can now construct and flash the firmware like some other PlatformIO venture.
The firmware helps solely a small subset of G-Code instructions listed beneath.
Each command is acknowledged with both an okay or error response.
If a command supplies extra info (e.g., the get place command), that info is returned earlier than the okay message.
The shopper should await an acknowledgment from the earlier command earlier than sending the subsequent one—in any other case, conduct is undefined.
| Command | Description |
|---|---|
G0 X Y Z F |
Move the end-effector in a straight line to the desired place. • X, Y, Z: goal positions • F: feed price |
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 present pose for servo loops with optionally available rotation vector* A, B, C. |
G28 A-F |
Home a number of joints. • Optional joint choice A–F. |
M3 |
Set Tool output. • T: instrument index • S: output worth (0.0..1.0) Note: new values is simply utilized on the subsequent movement or dwell command |
M17 |
Enable motors and skim present pose as the beginning pose. |
M18 |
Disable motors. |
M50 |
Get present inner pose. (Encoders are usually not learn right here) |
M51 |
Get present encoder angles (in levels) and uncooked encoder values. |
M52 |
Get the variety of objects within the planner queue. |
M53 |
Check if all deliberate strikes are completed (1 = completed, 0 = not completed). |
M55 A B C D F |
Set servo loop parameters. • A, B: place PI controller good points (P and I) • C, D: velocity PI controller good points (P and I) • F: velocity filter time fixed |
M56 J S |
Calibrate a joint. • J: joint index • S: save calibration outcome |
M57 |
Get gadget and servo loop information: homing/calibration state, angles, loop frequencies, and file listing. |
M58 |
Get firmware model. |
M204 L A |
Set linear and angular acceleration. • L: linear acceleration • A: angular acceleration |
*Note: The communication protocol makes use of 3D vectors for rotations. The path represents the rotation axis and the size of the vector represents the angle of rotation across the axis.
If you’d prefer to help this venture, take into account the next:
- Contribute to the construct information – Help enhance or broaden the construct directions by submitting pull requests or opening points with ideas.
- Characterize typical radial stepper motor shaft error movement – Measure radial error movement of the shaft of a number of Nema-17 stepper motors (see Cylos Garage for extra details about the topic: https://www.youtube.com/watch?v=gt2gK-oxy5s).
- Give suggestions on the construct expertise – Let us know what labored, what didn’t, and the way the method might be smoother for others.
- Support the venture on Ko-fi – If you discover this venture precious, you may help it financially by way of Ko-fi ☕.








