Merge branch 'main' of https://github.com/0x23/MicroManipulatorStepper
This commit is contained in:
commit
fc0e75f15c
3 changed files with 65 additions and 54 deletions
32
LICENSE
32
LICENSE
|
|
@ -1,21 +1,21 @@
|
||||||
MIT License
|
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
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
software, hardware design, documentation, or concept (the "Work"), to deal in the Work
|
||||||
in the Software without restriction, including without limitation the rights
|
without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
publish, distribute, sublicense, and/or sell copies of the Work, and to permit persons
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
to whom the Work is furnished to do so, subject to the following conditions:
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
The above copyright notice and this permission notice shall be included in all copies
|
||||||
copies or substantial portions of the Software.
|
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
|
THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE WORK
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OR THE USE OR OTHER DEALINGS IN THE WORK.
|
||||||
SOFTWARE.
|
|
||||||
|
|
|
||||||
85
README.md
85
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.
|
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.
|
It's designed for applications such as optical alignment, probing electronic components, and microscopy.
|
||||||
|
|
@ -19,31 +19,11 @@ 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 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.
|
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 a Python API plus 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
|
## 🐍 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.
|
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 (also install the dependencies in requirements.txt), and you’re ready to get started.
|
||||||
|
|
||||||
## Usage Example
|
## Usage Example
|
||||||
```python
|
```python
|
||||||
|
|
@ -76,15 +56,34 @@ set_workspace_transform(transform)
|
||||||
get_workspace_transform()
|
get_workspace_transform()
|
||||||
home(axis_list=None)
|
home(axis_list=None)
|
||||||
calibrate_joint(joint_index, save_result)
|
calibrate_joint(joint_index, save_result)
|
||||||
move_to(x, y, z, f, move_immediately=False, blocking=True, timeout=1)
|
move_to(x, y, z, f, move_immediately, blocking, timeout)
|
||||||
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)
|
|
||||||
set_pose(x, y, z)
|
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)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## ✨ 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
|
||||||
|
|
||||||
|
### 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)
|
||||||
|
- `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
|
## ⚙ 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.
|
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.
|
||||||
|
|
@ -143,16 +142,26 @@ 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.
|
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.
|
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. <br>• `X`, `Y`, `Z`: target positions <br>• `F`: feed rate |
|
||||||
| `G0 X Y Z F` | Move the end-effector in a straight line to the specified position. <br> • `X`: target position on X-axis <br> • `Y`: target position on Y-axis <br> • `Z`: target position on Z-axis <br> • `F`: feed rate (movement speed) |
|
| `G1 X Y Z F` | Same as `G0`. |
|
||||||
| `G1 X Y Z F` | Same as `G0`. |
|
| `G4 S/P` | Dwell/pause for a specified time. <br>• `S`: seconds <br>• `P`: milliseconds |
|
||||||
| `M204 L A` | Set current acceleration. <br> • `L`: linear acceleration (m/s²) <br> • `A`: angular acceleration (rad/s²) |
|
| `G24 X Y Z A B C` | Directly set current pose for servo loops with optional rotation vector* `A`, `B`, `C`. |
|
||||||
| `M50` | Get current actuator pose (position). |
|
| `G28 A-F` | Home one or more joints. <br>• Optional joint selection `A`–`F`. |
|
||||||
| `M51` | Get motion controller and servo loop update frequency. |
|
| `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. |
|
| `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. <br>• `A`, `B`: position PI controller gains (P and I) <br>• `C`, `D`: velocity PI controller gains (P and I) <br>• `F`: velocity filter time constant |
|
||||||
|
| `M56 J S` | Calibrate a joint. <br>• `J`: joint index <br>• `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. <br>• `L`: linear acceleration <br>• `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
|
## Youtube Video
|
||||||
[](https://youtu.be/MgQbPdiuUTw)
|
[](https://youtu.be/MgQbPdiuUTw)
|
||||||
|
|
|
||||||
2
bom.txt
2
bom.txt
|
|
@ -18,6 +18,7 @@
|
||||||
* 6 M3 Grub Screw M3x4
|
* 6 M3 Grub Screw M3x4
|
||||||
|
|
||||||
--- Electronics -------------------------------------------------------------------
|
--- Electronics -------------------------------------------------------------------
|
||||||
|
|
||||||
Qty. Name Comments
|
Qty. Name Comments
|
||||||
|
|
||||||
* 1 DC-DC Step Down Module 4.75-23V Step-Down Buck Converter Module
|
* 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)
|
* 3 NEMA 17 Stepper Motor (Body length <= 38mm)
|
||||||
|
|
||||||
--- 3D Printing ------------------------------------------------------------------
|
--- 3D Printing ------------------------------------------------------------------
|
||||||
|
|
||||||
Qty. Name Comments
|
Qty. Name Comments
|
||||||
|
|
||||||
* 3 WireFlexureMount 0.4mm+ nozzle will probably require post-processing.
|
* 3 WireFlexureMount 0.4mm+ nozzle will probably require post-processing.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue