Prusa MINI Firmware overview
Configuration.h File Reference

Go to the source code of this file.

Macros

#define CONFIGURATION_H_VERSION   020000
 
#define STRING_CONFIG_H_AUTHOR   "(none, default config)"
 
#define SHOW_BOOTSCREEN
 
#define SERIAL_PORT   0
 
#define BAUDRATE   250000
 
#define MOTHERBOARD   BOARD_RAMPS_14_EFB
 
#define EXTRUDERS   1
 
#define DEFAULT_NOMINAL_FILAMENT_DIA   3.0
 
#define TEMP_SENSOR_0   1
 
#define TEMP_SENSOR_1   0
 
#define TEMP_SENSOR_2   0
 
#define TEMP_SENSOR_3   0
 
#define TEMP_SENSOR_4   0
 
#define TEMP_SENSOR_5   0
 
#define TEMP_SENSOR_BED   0
 
#define TEMP_SENSOR_CHAMBER   0
 
#define DUMMY_THERMISTOR_998_VALUE   25
 
#define DUMMY_THERMISTOR_999_VALUE   100
 
#define MAX_REDUNDANT_TEMP_SENSOR_DIFF   10
 
#define TEMP_RESIDENCY_TIME   10
 
#define TEMP_WINDOW   1
 
#define TEMP_HYSTERESIS   3
 
#define TEMP_BED_RESIDENCY_TIME   10
 
#define TEMP_BED_WINDOW   1
 
#define TEMP_BED_HYSTERESIS   3
 
#define HEATER_0_MINTEMP   5
 
#define HEATER_1_MINTEMP   5
 
#define HEATER_2_MINTEMP   5
 
#define HEATER_3_MINTEMP   5
 
#define HEATER_4_MINTEMP   5
 
#define HEATER_5_MINTEMP   5
 
#define BED_MINTEMP   5
 
#define HEATER_0_MAXTEMP   275
 
#define HEATER_1_MAXTEMP   275
 
#define HEATER_2_MAXTEMP   275
 
#define HEATER_3_MAXTEMP   275
 
#define HEATER_4_MAXTEMP   275
 
#define HEATER_5_MAXTEMP   275
 
#define BED_MAXTEMP   150
 
#define PIDTEMP
 
#define BANG_MAX   255
 
#define PID_MAX   BANG_MAX
 
#define PID_K1   0.95
 
#define MAX_BED_POWER   255
 
#define PREVENT_COLD_EXTRUSION
 
#define EXTRUDE_MINTEMP   170
 
#define PREVENT_LENGTHY_EXTRUDE
 
#define EXTRUDE_MAXLENGTH   200
 
#define THERMAL_PROTECTION_HOTENDS
 
#define THERMAL_PROTECTION_BED
 
#define THERMAL_PROTECTION_CHAMBER
 
#define USE_XMIN_PLUG
 
#define USE_YMIN_PLUG
 
#define USE_ZMIN_PLUG
 
#define ENDSTOPPULLUPS
 
#define X_MIN_ENDSTOP_INVERTING   false
 
#define Y_MIN_ENDSTOP_INVERTING   false
 
#define Z_MIN_ENDSTOP_INVERTING   false
 
#define X_MAX_ENDSTOP_INVERTING   false
 
#define Y_MAX_ENDSTOP_INVERTING   false
 
#define Z_MAX_ENDSTOP_INVERTING   false
 
#define Z_MIN_PROBE_ENDSTOP_INVERTING   false
 
#define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 4000, 500 }
 
#define DEFAULT_MAX_FEEDRATE   { 300, 300, 5, 25 }
 
#define DEFAULT_MAX_ACCELERATION   { 3000, 3000, 100, 10000 }
 
#define DEFAULT_ACCELERATION   3000
 
#define DEFAULT_RETRACT_ACCELERATION   3000
 
#define DEFAULT_TRAVEL_ACCELERATION   3000
 
#define DEFAULT_EJERK   5.0
 
#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
 
#define NOZZLE_TO_PROBE_OFFSET   { 10, 10, 0 }
 
#define MIN_PROBE_EDGE   10
 
#define XY_PROBE_SPEED   8000
 
#define Z_PROBE_SPEED_FAST   HOMING_FEEDRATE_Z
 
#define Z_PROBE_SPEED_SLOW   (Z_PROBE_SPEED_FAST / 2)
 
#define Z_CLEARANCE_DEPLOY_PROBE   10
 
#define Z_CLEARANCE_BETWEEN_PROBES   5
 
#define Z_CLEARANCE_MULTI_PROBE   5
 
#define Z_PROBE_LOW_POINT   -2
 
#define Z_PROBE_OFFSET_RANGE_MIN   -20
 
#define Z_PROBE_OFFSET_RANGE_MAX   20
 
#define X_ENABLE_ON   0
 
#define Y_ENABLE_ON   0
 
#define Z_ENABLE_ON   0
 
#define E_ENABLE_ON   0
 
#define DISABLE_X   false
 
#define DISABLE_Y   false
 
#define DISABLE_Z   false
 
#define DISABLE_E   false
 
#define DISABLE_INACTIVE_EXTRUDER
 
#define INVERT_X_DIR   false
 
#define INVERT_Y_DIR   true
 
#define INVERT_Z_DIR   false
 
