锐单电子商城 , 一站式电子元器件采购平台!
  • 电话:400-990-0325

【3D打印机】原来配置Marlin2.0这么简单,别说我没告诉你。

时间:2023-08-11 18:07:01 fotek电感式pm12

``

有些参数可能不会出现在文章中,因为每个人的打印机风格不同,但只要你完全阅读这个指南,你就能理解Marlin我相信在此基础上,在固件中找到哪些不同的配置并不难。

本文的最终目标是让你学会自己配置Marlin,消除恐惧,而不是依赖导游。

配置从头开始 Marlin 2.0.x
我强烈建议您在设置时遵循本文的顺序。原因是当您编辑固件时,参数会以相同的顺序找到。这样,您就不会在配置过程中留下隐患。

最重要的是消除你对马林鱼的恐惧。如果这篇文章对你有帮助,它已经实现了它的目标。了解马林,你会了解和享受更多3D令人兴奋的世界,所有的可能性。

从marlin2.只有经验丰富的程序员才能做到固件开始适应自己的打印机似乎是一个挑战。但相信我,这种说法离事实很远。

有一点耐心和一个好的文本编辑器(和编程知识),我们可以在任何基础上配置任何东西arduino打印机和最新的固件版本没有问题。

事实上,Marlin它由许多文件组成,但我们最多只需要修改一两个文件来编译工作固件,然后上传到我们的打印机上。当然,你可以随意定制Marlin 但是我们已经需要修改相当多的文件,我们现在不会提及这些文件,或者以后再做。

你可能想知道为什么你需要学习配置Marlin 2.0.x。答案多种多样,但最令人信服的是,它为我们提供了安全性和性能改进。当然,它也纠正了以前版本中可能出现的错误。

然而,我不否认在配置和编译过程中可能会出现难以解决的错误或问题。但有了百度和一点耐心,我们不应该有太多的麻烦。DIY玩家,遇到问题就解决问题。

本手册配置Marlin 2.0.x,正如我上面提到的,我们将使用一台定制打印机作为一个例子,我在一段时间前设计和建造了它。你可以看到我做了什么,然后把它应用到你自己的机器上。我们将打开文件并按顺序(从文件开始到结束)更改参数。

请记住,配置Marlin 2.0.您需要提前了解机器的所有技术特性和组件。如挤出机类型、打印体积、热敏电阻等。因此,我们应该提前收集所有这些信息,然后立即开始。

正如我前面提到的,在配置中Marlin 2.0.x管理一切的主要文件有两个,一个是基本配置Configuration.h文件,另一个是高级配置Configuration_adv.h文件,对于一个DIY对于爱好者来说,他们基本上只需要配置这两个参数来实现自己的3D定制打印机。

注:配置文件包括主要硬件、语言和驱动程序设置,以及打印机最常见的功能和组件设置。在白色中,您可以看到我激活的选项(或默认激活的选项)和未激活的选项在深灰色中。为了激活一个选项,我们只需要消除参数前的两个栏//。

接下来,我将一步一步地带领你适应你的打印机marlin2.0的版本。

选择串口

#define SERIAL_PORT 0 

只需打开默认arduino连接串口

通信速度(波特率)

#define BAUDRATE 250000 

我们将计算机连接到打印机的速度,默认值为2.5万,因此我们将保持此速度。

如果您偶尔与打印机有通信问题,您可以降低此参数的速度,并尝试解决它。

主板或电子产品(主板)

#ifndef MOTHERBOARD  #define MOTHERBOARD BOARD_RAMPS_14_EFB #endif 

非常重要的参数。在这里,我们将选择我们已经安装在3中D打印机的电子设备。由于有很多电子产品可供选择,我们必须找出哪一种是我们的,并把它的价值放在这里。

您在文件“boards.h有一个可兼容的电子产品列表。Marlin固件的以下路径:\Marlin\src\core\boards.h

在我的例子中,我的3D使用打印机RAMPS_14_EFB电子板。对此,我必须写BOARD_RAMPS_14_EFB就像你在例子中看到的那样。配置自己的。

