-
-
Notifications
You must be signed in to change notification settings - Fork 21
Home
Copyright 2018 - 2022 DerAndere
Note: Multi-axis-Marlin firmware was merged into upstream MarlinFirmware/Marlin bugfix-2.0.x on 5th June 2021, so support for up to 6 non-extruder axes is part of official MarlinFirmware/Marlin. Code from this repository (DerAndere1/Marlin) may contain additional multi-axis feautures, but official Marlin will be more up to date in general and contain less bugs. Use nightly builds of official MarlinFirmware/Marlin, Version "Marlin 2.0 with bug fixes (bugfix-2.0.x)", whenever possible.
Marlin2ForPipetBot is a firmware for multi-axis 3D printers, CNC machines and lab robots (liquid handling robots, "pipetting robots").
It supports up to 9 (nine) non-extruder axes plus tools (extruders / laser / mill / hobby servos / hot wire foam cutters).
Axes 4-6 (internal axis ID I, J, K) can be rotational axes (AXIS*_NAME 'A', 'B' or 'C') or secondary linear axes (AXIS*_NAME 'U', 'V' or 'W'). Axes 7-9 (internal axis ID U, V, W) can only be secondary linear axes (AXIS*_NAME 'U', 'V' or 'W'). Feedrate interpretation follows specifications for the NIST RS274NGC interpreter - version 3 and its successor, LinuxCNC (default LinuxCNC with trivkins).
Thanks to the extra axes it is now possible to do indexed multi-axis machining and to drive additional tools (pumps, toolchangers or other) with Marlin2ForPipetBot. Continuous multi-axis machining with Tool Center Point Control (TCPC) is currently not supported. That would require implementation of a machine-specific kinematic model and commands like Haas G234, FANUC G43.3, or implementation of FANUC Rotational Tool Center Point Control (RTCP) type II (G43.5). Only one kinematic model with more than 3 non-extruder-axes that contribute to tool-positioning is currently available: FOAMCUTTER_XYUV (see below). If you have a different machine where additional axes contribute to tool positioning, you currently have to implement your own kinematic model.
Additional documentation can be found on the PipetBot-A8 project page that is part of the website by DerAndere. Issues related to multi-axis support can be reported to DerAndere1 here. If you want to add support for more hardware or optimize compatibility with other software features, please first consider to fork MarlinFirmware/Marlin and contribute directly to upstream MarlinFirmware/Marlin according to their guidelines. If merging your changes into MarlinFirmware/Marlin is not an option, you are welcome to (re)base your changes onto the Marlin2ForPipetBot_dev branch of DerAndere1/Marlin and create pull requests tageting the Marlin2ForPipetBot_dev branch.
Please test this firmware and let us know if it misbehaves in any way.
Volunteers are standing by!
Not for production use. Use with caution!
The following information applies to upstream MarlinFirmware/Marlin bugfix-2.0.x. Documentation relevant to Marlin2ForPipetBot or other versions can be found in the README file of the respective branch in this repository.
Multi-axis-Marlin supports up to six non-extruder axes (LINEAR_AXES) plus
extruders (e.g. XYZABC+E or XYZUVW+E).
Only a subset of the Marlin G-code dialect is supported:
- G0, G1, G2, G3, G28, G29, G90, G91, G92, T0, T1
- M17, M18, M43, M85, M92, M111, M114 (partially), M201, M202, M203, M206 (partially), M500, M501, M502, M503, M504
Default axis names are:
| LINEAR_AXES | Default axis codes |
|---|---|
| 3 | X, Y, Z, E |
| 4 | X, Y, Z, A, E |
| 5 | X, Y, Z, A, B, E |
| 6 | X, Y, Z, A, B, C, E |
Example syntax for movement (G-code G1) for a configuration with #define LINEAR_AXES 6:
G1 [Xx.xxxx] [Yy.yyyy] [Zz.zzzz] [Aa.aaaa] [Bb.bbbb] [Cc.cccc] [Ee.eeee] [Ff.ffff]
For G-code syntax supported by upstream MarlinFirmware/Marlin bugfix-2.0.x, see https://github.com/DerAndere1/MarlinDocumentation/tree/master/_gcode
Configuration is done by editing the file Marlin/Configuration.h. E.g. change
#define LINEAR_AXES 3
to:
#define LINEAR_AXES 4
Important options are:
Define FOAMCUTTER_XYUV kinematics for a hot wire cutter with parallel horizontal axes X, U where the hights
of the two wire ends are controlled by parallel axes Y, V. Currently only works with LINEAR_AXES 5. A dummy
pin number can be assigned to pins for the unused Z axis.
Leave FOAMCUTTER_XYUV disabled for default behaviour (stepper velocities are calculated using multidimensional linear interpolation over all axes). Host software and CAM software for 4 axis foam cutters can be found at https://rckeith.co.uk/file-downloads/ and https://www.jedicut.com/en/download/ . A simple python library to generate G-code for 4 axis foam cutters can be found at https://github.com/jasonhamilton/hotwing-core .
LINEAR_AXES:
The number of axes that are not used for extruders (axes that
benefit from endstops and homing). LINEAR_AXES > 3 requires definition of
[I, [J, [K]]]_STEP_PIN[I, [J, [K]]]_ENABLE_PIN[I, [J, [K]]]_DIR_PIN-
[I, [J, [K]]]_STOP_PIN(for available pins, see thepins/pins_YOURMOTHERBOARD.hfile for your board) USE_[I, [J, [K]]][MIN || MAX]_PLUG[I, [J, [K]]]_ENABLE_ONDISABLE_[I, [J, [K]]][I, [J, [K]]]_MIN_POS[I, [J, [K]]]_MAX_POS[I, [J, [K]]]_HOME_DIR- possibly
DEFAULT_[I, [J, [K]]]JERK
and definition of the respective values of
DEFAULT_AXIS_STEPS_PER_UNITDEFAULT_MAX_FEEDRATEDEFAULT_MAX_ACCELERATIONHOMING_FEEDRATE_MM_MAXIS_RELATIVE_MODESMICROSTEP_MODESMANUAL_FEEDRATE
and possibly also values of
HOMING_BUMP_DIVISORHOMING_BACKOFF_POST_MMBACKLASH_DISTANCE_MM
For bed-leveling, NOZZLE_TO_PROBE_OFFSETS has to be extended with elemets of value 0
until the number of elements is equal to the value of LINEAR_AXES.
Allowed values: [3, 4, 5, 6]
AXIS4_NAME, AXIS5_NAME, AXIS6_NAME:
Axis codes for additional axes:
This defines the axis code that is used in G-code commands to
reference a specific axis.
- 'A' for rotational axis parallel to X
- 'B' for rotational axis parallel to Y
- 'C' for rotational axis parallel to Z
- 'U' for secondary linear axis parallel to X
- 'V' for secondary linear axis parallel to Y
- 'W' for secondary linear axis parallel to Z
Regardless of the settings, firmware-internal axis identifiers are I (AXIS4), J (AXIS5), K (AXIS6).
Allowed values: ['A', 'B', 'C', 'U', 'V', 'W']
EVENT_GCODE_TOOLCHANGE_TO, EVENT_GCODE_TOOLCHANGE_T1:
Event Gcodes to be executed when the printer receives toolchange commands T0 or T1, respectively.
Allowed values: a string containing G-code commands seperated by \n, e.g:
#define EVENT_GCODE_TOOLCHANGE_TO "G28 A\nG28 B\nG1 A0 B5 F100"
To build Multi-axis-Marlin firmware you'll need PlatformIO. The MarlinFirmware team has posted detailed instructions on Building Marlin with PlatformIO.
The most stable Marlin Firmware with support for up to 6 axes is current MarlinFirmware/Marlin. All contributions that are not specific to pipetting robots should be rebased onto https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.0 and a pull requests targeting https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.0.x should be prepared.
The different branches in the git repository https://github.com/DerAndere1/Marlin reflect different stages of development:
-
Marlin2ForPipetBot branch is the stable release branch for tagged releases of Marlin2ForPipetBot firmware. It is optimized and preconfigured for the PipetBot-A8 by default. Currently it is based on Marlin bugfix-2.0.x from 2021-08-30, https://github.com/MarlinFirmware/Marlin/commit/90cd1ca68d3f4f5ede56cbea4913f06ca4782a94 or later.
-
Marlin2ForPipetBot_dev branch is used to develop and test bugfixes for Marlin2ForPipetBot. After successful testing, it will be merged into Marlin2ForPipetBot.
-
6axis_PR1 branch was merged into upstream MarlinFirmware/Marlin (pull request https://github.com/MarlinFirmware/Marlin/pull/19112). This branch is now outdated. Use current MarlinFirmware/Marlin instead.
-
9axis_PR2 branch is used to develop suppport for up to nine (9) non-extruder axes. Internal axis IDs are
X, Y, Z, I, J, K, U, V, W. These identifiers are used only internally in the firmware to reference joints. The respectiveAXIS*_NAMEused in Gcode can be one of'A', 'B', 'C', 'U', 'V', 'W'. A pull request to get this merged it into upstream MarlinFirmware/Marlin is open. This branch needs to be rebased onto https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.0. Pull requests targeting the 9axis_PR2 branch are welcome. -
Other branches: Deprecated legacy code. Use current MarlinFirmware/Marlin instead.
Currently the configs by hobiseven and HendrikJan-5D are the only ones that were tested. Below I list Individual features that may work (although not all combinations). All other config settings currently should be treated as not supported yet. Experienced useres are encouraged to experiment with other config settings and report at https://github.com/DerAndere1/Marlin/issues if something works or not. All at your own risk - be ready to push the emergency stop button at any time.
- *_DRIVER_TYPE A4988
- *_DRIVER_TYPE DRV8825
- *_DRIVER_TYPE TMC5160
- *_DRIVER_TYPE TMC2226
- *_DRIVER_TYPE TMC2209
- LINEAR_AXES 3
- LINEAR_AXES 4
- LINEAR_AXES 5
- LINEAR_AXES 6
- LINEAR_AXES 7
- LINEAR_AXES 8
- LINEAR_AXES 9
- EXTRUDERS 0
- EXTRUDERS 1
- EXTRUDERS 2
- DEBUG_LEVELING
- DEBUG_PINS
- [dogm display (possibly not all menus work flawlessly with axes I,J,K)]
- One or two stepper drivers per axis (*_DUAL_STEPPER_DRIVERS)
- AUTO_BED_LEVELING_3POINT
- AUTO_BED_LEVELING_LINEAR
Boards:
- ANET_10
- RAMPS_14_EFB
- MKS Rumba32
- ALFAWISE_U20 (?)
- ALFAWISE_U30 (?)
- Teensy 3.6
- BTT GTR V1.0 with M5 V1.0 board
Multi-axis support for Marlin firmware is developed by:
DerAndere [@DerAndere1] - Germany
Garbriel Beraldo [@GabrielBeraldo] - Brasil
Olivier Briand [@hobiseven] - France
Wolverine [@MohammadSDGHN] - Undisclosed
bilsef [@bilsef] - Undisclosed
FNeo31 [@FNeo31] - Undisclosed
Scott Lahteine [@thinkyhead] - USA
HendrikJan-5D [@HendrikJan-5D] - Undisclosed
Multi-axis-Marlin firmware is based on Marlin firmware.
The current Marlin dev team consists of:
Scott Lahteine [@thinkyhead] - USA
Roxanne Neufeld [@Roxy-3D] - USA
Bob Kuhn [@Bob-the-Kuhn] - USA
Chris Pepper [@p3p] - UK
João Brazio [@jbrazio] - Portugal
Erik van der Zalm [@ErikZalm] - Netherlands
| Author | Contact | Contribution |
|---|---|---|
| DerAndere | @DerAndere1 | main developer of multi-axis support, idea, initial implementation, added EVENT_GCODE_TOOLCHANGE_T0, EVENT_GCODE_TOOLCHANGE_T1, SAFE_BED_LEVELING_POSITION_X, LCD_SHOW_SECONDARY_AXES, AXIS4_ROTATES features, bugfixes |
| Gabriel Beraldo | @GabrielBeraldo | hardware debugging, bugfixes yielding first working prototype (make additional axes move, fix EEPROM) |
| Olivier Briand | @hobiseven | testing, added experimental compatibility with different configurations, code review, FOAMCUTTER_XYUV kinematics |
| Wolverine | @MohammadSDGHN | added experimental compatibility with different configurations (BigTreeTech SKR Pro 1.1, Trinamic TMC drivers, StealthChop, sensorless homing) |
| bilsef | @bilsef | testing, code review, bugfixes (fix movement of additional axes, fix types.h, fix EEPROM) |
| FNeo31 | @FNeo31 | added experimental drilling cyles (G81, G82, G83) |
| HendrikJan-5D | @HendrikJan-5D | testing bed leveling and Trinamic TMC, bugfixes yielding first working 9 axis prototype |
| Scott Lahteine | @thinkyhead | code review, refactoring |
| MarlinFirmware | @MarlinFirmware | Marlin 3D Printer firmware |
/**
* Multi-axis-Marlin firmware
* Copyright 2018 - 2021 DerAndere and other Multi-axis-Marlin authors
*
* Based on:
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/