#define INVERT_E0_DIR   false
 
#define INVERT_E1_DIR   false
 
#define INVERT_E2_DIR   false
 
#define INVERT_E3_DIR   false
 
#define INVERT_E4_DIR   false
 
#define INVERT_E5_DIR   false
 
#define X_HOME_DIR   -1
 
#define Y_HOME_DIR   -1
 
#define Z_HOME_DIR   -1
 
#define X_BED_SIZE   200
 
#define Y_BED_SIZE   200
 
#define X_MIN_POS   0
 
#define Y_MIN_POS   0
 
#define Z_MIN_POS   0
 
#define X_MAX_POS   X_BED_SIZE
 
#define Y_MAX_POS   Y_BED_SIZE
 
#define Z_MAX_POS   200
 
#define MIN_SOFTWARE_ENDSTOPS
 
#define MAX_SOFTWARE_ENDSTOPS
 
#define HOMING_FEEDRATE_XY   (50*60)
 
#define HOMING_FEEDRATE_Z   (4*60)
 
#define VALIDATE_HOMING_ENDSTOPS
 
#define EEPROM_CHITCHAT
 
#define HOST_KEEPALIVE_FEATURE
 
#define DEFAULT_KEEPALIVE_INTERVAL   2
 
#define BUSY_WHILE_HEATING
 
#define PREHEAT_1_LABEL   "PLA"
 
#define PREHEAT_1_TEMP_HOTEND   180
 
#define PREHEAT_1_TEMP_BED   70
 
#define PREHEAT_1_FAN_SPEED   0
 
#define PREHEAT_2_LABEL   "ABS"
 
#define PREHEAT_2_TEMP_HOTEND   240
 
#define PREHEAT_2_TEMP_BED   110
 
#define PREHEAT_2_FAN_SPEED   0
 
#define PRINTJOB_TIMER_AUTOSTART
 
#define LCD_LANGUAGE   en
 
#define DISPLAY_CHARSET_HD44780   JAPANESE
 
#define LCD_INFO_SCREEN_STYLE   0
 
#define SOFT_PWM_SCALE   0
 
#define SERVO_DELAY   { 300 }
 

Macro Definition Documentation

◆ CONFIGURATION_H_VERSION

#define CONFIGURATION_H_VERSION   020000

Marlin 3D Printer Firmware Copyright (c) 2019 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/. Configuration.h

Basic settings such as:

  • Type of electronics
  • Type of temperature sensor
  • Printer geometry
  • Endstop configuration
  • LCD controller
  • Extra features

Advanced settings can be found in Configuration_adv.h

◆ STRING_CONFIG_H_AUTHOR

◆ SHOW_BOOTSCREEN

#define SHOW_BOOTSCREEN

*** VENDORS PLEASE READ ***

Marlin allows you to add a custom boot image for Graphical LCDs. With this option Marlin will first show your custom screen followed by the standard Marlin logo with version number and web URL.

We encourage you to take advantage of this new feature and we also respectfully request that you retain the unmodified Marlin boot screen.

◆ SERIAL_PORT

#define SERIAL_PORT   0

Select the serial port on the board to use for communication with the host. This allows the connection of wireless adapters (for instance) to non-default port pins. Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.

:[-1, 0, 1, 2, 3, 4, 5, 6, 7]

◆ BAUDRATE

#define BAUDRATE   250000

Select a secondary serial port on the board to use for communication with the host. This allows the connection of wireless adapters (for instance) to non-default port pins. Serial port -1 is the USB emulated serial port, if available.

:[-1, 0, 1, 2, 3, 4, 5, 6, 7] This setting determines the communication speed of the printer.

250000 works in most cases, but you might try a lower speed if you commonly experience drop-outs during host printing. You may try up to 1000000 to speed up SD file transfer.

:[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000]

◆ MOTHERBOARD

#define MOTHERBOARD   BOARD_RAMPS_14_EFB

◆ EXTRUDERS

#define EXTRUDERS   1

◆ DEFAULT_NOMINAL_FILAMENT_DIA

#define DEFAULT_NOMINAL_FILAMENT_DIA   3.0

◆ TEMP_SENSOR_0

#define TEMP_SENSOR_0   1

Průša MK2 Single Nozzle Multi-Material Multiplexer, and variants.

This device allows one stepper driver on a control board to drive two to eight stepper motors, one at a time, in a manner suitable for extruders.

This option only allows the multiplexer to switch on tool-change. Additional options to configure custom E moves are pending. Prusa Multi-Material Unit v2

Requires NOZZLE_PARK_FEATURE to park print head in case MMU unit fails. Requires EXTRUDERS = 5

For additional configuration see Configuration_adv.h Two separate X-carriages with extruders that connect to a moving part via a solenoid docking mechanism. Requires SOL1_PIN and SOL2_PIN. Two separate X-carriages with extruders that connect to a moving part via a magnetic docking mechanism using movements and no solenoid

project : https://www.thingiverse.com/thing:3080893 movements : https://youtu.be/0xCEiG9VS3k https://youtu.be/Bqbcs0CU2FE Switching Toolhead

Support for swappable and dockable toolheads, such as the E3D Tool Changer. Toolheads are locked with a servo. Magnetic Switching Toolhead

Support swappable and dockable toolheads with a magnetic docking mechanism using movement and no servo. Electromagnetic Switching Toolhead

