From fc65b24aa9da28414c9a484744f1db3280a58e47 Mon Sep 17 00:00:00 2001 From: 0x23 Date: Fri, 19 Sep 2025 10:09:46 +0200 Subject: [PATCH 01/14] Update README.md --- README.md | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 1162821..7f1610d 100644 --- a/README.md +++ b/README.md @@ -76,13 +76,13 @@ 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=False, blocking=True, timeout=1) -dwell(time_s, blocking, timeout=1) -set_max_acceleration(linear_accel, angular_accel) -wait_for_stop(polling_interval_ms=10, disable_callbacks=True) -set_servo_parameter(pos_kp=150, pos_ki=50000, vel_kp=0.2, vel_ki=100, vel_filter_tc=0.0025) -enable_motors(enable) +move_to(x, y, z, f, move_immediately, blocking, timeout) 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) ``` ## ⚙ CAD-Files @@ -143,16 +143,25 @@ 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`: target position on X-axis
• `Y`: target position on Y-axis
• `Z`: target position on Z-axis
• `F`: feed rate (movement speed) | -| `G1 X Y Z F` | Same as `G0`. | -| `M204 L A` | Set current acceleration.
• `L`: linear acceleration (m/s²)
• `A`: angular acceleration (rad/s²) | -| `M50` | Get current actuator pose (position). | -| `M51` | Get motion controller and servo loop update frequency. | +| `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. Optional rotation with `A`, `B`, `C`. | +| `G28 A-F` | Home one or more joints.
• Optional joint selection `A`–`F`. | +| `M17` | Enable motors and read current pose as the start pose. | +| `M18` | Disable motors. | +| `M50` | Get current internal position (X, Y, Z). | +| `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 moves are finished. Returns `1` if finished, `0` otherwise. | +| `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 | + ## Youtube Video [![Watch the video](images/thumbnail.jpg)](https://youtu.be/MgQbPdiuUTw) From 4de9f2566f9aad632e1ea6a52a4c1373acac7a17 Mon Sep 17 00:00:00 2001 From: 0x23 Date: Fri, 19 Sep 2025 10:10:31 +0200 Subject: [PATCH 02/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7f1610d..8ebf736 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ The firmware implements a complete motion planning stack with look-ahead for smo ## ✨ NEW: Firmware v1.0.1 -This update improves calibration, homing, logging, and adds a Python API plus new G-Code commands. +This update improves calibration, homing, logging, and adds several new G-Code commands. ### Improvements - **Homing**: parallel homing support, higher repeatability, more accurate geometric reference From e4a06086179a25fce33356b3d36834093324609e Mon Sep 17 00:00:00 2001 From: 0x23 Date: Fri, 19 Sep 2025 10:12:43 +0200 Subject: [PATCH 03/14] Update README.md --- README.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 8ebf736..ffe4407 100644 --- a/README.md +++ b/README.md @@ -19,26 +19,6 @@ A 'magnetic gearing' approach increases the resolution of the low-cost magnetic 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. -## ✨ NEW: Firmware v1.0.1 - -This update improves calibration, homing, logging, and adds several new G-Code commands. - -### Improvements -- **Homing**: parallel homing support, higher repeatability, more accurate geometric reference -- **Joint calibration**: refined procedure, persistent flash storage (no recalibration after reboot) -- **Logging**: clearer and more detailed output -- **Python API**: easy device control from Python - -### G-Code Commands -- `G28` — Home joints (supports homing multiple axis simultanously for faster startup) -- `G24` — Set pose command (directly sets servo targets, bypassing motion controller) -- `M17/M18` — Enable/Disable motors (with pose recovery from encoders on enable) -- `M51` — Read encoder values -- `M55` — Set servo loop parameters -- `M56` — Joint calibration (with save-to-flash option) -- `M57` — Read various information about the device state -- `M58` — Read firmware version - ## 🐍 NEW: Python-API The new Python API handles all serial communication and provides convenient command execution and debug message printing. @@ -85,6 +65,26 @@ set_max_acceleration(linear_accel, angular_accel) set_servo_parameter(pos_kp, pos_ki, vel_kp, vel_ki, vel_filter_tc) ``` +## ✨ NEW: Firmware v1.0.1 + +This update improves calibration, homing, logging, and adds several new G-Code commands. + +### Improvements +- **Homing**: parallel homing support, higher repeatability, more accurate geometric reference +- **Joint calibration**: refined procedure, persistent flash storage (no recalibration after reboot) +- **Logging**: clearer and more detailed output +- **Python API**: easy device control from Python + +### G-Code Commands +- `G28` — Home joints (supports homing multiple axis simultanously for faster startup) +- `G24` — Set pose command (directly sets servo targets, bypassing motion controller) +- `M17/M18` — Enable/Disable motors (with pose recovery from encoders on enable) +- `M51` — Read encoder values +- `M55` — Set servo loop parameters +- `M56` — Joint calibration (with save-to-flash option) +- `M57` — Read various information about the device state +- `M58` — Read firmware version + ## ⚙ 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. From 40023563d72c75e864377f71f47d7ae0c6100916 Mon Sep 17 00:00:00 2001 From: 0x23 Date: Fri, 19 Sep 2025 10:13:49 +0200 Subject: [PATCH 04/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ffe4407..9916753 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Micro Manipulator Stepper +# 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. From 9e56b303bb43e8b0e7ab91d0610a0741dcb13ffe Mon Sep 17 00:00:00 2001 From: 0x23 Date: Fri, 19 Sep 2025 13:41:14 +0200 Subject: [PATCH 05/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9916753..2f38bc2 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ The firmware implements a complete motion planning stack with look-ahead for smo ## 🐍 NEW: Python-API -The new Python API handles all serial communication and provides convenient command execution and debug message printing. +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](software/PythonAPI/open_micro_stage_api.py) file into your project, and you’re ready to get started. From 4b267da8b937ee4f67fc0a22e4d908c0c4f2c6ea Mon Sep 17 00:00:00 2001 From: 0x23 Date: Fri, 19 Sep 2025 13:44:33 +0200 Subject: [PATCH 06/14] Update bom.txt --- bom.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bom.txt b/bom.txt index 3ec0b03..9e21e01 100644 --- a/bom.txt +++ b/bom.txt @@ -18,6 +18,7 @@ * 6 M3 Grub Screw M3x4 --- Electronics ------------------------------------------------------------------- + Qty. Name Comments * 1 DC-DC Step Down Module 4.75-23V Step-Down Buck Converter Module @@ -39,6 +40,7 @@ * 3 NEMA 17 Stepper Motor (Body length <= 38mm) --- 3D Printing ------------------------------------------------------------------ + Qty. Name Comments * 3 WireFlexureMount 0.4mm+ nozzle will probably require post-processing. From 0c5cd422a4738dbc4402481bb107326d31ad2173 Mon Sep 17 00:00:00 2001 From: 0x23 Date: Fri, 19 Sep 2025 13:45:36 +0200 Subject: [PATCH 07/14] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2f38bc2..5b7894b 100644 --- a/README.md +++ b/README.md @@ -143,8 +143,8 @@ 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 | -|----------------|-----------------------------------------------------------------------------| +| 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 | From e3b33fbf083b533283832bb554df5595a4c2cb38 Mon Sep 17 00:00:00 2001 From: 0x23 Date: Fri, 19 Sep 2025 13:49:42 +0200 Subject: [PATCH 08/14] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5b7894b..f72a1c8 100644 --- a/README.md +++ b/README.md @@ -148,11 +148,11 @@ The client must wait for an acknowledgment from the previous command before send | `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. Optional rotation with `A`, `B`, `C`. | +| `G24 X Y Z A B C` | Directly set current pose for servo loops. Optional rotation with rotation vector `A`, `B`, `C`. | | `G28 A-F` | Home one or more joints.
• Optional joint selection `A`–`F`. | | `M17` | Enable motors and read current pose as the start pose. | | `M18` | Disable motors. | -| `M50` | Get current internal position (X, Y, Z). | +| `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). | @@ -162,6 +162,7 @@ The client must wait for an acknowledgment from the previous command before send | `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. ## Youtube Video [![Watch the video](images/thumbnail.jpg)](https://youtu.be/MgQbPdiuUTw) From 89f2dde32645323ae6cb73d6ab46d7e15daa8f59 Mon Sep 17 00:00:00 2001 From: 0x23 Date: Fri, 19 Sep 2025 13:50:30 +0200 Subject: [PATCH 09/14] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f72a1c8..546295b 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ The client must wait for an acknowledgment from the previous command before send | `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. Optional rotation with rotation vector `A`, `B`, `C`. | +| `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`. | | `M17` | Enable motors and read current pose as the start pose. | | `M18` | Disable motors. | @@ -162,7 +162,7 @@ The client must wait for an acknowledgment from the previous command before send | `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. +*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. ## Youtube Video [![Watch the video](images/thumbnail.jpg)](https://youtu.be/MgQbPdiuUTw) From bc2bf0f0c345949124618691b6468160bea27b14 Mon Sep 17 00:00:00 2001 From: 0x23 Date: Sat, 20 Sep 2025 08:56:44 +0200 Subject: [PATCH 10/14] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 546295b..13ea2a5 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,6 @@ This update improves calibration, homing, logging, and adds several new G-Code c - **Homing**: parallel homing support, higher repeatability, more accurate geometric reference - **Joint calibration**: refined procedure, persistent flash storage (no recalibration after reboot) - **Logging**: clearer and more detailed output -- **Python API**: easy device control from Python ### G-Code Commands - `G28` — Home joints (supports homing multiple axis simultanously for faster startup) From 370ffbd52ee0ed3a58942e5fcdbac0e4f842f93d Mon Sep 17 00:00:00 2001 From: 0x23 Date: Sat, 20 Sep 2025 08:57:06 +0200 Subject: [PATCH 11/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 13ea2a5..b455078 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ This update improves calibration, homing, logging, and adds several new G-Code c - **Joint calibration**: refined procedure, persistent flash storage (no recalibration after reboot) - **Logging**: clearer and more detailed output -### G-Code Commands +### New G-Code Commands - `G28` — Home joints (supports homing multiple axis simultanously for faster startup) - `G24` — Set pose command (directly sets servo targets, bypassing motion controller) - `M17/M18` — Enable/Disable motors (with pose recovery from encoders on enable) From 0e02557b39a220d3efae7cdfe2d11fe5a99795b7 Mon Sep 17 00:00:00 2001 From: 0x23 Date: Sun, 21 Sep 2025 12:29:26 +0200 Subject: [PATCH 12/14] Update LICENSE --- LICENSE | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/LICENSE b/LICENSE index 7693fbe..14ebf02 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ MIT License -Copyright (c) 2023 0x23 +Copyright (c) 2025 Github User '0x23' (https://github.com/0x23/) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software, hardware design, documentation, or concept (the "Work"), to deal in the Work +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Work, and to permit persons +to whom the Work is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all copies +or substantial portions of the Work, including but not limited to products or +derivative works based on the presented concepts, designs, or arrangements, even if +the original design files are not directly used. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE WORK +OR THE USE OR OTHER DEALINGS IN THE WORK. From a1a12a17bb0545ced8631ff055ba08dc2cf04fe7 Mon Sep 17 00:00:00 2001 From: 0x23 Date: Sun, 21 Sep 2025 16:19:28 +0200 Subject: [PATCH 13/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b455078..df66e0b 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ The firmware implements a complete motion planning stack with look-ahead for smo 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](software/PythonAPI/open_micro_stage_api.py) file into your project, and you’re ready to get started. +Simply copy the [open_micro_stage_api.py](software/PythonAPI/open_micro_stage_api.py) file into your project (and install the dependencies in requirements.txt), and you’re ready to get started. ## Usage Example ```python From 4480971162d827f048c24ba3209f5282a03e322f Mon Sep 17 00:00:00 2001 From: 0x23 Date: Sun, 21 Sep 2025 16:19:59 +0200 Subject: [PATCH 14/14] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df66e0b..befb21f 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ The firmware implements a complete motion planning stack with look-ahead for smo 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](software/PythonAPI/open_micro_stage_api.py) file into your project (and install the dependencies in requirements.txt), and you’re ready to get started. +Simply copy the [open_micro_stage_api.py](software/PythonAPI/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 ```python