Skip to content
DerAndere edited this page Sep 19, 2020 · 113 revisions

Multi-axis Marlin firmware

Copyright 2018 - 2020 DerAndere

Multi-axis-Marlin firmware for multi-axis 3D printers, CNC machines and lab robots

Multi-axis-Marlin firmware for multi-axis 3D printers, CNC machines and lab robots (liquid handling robots, "pipetting robots"). Supports up to six (6) non-extruder axes plus tools (extruders / laser / mill / hobby servos / hot wire foam cutters).

Additional documentation can be found on the PipetBot-A8 project page that is part of the website by DerAndere. Issues can be reported to DerAndere1 here. If you want to add support with more hardware or optimize compatibility with other software features, you are welcome to (re)base your changes onto the 6axis_dev branch and create pull requests.
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 branch 6axis_dev is based on MarlinFirmware/Marlin after the release of version 2.0.6 (bugfix-2.0.x from 2020-08-22, https://github.com/MarlinFirmware/Marlin/commit/434e43cc42f782d5fbe89db21f97571c71ad62f3 or later)

Multi-axis-Marlin supports up to six non-extruder axes (NON_E_AXES) plus extruders (e.g. XYZIJKE or XYZUVWE or XYZABCE).

Only a subset of the Marlin G-code dialect is supported:

  • G1, G28, G90, G91, G92 (partially)
  • M17, M18, M43, M85, M92, M111, M114 (partially), M201, M202, M203, M206 (partially), M502, M503

Default axis names are:

NON_E_AXES Default axis codes
3 X, Y, Z, E
4 X, Y, Z, I, E
5 X, Y, Z, I, J, E
6 X, Y, Z, I, J, K, E

Example syntax for movement (G-code G1) for a configuration with define NON_E_AXES 6:

G1 [Xx.xxxx] [Yy.yyyy] [Zz.zzzz] [Ii.iiii] [Jj.jjjj] [Kk.kkkk] [Ee.eeee] [Ff.ffff]

Configuration

Configuration is done by editing the file Marlin/Configuration.h. E.g. change define NON_E_AXES 3

to:

define NON_E_AXES 4

Important options are:

ASYNC_SECONDARY_AXES

Define ASYNC_SECONDARY_AXES for a CNC machine with NON_E_AXES > 3 where primary axes XYZ are coordinated. Optional additional axes I(, J(, K)) are uncoordinated (asynchronous). Leave disabled (commented out) for coordinated movement of all axes.

FOAMCUTTER_XYUV

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.

NON_E_AXES

NON_E_AXES: The number of axes that are not used for extruders (axes that benefit from endstops and homing). NON_E_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, USE_[I, [J, [K]]][MIN || MAX]_PLUG and definition of the respective values of DEFAULT_AXIS_STEPS_PER_UNIT, DEFAULT_MAX_FEEDRATE, DEFAULT_MAX_ACCELERATION, AXIS_RELATIVE_MODES, MICROSTEP_MODES and MANUAL_FEEDRATE.

Allowed values: [3, 4, 5, 6]

AXIS4_NAME

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.

  • 'I' for generic 4th axis
  • 'J' for generic 5th axis
  • 'K' for generic 6th 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 names are I (AXIS4), J (AXIS5), K (AXIS6).

Allowed values: ['I', 'J', 'K', 'A', 'B', 'C', 'U', 'V', 'W']

Building Multi-axis Marlin firmware

To build Multi-axis Marlin firmware you'll need PlatformIO. The MarlinFirmware team has posted detailed instructions on Building Marlin with PlatformIO.

The different branches in the git repository https://github.com/DerAndere1/Marlin reflect different stages of development:

Credits

Multi-axis support for Marlin firmware is developed by:

DerAndere [@DerAndere1] - Germany
Garbriel Beraldo [@GabrielBeraldo] - Brasil
Olivier Briand [@hobiseven] - France
Wolverine [@MohammadSDGHN] - 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

Contributions:

Author Contact Contribution
DerAndere @DerAndere1 main developer of multi-axis support, idea, initial implementation, ASYNC_SECONDARY_AXES kinematics, bugfixes
Gabriel Beraldo @GabrielBeraldo : hardware debugging, bugfixes yielding first working prototype (fix for non-moving additional axes, 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
FNeo31 @FNeo31 added experimental drilling cyles (G81, G82, G83)
MarlinFirmware @MarlinFirmware Marlin 3D Printer firmware

Licensing information

/**
 * Multi-axis-Marlin firmware
 * Copyright 2020 DerAndere and other Multi-axis-Marlin authors
 *
 * Based on:
 * Marlin 3D Printer Firmware
 * Copyright (c) 2020 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/>.
 *
 */

Clone this wiki locally