Parking for CoreXY / HBot kinematics. Toolheads are parked at one edge and held with an electromagnet. Supports more than 2 Toolheads. See https://youtu.be/JolbsAKTKf4 "Mixing Extruder"

  • Adds G-codes M163 and M164 to set and "commit" the current mix factors.
  • Extends the stepping routines to move multiple steppers in proportion to the mix.
  • Optional support for Repetier Firmware's 'M164 S<index>' supporting virtual tools.
  • This implementation supports up to two mixing extruders.
  • Enable DIRECT_MIXING_IN_G1 for M165 and mixing in G1 (from Pia Taubert's reference implementation). Power Supply Control

Enable and connect the power supply to the PS_ON_PIN. Specify whether the power supply is active HIGH or active LOW. –NORMAL IS 4.7kohm PULLUP!– 1kohm pullup can be used on hotend sensor, using correct resistor and table

Temperature sensors available:

-4 : thermocouple with AD8495 -3 : thermocouple with MAX31855 (only for sensor 0) -2 : thermocouple with MAX6675 (only for sensor 0) -1 : thermocouple with AD595 0 : not used 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup) 331 : (3.3V scaled thermistor 1 table) 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup) 3 : Mendel-parts thermistor (4.7k pullup) 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !! 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup) 501 : 100K Zonestar (Tronxy X3A) Thermistor 512 : 100k RPW-Ultra hotend thermistor (4.7k pullup) 6 : 100k EPCOS - Not as accurate as table 1 (created using a fluke thermocouple) (4.7k pullup) 7 : 100k Honeywell thermistor 135-104LAG-J01 (4.7k pullup) 71 : 100k Honeywell thermistor 135-104LAF-J01 (4.7k pullup) 8 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) 9 : 100k GE Sensing AL03006-58.2K-97-G1 (4.7k pullup) 10 : 100k RS thermistor 198-961 (4.7k pullup) 11 : 100k beta 3950 1% thermistor (4.7k pullup) 12 : 100k 0603 SMD Vishay NTCS0603E3104FXT (4.7k pullup) (calibrated for Makibox hot bed) 13 : 100k Hisens 3950 1% up to 300°C for hotend "Simple ONE " & "Hotend "All In ONE" 15 : 100k thermistor calibration for JGAurora A5 hotend 18 : ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327 20 : Pt100 with circuit in the Ultimainboard V2.x 201 : Pt100 with circuit in Overlord, similar to Ultimainboard V2.x 60 : 100k Maker's Tool Works Kapton Bed Thermistor beta=3950 61 : 100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup 66 : 4.7M High Temperature thermistor from Dyze Design 67 : 450C thermistor from SliceEngineering 70 : the 100K thermistor found in the bq Hephestos 2 75 : 100k Generic Silicon Heat Pad with NTC 100K MGB18-104F39050L32 thermistor 99 : 100k thermistor with a 10K pull-up resistor (found on some Wanhao i3 machines)

1k ohm pullup tables - This is atypical, and requires changing out the 4.7k pullup for 1k. (but gives greater accuracy and more stable PID) 51 : 100k thermistor - EPCOS (1k pullup) 52 : 200k thermistor - ATC Semitec 204GT-2 (1k pullup) 55 : 100k thermistor - ATC Semitec 104GT-2 (Used in ParCan & J-Head) (1k pullup)

1047 : Pt1000 with 4k7 pullup 1010 : Pt1000 with 1k pullup (non standard) 147 : Pt100 with 4k7 pullup 110 : Pt100 with 1k pullup (non standard)

1000 : Custom - Specify parameters in Configuration_adv.h

   Use these for Testing or Development purposes. NEVER for production machine.

998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below. 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.

◆ TEMP_SENSOR_1

#define TEMP_SENSOR_1   0

◆ TEMP_SENSOR_2

#define TEMP_SENSOR_2   0

◆ TEMP_SENSOR_3

#define TEMP_SENSOR_3   0

◆ TEMP_SENSOR_4

#define TEMP_SENSOR_4   0

◆ TEMP_SENSOR_5

#define TEMP_SENSOR_5   0

◆ TEMP_SENSOR_BED

#define TEMP_SENSOR_BED   0

◆ TEMP_SENSOR_CHAMBER

#define TEMP_SENSOR_CHAMBER   0

◆ DUMMY_THERMISTOR_998_VALUE

#define DUMMY_THERMISTOR_998_VALUE   25

◆ DUMMY_THERMISTOR_999_VALUE

#define DUMMY_THERMISTOR_999_VALUE   100

◆ MAX_REDUNDANT_TEMP_SENSOR_DIFF

#define MAX_REDUNDANT_TEMP_SENSOR_DIFF   10

◆ TEMP_RESIDENCY_TIME

#define TEMP_RESIDENCY_TIME   10

◆ TEMP_WINDOW

#define TEMP_WINDOW   1

◆ TEMP_HYSTERESIS

#define TEMP_HYSTERESIS   3

◆ TEMP_BED_RESIDENCY_TIME

#define TEMP_BED_RESIDENCY_TIME   10

◆ TEMP_BED_WINDOW

#define TEMP_BED_WINDOW   1

◆ TEMP_BED_HYSTERESIS

#define TEMP_BED_HYSTERESIS   3