您的机器名称(CUSTOM_MACHINE_NAME)

#define CUSTOM_MACHINE_NAME "3D Printer"   

这很简单,就是你想要新配置的打印机的名字。默认情况下,你会注意到它是禁止的,所以这两个栏出现在#define前面的" // "。

我们将删除这两根杆,并留下这样的配置

挤出机数量(挤出机)

#define EXTRUDERS 1 

在这里,我们将配置挤出机的数量,我们的3D有打印机。默认情况下,初始值为1,因为大部分都有挤出机。如果没有,请输入正确的挤出机数量。

线材的直径 (DEFAULT_NOMINAL_FILAMENT_DIA)

#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75 

本节将选择打印机使用的直径类型。默认为1.虽然大多数打印机现在都在15岁.75直径。但如果我们使用不同的东西,就必须改变它,这是非常重要的。

Prusa多材料套件(PRUSA_MMU2)

//#define MMU_MODEL PRUSA_MMU2 

假如你安装了原始的Josef Prusa中国克隆的多材料工具包或其他工具包,然后打开它,否则保持关闭。

标题温度传感器(TEMP_SENSORS)

在这部分Marlin我们将定义固件3D打印机中现有的温度传感器。在最新版本2.0.8.2.增加了对更多挤出机的支持(共支持11个传感器),包括一个用于腔室温度的传感器。正如你所看到的,有很多这样的传感器,代码本身有一个列表。如果您对您的打印机没有任何信息,请尝试咨询谷歌,因为它可能由其他使用相同打印机的用户记录。

只有在缺TEMP_SENSOR_0的值是1。在我的例子中,我必须把值5放在这里。因为我也有一张加热床来提高印刷过程中的附着力,避免扭曲,我设置了它TEMP_SENSOR_BED值1。剩下的0,因为我在这台打印机里没有更多的挤出机或封闭的房间。

#define TEMP_SENSOR_0 5 #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_6 0 #define TEMP_SENSOR_7 0 #define TEMP_SENSOR_BED 1 #define TEMP_SENSOR_PROBE 0 #define TEMP_SENSOR_CHAMBER 0 #define TEMP_SENSOR_COOLER 0 

标题温度限制器(MINTEMP & MAXTEMP)

在Marlin 2中配置这些参数是非常重要的,因为它们控制我们打印机的最高和最低温度。

我们将定义每个可用传感器必须在哪个范围内。这样,如果任何传感器没有达到或超过这个温度,Marlin显示屏上会出错并关闭Hotend和加热床。

在我的情况下,我通常将挤出温度设置为5度(最低)和265度(最高)。如果挤出机或床没有达到5度o我们将推断热敏电阻没有正确安装或物理损坏。同样,当事故超过最高温度时,它也会保护我们,这对我们和我们家的安全至关重要。

// Below this temperature the heater will be switched off // because it probably indicates a broken thermistor wire. #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 HEATER_6_MINTEMP   5 #define HEATER_7_MINTEMP   5 #define BED_MINTEMP       5 #define CHAMBER_MINTEMP   5  // Above this temperature the heater will be switched off. // This can protect components from overheating, but NOT from shorts and failures. // (Use MINTEMP for thermistor short/failure protection.) #define HEATER_0_MAXTEMP 265 #define HEATER_1_MAXTEMP 265 #define HEATER_2_MAXTEM 265
#define HEATER_3_MAXTEMP 265
#define HEATER_4_MAXTEMP 265
#define HEATER_5_MAXTEMP 265
#define HEATER_6_MAXTEMP 265
#define HEATER_7_MAXTEMP 265
#define BED_MAXTEMP     150
#define CHAMBER_MAXTEMP 60

标题PID调优(挤出机)