◆ HEATER_0_MINTEMP

#define HEATER_0_MINTEMP   5

◆ HEATER_1_MINTEMP

#define HEATER_1_MINTEMP   5

◆ HEATER_2_MINTEMP

#define HEATER_2_MINTEMP   5

◆ HEATER_3_MINTEMP

#define HEATER_3_MINTEMP   5

◆ HEATER_4_MINTEMP

#define HEATER_4_MINTEMP   5

◆ HEATER_5_MINTEMP

#define HEATER_5_MINTEMP   5

◆ BED_MINTEMP

#define BED_MINTEMP   5

◆ HEATER_0_MAXTEMP

#define HEATER_0_MAXTEMP   275

◆ HEATER_1_MAXTEMP

#define HEATER_1_MAXTEMP   275

◆ HEATER_2_MAXTEMP

#define HEATER_2_MAXTEMP   275

◆ HEATER_3_MAXTEMP

#define HEATER_3_MAXTEMP   275

◆ HEATER_4_MAXTEMP

#define HEATER_4_MAXTEMP   275

◆ HEATER_5_MAXTEMP

#define HEATER_5_MAXTEMP   275

◆ BED_MAXTEMP

#define BED_MAXTEMP   150

◆ PIDTEMP

#define PIDTEMP

◆ BANG_MAX

#define BANG_MAX   255

◆ PID_MAX

#define PID_MAX   BANG_MAX

◆ PID_K1

#define PID_K1   0.95

◆ MAX_BED_POWER

#define MAX_BED_POWER   255

PID Bed Heating

If this option is enabled set PID constants below. If this option is disabled, bang-bang will be used and BED_LIMIT_SWITCHING will enable hysteresis.

The PID frequency will be the same as the extruder PWM. If PID_dT is the default, and correct for the hardware/configuration, that means 7.689Hz, which is fine for driving a square wave into a resistive load and does not significantly impact FET heating. This also works fine on a Fotek SSR-10DA Solid State Relay into a 250W heater. If your configuration is significantly different than this and you don't understand the issues involved, don't use bed PID until someone else verifies that your hardware works. Max Bed Power Applies to all forms of bed control (PID, bang-bang, and bang-bang with hysteresis). When set to any value below 255, enables a form of PWM to the bed that acts like a divider so don't use it unless you are OK with PWM on your bed. (See the comment on enabling PIDTEMPBED)

◆ PREVENT_COLD_EXTRUSION

#define PREVENT_COLD_EXTRUSION

Prevent extrusion if the temperature is below EXTRUDE_MINTEMP. Add M302 to set the minimum extrusion temperature and/or turn cold extrusion prevention on and off.

*** IT IS HIGHLY RECOMMENDED TO LEAVE THIS OPTION ENABLED! ***

◆ EXTRUDE_MINTEMP

#define EXTRUDE_MINTEMP   170

◆ PREVENT_LENGTHY_EXTRUDE

#define PREVENT_LENGTHY_EXTRUDE

Prevent a single extrusion longer than EXTRUDE_MAXLENGTH. Note: For Bowden Extruders make this large enough to allow load/unload.

◆ EXTRUDE_MAXLENGTH

#define EXTRUDE_MAXLENGTH   200

◆ THERMAL_PROTECTION_HOTENDS

#define THERMAL_PROTECTION_HOTENDS

Thermal Protection provides additional protection to your printer from damage and fire. Marlin always includes safe min and max temperature ranges which protect against a broken or disconnected thermistor wire.

The issue: If a thermistor falls out, it will report the much lower temperature of the air in the room, and the the firmware will keep the heater on.

If you get "Thermal Runaway" or "Heating failed" errors the details can be tuned in Configuration_adv.h

◆ THERMAL_PROTECTION_BED

#define THERMAL_PROTECTION_BED

◆ THERMAL_PROTECTION_CHAMBER

#define THERMAL_PROTECTION_CHAMBER

◆ USE_XMIN_PLUG

#define USE_XMIN_PLUG

◆ USE_YMIN_PLUG

#define USE_YMIN_PLUG

◆ USE_ZMIN_PLUG

#define USE_ZMIN_PLUG

◆ ENDSTOPPULLUPS

#define ENDSTOPPULLUPS

◆ X_MIN_ENDSTOP_INVERTING

#define X_MIN_ENDSTOP_INVERTING   false

◆ Y_MIN_ENDSTOP_INVERTING

#define Y_MIN_ENDSTOP_INVERTING   false

◆ Z_MIN_ENDSTOP_INVERTING

#define Z_MIN_ENDSTOP_INVERTING   false

◆ X_MAX_ENDSTOP_INVERTING

#define X_MAX_ENDSTOP_INVERTING   false

◆ Y_MAX_ENDSTOP_INVERTING

#define Y_MAX_ENDSTOP_INVERTING   false

◆ Z_MAX_ENDSTOP_INVERTING

#define Z_MAX_ENDSTOP_INVERTING   false

◆ Z_MIN_PROBE_ENDSTOP_INVERTING

#define Z_MIN_PROBE_ENDSTOP_INVERTING   false

◆ DEFAULT_AXIS_STEPS_PER_UNIT

#define DEFAULT_AXIS_STEPS_PER_UNIT   { 80, 80, 4000, 500 }

Stepper Drivers

These settings allow Marlin to tune stepper driver timing and enable advanced options for stepper drivers that support them. You may also override timing options in Configuration_adv.h.

A4988 is assumed for unspecified drivers.

Options: A4988, A5984, DRV8825, LV8729, L6470, TB6560, TB6600, TMC2100, TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE, TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE, TMC26X, TMC26X_STANDALONE, TMC2660, TMC2660_STANDALONE, TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE'] Endstop Noise Threshold

Enable if your probe or endstops falsely trigger due to noise.

  • Higher values may affect repeatability or accuracy of some bed probes.
  • To fix noise install a 100nF ceramic capacitor inline with the switch.
  • This feature is not required for common micro-switches mounted on PCBs based on the Makerbot design, which already have the 100nF capacitor.

:[2,3,4,5,6,7] Default Settings

These settings can be reset by M502

Note that if EEPROM is enabled, saved values will override these. With this option each E stepper can have its own factors for the following movement settings. If fewer factors are given than the total number of extruders, the last value applies to the rest. Default Axis Steps Per Unit (steps/mm) Override with M92 X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]

◆ DEFAULT_MAX_FEEDRATE

#define DEFAULT_MAX_FEEDRATE   { 300, 300, 5, 25 }

Default Max Feed Rate (mm/s) Override with M203 X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]

◆ DEFAULT_MAX_ACCELERATION

#define DEFAULT_MAX_ACCELERATION   { 3000, 3000, 100, 10000 }

Default Max Acceleration (change/s) change = mm/s (Maximum start speed for accelerated moves) Override with M201 X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]

◆ DEFAULT_ACCELERATION

#define DEFAULT_ACCELERATION   3000

Default Acceleration (change/s) change = mm/s Override with M204

M204 P Acceleration M204 R Retract Acceleration M204 T Travel Acceleration

◆ DEFAULT_RETRACT_ACCELERATION

#define DEFAULT_RETRACT_ACCELERATION   3000

◆ DEFAULT_TRAVEL_ACCELERATION

#define DEFAULT_TRAVEL_ACCELERATION   3000

◆ DEFAULT_EJERK

#define DEFAULT_EJERK   5.0

Default Jerk limits (mm/s) Override with M205 X Y Z E

"Jerk" specifies the minimum speed change that requires acceleration. When changing speed and direction, if the difference is less than the value set here, it may happen instantaneously.

◆ Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN

#define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN

Junction Deviation Factor

See: https://reprap.org/forum/read.php?1,739819 http://blog.kyneticcnc.com/2018/10/computing-junction-deviation-for-marlin.html S-Curve Acceleration

This option eliminates vibration during printing by fitting a Bézier curve to move acceleration, producing much smoother direction changes.

See https://github.com/synthetos/TinyG/wiki/Jerk-Controlled-Motion-Explained Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN

Enable this option for a probe connected to the Z Min endstop pin.

◆ NOZZLE_TO_PROBE_OFFSET

#define NOZZLE_TO_PROBE_OFFSET   { 10, 10, 0 }

Z_MIN_PROBE_PIN

Define this pin if the probe is not connected to Z_MIN_PIN. If not defined the default pin for the selected MOTHERBOARD will be used. Most of the time the default is what you want.

  • The simplest option is to use a free endstop connector.
  • Use 5V for powered (usually inductive) sensors.
  • RAMPS 1.3/1.4 boards may use the 5V, GND, and Aux4->D32 pin:
    • For simple switches connect...
      • normally-closed switches to GND and D32.
      • normally-open switches to 5V and D32. Probe Type

Allen Key Probes, Servo Probes, Z-Sled Probes, FIX_MOUNTED_PROBE, etc. Activate one of these to use Auto Bed Leveling below. The "Manual Probe" provides a means to do "Auto" Bed Leveling without a probe. Use G29 repeatedly, adjusting the Z height at each point with movement commands or (with LCD_BED_LEVELING) the LCD controller. A Fix-Mounted Probe either doesn't deploy or needs manual deployment. (e.g., an inductive probe or a nozzle-based probe-switch.) Z Servo Probe, such as an endstop switch on a rotating arm. The BLTouch probe uses a Hall effect sensor and emulates a servo. Touch-MI Probe by hotends.fr

This probe is deployed and activated by moving the X-axis to a magnet at the edge of the bed. By default, the magnet is assumed to be on the left and activated by a home. If the magnet is on the right, enable and set TOUCH_MI_DEPLOY_XPOS to the deploy position.

Also requires: BABYSTEPPING, BABYSTEP_ZPROBE_OFFSET, Z_SAFE_HOMING, and a minimum Z_HOMING_HEIGHT of 10. Z Probe to nozzle (X,Y) offset, relative to (0, 0).

In the following example the X and Y offsets are both positive:

#define NOZZLE_TO_PROBE_OFFSET { 10, 10, 0 }

+– BACK —+ | | L | (+) P | R <– probe (20,20) E | | I F | (-) N (+) | G <– nozzle (10,10) T | | H | (-) | T | | O– FRONT –+ (0,0)

Specify a Probe position as { X, Y, Z }

◆ MIN_PROBE_EDGE

#define MIN_PROBE_EDGE   10

◆ XY_PROBE_SPEED

#define XY_PROBE_SPEED   8000