#if ENABLED(PIDTEMP)
 //#define PID_EDIT_MENU         // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
 //#define PID_AUTOTUNE_MENU     // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
 //#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
                                 // Set/get with gcode: M301 E[extruder number, 0-2]

 #if ENABLED(PID_PARAMS_PER_HOTEND)
   // Specify between 1 and HOTENDS values per array.
   // If fewer than EXTRUDER values are provided, the last element will be repeated.
   #define DEFAULT_Kp_LIST { 22.20, 22.20 }
   #define DEFAULT_Ki_LIST {   1.08,   1.08 }
   #define DEFAULT_Kd_LIST { 114.00, 114.00 }
 #else
   #define DEFAULT_Kp 20.3    // Values that I added !!
   #define DEFAULT_Ki 1.43    // Values that I added !!
   #define DEFAULT_Kd 71.84   // Values that I added !!
 #endif
#endif // PIDTEMP

控制控制控制挤出机和加热床温度的算法设置的部分。

我们可以更详细地讨论它是如何工作的,但这不是正确的文章。如果您有兴趣了解更多关于PID调优的知识,我建议您查看REPRAP上关于PID调优的以下文章。

默认情况下,市场上一些最知名的打印机的一些值已经预先确定。由于我的打印机不符合描述,我只是添加了我自己的值。

要从打印机获取值,您可以在Internet上查询这些值,也可以使用一个名为PID Autotune的内部马林函数自己生成这些值。

要做到这一点,将您的打印机连接到Repetier/Simplify3D或任何其他软件,允许您使用Gcode命令。一旦连接上,发送命令M303 E0 S200 C8,这个过程就会开始。

加热冷却8次后,加热结束,显示如下信息。你只需要取Kp、Ki和Kd的值,并在DEFAULT_Kp、DEFAULT_Ki和DEFAULT_Kd字段中输入它们。

bias: 92 d: 92 min: 196.56 max: 203.75
Ku: 32.59 Tu: 54.92
Clasic PID
Kp: 19.56
Ki: 0.71
Kd: 134.26
PID Autotune finished ! Place the Kp, Ki and Kd constants in the configuration.h

PID床整定(热床)

和以前一样,只是我们的加热床。在新固件中,默认情况下它将被禁用。如果您有一个加热床,您必须取消注释#define PIDTEMPBED选项,正如您将在我的配置中看到的那样。

您还可以运行另一个内部马林函数来获得您的床的最佳值。这是通过Gcode命令M303 E-1 C8 S90完成的。

//===========================================================================
//====================== PID > Bed Temperature Control ======================
//===========================================================================

/**
* 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.
*/
#define PIDTEMPBED

//#define BED_LIMIT_SWITCHING

/**
* 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)
*/
#define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current

if ENABLED(PIDTEMPBED)
 //#define MIN_BED_POWER 0
 //#define PID_BED_DEBUG // Sends debug data to the serial port.

 //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
 //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10)
 #define DEFAULT_bedKp 347.77
 #define DEFAULT_bedKi 48.46
 #define DEFAULT_bedKd 623.90

 //120V 250W silicone heater into 4mm borosilicate (MendelMax 1.5+)
 //from pidautotune
 //#define DEFAULT_bedKp 97.1
 //#define DEFAULT_bedKi 1.41
 //#define DEFAULT_bedKd 1675.16

 // FIND YOUR OWN: "M303 E-1 C8 S90" to run autotune on the bed at 90 degreesC for 8 cycles.
#endif // PIDTEMPBED

然而,有时激活PIDTEMPBED参数比不激活它更具破坏性。我建议您不要从一开始就启用它。