◆ Z_PROBE_SPEED_FAST

#define Z_PROBE_SPEED_FAST   HOMING_FEEDRATE_Z

◆ Z_PROBE_SPEED_SLOW

#define Z_PROBE_SPEED_SLOW   (Z_PROBE_SPEED_FAST / 2)

◆ Z_CLEARANCE_DEPLOY_PROBE

#define Z_CLEARANCE_DEPLOY_PROBE   10

Multiple Probing

You may get improved results by probing 2 or more times. With EXTRA_PROBING the more atypical reading(s) will be disregarded.

A total of 2 does fast/slow probes with a weighted average. A total of 3 or more adds more slow probes, taking the average. Z probes require clearance when deploying, stowing, and moving between probe points to avoid hitting the bed and other hardware. Servo-mounted probes require extra space for the arm to rotate. Inductive probes need space to keep from triggering early.

Use these settings to specify the distance (mm) to raise the probe (or lower the bed). The values set here apply over and above any (negative) probe Z Offset set with NOZZLE_TO_PROBE_OFFSET, M851, or the LCD. Only integer values >= 1 are valid here.

Example: M851 Z-5 with a CLEARANCE of 4 => 9mm from bed to nozzle. But: M851 Z+1 with a CLEARANCE of 2 => 2mm from bed to nozzle.

◆ Z_CLEARANCE_BETWEEN_PROBES

#define Z_CLEARANCE_BETWEEN_PROBES   5

◆ Z_CLEARANCE_MULTI_PROBE

#define Z_CLEARANCE_MULTI_PROBE   5

◆ Z_PROBE_LOW_POINT

#define Z_PROBE_LOW_POINT   -2

◆ Z_PROBE_OFFSET_RANGE_MIN

#define Z_PROBE_OFFSET_RANGE_MIN   -20

◆ Z_PROBE_OFFSET_RANGE_MAX

#define Z_PROBE_OFFSET_RANGE_MAX   20

◆ X_ENABLE_ON

#define X_ENABLE_ON   0

Enable one or more of the following if probing seems unreliable. Heaters and/or fans can be disabled during probing to minimize electrical noise. A delay can also be added to allow noise and vibration to settle. These options are most useful for the BLTouch probe, but may also improve readings with inductive probes and piezo sensors.

◆ Y_ENABLE_ON

#define Y_ENABLE_ON   0

◆ Z_ENABLE_ON

#define Z_ENABLE_ON   0

◆ E_ENABLE_ON

#define E_ENABLE_ON   0

◆ DISABLE_X

#define DISABLE_X   false

◆ DISABLE_Y

#define DISABLE_Y   false

◆ DISABLE_Z

#define DISABLE_Z   false

◆ DISABLE_E

#define DISABLE_E   false

◆ DISABLE_INACTIVE_EXTRUDER

#define DISABLE_INACTIVE_EXTRUDER

◆ INVERT_X_DIR

#define INVERT_X_DIR   false

◆ INVERT_Y_DIR

#define INVERT_Y_DIR   true

◆ INVERT_Z_DIR

#define INVERT_Z_DIR   false

◆ INVERT_E0_DIR

#define INVERT_E0_DIR   false

◆ INVERT_E1_DIR

#define INVERT_E1_DIR   false

◆ INVERT_E2_DIR

#define INVERT_E2_DIR   false

◆ INVERT_E3_DIR

#define INVERT_E3_DIR   false

◆ INVERT_E4_DIR

#define INVERT_E4_DIR   false

◆ INVERT_E5_DIR

#define INVERT_E5_DIR   false

◆ X_HOME_DIR

#define X_HOME_DIR   -1

◆ Y_HOME_DIR

#define Y_HOME_DIR   -1

◆ Z_HOME_DIR

#define Z_HOME_DIR   -1

◆ X_BED_SIZE

#define X_BED_SIZE   200

◆ Y_BED_SIZE

#define Y_BED_SIZE   200

◆ X_MIN_POS

#define X_MIN_POS   0

◆ Y_MIN_POS

#define Y_MIN_POS   0

◆ Z_MIN_POS

#define Z_MIN_POS   0

◆ X_MAX_POS

#define X_MAX_POS   X_BED_SIZE

◆ Y_MAX_POS

#define Y_MAX_POS   Y_BED_SIZE

◆ Z_MAX_POS

#define Z_MAX_POS   200

◆ MIN_SOFTWARE_ENDSTOPS

#define MIN_SOFTWARE_ENDSTOPS

Software Endstops

  • Prevent moves outside the set machine bounds.
  • Individual axes can be disabled, if desired.
  • X and Y only apply to Cartesian robots.
  • Use 'M211' to set software endstops on/off or report current state

◆ MAX_SOFTWARE_ENDSTOPS

#define MAX_SOFTWARE_ENDSTOPS

◆ HOMING_FEEDRATE_XY

#define HOMING_FEEDRATE_XY   (50*60)

Filament Runout Sensors Mechanical or opto endstops are used to check for the presence of filament.

RAMPS-based boards use SERVO3_PIN for the first runout sensor. For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. By default the firmware assumes HIGH=FILAMENT PRESENT. Choose one of the options below to enable G29 Bed Leveling. The parameters and behavior of G29 will change depending on your selection.

If using a Probe for Z Homing, enable Z_SAFE_HOMING also!

  • AUTO_BED_LEVELING_3POINT Probe 3 arbitrary points on the bed (that aren't collinear) You specify the XY coordinates of all 3 points. The result is a single tilted plane. Best for a flat bed.
  • AUTO_BED_LEVELING_LINEAR Probe several points in a grid. You specify the rectangle and the density of sample points. The result is a single tilted plane. Best for a flat bed.
  • AUTO_BED_LEVELING_BILINEAR Probe several points in a grid. You specify the rectangle and the density of sample points. The result is a mesh, best for large or uneven beds.
  • AUTO_BED_LEVELING_UBL (Unified Bed Leveling) A comprehensive bed leveling system combining the features and benefits of other systems. UBL also includes integrated Mesh Generation, Mesh Validation and Mesh Editing systems.
  • MESH_BED_LEVELING Probe a grid manually The result is a mesh, suitable for large or uneven beds. (See BILINEAR.) For machines without a probe, Mesh Bed Leveling provides a method to perform leveling in steps so you can manually adjust the Z height at each grid-point. With an LCD controller the process is guided step-by-step. Normally G28 leaves leveling disabled on completion. Enable this option to have G28 restore the prior leveling state. Enable detailed logging of G28, G29, M48, etc. Turn on with the command 'M111 S32'. NOTE: Requires a lot of PROGMEM! Add a bed leveling sub-menu for ABL or MBL. Include a guided procedure if manual probing is enabled. Commands to execute at the end of G29 probing. Useful to retract or move the Z probe out of the way.

◆ HOMING_FEEDRATE_Z

#define HOMING_FEEDRATE_Z   (4*60)

◆ VALIDATE_HOMING_ENDSTOPS

#define VALIDATE_HOMING_ENDSTOPS

◆ EEPROM_CHITCHAT

#define EEPROM_CHITCHAT

Bed Skew Compensation

This feature corrects for misalignment in the XYZ axes.

Take the following steps to get the bed skew in the XY plane:

  1. Print a test square (e.g., https://www.thingiverse.com/thing:2563185)
  2. For XY_DIAG_AC measure the diagonal A to C
  3. For XY_DIAG_BD measure the diagonal B to D
  4. For XY_SIDE_AD measure the edge A to D

Marlin automatically computes skew factors from these measurements. Skew factors may also be computed and set manually:

  • Compute AB : SQRT(2*AC*AC+2*BD*BD-4*AD*AD)/2
  • XY_SKEW_FACTOR : TAN(PI/2-ACOS((AC*AC-AB*AB-AD*AD)/(2*AB*AD)))

If desired, follow the same procedure for XZ and YZ. Use these diagrams for reference:

Y Z Z ^ B----—C ^ B----—C ^ B----—C | / / | / / | / / | / / | / / | / / | A----—D | A----—D | A----—D +-----------—>X +-----------—>X +-----------—>Y XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR EEPROM

Persistent storage to preserve configurable settings across reboots.

M500 - Store settings to EEPROM. M501 - Read settings from EEPROM. (i.e., Throw away unsaved changes) M502 - Revert settings to "factory" defaults. (Follow with M500 to init the EEPROM.)

◆ HOST_KEEPALIVE_FEATURE

#define HOST_KEEPALIVE_FEATURE

◆ DEFAULT_KEEPALIVE_INTERVAL

#define DEFAULT_KEEPALIVE_INTERVAL   2

◆ BUSY_WHILE_HEATING

#define BUSY_WHILE_HEATING

◆ PREHEAT_1_LABEL

#define PREHEAT_1_LABEL   "PLA"

◆ PREHEAT_1_TEMP_HOTEND

#define PREHEAT_1_TEMP_HOTEND   180

◆ PREHEAT_1_TEMP_BED

#define PREHEAT_1_TEMP_BED   70

◆ PREHEAT_1_FAN_SPEED

#define PREHEAT_1_FAN_SPEED   0

◆ PREHEAT_2_LABEL

#define PREHEAT_2_LABEL   "ABS"

◆ PREHEAT_2_TEMP_HOTEND

#define PREHEAT_2_TEMP_HOTEND   240

◆ PREHEAT_2_TEMP_BED

#define PREHEAT_2_TEMP_BED   110

◆ PREHEAT_2_FAN_SPEED

#define PREHEAT_2_FAN_SPEED   0

◆ PRINTJOB_TIMER_AUTOSTART

#define PRINTJOB_TIMER_AUTOSTART

Nozzle Park

Park the nozzle at the given XYZ position on idle or G27.

The "P" parameter controls the action applied to the Z axis:

P0 (Default) If Z is below park Z raise the nozzle. P1 Raise the nozzle always to Z-park height. P2 Raise the nozzle by Z-park amount, limited to Z_MAX_POS. Clean Nozzle Feature – EXPERIMENTAL

Adds the G12 command to perform a nozzle cleaning process.

Parameters: P Pattern S Strokes / Repetitions T Triangles (P1 only)

Patterns: P0 Straight line (default). This process requires a sponge type material at a fixed bed location. "S" specifies strokes (i.e. back-forth motions) between the start / end points.

P1 Zig-zag pattern between (X0, Y0) and (X1, Y1), "T" specifies the number of zig-zag triangles to do. "S" defines the number of strokes. Zig-zags are done in whichever is the narrower dimension. For example, "G12 P1 S1 T3" will execute:


| (X0, Y1) | /\ /\ /\ | (X1, Y1) | | / \ / \ / \ | A | | / \ / \ / \ | | | / \ / \ / \ | | (X0, Y0) | / \/ \/ \ | (X1, Y0) – +-----------------------------—+ |________|_________|_________| T1 T2 T3

P2 Circular pattern with middle at NOZZLE_CLEAN_CIRCLE_MIDDLE. "R" specifies the radius. "S" specifies the stroke count. Before starting, the nozzle moves to NOZZLE_CLEAN_START_POINT.

Caveats: The ending Z should be the same as starting Z. Attention: EXPERIMENTAL. G-code arguments may change. Print Job Timer

Automatically start and stop the print job timer on M104/M109/M190.

M104 (hotend, no wait) - high temp = none, low temp = stop timer M109 (hotend, wait) - high temp = start timer, low temp = stop timer M190 (bed, wait) - high temp = start timer, low temp = none

The timer can also be controlled with the following commands:

M75 - Start the print job timer M76 - Pause the print job timer M77 - Stop the print job timer

◆ LCD_LANGUAGE

#define LCD_LANGUAGE   en

Print Counter

Track statistical data such as:

  • Total print jobs
  • Total successful print jobs
  • Total failed print jobs
  • Total time printing

View the current statistics with M78. LCD LANGUAGE

Select the language to display on the LCD. These languages are available:

en, an, bg, ca, cz, da, de, el, el_gr, es, eu, fi, fr, gl, hr, it, jp_kana, ko_KR, nl, pl, pt, pt_br, ru, sk, tr, uk, vi, zh_CN, zh_TW, test

:{ 'en':'English', 'an':'Aragonese', 'bg':'Bulgarian', 'ca':'Catalan', 'cz':'Czech', 'da':'Danish', 'de':'German', 'el':'Greek', 'el_gr':'Greek (Greece)', 'es':'Spanish', 'eu':'Basque-Euskera', 'fi':'Finnish', 'fr':'French', 'gl':'Galician', 'hr':'Croatian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ru':'Russian', 'sk':'Slovak', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)', 'test':'TEST' }

◆ DISPLAY_CHARSET_HD44780

#define DISPLAY_CHARSET_HD44780   JAPANESE

LCD Character Set

Note: This option is NOT applicable to Graphical Displays.

All character-based LCDs provide ASCII plus one of these language extensions:

  • JAPANESE ... the most common
  • WESTERN ... with more accented characters
  • CYRILLIC ... for the Russian language

To determine the language extension installed on your controller:

  • Compile and upload with LCD_LANGUAGE set to 'test'
  • Click the controller to view the LCD menu
  • The LCD will display Japanese, Western, or Cyrillic text

See http://marlinfw.org/docs/development/lcd_language.html

:['JAPANESE', 'WESTERN', 'CYRILLIC']

◆ LCD_INFO_SCREEN_STYLE

#define LCD_INFO_SCREEN_STYLE   0

Info Screen Style (0:Classic, 1:Prusa)

:[0:'Classic', 1:'Prusa']

◆ SOFT_PWM_SCALE

#define SOFT_PWM_SCALE   0

SD CARD

SD Card support is disabled by default. If your controller has an SD slot, you must uncomment the following option or it won't work. SD CARD: SPI SPEED

Enable one of the following items for a slower SPI transfer speed. This may be required to resolve "volume init" errors. SD CARD: ENABLE CRC

Use CRC checks and retries on the SD communication. LCD Menu Items

Disable all menus and only display the Status Screen, or just remove some extraneous menu items to recover space. Encoder Direction Options

Test your encoder's behavior first with both options disabled.

Reversed Value Edit and Menu Nav? Enable REVERSE_ENCODER_DIRECTION. Reversed Menu Navigation only? Enable REVERSE_MENU_DIRECTION. Reversed Value Editing only? Enable BOTH options.

◆ SERVO_DELAY

#define SERVO_DELAY   { 300 }

RGB LED / LED Strip Control

Enable support for an RGB LED connected to 5V digital pins, or an RGB Strip connected to MOSFETs controlled by digital pins.

Adds the M150 command to set the LED (or LED strip) color. If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of luminance values can be set from 0 to 255. For Neopixel LED an overall brightness parameter is also available.

*** CAUTION *** LED Strips require a MOSFET Chip between PWM lines and LEDs, as the Arduino cannot handle the current the LEDs will require. Failure to follow this precaution can destroy your Arduino! NOTE: A separate 5V power supply is required! The Neopixel LED needs more current than the Arduino 5V linear regulator can produce. *** CAUTION ***

LED Type. Enable only one of the following two options. Printer Event LEDs

During printing, the LEDs will reflect the printer status:

  • Gradually change from blue to violet as the heated bed gets to target temp
  • Gradually change from violet to red as the hotend gets to temperature
  • Change to white to illuminate work surface
  • Change to green once print has finished
  • Turn off after the print has finished and the user has pushed a button R/C SERVO support Sponsored by TrinityLabs, Reworked by codexmas Number of servos

For some servo-related options NUM_SERVOS will be set automatically. Set this manually if there are extra servos needing manual control. Leave undefined or set to 0 to entirely disable the servo subsystem.