冷挤压(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! ***
*/
#define PREVENT_COLD_EXTRUSION
#define EXTRUDE_MINTEMP 170

这两个功能都管理马林的冷挤压。我们都知道,如果我们的喷头没有打开,是不建议挤出灯丝的。

PREVENT_COLD_EXTRUSION选项,它将直接防止我们挤压材料,如果我们的加热器没有达到定义的最低温度。

我们可以通过EXTRUDE_MINTEMP参数来配置允许马林挤出灯丝的最低温度。默认情况下两者都是活动的,所以您不必担心。

然而,我认为给它命名是很重要的,这样你就能证明它的存在。

挤出长度(prevent_length_extrude)

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

如注释中所示,它可以防止灯丝挤出的距离大于我们所配置的距离。这意味着Marlin将只允许你在一个单一的GCODE命令挤压最大200mm。如果您想在一个命令中挤出超过200mm的材料,例如使用Bowden从显示中加载灯丝的函数,您必须修改参数EXTRUDE_MAXLENGTH为一个更高的值。在Marlin 2中,两者都是默认启用的。

热保护(THERMAL_PROTECTION)

/**
* 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
*/

#define THERMAL_PROTECTION_HOTENDS // Enable thermal protection for all extruders
#define THERMAL_PROTECTION_BED     // Enable thermal protection for the heated bed
#define THERMAL_PROTECTION_CHAMBER // Enable thermal protection for the heated chamber
#define THERMAL_PROTECTION_COOLER  // Enable thermal protection for the laser cooling

这三个参数激活了马林2.0的额外热保护提供防止损坏我们的打印机。它们必须总是活跃的,事实上它们在Marlin 2中是默认的,所以我们不会以任何方式接触它们。

机械参数(COREXY运动学)

//===========================================================================
//============================= Mechanical Settings =========================
//===========================================================================

// @section machine

// Enable one of the options below for CoreXY, CoreXZ, or CoreYZ kinematics,
// either in the usual order or reversed
//#define COREXY
//#define COREXZ
//#define COREYZ
//#define COREYX
//#define COREZX
//#define COREZY
//#define MARKFORGED_XY // MarkForged. See https://reprap.org/forum/read.php?152,504042

市场上有不同运动学的打印机。例如笛卡尔运动学,delta, tripteron, corexy(及其变体)等等。事实上,我会用一篇不错的文章来讨论所有这些问题。

在这种情况下,您的3D打印机使用COREXY运动学或其任何变体,您应该激活其相应的参数。因为我用了笛卡尔运动学,所以我把所有的东西都去掉了

标题激活限位开关(USE_XMIN_PLUG & USE_XMAX_PLUG)

// Specify here all the endstop connectors that are connected to any endstop or probe.
// Almost all printers will be using one per axis. Probes will use one or more of the
// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
#define USE_XMIN_PLUG
#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
//#define USE_XMAX_PLUG
//#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG

在本节中,我们将向我们的Marlin固件指出我们已经连接到主板的限制开关。最常见的是使用3个限位开关来指示最小行程(或停止)。

通过这种方式,马林确定了归航时在所有轴上的初始位置(0)。还可以安装额外的传感器来确定最大行程。它们将用于防止机器超出严格必要的范围。它们不是必需的,但它们是控制所有未预见到的事情的好选择。

在我的特殊情况下,我在X轴(挤出机)和Y轴(床)上有两个机械限位开关。我也有一个水平传感器在Z,所以我只留下3个最小限制开关激活,你可以看到自己在下面的行。

限位开关触发高低电平(ENDSTOP_INVERTING)

// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING true // Set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING false // Set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING false // Set to true to invert the logic of the probe.

根据我们使用的传感器或限位开关的类型,它们将有不同的逻辑。它没有更大的神秘性,只是把它们都留在FALSE中,如果其中一个对您不起作用,在这里更改逻辑(您指示TRUE)。

驱动程序配置(DRIVER_TYPE)

/**
* 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, L6474, POWERSTEP01,
*         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', 'L6474', 'POWERSTEP01', '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']
*/
#define X_DRIVER_TYPE DRV8825
#define Y_DRIVER_TYPE DRV8825
#define Z_DRIVER_TYPE DRV8825
//#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988
//#define Z2_DRIVER_TYPE A4988
//#define Z3_DRIVER_TYPE A4988
#define E0_DRIVER_TYPE DRV8825
//#define E1_DRIVER_TYPE A4988
//#define E2_DRIVER_TYPE A4988
//#define E3_DRIVER_TYPE A4988
//#define E4_DRIVER_TYPE A4988
//#define E5_DRIVER_TYPE A4988
//#define E6_DRIVER_TYPE A4988
//#define E7_DRIVER_TYPE A4988

使用我们现有的驱动程序配置Marlin 2固件是非常重要的。但是不用担心,这是一个很简单的过程。

默认情况下,你会看到所有的选项都是禁用的,所以你必须启用你将要使用的选项,这将是你在你的板上安装驱动程序的地方。

在我的打印机我有3个马达在3个轴(X, Y, Z),和一个单一的马达为挤出机。所以我启用了必要的选项。如您所见,第一个挤出机总是命名为E0。

但我们不仅必须启用这个选项,还必须指出你已经安装在电子设备上的驱动程序。因为我有DRV8825,我已经将它指示给编译器,仅此而已。

在评论中,你可以看到马林2中可用的所有类型的驱动程序,所以找到你的并将其记录下来。

电机步骤配置(DEFAULT_AXIS_STEPS_PER_UNIT)

/**
``* Default Axis Steps Per Unit (steps/mm)
``* Override with M92
``*                   X, Y, Z, E0 [, E1[, E2...]]
``*/
#define DEFAULT_AXIS_STEPS_PER_UNIT { 160, 160, 800, 803 }

在本节中,我们将告诉打印机每个运动单元将执行多少步。单位可以定义为毫米或英寸。

如果使用英寸,必须激活INCH_MODE_SUPPORT参数。我们不打算激活该参数,因为我们通常使用毫米,在这一节中,我们将介绍我们的步骤为每个轴和挤出机。

您首先需要知道要输入的值,因此我建议您从您的打印机已经可用的一些固件中提取它们(为了安全)。

另一种选择是在互联网上从其他用户那里搜索,浏览论坛,咨询制造商,或者作为最后一种选择,自己计算,就像你在这个视频中看到的那样。

https://www.youtube.com/watch?v=VIHgDiCCY0Y

自动调平传感器位置(NOZZLE_TO_PROBE_OFFSET)

/**
* Nozzle-to-Probe offsets { X, Y, Z }
*
* - Use a caliper or ruler to measure the distance from the tip of
*   the Nozzle to the center-point of the Probe in the X and Y axes.
* - For the Z offset use your best known value and adjust at runtime.
* - Probe Offsets can be tuned at runtime with 'M851', LCD menus, babystepping, etc.
*
* Assuming the typical work area orientation:
* - Probe to RIGHT of the Nozzle has a Positive X offset
* - Probe to LEFT of the Nozzle has a Negative X offset
* - Probe in BACK of the Nozzle has a Positive Y offset
* - Probe in FRONT of the Nozzle has a Negative Y offset
*
* Some examples:
*   #define NOZZLE_TO_PROBE_OFFSET { 10, 10, -1 }   // Example "1"
*   #define NOZZLE_TO_PROBE_OFFSET {-10, 5, -1 }   // Example "2"
*   #define NOZZLE_TO_PROBE_OFFSET { 5, -5, -1 }   // Example "3"
*   #define NOZZLE_TO_PROBE_OFFSET {-15,-10, -1 }   // Example "4"
*
*     +-- BACK ---+
*     |   [+]   |
*   L |       1 | R <-- Example "1" (right+, back+)
*   E | 2       | I <-- Example "2" ( left-, back+)
*   F |[-] N [+]| G <-- Nozzle
*   T |       3   | H <-- Example "3" (right+, front-)
*     | 4         | T <-- Example "4" ( left-, front-)
*     |   [-]   |
*     O-- FRONT --+
*/
#define NOZZLE_TO_PROBE_OFFSET { 37, 2, 0 }

在使用自动调平传感器的情况下(就像我的情况一样),必须表明其相对于喷嘴到Marlin的位置。这是分开的,我们将它定义为坐标,单位是毫米。我的液位传感器位于喷嘴右侧37mm处,在它后面2mm处,所以下面的配置将保持不变

调平速度(XY_PROBE_FEEDRATE)

// X and Y axis travel speed (mm/min) between probes
#define XY_PROBE_FEEDRATE (133*60)

此参数定义了当自动液位传感器在2个测量点之间移动时,马林2将使用的速度。它的默认尺寸是133 * 60mm /min,你可以自行决定是否上传。

电机反转方向(INVERT_X_DIR)

// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false
#define INVERT_Y_DIR true
#define INVERT_Z_DIR false

我们将修改这些参数,如果做一个家或当打印任何部分与我们的打印机,任何马达在错误的方向。默认情况下,它们都配置了FALSE选项,但在我的情况下,我必须反转我的床(Y轴)的方向,如下所示。

然而,另一种选择是将电机连接电缆倒置,这样就可以为您选择更舒适的解决方案。

打印体积(X_BED_SIZE & Y_BED_SIZE)

// The size of the printable area
#define X_BED_SIZE 210
#define Y_BED_SIZE 210

我们将在这里确定您的加热床的确切尺寸。我的打印机有一个210x210mm的水平床,所以它会这样配置

移动限制(MIN_POS &MAN_POS)

// Travel limits (mm) after homing, corresponding to endstop positions.
#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 205

一旦我们的打印基地(Heatbed)的大小被定义,我们必须配置Marlin 2的最小和最大移动限制。默认情况下,Marlin的最小值配置为0,我们不应该修改这个值,因为它是HOME。对于最大限制,Marlin在X和Y中直接使用我们的Heatbed的当前尺寸,这是我们在之前的参数中保留的配置。完成配置,在Z轴上,我们必须添加的测量是您的3D打印机的最大打印高度。在我的特殊情况下,我可以打印大约205,所以我输入它的值。

移动限制(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
*/

// Min software endstops constrain movement within minimum coordinate bounds
#define MIN_SOFTWARE_ENDSTOPS
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
 #define MIN_SOFTWARE_ENDSTOP_X
 #define MIN_SOFTWARE_ENDSTOP_Y
 #define MIN_SOFTWARE_ENDSTOP_Z
#endif

// Max software endstops constrain movement within maximum coordinate bounds
#define MAX_SOFTWARE_ENDSTOPS
#if ENABLED(MAX_SOFTWARE_ENDSTOPS)
 #define MAX_SOFTWARE_ENDSTOP_X
 #define MAX_SOFTWARE_ENDSTOP_Y
 #define MAX_SOFTWARE_ENDSTOP_Z
#endif

#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
 //#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
#endif

出于安全原因,并避免损坏我们的打印机组件,缺省情况下,Marlin 2被配置为不能超过最小限制。这意味着当到达限位开关或传感器时,即使手动也不会让发动机进一步前进。然而,就像马林2.0中的许多其他东西一样。

如果您愿意,可以禁用该限制。这是一个我不推荐的选择,但我想评论它的存在。我个人通常去掉Z轴上的极限。但正如我所告诉您的,除非这是必要的,或者您非常清楚自己在做什么,否则您必须保留固件所带来的默认值。

使用“M211”设置软件结束端开/关或报告当前状态

eepm存储(EEPROM_SETTINGS)

#define EEPROM_SETTINGS     // Persistent storage with M500 and M501

Marlin为我们提供了从显示器本身更改打印机配置的可能性,然后将更改保存在Eeprom中。

如果我们想要激活这种可能性,我们必须在固件中激活这个参数。

预热ABS / PLA(预热)

//
// Preheat Constants - Up to 5 are supported without changes
//
#define PREHEAT_1_LABEL       "PLA"
#define PREHEAT_1_TEMP_HOTEND 180
#define PREHEAT_1_TEMP_BED     70
#define PREHEAT_1_TEMP_CHAMBER 35
#define PREHEAT_1_FAN_SPEED     0 // Value from 0 to 255

#define PREHEAT_2_LABEL       "ABS"
#define PREHEAT_2_TEMP_HOTEND 240
#define PREHEAT_2_TEMP_BED   110
#define PREHEAT_2_TEMP_CHAMBER 35
#define PREHEAT_2_FAN_SPEED     0 // Value from 0 to 255

如您所见,如果您已经打乱了您的打印机,马林为您提供了两个初始选项,以在打印之前预热打印机。你可以设定ABS和PLA灯丝的温度,尽管你可以添加更多如果你想。这是非常有用的,因为固件中默认的那些可以改进。我个人不做这些设置

菜单语言(LCD_LANGUAGE)

* 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, hu, it,
*   jp_kana, ko_KR, nl, pl, pt, pt_br, ro, ru, sk, sv, tr, uk, vi, zh_CN, zh_TW
*
* :{ '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', 'hu':'Hungarian', 'it':'Italian', 'jp_kana':'Japanese', 'ko_KR':'Korean (South Korea)', 'nl':'Dutch', 'pl':'Polish', 'pt':'Portuguese', 'pt_br':'Portuguese (Brazilian)', 'ro':'Romanian', 'ru':'Russian', 'sk':'Slovak', 'sv':'Swedish', 'tr':'Turkish', 'uk':'Ukrainian', 'vi':'Vietnamese', 'zh_CN':'Chinese (Simplified)', 'zh_TW':'Chinese (Traditional)' }
*/
#define LCD_LANGUAGE en

将出现在每个马林2固件菜单中的语言(显示)。

默认是英文的,也可以在这里选择你需要的。

SD卡支持(SDSUPPORT)

/**
* 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.
*/
#define SDSUPPORT

很可能,激活这个选项是必要的。它允许您使用SDCard加载STL文件。

信不信由你,它在我们的马林固件中是默认禁用的。您将需要激活它,就像我在我的固件中所做的那样。

简化菜单(SLIM_LCD_MENUS)

/**
* LCD Menu Items
*
* Disable all menus and only display the Status Screen, or
* just remove some extraneous menu items to recover space.
*/
//#define NO_LCD_MENUS
#define SLIM_LCD_MENUS

Marlin提供了从其显示中导航无数菜单的能力,这一点让人不知所措(至少对我来说)。顺便说一下,这些参数中的许多应该在固件中预先配置,而不必在动态中修改它们。为了减少这些菜单的数量,Marlin提供了使用SLIM_LCD_MENUS参数简化它们的选项。它不仅可以简化菜单,还可以节省不少内存。我建议您激活这个选项。

显示类型(LCD /控制器选择)

// RepRapDiscount Smart Controller.
// https://reprap.org/wiki/RepRapDiscount_Smart_Controller
//
// Note: Usually sold with a white PCB.
//
#define REPRAP_DISCOUNT_SMART_CONTROLLER

最后,我们到达了显示设置。如果我们仔细查看Configuration.h文件,就会发现有无数的显示。

它可能看起来有点复杂,但实际上我们所要做的就是找到我们的LCD屏幕的描述并取消注释,以便配置Marlin 2。

有基于文本的显示器、图形LCD显示器、OLED显示器等等。我有一个基于图形称为REPRAP_DISCOUNT_SMART_CONTROLLER。为此,取消对下面一行的注释。

如果你找不到屏幕的名称,我建议你使用Windows的“搜索”功能,这是最快和最简单的方法。

加热床调平(BED_LEVELING)

/**
* 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.
*/
//#define AUTO_BED_LEVELING_3POINT
//#define AUTO_BED_LEVELING_LINEAR
#define AUTO_BED_LEVELING_BILINEAR
//#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING

/**
* Normally G28 leaves leveling disabled on completion. Enable
* this option to have G28 restore the prior leveling state.
*/
#define RESTORE_LEVELING_AFTER_G28

在marlin2.0中有各种各样的方法或功能来帮助我们自己调平我们的床。默认情况下,它们在固件中是不激活的,所以我们必须激活它们才能使用它们。

首先,我们必须取消AUTO_BED_LEVELING_BILINEAR函数和RESTORE_LEVELING_AFTER_G28函数的注释,以便它们在我们的固件中保持活跃。

通过这种方式,我们的传感器将在不同的点下降,并创建一个不同高度的虚拟3D网格。因为我总是喜欢把HOME放在床的中间,所以我启动了Z_SAFE_HOMING选项。

#define Z_SAFE_HOMING

#if ENABLED(Z_SAFE_HOMING)
 #define Z_SAFE_HOMING_X_POINT X_CENTER  // X point for Z homing
 #define Z_SAFE_HOMING_Y_POINT Y_CENTER  // Y point for Z homing
#endif
锐单商城拥有海量元器件数据手册IC替代型号,打造电子元器件IC百科大全!

相关文章