From a6ce18fbe02d304b2e27a13acf59955bc3e0a5a9 Mon Sep 17 00:00:00 2001 From: Jan-Gerrit Drexhage <102791900+Surion79@users.noreply.github.com> Date: Fri, 8 Mar 2024 11:52:35 +0100 Subject: [PATCH 01/24] added custom4..9 in start_print (#539) --- macros/base/start_print.cfg | 72 +++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/macros/base/start_print.cfg b/macros/base/start_print.cfg index b5f05a782..dec67f7b6 100644 --- a/macros/base/start_print.cfg +++ b/macros/base/start_print.cfg @@ -168,6 +168,18 @@ gcode: _MODULE_CUSTOM2 {rawparams} {% elif action == "custom3" %} _MODULE_CUSTOM3 {rawparams} + {% elif action == "custom4" %} + _MODULE_CUSTOM4 {rawparams} + {% elif action == "custom5" %} + _MODULE_CUSTOM5 {rawparams} + {% elif action == "custom6" %} + _MODULE_CUSTOM6 {rawparams} + {% elif action == "custom7" %} + _MODULE_CUSTOM7 {rawparams} + {% elif action == "custom8" %} + _MODULE_CUSTOM8 {rawparams} + {% elif action == "custom9" %} + _MODULE_CUSTOM9 {rawparams} {% else %} { action_raise_error("Unknown module called in START_PRINT! Please verify your startprint_actions variable override!") } {% endif %} @@ -497,3 +509,63 @@ gcode: # gcode: # ## Your custom code here + +[gcode_macro _MODULE_CUSTOM4] +gcode: + # ---- CUSTOM Macro section + # this section is reserved for personal customized start actions, which can be combined with all other start actions + # in order to use this, create a new macro in overrides.cfg + # [gcode_macro _MODULE_CUSTOM4] + # gcode: + # ## Your custom code here + + +[gcode_macro _MODULE_CUSTOM5] +gcode: + # ---- CUSTOM Macro section + # this section is reserved for personal customized start actions, which can be combined with all other start actions + # in order to use this, create a new macro in overrides.cfg + # [gcode_macro _MODULE_CUSTOM5] + # gcode: + # ## Your custom code here + + +[gcode_macro _MODULE_CUSTOM6] +gcode: + # ---- CUSTOM Macro section + # this section is reserved for personal customized start actions, which can be combined with all other start actions + # in order to use this, create a new macro in overrides.cfg + # [gcode_macro _MODULE_CUSTOM6] + # gcode: + # ## Your custom code here + + +[gcode_macro _MODULE_CUSTOM7] +gcode: + # ---- CUSTOM Macro section + # this section is reserved for personal customized start actions, which can be combined with all other start actions + # in order to use this, create a new macro in overrides.cfg + # [gcode_macro _MODULE_CUSTOM7] + # gcode: + # ## Your custom code here + + +[gcode_macro _MODULE_CUSTOM8] +gcode: + # ---- CUSTOM Macro section + # this section is reserved for personal customized start actions, which can be combined with all other start actions + # in order to use this, create a new macro in overrides.cfg + # [gcode_macro _MODULE_CUSTOM8] + # gcode: + # ## Your custom code here + + +[gcode_macro _MODULE_CUSTOM9] +gcode: + # ---- CUSTOM Macro section + # this section is reserved for personal customized start actions, which can be combined with all other start actions + # in order to use this, create a new macro in overrides.cfg + # [gcode_macro _MODULE_CUSTOM8] + # gcode: + # ## Your custom code here + From 136faca1146de618bbc36da5c0023c51cd77758b Mon Sep 17 00:00:00 2001 From: Jan-Gerrit Drexhage <102791900+Surion79@users.noreply.github.com> Date: Wed, 13 Mar 2024 09:57:06 +0100 Subject: [PATCH 02/24] updated beeper sections (#549) by switching to pwm_cycle_time instead of output pin --- config/hardware/displays/BTT_mini12864.cfg | 6 +++++- config/hardware/displays/BTT_mini12864_inversed.cfg | 6 +++++- config/hardware/displays/Fysetc_mini12864.cfg | 6 +++++- config/hardware/displays/Fysetc_mini12864_inversed.cfg | 6 +++++- config/hardware/displays/Fysetc_mini12864_v1.2_v2.0.cfg | 6 +++++- .../displays/Fysetc_mini12864_v1.2_v2.0_inversed.cfg | 6 +++++- 6 files changed, 30 insertions(+), 6 deletions(-) diff --git a/config/hardware/displays/BTT_mini12864.cfg b/config/hardware/displays/BTT_mini12864.cfg index 17be931f3..c8c2a2e14 100644 --- a/config/hardware/displays/BTT_mini12864.cfg +++ b/config/hardware/displays/BTT_mini12864.cfg @@ -27,8 +27,12 @@ spi_software_miso_pin: EXP2_1 spi_software_mosi_pin: EXP2_6 spi_software_sclk_pin: EXP2_2 -[output_pin beeper] +[pwm_cycle_time beeper] pin: EXP1_1 +value: 0 +shutdown_value: 0 +cycle_time: 0.0005 +scale: 1 [neopixel btt_mini12864] # To control Neopixel RGB in mini12864 display diff --git a/config/hardware/displays/BTT_mini12864_inversed.cfg b/config/hardware/displays/BTT_mini12864_inversed.cfg index e85610c48..a4968a4e1 100644 --- a/config/hardware/displays/BTT_mini12864_inversed.cfg +++ b/config/hardware/displays/BTT_mini12864_inversed.cfg @@ -27,8 +27,12 @@ spi_software_miso_pin: EXP2_10 spi_software_mosi_pin: EXP2_5 spi_software_sclk_pin: EXP2_9 -[output_pin beeper] +[pwm_cycle_time beeper] pin: EXP1_10 +value: 0 +shutdown_value: 0 +cycle_time: 0.0005 +scale: 1 [neopixel btt_mini12864] # To control Neopixel RGB in mini12864 display diff --git a/config/hardware/displays/Fysetc_mini12864.cfg b/config/hardware/displays/Fysetc_mini12864.cfg index fa295ecef..e6bc650d0 100644 --- a/config/hardware/displays/Fysetc_mini12864.cfg +++ b/config/hardware/displays/Fysetc_mini12864.cfg @@ -27,8 +27,12 @@ spi_software_miso_pin: EXP2_10 spi_software_mosi_pin: EXP2_5 spi_software_sclk_pin: EXP2_9 -[output_pin beeper] +[pwm_cycle_time beeper] pin: EXP1_10 +value: 0 +shutdown_value: 0 +cycle_time: 0.0005 +scale: 1 [neopixel fysetc_mini12864] # To control Neopixel RGB in mini12864 display diff --git a/config/hardware/displays/Fysetc_mini12864_inversed.cfg b/config/hardware/displays/Fysetc_mini12864_inversed.cfg index 9aaafe815..e434a056e 100644 --- a/config/hardware/displays/Fysetc_mini12864_inversed.cfg +++ b/config/hardware/displays/Fysetc_mini12864_inversed.cfg @@ -27,8 +27,12 @@ spi_software_miso_pin: EXP2_1 spi_software_mosi_pin: EXP2_6 spi_software_sclk_pin: EXP2_2 -[output_pin beeper] +[pwm_cycle_time beeper] pin: EXP1_1 +value: 0 +shutdown_value: 0 +cycle_time: 0.0005 +scale: 1 [neopixel fysetc_mini12864] # To control Neopixel RGB in mini12864 display diff --git a/config/hardware/displays/Fysetc_mini12864_v1.2_v2.0.cfg b/config/hardware/displays/Fysetc_mini12864_v1.2_v2.0.cfg index 98e25169f..5e7ff136e 100644 --- a/config/hardware/displays/Fysetc_mini12864_v1.2_v2.0.cfg +++ b/config/hardware/displays/Fysetc_mini12864_v1.2_v2.0.cfg @@ -24,8 +24,12 @@ spi_software_miso_pin: EXP2_10 spi_software_mosi_pin: EXP2_5 spi_software_sclk_pin: EXP2_9 -[output_pin beeper] +[pwm_cycle_time beeper] pin: EXP1_10 +value: 0 +shutdown_value: 0 +cycle_time: 0.0005 +scale: 1 [led fysetc_mini12864] red_pin: EXP1_5 diff --git a/config/hardware/displays/Fysetc_mini12864_v1.2_v2.0_inversed.cfg b/config/hardware/displays/Fysetc_mini12864_v1.2_v2.0_inversed.cfg index bc2fe543d..0e4dfa044 100644 --- a/config/hardware/displays/Fysetc_mini12864_v1.2_v2.0_inversed.cfg +++ b/config/hardware/displays/Fysetc_mini12864_v1.2_v2.0_inversed.cfg @@ -24,8 +24,12 @@ spi_software_miso_pin: EXP2_1 spi_software_mosi_pin: EXP2_6 spi_software_sclk_pin: EXP2_2 -[output_pin beeper] +[pwm_cycle_time beeper] pin: EXP1_1 +value: 0 +shutdown_value: 0 +cycle_time: 0.0005 +scale: 1 [led fysetc_mini12864] red_pin: EXP1_6 From 7f7d2cfeb06c5e39dfdaf74260919d94fad50c35 Mon Sep 17 00:00:00 2001 From: Colten Edwards Date: Mon, 18 Mar 2024 04:55:00 -0600 Subject: [PATCH 03/24] removed M204 in favor of SET_VELOCITY_LIMIT (#555) --- config/hardware/temperature_sensors/cabinet_temp.cfg | 2 +- config/hardware/temperature_sensors/rpi_temp.cfg | 2 +- config/kinematics/cartesian.cfg | 1 + config/kinematics/corexy.cfg | 1 + config/kinematics/corexz.cfg | 1 + macros/base/homing/homing_override.cfg | 5 ++--- macros/base/probing/dockable_probe.cfg | 10 ++++------ macros/base/probing/overrides/qgl.cfg | 3 +-- macros/base/probing/overrides/z_tilt.cfg | 5 ++--- macros/calibration/test_speed.cfg | 6 +++--- macros/helpers/nozzle_cleaning.cfg | 3 +-- macros/miscs/compatibility.cfg | 6 ++---- user_templates/variables.cfg | 3 --- 13 files changed, 20 insertions(+), 28 deletions(-) diff --git a/config/hardware/temperature_sensors/cabinet_temp.cfg b/config/hardware/temperature_sensors/cabinet_temp.cfg index 6237ad4b7..9addc0606 100644 --- a/config/hardware/temperature_sensors/cabinet_temp.cfg +++ b/config/hardware/temperature_sensors/cabinet_temp.cfg @@ -1,3 +1,3 @@ -[temperature_sensor ElectricalCabinet] +[temperature_sensor Electrical_Cabinet] sensor_type: ATC Semitec 104GT-2 sensor_pin: ELECTRICAL_CABINET_TEMPERATURE diff --git a/config/hardware/temperature_sensors/rpi_temp.cfg b/config/hardware/temperature_sensors/rpi_temp.cfg index 68bfcb90e..f2f44f476 100644 --- a/config/hardware/temperature_sensors/rpi_temp.cfg +++ b/config/hardware/temperature_sensors/rpi_temp.cfg @@ -1,2 +1,2 @@ -[temperature_sensor RaspberryPi] +[temperature_sensor Raspberry_Pi] sensor_type: temperature_host diff --git a/config/kinematics/cartesian.cfg b/config/kinematics/cartesian.cfg index 6537b5726..344afcb08 100644 --- a/config/kinematics/cartesian.cfg +++ b/config/kinematics/cartesian.cfg @@ -4,6 +4,7 @@ max_velocity: 200 max_accel: 3000 max_z_velocity: 30 max_z_accel: 500 +# minimum_cruise_ratio: 0.5 # This left commented to not break older Klipper versions square_corner_velocity: 5.0 # And add directly all the machines standard includes here diff --git a/config/kinematics/corexy.cfg b/config/kinematics/corexy.cfg index 80cf0e099..b7573a2f1 100644 --- a/config/kinematics/corexy.cfg +++ b/config/kinematics/corexy.cfg @@ -4,6 +4,7 @@ max_velocity: 400 max_accel: 8000 max_z_velocity: 30 max_z_accel: 500 +# minimum_cruise_ratio: 0.5 # This left commented to not break older Klipper versions square_corner_velocity: 5.0 # And add directly all the machines standard includes here diff --git a/config/kinematics/corexz.cfg b/config/kinematics/corexz.cfg index 8ed2a919f..a11c6bfdf 100644 --- a/config/kinematics/corexz.cfg +++ b/config/kinematics/corexz.cfg @@ -4,6 +4,7 @@ max_velocity: 400 max_accel: 1000 max_z_velocity: 200 max_z_accel: 1000 +# minimum_cruise_ratio: 0.5 # This left commented to not break older Klipper versions square_corner_velocity: 5.0 # And add directly all the machines standard includes here diff --git a/macros/base/homing/homing_override.cfg b/macros/base/homing/homing_override.cfg index 94544779c..3d76e77ea 100644 --- a/macros/base/homing/homing_override.cfg +++ b/macros/base/homing/homing_override.cfg @@ -73,8 +73,7 @@ gcode: # Set the homing acceleration prior to any movement {% set saved_accel = printer.toolhead.max_accel %} - {% set saved_decel = printer.toolhead.max_accel_to_decel %} - M204 S{homing_travel_accel} + SET_VELOCITY_LIMIT ACCEL={homing_travel_accel} {% if bed_mesh_enabled %} BED_MESH_CLEAR @@ -340,7 +339,7 @@ gcode: {% endif %} # Reset acceleration values to what it was before - SET_VELOCITY_LIMIT ACCEL={saved_accel} ACCEL_TO_DECEL={saved_decel} + SET_VELOCITY_LIMIT ACCEL={saved_accel} {% if probe_type_enabled == "dockable" or probe_type_enabled == "dockable_virtual" %} _EXIT_POINT FUNCTION=homing_override diff --git a/macros/base/probing/dockable_probe.cfg b/macros/base/probing/dockable_probe.cfg index 42659ca21..1541cfb46 100644 --- a/macros/base/probing/dockable_probe.cfg +++ b/macros/base/probing/dockable_probe.cfg @@ -138,8 +138,7 @@ gcode: # Set the dock/undock acceleration prior to any movement {% set saved_accel = printer.toolhead.max_accel %} - {% set saved_decel = printer.toolhead.max_accel_to_decel %} - M204 S{probe_dock_accel} + SET_VELOCITY_LIMIT ACCEL={probe_dock_accel} # Probe entry location _PROBE_MOVE_TO LOCATION={probe_before_attach_position} DISTANCE={probe_move_attach_length} SPEED={travel_speed} @@ -161,7 +160,7 @@ gcode: {% endif %} # Reset acceleration values to what it was before - SET_VELOCITY_LIMIT ACCEL={saved_accel} ACCEL_TO_DECEL={saved_decel} + SET_VELOCITY_LIMIT ACCEL={saved_accel} _CHECK_PROBE action=attach @@ -247,8 +246,7 @@ gcode: # Set the dock/undock acceleration prior to any movement {% set saved_accel = printer.toolhead.max_accel %} - {% set saved_decel = printer.toolhead.max_accel_to_decel %} - M204 S{probe_dock_accel} + SET_VELOCITY_LIMIT ACCEL={probe_dock_accel} # Move to probe entry location _PROBE_MOVE_TO LOCATION={probe_before_dock_position} DISTANCE={probe_move_dock_length} SPEED={travel_speed} @@ -275,7 +273,7 @@ gcode: {% endif %} # Reset acceleration values to what it was before - SET_VELOCITY_LIMIT ACCEL={saved_accel} ACCEL_TO_DECEL={saved_decel} + SET_VELOCITY_LIMIT ACCEL={saved_accel} G4 P500 _CHECK_PROBE action=dock diff --git a/macros/base/probing/overrides/qgl.cfg b/macros/base/probing/overrides/qgl.cfg index 6b5d6b953..872b5f332 100644 --- a/macros/base/probing/overrides/qgl.cfg +++ b/macros/base/probing/overrides/qgl.cfg @@ -25,13 +25,12 @@ gcode: # Set the tilting acceleration prior to any movement {% set saved_accel = printer.toolhead.max_accel %} - {% set saved_decel = printer.toolhead.max_accel_to_decel %} M204 S{tilting_travel_accel} _BASE_QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} # Reset acceleration values to what it was before - SET_VELOCITY_LIMIT ACCEL={saved_accel} ACCEL_TO_DECEL={saved_decel} + SET_VELOCITY_LIMIT ACCEL={saved_accel} DEACTIVATE_PROBE diff --git a/macros/base/probing/overrides/z_tilt.cfg b/macros/base/probing/overrides/z_tilt.cfg index 548b40ce3..70fb6a5d0 100644 --- a/macros/base/probing/overrides/z_tilt.cfg +++ b/macros/base/probing/overrides/z_tilt.cfg @@ -26,13 +26,12 @@ gcode: # Set the tilting acceleration prior to any movement {% set saved_accel = printer.toolhead.max_accel %} - {% set saved_decel = printer.toolhead.max_accel_to_decel %} - M204 S{tilting_travel_accel} + SET_VELOCITY_LIMIT ACCEL={tilting_travel_accel} _BASE_Z_TILT_ADJUST {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} # Reset acceleration values to what it was before - SET_VELOCITY_LIMIT ACCEL={saved_accel} ACCEL_TO_DECEL={saved_decel} + SET_VELOCITY_LIMIT ACCEL={saved_accel} DEACTIVATE_PROBE diff --git a/macros/calibration/test_speed.cfg b/macros/calibration/test_speed.cfg index 4ba6d9075..51e5f32c6 100644 --- a/macros/calibration/test_speed.cfg +++ b/macros/calibration/test_speed.cfg @@ -63,7 +63,7 @@ gcode: G0 X{x_min} Y{y_min} Z{bound + 10} F{speed*60} # Set new limits - SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} ACCEL_TO_DECEL={accel / 2} + SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} {% for i in range(iterations) %} # Large pattern diagonals @@ -95,8 +95,8 @@ gcode: G0 X{x_center_max} Y{y_center_min} F{speed*60} {% endfor %} - # Restore max speed/accel/accel_to_decel to their configured values - SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel} + # Restore max speed/accel to their configured values + SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} # Re-home and get position again for comparison: M400 # Finish moves - https://github.com/AndrewEllis93/Print-Tuning-Guide/issues/66 diff --git a/macros/helpers/nozzle_cleaning.cfg b/macros/helpers/nozzle_cleaning.cfg index 8cb799f28..e2869681e 100644 --- a/macros/helpers/nozzle_cleaning.cfg +++ b/macros/helpers/nozzle_cleaning.cfg @@ -25,7 +25,6 @@ gcode: # Set the cleaning acceleration prior to any movement {% set saved_accel = printer.toolhead.max_accel %} - {% set saved_decel = printer.toolhead.max_accel_to_decel %} M204 S{brush_clean_accel} # Move to purge zone (left side) @@ -53,7 +52,7 @@ gcode: G90 # Reset acceleration values to what it was before - SET_VELOCITY_LIMIT ACCEL={saved_accel} ACCEL_TO_DECEL={saved_decel} + SET_VELOCITY_LIMIT ACCEL={saved_accel} {% if purgeclean_servo_enabled %} _SERVO_RETRACT ITEM="clean" diff --git a/macros/miscs/compatibility.cfg b/macros/miscs/compatibility.cfg index 3a1c9b665..5f3bbc73c 100644 --- a/macros/miscs/compatibility.cfg +++ b/macros/miscs/compatibility.cfg @@ -30,14 +30,12 @@ gcode: {% endif %} [gcode_macro M204] -description: Map M204 to SET_VELOCITY_LIMIT for ACCEL and ACCEL_TO_DECEL +description: Map M204 to SET_VELOCITY_LIMIT for ACCEL rename_existing: M204.1 gcode: - {% set F = params.F|default(printer["gcode_macro _USER_VARIABLES"].accel_to_decel_factor)|float %} - {% if 'S' in params %} {% set S = params.S|float %} - SET_VELOCITY_LIMIT ACCEL={S} ACCEL_TO_DECEL={S * F} + SET_VELOCITY_LIMIT ACCEL={S} {% endif %} [gcode_macro M205] diff --git a/user_templates/variables.cfg b/user_templates/variables.cfg index 63c9b1390..f2e62f2e9 100644 --- a/user_templates/variables.cfg +++ b/user_templates/variables.cfg @@ -20,9 +20,6 @@ variable_tilting_travel_accel: 3000 variable_brush_clean_accel: 1500 variable_probe_dock_accel: 2000 -## Accel to decel scale factor (default is 75% of the accel) -variable_accel_to_decel_factor: 0.75 - ################################################# # Homing, start_print and end_print variables From ab0d386996fe75db87560b1172af474bfb6a22ab Mon Sep 17 00:00:00 2001 From: Nick Danyluk Date: Mon, 18 Mar 2024 09:23:12 -0700 Subject: [PATCH 04/24] support for LDO Picobilical (#533) --- .../toolhead/LDO_Picobilical_vA1.3.cfg | 21 ++++++ .../toolhead/LDO_Picobilical_vA1.3.cfg | 65 +++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 config/mcu_definitions/toolhead/LDO_Picobilical_vA1.3.cfg create mode 100644 user_templates/mcu_defaults/toolhead/LDO_Picobilical_vA1.3.cfg diff --git a/config/mcu_definitions/toolhead/LDO_Picobilical_vA1.3.cfg b/config/mcu_definitions/toolhead/LDO_Picobilical_vA1.3.cfg new file mode 100644 index 000000000..d439157cb --- /dev/null +++ b/config/mcu_definitions/toolhead/LDO_Picobilical_vA1.3.cfg @@ -0,0 +1,21 @@ +# Board pins configuration for the LDO Motors Picobilical Frame PCB vA1.3 +# This is the board that ships with the LDO V0.2-S1 and V0.1-S1 kits +# to use pair with an umbilical and toolhead PCB (which is a pass-through) + +[board_pins toolhead_manufacturer] +mcu: toolhead +aliases: + MCU_XES=gpio0 , + + MCU_HE0=gpio4 , + + MCU_TH0=gpio29 , + MCU_CT=gpio28 , + + MCU_PCF=gpio2 , MCU_HEF=gpio3 , + + MCU_BEEPER=gpio5 , + + MCU_NEOPIXEL_1=gpio1 , MCU_NEOPIXEL_2=gpio7 , + + MCU_FS=gpio6 , MCU_SU=gpio18 , \ No newline at end of file diff --git a/user_templates/mcu_defaults/toolhead/LDO_Picobilical_vA1.3.cfg b/user_templates/mcu_defaults/toolhead/LDO_Picobilical_vA1.3.cfg new file mode 100644 index 000000000..02625ef6b --- /dev/null +++ b/user_templates/mcu_defaults/toolhead/LDO_Picobilical_vA1.3.cfg @@ -0,0 +1,65 @@ +#-------------------------------------------------# +#### LDO Picobilical Frame PCB A1.3 definition #### +#-------------------------------------------------# + +[mcu toolhead] +##-------------------------------------------------------------------- +serial: /dev/serial/by-id/change-me-to-the-correct-mcu-path +restart_method: command +##-------------------------------------------------------------------- + +# If you want to override the wiring of the LDO Picobilical, keep in mind that this +# board is defined using the "toolhead" name. So you should use "pin: toolhead:PIN_NAME" +# in your own overrides.cfg files. + +[include config/mcu_definitions/toolhead/LDO_Picobilical_vA1.3.cfg] # Do not remove this line +[board_pins picobilical_mcu] +mcu: toolhead +aliases: + X_STOP=MCU_XES , + + RUNOUT_SENSOR=MCU_FS , + + E_HEATER=MCU_HE0 , E_TEMPERATURE=MCU_TH0 , + + PART_FAN=MCU_PCF , E_FAN=MCU_HEF , + + PB_PCB_TEMP=MCU_CT , + + # If you want to use both of the independent neopixel ports, + # LIGHT_NEOPIXEL is on the left when installed in a V0 and + # LIGHT_NEOPIXEL_2 is on the right. This can be useful for + # "Rainbow on a Matchstick" strips on opposite sides of the printer + LIGHT_NEOPIXEL=MCU_NEOPIXEL_1 , LIGHT_NEOPIXEL_2=MCU_NEOPIXEL_2 + +#----------------------------------------# +# LDO Picobilical vA1.3 pins remapping # +#----------------------------------------# + +# These pins overrides are automatically added when you select a +# toolhead MCU during the installation process. They should provide a +# good base to work with. Feel free to adapt to your board if needed! + +[extruder] +heater_pin: toolhead:E_HEATER +sensor_pin: toolhead:E_TEMPERATURE +pullup_resistor: 2200 + +[fan] +pin: toolhead:PART_FAN + +[heater_fan hotend_fan] +pin: toolhead:E_FAN + +## Uncomment the following line if not using sensorless homing +## and having the X endstop plugged to the toolhead MCU +# [stepper_x] +# endstop_pin: ^toolhead:X_STOP + +[temperature_sensor picobilical_temp] +sensor_type: CMFB103F3950FANT +sensor_pin: toolhead:PB_PCB_TEMP +pullup_resistor: 2200 +min_temp: 0 +max_temp: 100 + From 6710c3600cf35a0af50696d6580dd6fa484357e1 Mon Sep 17 00:00:00 2001 From: Colten Edwards Date: Wed, 20 Mar 2024 02:44:03 -0600 Subject: [PATCH 05/24] removed M204 for SET_VELOCITY_LIMIT (#554) --- macros/helpers/nozzle_cleaning.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros/helpers/nozzle_cleaning.cfg b/macros/helpers/nozzle_cleaning.cfg index e2869681e..eb7050d88 100644 --- a/macros/helpers/nozzle_cleaning.cfg +++ b/macros/helpers/nozzle_cleaning.cfg @@ -25,7 +25,7 @@ gcode: # Set the cleaning acceleration prior to any movement {% set saved_accel = printer.toolhead.max_accel %} - M204 S{brush_clean_accel} + SET_VELOCITY_LIMIT ACCEL={brush_clean_accel} # Move to purge zone (left side) G90 From 183cb409929f2c1ea4bd394fedc83f38911e0e37 Mon Sep 17 00:00:00 2001 From: Colten Edwards Date: Wed, 20 Mar 2024 02:46:03 -0600 Subject: [PATCH 06/24] removed last M204 for SET_VELOCITY_LIMIT (#553) --- macros/base/probing/overrides/qgl.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros/base/probing/overrides/qgl.cfg b/macros/base/probing/overrides/qgl.cfg index 872b5f332..770a7cb31 100644 --- a/macros/base/probing/overrides/qgl.cfg +++ b/macros/base/probing/overrides/qgl.cfg @@ -25,7 +25,7 @@ gcode: # Set the tilting acceleration prior to any movement {% set saved_accel = printer.toolhead.max_accel %} - M204 S{tilting_travel_accel} + SET_VELOCTITY_LIMIT ACCEL={tilting_travel_accel} _BASE_QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} From 9029c2d27ca59cf67d39c2122d12a5affafca4c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Boisselier?= Date: Wed, 20 Mar 2024 09:36:37 +0000 Subject: [PATCH 07/24] removed old artifacts from TMC2240 init feature Please use https://github.com/andrewmcgr/klipper_tmc_autotune instead! --- macros/miscs/startup.cfg | 41 ---------------------------------------- 1 file changed, 41 deletions(-) diff --git a/macros/miscs/startup.cfg b/macros/miscs/startup.cfg index e9ebc2258..10106bf1c 100644 --- a/macros/miscs/startup.cfg +++ b/macros/miscs/startup.cfg @@ -29,12 +29,6 @@ gcode: # Check the probe configuration and compatibility with current includes _INIT_CHECKPROBECONF - # If the extruder is running with a TMC2240, there is specific driver registers to set at Klipper startup - {% set e_driver = printer["gcode_macro _USER_VARIABLES"].e_driver|string %} - {% if e_driver == "TMC2240" %} - _INIT_TMC2240 - {% endif %} - # If an MMU/ERCF is included in Klippain, we also check that the correct HH version is installed {% set klippain_mmu_enabled = printer["gcode_macro _USER_VARIABLES"].klippain_mmu_enabled %} {% set klippain_ercf_enabled = printer["gcode_macro _USER_VARIABLES"].klippain_ercf_enabled %} @@ -66,41 +60,6 @@ gcode: {% endif %} -[gcode_macro _INIT_TMC2240] -gcode: - # This macro can be copied over to overrides.cfg and will allow the values to be defined automatically on klipper startup - # TMC2240 extruder initialization macro to set the driver registers based on Esoterical's github page. These settings are not - # universal and not necessary for all SB2240 owners. Adapt them to your needs! - # https://github.com/Esoterical/voron_canbus/blob/main/toolhead_flashing/common_hardware/BigTreeTech%20SB2209%20and%20SB2240/SB2240%20Stepper%20Configuration%20and%20Undervoltage.md - - ## Enable accurate stall current measurement - #SET_TMC_FIELD STEPPER=extruder FIELD=pwm_meas_sd_enable VALUE=1 - #SET_TMC_FIELD STEPPER=extruder FIELD=sg4_filt_en VALUE=1 - ## Set the StealthChop stall detection threshold (may not be completely necessary) - #SET_TMC_FIELD STEPPER=extruder FIELD=SG4_THRS VALUE=10 - ## Set the hold current to zero, and completely switch off the motor when it is not in use - #SET_TMC_FIELD STEPPER=extruder FIELD=IHOLD VALUE=0 - #SET_TMC_FIELD STEPPER=extruder FIELD=freewheel VALUE=1 - ## Set the max expected velocity to a value such that we are unlikely to switch to fullstepping except during a very fast retraction or prime - #SET_TMC_FIELD STEPPER=extruder FIELD=THIGH VELOCITY=50 - ## Use CoolStep, but we need a certain step frequency for it to work - #SET_TMC_FIELD STEPPER=extruder FIELD=TCOOLTHRS VALUE=4000 - ## But do switch to PWM autotuning when at high flow - #SET_TMC_FIELD STEPPER=extruder FIELD=TPWMTHRS VELOCITY=1 - ## Allow the motor to freewheel when not in use, means it runs cooler - #SET_TMC_FIELD STEPPER=extruder FIELD=freewheel VALUE=1 - ## Set the temperature prewarning to something reasonable. Cosmetic, Klipper does nothing with this - #SET_TMC_FIELD STEPPER=extruder FIELD=OVERTEMPPREWARNING_VTH VALUE=2885 # 7.7 * 100 C + 2038 - ## The following is absolutely critical: set the overvoltage snubber to a sensible voltage. - ## This should be set to about 0.8 V above your power supply's idle voltage. - ## Your PSU voltage can be read from the TMC 2240 by issuing a GCODE command: - ## DUMP_TMC stepper=extruder register=ADC_VSUPPLY_AIN - ## The voltage is the value of adc_vsupply multiplied by 0.009732 - ## It is also possible to use adc_vsupply + 82 here, which works out to be the same. - #{% set v = (24.7/0.009732)|int %} - #SET_TMC_FIELD STEPPER=extruder FIELD=OVERVOLTAGE_VTH VALUE={ v } - - [gcode_macro _INIT_CHECKPROBECONF] gcode: {% set probe_type_enabled = printer["gcode_macro _USER_VARIABLES"].probe_type_enabled|string %} From 8e2b41a811fcbfad90b315f99fce8cf3a6becc9f Mon Sep 17 00:00:00 2001 From: Christian Johnson Date: Tue, 18 Jun 2024 03:11:24 -0500 Subject: [PATCH 08/24] Message update to show "Available RAM" rather than "Used RAM" (#579) --- scripts/system_info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system_info.py b/scripts/system_info.py index 1995944d4..1b8e7ced7 100755 --- a/scripts/system_info.py +++ b/scripts/system_info.py @@ -116,7 +116,7 @@ def print_system_info(): if total_ram is None or available_ram is None: print("RAM information not found...") else: - print(f"Used RAM: {available_ram}/{total_ram} MB") + print(f"Available RAM: {available_ram}/{total_ram} MB") if __name__ == "__main__": From 22955642bd54ea78c1a59ce514def43fab9aaffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Boisselier?= Date: Tue, 18 Jun 2024 08:42:54 +0000 Subject: [PATCH 09/24] fixed max_z bug in PARK macro --- macros/base/park.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros/base/park.cfg b/macros/base/park.cfg index 504676e34..395812b5d 100644 --- a/macros/base/park.cfg +++ b/macros/base/park.cfg @@ -15,7 +15,7 @@ gcode: {% set St = printer["gcode_macro _USER_VARIABLES"].travel_speed * 60 %} {% set Sz = printer["gcode_macro _USER_VARIABLES"].z_drop_speed * 60 %} - {% set max_z = printer.toolhead.axis_maximum.z|float %} + {% set max_z = printer.toolhead.axis_maximum.z - printer.gcode_move.homing_origin.z |float %} {% set act_z = printer.toolhead.position.z|float %} {% set z_safe = act_z + Z_HOP %} From 4e98dadec78fe0c79c28bdebe9ecc87be81df871 Mon Sep 17 00:00:00 2001 From: tsk-2222 <111063724+tsk-2222@users.noreply.github.com> Date: Tue, 18 Jun 2024 04:45:51 -0400 Subject: [PATCH 10/24] Update BTT_SKR_2.cfg to fix EXP1_4 typo (#578) --- config/mcu_definitions/main/BTT_SKR_2.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/mcu_definitions/main/BTT_SKR_2.cfg b/config/mcu_definitions/main/BTT_SKR_2.cfg index 838159102..a943a5069 100644 --- a/config/mcu_definitions/main/BTT_SKR_2.cfg +++ b/config/mcu_definitions/main/BTT_SKR_2.cfg @@ -41,7 +41,7 @@ aliases: # EXP1 header EXP1_1=PC5 , EXP1_2=PB0 , - EXP1_3=PB1 , EXP1_4=PB9 , + EXP1_3=PB1 , EXP1_4=PE9 , EXP1_5=PE10 , EXP1_6=PE11 , # Key in the socket on this side EXP1_7=PE12 , EXP1_8=PE13 , EXP1_9= , EXP1_10=<5V> , From cfd930594de961b7d1b1ee58724c1b4871296976 Mon Sep 17 00:00:00 2001 From: Jan-Gerrit Drexhage <102791900+Surion79@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:48:43 +0200 Subject: [PATCH 11/24] added a fix for filament sensor activation for material as default (#582) --- macros/base/start_print.cfg | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/macros/base/start_print.cfg b/macros/base/start_print.cfg index dec67f7b6..125c35845 100644 --- a/macros/base/start_print.cfg +++ b/macros/base/start_print.cfg @@ -73,9 +73,11 @@ gcode: {% else %} RESPOND MSG="Material '{MATERIAL}' is used" {% set material = printer["gcode_macro _USER_VARIABLES"].material_parameters[MATERIAL] %} + {% if filament_sensor_enabled %} + {% set filament_sensor_enabled = material.filament_sensor | default(1) %} + {% endif %} {% endif %} - - + # -------------------------------- # Let's do the START_PRINT actions # -------------------------------- @@ -195,7 +197,7 @@ gcode: START_FILTER SPEED={material.filter_speed / 100} {% endif %} - {% if filament_sensor_enabled and not material.filament_sensor %} + {% if filament_sensor_enabled %} SET_FILAMENT_SENSOR SENSOR="runout_sensor" ENABLE=0 {% endif %} From 6720aefb7aec90a59710b9aed535f179f23d70aa Mon Sep 17 00:00:00 2001 From: o1hitman1o Date: Tue, 18 Jun 2024 01:49:58 -0700 Subject: [PATCH 12/24] code cleanup in some templates (removed extra spaces) (#570) --- config/mcu_definitions/main/Fysetc_Spider_v1.x.cfg | 2 +- config/mcu_definitions/main/Fysetc_Spider_v2.x.cfg | 2 +- config/mcu_definitions/main/Fysetc_Spider_v3.x.cfg | 2 +- config/mcu_definitions/toolhead/BTT_SB2209_v1.0.cfg | 2 +- config/mcu_definitions/toolhead/BTT_SB2240_v1.0.cfg | 2 +- user_templates/mcu_defaults/toolhead/BTT_SB2209_v1.0.cfg | 2 +- user_templates/mcu_defaults/toolhead/BTT_SB2240_v1.0.cfg | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/config/mcu_definitions/main/Fysetc_Spider_v1.x.cfg b/config/mcu_definitions/main/Fysetc_Spider_v1.x.cfg index ae0884221..57301d27d 100644 --- a/config/mcu_definitions/main/Fysetc_Spider_v1.x.cfg +++ b/config/mcu_definitions/main/Fysetc_Spider_v1.x.cfg @@ -39,7 +39,7 @@ aliases: EXP1_3=PD1 , EXP1_4=PD0 , EXP1_5=PC12 , EXP1_6=PC10 , # Slot in the socket on this side EXP1_7=PD2 , EXP1_8=PC11 , - EXP1_9=PA8 , EXP1_10= PC9 , + EXP1_9=PA8 , EXP1_10=PC9 , # EXP2 header (be careful as the name is inversed and called EXP1 on the Spider v1.0 PCB) EXP2_1=<5V> , EXP2_2= , diff --git a/config/mcu_definitions/main/Fysetc_Spider_v2.x.cfg b/config/mcu_definitions/main/Fysetc_Spider_v2.x.cfg index f2c110ffc..a3db08fc2 100644 --- a/config/mcu_definitions/main/Fysetc_Spider_v2.x.cfg +++ b/config/mcu_definitions/main/Fysetc_Spider_v2.x.cfg @@ -39,7 +39,7 @@ aliases: EXP1_3=PD1 , EXP1_4=PD0 , EXP1_5=PC12 , EXP1_6=PC10 , # Slot in the socket on this side EXP1_7=PD2 , EXP1_8=PC11 , - EXP1_9=PA8 , EXP1_10= PC9 , + EXP1_9=PA8 , EXP1_10=PC9 , # EXP2 header EXP2_1=<5V> , EXP2_2= , diff --git a/config/mcu_definitions/main/Fysetc_Spider_v3.x.cfg b/config/mcu_definitions/main/Fysetc_Spider_v3.x.cfg index 8107f8c03..c4dcc5ea1 100644 --- a/config/mcu_definitions/main/Fysetc_Spider_v3.x.cfg +++ b/config/mcu_definitions/main/Fysetc_Spider_v3.x.cfg @@ -34,7 +34,7 @@ aliases: EXP1_3=PD1 , EXP1_4=PD0 , EXP1_5=PC12 , EXP1_6=PC10 , # Slot in the socket on this side EXP1_7=PD2 , EXP1_8=PC11 , - EXP1_9=PA8 , EXP1_10= PC9 , + EXP1_9=PA8 , EXP1_10=PC9 , # EXP2 header EXP2_1=<5V> , EXP2_2= , diff --git a/config/mcu_definitions/toolhead/BTT_SB2209_v1.0.cfg b/config/mcu_definitions/toolhead/BTT_SB2209_v1.0.cfg index 8a2654412..377b3583a 100644 --- a/config/mcu_definitions/toolhead/BTT_SB2209_v1.0.cfg +++ b/config/mcu_definitions/toolhead/BTT_SB2209_v1.0.cfg @@ -20,4 +20,4 @@ aliases: MCU_SPI1_NSS=PA4 , MCU_SPI1_CLK=PA5 , MCU_SPI1_MISO=PA6 , MCU_SPI1_MOSI=PA7 , MCU_SPI2_NSS=PB12 , MCU_SPI2_CLK=PB10 , MCU_SPI2_MISO=PB2 , MCU_SPI2_MOSI=PB11 , - MCU_SPI_OUT_NSS=PA10 , MCU_SPI_OUT_IO1 = PA9 , MCU_SPI_OUT_IO2 = PA8 , # shared pins between SPI2 and SPI_OUT + MCU_SPI_OUT_NSS=PA10 , MCU_SPI_OUT_IO1=PA9 , MCU_SPI_OUT_IO2=PA8 , # shared pins between SPI2 and SPI_OUT diff --git a/config/mcu_definitions/toolhead/BTT_SB2240_v1.0.cfg b/config/mcu_definitions/toolhead/BTT_SB2240_v1.0.cfg index e0decf07e..ac6cfa69f 100644 --- a/config/mcu_definitions/toolhead/BTT_SB2240_v1.0.cfg +++ b/config/mcu_definitions/toolhead/BTT_SB2240_v1.0.cfg @@ -20,4 +20,4 @@ aliases: MCU_SPI1_NSS=PA4 , MCU_SPI1_CLK=PA5 , MCU_SPI1_MISO=PA6 , MCU_SPI1_MOSI=PA7 , MCU_SPI2_NSS=PB12 , MCU_SPI2_CLK=PB10 , MCU_SPI2_MISO=PB2 , MCU_SPI2_MOSI=PB11 , - MCU_SPI_OUT_NSS=PA10 , MCU_SPI_OUT_IO1 = PA9 , MCU_SPI_OUT_IO2 = PA8 , # shared pins between SPI2 and SPI_OUT + MCU_SPI_OUT_NSS=PA10 , MCU_SPI_OUT_IO1=PA9 , MCU_SPI_OUT_IO2=PA8 , # shared pins between SPI2 and SPI_OUT diff --git a/user_templates/mcu_defaults/toolhead/BTT_SB2209_v1.0.cfg b/user_templates/mcu_defaults/toolhead/BTT_SB2209_v1.0.cfg index 48a805be8..0ebeabeea 100644 --- a/user_templates/mcu_defaults/toolhead/BTT_SB2209_v1.0.cfg +++ b/user_templates/mcu_defaults/toolhead/BTT_SB2209_v1.0.cfg @@ -29,7 +29,7 @@ aliases: STATUS_NEOPIXEL=MCU_RGB , ADXL_CS=MCU_SPI2_NSS , ADXL_SCLK=MCU_SPI2_CLK , ADXL_MISO=MCU_SPI2_MISO , ADXL_MOSI=MCU_SPI2_MOSI , - MAX31865_NSS=MCU_SPI1_NSS , MAX31865_CLK=MCU_SPI1_CLK , MAX31865_MOSI=MCU_SPI1_MOSI , MAX31865_MISO = MCU_SPI1_MISO , + MAX31865_NSS=MCU_SPI1_NSS , MAX31865_CLK=MCU_SPI1_CLK , MAX31865_MOSI=MCU_SPI1_MOSI , MAX31865_MISO=MCU_SPI1_MISO , #----------------------------------------# diff --git a/user_templates/mcu_defaults/toolhead/BTT_SB2240_v1.0.cfg b/user_templates/mcu_defaults/toolhead/BTT_SB2240_v1.0.cfg index 37985e486..96527ad1f 100644 --- a/user_templates/mcu_defaults/toolhead/BTT_SB2240_v1.0.cfg +++ b/user_templates/mcu_defaults/toolhead/BTT_SB2240_v1.0.cfg @@ -30,7 +30,7 @@ aliases: STATUS_NEOPIXEL=MCU_RGB , ADXL_CS=MCU_SPI2_NSS , ADXL_SCLK=MCU_SPI2_CLK , ADXL_MISO=MCU_SPI2_MISO , ADXL_MOSI=MCU_SPI2_MOSI , - MAX31865_NSS=MCU_SPI1_NSS , MAX31865_CLK=MCU_SPI1_CLK , MAX31865_MOSI=MCU_SPI1_MOSI , MAX31865_MISO = MCU_SPI1_MISO , + MAX31865_NSS=MCU_SPI1_NSS , MAX31865_CLK=MCU_SPI1_CLK , MAX31865_MOSI=MCU_SPI1_MOSI , MAX31865_MISO=MCU_SPI1_MISO , #----------------------------------------# From f01c4ca16226485c95e45864f0f6ac50a0eb0087 Mon Sep 17 00:00:00 2001 From: ksummers92 <66363414+ksummers92@users.noreply.github.com> Date: Tue, 18 Jun 2024 03:54:46 -0500 Subject: [PATCH 13/24] Nozzle cleaning parameters update (#569) --- docs/brush_center_offset.md | 24 ++++++++++++++++++++++++ macros/helpers/nozzle_cleaning.cfg | 24 +++++++++++++++++------- user_templates/variables.cfg | 3 +++ 3 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 docs/brush_center_offset.md diff --git a/docs/brush_center_offset.md b/docs/brush_center_offset.md new file mode 100644 index 000000000..5e425bd75 --- /dev/null +++ b/docs/brush_center_offset.md @@ -0,0 +1,24 @@ +The purpose of this document is to explain the purpose of the brush center offset variable in variables.cfg. + +The brush center offset takes the brush center and moves it in the direction of the brush normal by the specified amount. +This is useful for avoiding brush strokes that would cause the toolhead to crash into something or otherwise cause undesired affects. +One example (and the impetus for this feature) is the case in which one has a brush and a gantry-mounted depressor for a filament cutter on the same side of the gantry. If nozzle cleaning is perform with filament loaded and the brush strokes occur in the same space as the depressor, then the filament cutter is actuated (repeatedly) which results in unnecessary wear and unwanted filament cutting. +One could simply move the center of the brush away from the depressor, but this would cause the nozzle to leave the brush and be wasted motion. + +How it works: +The brush center should be set as normal in the variables.cfg file. The brush center offset should be set to a value (in mm) that will prevent the toolhead from crashing into anything. +The brush size is provided to accomodate different brush sizes and is used to calculate the brush stroke distance. + +For example, if the variable_brush_xyz is set to (40, 250, 2) and the variable_brush_center_offset is set to 10, then the new brush center will be (50, 250, 2). +This will create the following brush action: + + |-----------------------------|---------------|--------------| + left center center + offset right + ^ nozzle starts here + ---------------> first brush stroke direction {(brush size/2) - brush center offset} + <-------------------------------------------- n brush stroke direction {(brush size/2)} + --------------------------------------------> n+1 brush stroke direction {(brush size/2)} + +If variable_brush_center_offset is set to -10, then the new brush center will be (30, 250, 2) and the nozzle will start to the left of the center and do the mirror of the above brush action. + +Therefore, this allows the nozzle brushing action to occur entirely with the brush with no wasted motion or unwanted interactions with other components. diff --git a/macros/helpers/nozzle_cleaning.cfg b/macros/helpers/nozzle_cleaning.cfg index e2869681e..118dab703 100644 --- a/macros/helpers/nozzle_cleaning.cfg +++ b/macros/helpers/nozzle_cleaning.cfg @@ -6,6 +6,9 @@ gcode: {% set status_leds_enabled = printer["gcode_macro _USER_VARIABLES"].status_leds_enabled %} {% set brush_clean_accel = printer["gcode_macro _USER_VARIABLES"].brush_clean_accel %} {% set brush_over_y_axis = printer["gcode_macro _USER_VARIABLES"].brush_over_y_axis %} + {% set brush_offset = printer["gcode_macro _USER_VARIABLES"].brush_center_offset|default(0)|float %} + {% set brush_size = printer["gcode_macro _USER_VARIABLES"].brush_width_x|default(40)|float %} + {% set brushes = printer["gcode_macro _USER_VARIABLES"].brushes|default(6)|int %} {% set verbose = printer["gcode_macro _USER_VARIABLES"].verbose %} {% if purge_and_brush_enabled %} @@ -14,6 +17,7 @@ gcode: {% set Sc = printer["gcode_macro _USER_VARIABLES"].brush_clean_speed * 60 %} {% set Bx, By, Bz = printer["gcode_macro _USER_VARIABLES"].brush_xyz|map('float') %} + {% set Bx = Bx + brush_offset %} {% if status_leds_enabled %} STATUS_LEDS COLOR="CLEANING" @@ -25,7 +29,7 @@ gcode: # Set the cleaning acceleration prior to any movement {% set saved_accel = printer.toolhead.max_accel %} - M204 S{brush_clean_accel} + SET_VELOCITY_LIMIT ACCEL={brush_clean_accel} # Move to purge zone (left side) G90 @@ -36,17 +40,23 @@ gcode: # Wipe procedure G91 {% if brush_over_y_axis %} - {% for wipe in range(6) %} + {% for wipe in range(brushes) %} G1 Y-5 F{Sc} G1 Y+5 F{Sc} {% endfor %} {% endif %} - G1 X+20 F{Sc} + # Move to the right side of the brush + {% if brush_offset < 0 %} # brush center biased towards 0 + G1 X+{ brush_size/2 } F{Sc} + {% else %} # brush center biased towards x_max + G1 X+{ (brush_size/2) - brush_offset} F{Sc} + {% endif %} - {% for wipe in range(6) %} - G1 X-40 F{Sc} - G1 X+40 F{Sc} + # Brush procedure + {% for wipe in range(brushes) %} + G1 X-{ (brush_size) - brush_offset } F{Sc} + G1 X+{ (brush_size) - brush_offset } F{Sc} {% endfor %} G90 @@ -162,4 +172,4 @@ gcode: {% endif %} RESTORE_GCODE_STATE NAME=CONDITIONAL_MOVE_TO_PURGE_BUCKET_STATE - {% endif %} + {% endif %} \ No newline at end of file diff --git a/user_templates/variables.cfg b/user_templates/variables.cfg index f2e62f2e9..8abb6d79a 100644 --- a/user_templates/variables.cfg +++ b/user_templates/variables.cfg @@ -219,6 +219,9 @@ variable_purge_and_brush_enabled: False variable_force_homing_before_brush: False # Add an homing of the Z axis before a clean to be sure to not miss the brush variable_brush_over_y_axis: True # Cleanup is done moving the extruder along the Y axis, then X axis. If false, only X axis is done variable_brush_xyz: -1, -1, -1 # Position of the brush center for nozzle cleaning +variable_brush_width_x: 40 # Width of the brush in X direction (in mm) +variable_brush_center_offset: 0 # Offset of the brush center to start brushing (in mm), + is towards max X +variable_brushes: 6 # Number of brushes of the nozzle to perform variable_purge_bucket_xyz: -1, -1, -1 # Purge bucket position variable_purge_distance: 30 # Amount to purge (in mm) variable_purge_ooze_time: 10 # Time (in seconds) to wait after the purge to let the nozzle ooze before going to the brush From 6079072bf687f9b402cfc29fa90cb177a42fb0e2 Mon Sep 17 00:00:00 2001 From: Benoitone <63300355+Benoitone@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:57:14 +0200 Subject: [PATCH 14/24] add expander templates support (#567) with Klipper expander and Arduino nano templates as first expanders --- .../mcu_definitions/expander/Arduino_nano.cfg | 6 ++++ .../expander/STM32_Klipper_Expander.cfg | 20 ++++++++++++ install.sh | 32 +++++++++++++++++-- .../mcu_defaults/expander/Arduino_nano.cfg | 32 +++++++++++++++++++ .../expander/STM32_Klipper_Expander.cfg | 31 ++++++++++++++++++ 5 files changed, 119 insertions(+), 2 deletions(-) create mode 100644 config/mcu_definitions/expander/Arduino_nano.cfg create mode 100644 config/mcu_definitions/expander/STM32_Klipper_Expander.cfg create mode 100644 user_templates/mcu_defaults/expander/Arduino_nano.cfg create mode 100644 user_templates/mcu_defaults/expander/STM32_Klipper_Expander.cfg diff --git a/config/mcu_definitions/expander/Arduino_nano.cfg b/config/mcu_definitions/expander/Arduino_nano.cfg new file mode 100644 index 000000000..9f49567c6 --- /dev/null +++ b/config/mcu_definitions/expander/Arduino_nano.cfg @@ -0,0 +1,6 @@ +[board_pins nano_manufacturer] +mcu: nano +aliases: + MCU_TX1=PD1 , MCU_RX0=PD0 , + MCU_D2=PD2 , MCU_D3=PD3 , MCU_D4=PD4 , MCU_D5=PD5 , MCU_D6=PD6 , MCU_D7=PD7 , MCU_D8=PB0 , MCU_D9=PB1 , MCU_D10=PB2 , MCU_D11=PB3 , MCU_D12=PB4 , MCU_D13=PB5 , + MCU_A0=PC0 , MCU_A1=PC1 , MCU_A2=PC2 , MCU_A3=PC3 , MCU_A4=PC4 , MCU_A5=PC5 , diff --git a/config/mcu_definitions/expander/STM32_Klipper_Expander.cfg b/config/mcu_definitions/expander/STM32_Klipper_Expander.cfg new file mode 100644 index 000000000..52b9e3713 --- /dev/null +++ b/config/mcu_definitions/expander/STM32_Klipper_Expander.cfg @@ -0,0 +1,20 @@ +[board_pins expander_manufacturer] +mcu: expander +aliases: + # Mosfets + MCU_M0=PA0 , MCU_M1=PA1 , MCU_M2=PA2 , MCU_M3=PA3 , + + # Thermistor + MCU_T0=PA6 , MCU_T1=PA5 , + + # Neopixel header + MCU_DATA=PB1 , + + # I2C Header + MCU_SLC=PF1 , MCU_SDA=PF0 , + + # GPIO + MCU_PA7=PA7 , + + # Onboard Led + MCU_LED=PA4 , diff --git a/install.sh b/install.sh index 27b7d9f03..3148bcc81 100755 --- a/install.sh +++ b/install.sh @@ -211,7 +211,7 @@ function install_mcu_templates { fi fi - # Finally see if the user use an MMU/ERCF board + # Next see if the user use an MMU/ERCF board read < /dev/tty -rp "[CONFIG] Do you have an MMU/ERCF MCU and want to install a template? (y/N) " install_mmu_template if [[ -z "$install_mmu_template" ]]; then install_mmu_template="n" @@ -240,8 +240,36 @@ function install_mcu_templates { printf "[CONFIG] No MMU/ERCF template selected. Skip and continuing...\n\n" fi fi -} + # Finally see if the user use an expander board + read < /dev/tty -rp "[CONFIG] Do you have an expander board and want to install a template? (y/N) " install_expander_template + if [[ -z "$install_expander_template" ]]; then + install_expander_template="n" + fi + install_expander_template="${install_expander_template,,}" + + # Check if the user wants to install an expander MCU template + if [[ "$install_expander_template" =~ ^(yes|y)$ ]]; then + file_list=() + while IFS= read -r -d '' file; do + file_list+=("$file") + done < <(find "${FRIX_CONFIG_PATH}/user_templates/mcu_defaults/expand" -maxdepth 1 -type f -print0) + echo "[CONFIG] Please select your expander MCU in the following list:" + for i in "${!file_list[@]}"; do + echo " $((i+1))) $(basename "${file_list[i]}")" + done + + read < /dev/tty -p "[CONFIG] Template to install (or 0 to skip): " expander_template + if [[ "$expander_template" -gt 0 ]]; then + # If the user selected a file, copy its content into the mcu.cfg file + filename=$(basename "${file_list[$((expander_template-1))]}") + cat "${FRIX_CONFIG_PATH}/user_templates/mcu_defaults/expand/$filename" >> ${USER_CONFIG_PATH}/mcu.cfg + printf "[CONFIG] Template '$filename' inserted into your mcu.cfg user file\n\n" + else + printf "[CONFIG] No expander template selected. Skip and continuing...\n\n" + fi + fi +} # Step 5: restarting Klipper function restart_klipper { diff --git a/user_templates/mcu_defaults/expander/Arduino_nano.cfg b/user_templates/mcu_defaults/expander/Arduino_nano.cfg new file mode 100644 index 000000000..46d448cae --- /dev/null +++ b/user_templates/mcu_defaults/expander/Arduino_nano.cfg @@ -0,0 +1,32 @@ +#------------------------------------------------# +#### Adruino Nano ATmega328P board definition #### +#------------------------------------------------# + +[mcu nano] +##-------------------------------------------------------------------- +serial: /dev/serial/by-id/change-me-to-the-correct-mcu-path +restart_method: command +##-------------------------------------------------------------------- + +# For use with Arduino Nano with ATmega328P (8-bit AVR family) +# If you want to override the wiring of Arduino Nano board, keep in mind that this +# board is defined using the "nano" name. So you should use "pin: nano:PIN_NAME" +# in your own overrides.cfg files. +# You can rename here your PIN_NAME to be used in Klippain macros or in your own. + +[include config/mcu_definitions/expander/Arduino_nano.cfg] # Do not remove this line +[board_pins nano_mcu] +mcu: nano +aliases: + # Digital I/O pins + NANO_TX1=MCU_TX1 , NANO_RX0=MCU_RX0 , + NANO_D3=MCU_D3 , NANO_D5=MCU_D5 , NANO_D6=MCU_D6 , NANO_D9=MCU_D9 , NANO_D10_SS=MCU_D10 , NANO_D11_MOSI=MCU_D11 , # with PWM output for exemple for fans and output_pin devices or any others I/O devices + NANO_D2=MCU_D2 , NANO_D4=MCU_D4 , NANO_D7=MCU_D7 , NANO_D8=MCU_D8 , NANO_D12_MISO=MCU_D12 , NANO_D13_SCK=MCU_D13 , # without PWM for exemple for fans, heaters, servos, leds (Rem: D13 used for Inbuilt LED) + + # Analog Input pins + NANO_A0=MCU_A0 , NANO_A1=MCU_A1 , NANO_A2=MCU_A2 , NANO_A3=MCU_A3 , NANO_A4_I2C=MCU_A4 , NANO_A5_I2C=MCU_A5 , # can be used (for exemple) for thermistors + +# Status LED lights when klipper connects +[static_digital_output onboardANLED] +pins: nano:NANO_D13_SCK + diff --git a/user_templates/mcu_defaults/expander/STM32_Klipper_Expander.cfg b/user_templates/mcu_defaults/expander/STM32_Klipper_Expander.cfg new file mode 100644 index 000000000..418977f96 --- /dev/null +++ b/user_templates/mcu_defaults/expander/STM32_Klipper_Expander.cfg @@ -0,0 +1,31 @@ +#-----------------------------------------------# +#### STM32 Klipper Expander board definition #### +#-----------------------------------------------# + +[mcu expander] +##-------------------------------------------------------------------- +serial: /dev/serial/by-id/change-me-to-the-correct-mcu-path +restart_method: command +##-------------------------------------------------------------------- + +# For use with https://github.com/VoronDesign/Voron-Hardware/tree/master/Klipper_Expander +# If you want to override the wiring of the STM32 Klipper Expander board, keep in mind that this +# board is defined using the "expand" name. So you should use "pin: expand:PIN_NAME" +# in your own overrides.cfg files. +# You can rename here your PIN_NAME to be used in Klippain macros or in your own. + +[include config/mcu_definitions/expander/STM32_Klipper_Expander.cfg] # Do not remove this line +[board_pins expander_mcu] +mcu: expander +aliases: + EXP_FAN0=MCU_M0 , EXP_FAN1=MCU_M1 , EXP_FAN2=MCU_M2 , EXP_FAN3=MCU_M3 , # can be use for fans, Leds, Heaters ... + EXP_TEMP0=MCU_T0 , EXP_TEMP1=MCU_T1 , # for thermistor + EXP_NEOPIXEL=MCU_DATA , + EXP_SLC=MCU_SLC , EXP_SDA=MCU_SDA , # for 3.3V displays or sensors + EXP_PA7=MCU_PA7 , # can be use for external mosfet, relay or a door open sensor + EXP_ONBOARDLED=MCU_LED , # onboard status led + +# Status LED lights when klipper connects +[static_digital_output onboardKELED] +pins: !expander:EXP_ONBOARDLED + From 973df0827a9de013275140432d1449cc7217ba8e Mon Sep 17 00:00:00 2001 From: Benoitone <63300355+Benoitone@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:57:37 +0200 Subject: [PATCH 15/24] Reset layers stats on start print (#565) --- macros/base/start_print.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/macros/base/start_print.cfg b/macros/base/start_print.cfg index 125c35845..d31f6cc17 100644 --- a/macros/base/start_print.cfg +++ b/macros/base/start_print.cfg @@ -48,6 +48,7 @@ gcode: SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=adaptive_primeline VALUE={ADAPTIVE_PRIMELINE} {% if params.TOTAL_LAYER %} # total layers count (if provided by the slicer) + SET_PRINT_STATS_INFO TOTAL_LAYER="{0}" CURRENT_LAYER="{0}" # Reset layers SET_PRINT_STATS_INFO TOTAL_LAYER={params.TOTAL_LAYER|int} SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=total_layer VALUE={params.TOTAL_LAYER|int} {% endif %} From 08707ca381fb616017ad5637d090d7e60db14629 Mon Sep 17 00:00:00 2001 From: Jan-Gerrit Drexhage <102791900+Surion79@users.noreply.github.com> Date: Tue, 18 Jun 2024 10:59:00 +0200 Subject: [PATCH 16/24] optional setting for adaptive primeline (#522) --- macros/base/start_print.cfg | 2 +- user_templates/variables.cfg | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/macros/base/start_print.cfg b/macros/base/start_print.cfg index d31f6cc17..8eb8276e2 100644 --- a/macros/base/start_print.cfg +++ b/macros/base/start_print.cfg @@ -30,7 +30,7 @@ gcode: {% set TOOLS_USED = params.TOOLS_USED|default("")|string %} # Check if MMU gates (used in gcode file) are availables {% set SYNC_MMU_EXTRUDER = params.SYNC_MMU_EXTRUDER|default(0)|int %} # set MMU gear motor and extruder synchronization during print TODO {% set BED_MESH_PROFILE = params.MESH|default("")|string %} # Bed mesh profile to load - {% set ADAPTIVE_PRIMELINE = params.ADAPTIVE_PRIMELINE|default(1)|int %} # Weither to do or not an adaptive prime line near the real print zone + {% set ADAPTIVE_PRIMELINE = params.ADAPTIVE_PRIMELINE|default(printer['gcode_macro _USER_VARIABLES'].prime_line_adaptive_mode)|default(1)|int %} # Place an adaptive prime line near the real print zone # Set the variables to be used in all the modules based on the slicer parameters SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=bed_temp VALUE={BED_TEMP} diff --git a/user_templates/variables.cfg b/user_templates/variables.cfg index f2e62f2e9..ffaf0fcca 100644 --- a/user_templates/variables.cfg +++ b/user_templates/variables.cfg @@ -52,6 +52,7 @@ variable_probe_dock_margin_xy: 0, 0 variable_safe_extruder_temp: 150 ## Prime line parameters +variable_prime_line_adaptive_mode: True # using the adaptive primeline manages start point and direction automatically variable_prime_line_xy: 5, 2.5 # starting point variable_prime_line_direction: "X" # can also be set to "Y" variable_prime_line_length: 40 # length of the prime line on the bed (in mm) From e21871f8591f4e20fb174444460ed4cad86ab1a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Boisselier?= Date: Tue, 18 Jun 2024 21:44:58 +0200 Subject: [PATCH 17/24] fix typo in qgl.cfg --- macros/base/probing/overrides/qgl.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros/base/probing/overrides/qgl.cfg b/macros/base/probing/overrides/qgl.cfg index 770a7cb31..fe8eeec81 100644 --- a/macros/base/probing/overrides/qgl.cfg +++ b/macros/base/probing/overrides/qgl.cfg @@ -25,7 +25,7 @@ gcode: # Set the tilting acceleration prior to any movement {% set saved_accel = printer.toolhead.max_accel %} - SET_VELOCTITY_LIMIT ACCEL={tilting_travel_accel} + SET_VELOCITY_LIMIT ACCEL={tilting_travel_accel} _BASE_QUAD_GANTRY_LEVEL {% for p in params %}{'%s=%s ' % (p, params[p])}{% endfor %} From e46365c8147ba9d727966dc56205f51d3e0de47a Mon Sep 17 00:00:00 2001 From: Jan-Gerrit Drexhage <102791900+Surion79@users.noreply.github.com> Date: Wed, 19 Jun 2024 21:08:00 +0200 Subject: [PATCH 18/24] added AWD support (2x X, 2x Y) (#508) --- config/hardware/axis/X/0.9deg.cfg | 9 +-------- config/hardware/axis/X/0.9deg_1M.cfg | 8 ++++++++ config/hardware/axis/X/0.9deg_2M.cfg | 13 +++++++++++++ config/hardware/axis/X/1.8deg.cfg | 9 +-------- config/hardware/axis/X/1.8deg_1M.cfg | 8 ++++++++ config/hardware/axis/X/1.8deg_2M.cfg | 13 +++++++++++++ config/hardware/axis/X/TMC/TMC2209.cfg | 13 +------------ config/hardware/axis/X/TMC/TMC2209_1-Motor.cfg | 12 ++++++++++++ .../hardware/axis/X/TMC/TMC2209_2-Motors.cfg | 8 ++++++++ config/hardware/axis/X/TMC/TMC2240.cfg | 16 +--------------- config/hardware/axis/X/TMC/TMC2240_1-Motor.cfg | 15 +++++++++++++++ .../hardware/axis/X/TMC/TMC2240_2-Motors.cfg | 11 +++++++++++ config/hardware/axis/X/TMC/TMC5160.cfg | 16 +--------------- config/hardware/axis/X/TMC/TMC5160_1-Motor.cfg | 15 +++++++++++++++ .../hardware/axis/X/TMC/TMC5160_2-Motors.cfg | 11 +++++++++++ config/hardware/axis/X/default_wiring.cfg | 6 +----- config/hardware/axis/X/default_wiring_1M.cfg | 5 +++++ config/hardware/axis/X/default_wiring_2M.cfg | 6 ++++++ config/hardware/axis/Y/0.9deg.cfg | 9 +-------- config/hardware/axis/Y/0.9deg_1M.cfg | 8 ++++++++ config/hardware/axis/Y/0.9deg_2M.cfg | 13 +++++++++++++ config/hardware/axis/Y/1.8deg.cfg | 9 +-------- config/hardware/axis/Y/1.8deg_1M.cfg | 8 ++++++++ config/hardware/axis/Y/1.8deg_2M.cfg | 13 +++++++++++++ config/hardware/axis/Y/TMC/TMC2209.cfg | 13 +------------ config/hardware/axis/Y/TMC/TMC2209_1-Motor.cfg | 12 ++++++++++++ .../hardware/axis/Y/TMC/TMC2209_2-Motors.cfg | 8 ++++++++ config/hardware/axis/Y/TMC/TMC2240.cfg | 16 +--------------- config/hardware/axis/Y/TMC/TMC2240_1-Motor.cfg | 15 +++++++++++++++ .../hardware/axis/Y/TMC/TMC2240_2-Motors.cfg | 11 +++++++++++ config/hardware/axis/Y/TMC/TMC5160.cfg | 16 +--------------- config/hardware/axis/Y/TMC/TMC5160_1-Motor.cfg | 15 +++++++++++++++ .../hardware/axis/Y/TMC/TMC5160_2-Motors.cfg | 11 +++++++++++ config/hardware/axis/Y/default_wiring.cfg | 6 +----- config/hardware/axis/Y/default_wiring_1M.cfg | 5 +++++ config/hardware/axis/Y/default_wiring_2M.cfg | 6 ++++++ user_templates/mcu.cfg | 18 ++++++++++++------ user_templates/printer.cfg | 12 ++++++++---- 38 files changed, 282 insertions(+), 136 deletions(-) create mode 100644 config/hardware/axis/X/0.9deg_1M.cfg create mode 100644 config/hardware/axis/X/0.9deg_2M.cfg create mode 100644 config/hardware/axis/X/1.8deg_1M.cfg create mode 100644 config/hardware/axis/X/1.8deg_2M.cfg create mode 100644 config/hardware/axis/X/TMC/TMC2209_1-Motor.cfg create mode 100644 config/hardware/axis/X/TMC/TMC2209_2-Motors.cfg create mode 100644 config/hardware/axis/X/TMC/TMC2240_1-Motor.cfg create mode 100644 config/hardware/axis/X/TMC/TMC2240_2-Motors.cfg create mode 100644 config/hardware/axis/X/TMC/TMC5160_1-Motor.cfg create mode 100644 config/hardware/axis/X/TMC/TMC5160_2-Motors.cfg create mode 100644 config/hardware/axis/X/default_wiring_1M.cfg create mode 100644 config/hardware/axis/X/default_wiring_2M.cfg create mode 100644 config/hardware/axis/Y/0.9deg_1M.cfg create mode 100644 config/hardware/axis/Y/0.9deg_2M.cfg create mode 100644 config/hardware/axis/Y/1.8deg_1M.cfg create mode 100644 config/hardware/axis/Y/1.8deg_2M.cfg create mode 100644 config/hardware/axis/Y/TMC/TMC2209_1-Motor.cfg create mode 100644 config/hardware/axis/Y/TMC/TMC2209_2-Motors.cfg create mode 100644 config/hardware/axis/Y/TMC/TMC2240_1-Motor.cfg create mode 100644 config/hardware/axis/Y/TMC/TMC2240_2-Motors.cfg create mode 100644 config/hardware/axis/Y/TMC/TMC5160_1-Motor.cfg create mode 100644 config/hardware/axis/Y/TMC/TMC5160_2-Motors.cfg create mode 100644 config/hardware/axis/Y/default_wiring_1M.cfg create mode 100644 config/hardware/axis/Y/default_wiring_2M.cfg diff --git a/config/hardware/axis/X/0.9deg.cfg b/config/hardware/axis/X/0.9deg.cfg index 0c86dba3a..b83ba150b 100644 --- a/config/hardware/axis/X/0.9deg.cfg +++ b/config/hardware/axis/X/0.9deg.cfg @@ -1,8 +1 @@ -[stepper_x] -rotation_distance: 40 -microsteps: 32 -full_steps_per_rotation: 400 - -# We also include the default wiring and speeds from here to avoid duplicating -[include default_wiring.cfg] -[include default_speed.cfg] +[include 0.9deg_1M.cfg] diff --git a/config/hardware/axis/X/0.9deg_1M.cfg b/config/hardware/axis/X/0.9deg_1M.cfg new file mode 100644 index 000000000..9fd8f0902 --- /dev/null +++ b/config/hardware/axis/X/0.9deg_1M.cfg @@ -0,0 +1,8 @@ +[stepper_x] +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation: 400 + +# We also include the default wiring and speeds from here to avoid duplicating +[include default_wiring_1M.cfg] +[include default_speed.cfg] diff --git a/config/hardware/axis/X/0.9deg_2M.cfg b/config/hardware/axis/X/0.9deg_2M.cfg new file mode 100644 index 000000000..e0007139c --- /dev/null +++ b/config/hardware/axis/X/0.9deg_2M.cfg @@ -0,0 +1,13 @@ +[stepper_x] +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation: 400 + +[stepper_x1] +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation: 400 + +# We also include the default wiring and speeds from here to avoid duplicating +[include default_wiring_2M.cfg] +[include default_speed.cfg] diff --git a/config/hardware/axis/X/1.8deg.cfg b/config/hardware/axis/X/1.8deg.cfg index ee1d030a2..0623ccea7 100644 --- a/config/hardware/axis/X/1.8deg.cfg +++ b/config/hardware/axis/X/1.8deg.cfg @@ -1,8 +1 @@ -[stepper_x] -rotation_distance: 40 -microsteps: 32 -full_steps_per_rotation: 200 - -# We also include the default wiring and speeds from here to avoid duplicating -[include default_wiring.cfg] -[include default_speed.cfg] +[include 1.8deg_1M.cfg] diff --git a/config/hardware/axis/X/1.8deg_1M.cfg b/config/hardware/axis/X/1.8deg_1M.cfg new file mode 100644 index 000000000..80a1c3c8c --- /dev/null +++ b/config/hardware/axis/X/1.8deg_1M.cfg @@ -0,0 +1,8 @@ +[stepper_x] +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation: 200 + +# We also include the default wiring and speeds from here to avoid duplicating +[include default_wiring_1M.cfg] +[include default_speed.cfg] diff --git a/config/hardware/axis/X/1.8deg_2M.cfg b/config/hardware/axis/X/1.8deg_2M.cfg new file mode 100644 index 000000000..1e5237802 --- /dev/null +++ b/config/hardware/axis/X/1.8deg_2M.cfg @@ -0,0 +1,13 @@ +[stepper_x] +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation: 200 + +[stepper_x1] +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation: 200 + +# We also include the default wiring and speeds from here to avoid duplicating +[include default_wiring_2M.cfg] +[include default_speed.cfg] diff --git a/config/hardware/axis/X/TMC/TMC2209.cfg b/config/hardware/axis/X/TMC/TMC2209.cfg index 2b25f6666..56e76cc45 100644 --- a/config/hardware/axis/X/TMC/TMC2209.cfg +++ b/config/hardware/axis/X/TMC/TMC2209.cfg @@ -1,12 +1 @@ -# X TMC2209 definition - -[gcode_macro _USER_VARIABLES] -variable_x_driver: "tmc2209" -gcode: - -[tmc2209 stepper_x] -uart_pin: X_TMCUART -interpolate: True -run_current: 0.8 -sense_resistor: 0.110 -stealthchop_threshold: 0 +[include TMC2209_1-Motor.cfg] diff --git a/config/hardware/axis/X/TMC/TMC2209_1-Motor.cfg b/config/hardware/axis/X/TMC/TMC2209_1-Motor.cfg new file mode 100644 index 000000000..2b25f6666 --- /dev/null +++ b/config/hardware/axis/X/TMC/TMC2209_1-Motor.cfg @@ -0,0 +1,12 @@ +# X TMC2209 definition + +[gcode_macro _USER_VARIABLES] +variable_x_driver: "tmc2209" +gcode: + +[tmc2209 stepper_x] +uart_pin: X_TMCUART +interpolate: True +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/X/TMC/TMC2209_2-Motors.cfg b/config/hardware/axis/X/TMC/TMC2209_2-Motors.cfg new file mode 100644 index 000000000..268db74ed --- /dev/null +++ b/config/hardware/axis/X/TMC/TMC2209_2-Motors.cfg @@ -0,0 +1,8 @@ +[include TMC2209_1-Motor.cfg] + +[tmc2209 stepper_x1] +uart_pin: X1_TMCUART +interpolate: True +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/X/TMC/TMC2240.cfg b/config/hardware/axis/X/TMC/TMC2240.cfg index 840be8124..c002be5ca 100644 --- a/config/hardware/axis/X/TMC/TMC2240.cfg +++ b/config/hardware/axis/X/TMC/TMC2240.cfg @@ -1,15 +1 @@ -# X TMC2240 definition - -[gcode_macro _USER_VARIABLES] -variable_x_driver: "tmc2240" -gcode: - -[tmc2240 stepper_x] -cs_pin: X_TMCUART -spi_speed: 500000 -spi_software_sclk_pin: DRIVER_SPI_SCK -spi_software_mosi_pin: DRIVER_SPI_MOSI -spi_software_miso_pin: DRIVER_SPI_MISO -interpolate: True -run_current: 0.7 -stealthchop_threshold: 0 +[include TMC2240_1-Motor.cfg] diff --git a/config/hardware/axis/X/TMC/TMC2240_1-Motor.cfg b/config/hardware/axis/X/TMC/TMC2240_1-Motor.cfg new file mode 100644 index 000000000..840be8124 --- /dev/null +++ b/config/hardware/axis/X/TMC/TMC2240_1-Motor.cfg @@ -0,0 +1,15 @@ +# X TMC2240 definition + +[gcode_macro _USER_VARIABLES] +variable_x_driver: "tmc2240" +gcode: + +[tmc2240 stepper_x] +cs_pin: X_TMCUART +spi_speed: 500000 +spi_software_sclk_pin: DRIVER_SPI_SCK +spi_software_mosi_pin: DRIVER_SPI_MOSI +spi_software_miso_pin: DRIVER_SPI_MISO +interpolate: True +run_current: 0.7 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/X/TMC/TMC2240_2-Motors.cfg b/config/hardware/axis/X/TMC/TMC2240_2-Motors.cfg new file mode 100644 index 000000000..ddfa73e28 --- /dev/null +++ b/config/hardware/axis/X/TMC/TMC2240_2-Motors.cfg @@ -0,0 +1,11 @@ +[include TMC2240_1-Motor.cfg] + +[tmc2240 stepper_x1] +cs_pin: X1_TMCUART +spi_speed: 500000 +spi_software_sclk_pin: DRIVER_SPI_SCK +spi_software_mosi_pin: DRIVER_SPI_MOSI +spi_software_miso_pin: DRIVER_SPI_MISO +interpolate: True +run_current: 0.7 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/X/TMC/TMC5160.cfg b/config/hardware/axis/X/TMC/TMC5160.cfg index 248485e34..1dfa3f1ee 100644 --- a/config/hardware/axis/X/TMC/TMC5160.cfg +++ b/config/hardware/axis/X/TMC/TMC5160.cfg @@ -1,15 +1 @@ -# X TMC5160 definition - -[gcode_macro _USER_VARIABLES] -variable_x_driver: "tmc5160" -gcode: - -[tmc5160 stepper_x] -cs_pin: X_TMCUART -spi_software_sclk_pin: DRIVER_SPI_SCK -spi_software_mosi_pin: DRIVER_SPI_MOSI -spi_software_miso_pin: DRIVER_SPI_MISO -interpolate: True -run_current: 0.8 -sense_resistor: 0.075 -stealthchop_threshold: 0 +[include TMC5160_1-Motor.cfg] diff --git a/config/hardware/axis/X/TMC/TMC5160_1-Motor.cfg b/config/hardware/axis/X/TMC/TMC5160_1-Motor.cfg new file mode 100644 index 000000000..248485e34 --- /dev/null +++ b/config/hardware/axis/X/TMC/TMC5160_1-Motor.cfg @@ -0,0 +1,15 @@ +# X TMC5160 definition + +[gcode_macro _USER_VARIABLES] +variable_x_driver: "tmc5160" +gcode: + +[tmc5160 stepper_x] +cs_pin: X_TMCUART +spi_software_sclk_pin: DRIVER_SPI_SCK +spi_software_mosi_pin: DRIVER_SPI_MOSI +spi_software_miso_pin: DRIVER_SPI_MISO +interpolate: True +run_current: 0.8 +sense_resistor: 0.075 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/X/TMC/TMC5160_2-Motors.cfg b/config/hardware/axis/X/TMC/TMC5160_2-Motors.cfg new file mode 100644 index 000000000..3b4e2a3be --- /dev/null +++ b/config/hardware/axis/X/TMC/TMC5160_2-Motors.cfg @@ -0,0 +1,11 @@ +[include TMC5160_1-Motor.cfg] + +[tmc5160 stepper_x1] +cs_pin: X1_TMCUART +spi_software_sclk_pin: DRIVER_SPI_SCK +spi_software_mosi_pin: DRIVER_SPI_MOSI +spi_software_miso_pin: DRIVER_SPI_MISO +interpolate: True +run_current: 0.8 +sense_resistor: 0.075 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/X/default_wiring.cfg b/config/hardware/axis/X/default_wiring.cfg index 036f31e7d..358fa2db4 100644 --- a/config/hardware/axis/X/default_wiring.cfg +++ b/config/hardware/axis/X/default_wiring.cfg @@ -1,5 +1 @@ -[stepper_x] -step_pin: X_STEP -dir_pin: X_DIR -enable_pin: !X_ENABLE -endstop_pin: X_STOP +[include default_wiring_1M.cfg] diff --git a/config/hardware/axis/X/default_wiring_1M.cfg b/config/hardware/axis/X/default_wiring_1M.cfg new file mode 100644 index 000000000..036f31e7d --- /dev/null +++ b/config/hardware/axis/X/default_wiring_1M.cfg @@ -0,0 +1,5 @@ +[stepper_x] +step_pin: X_STEP +dir_pin: X_DIR +enable_pin: !X_ENABLE +endstop_pin: X_STOP diff --git a/config/hardware/axis/X/default_wiring_2M.cfg b/config/hardware/axis/X/default_wiring_2M.cfg new file mode 100644 index 000000000..98272318f --- /dev/null +++ b/config/hardware/axis/X/default_wiring_2M.cfg @@ -0,0 +1,6 @@ +[include default_wiring_1M.cfg] + +[stepper_x1] +step_pin: X1_STEP +dir_pin: X1_DIR +enable_pin: !X1_ENABLE diff --git a/config/hardware/axis/Y/0.9deg.cfg b/config/hardware/axis/Y/0.9deg.cfg index 9bc9f0604..b83ba150b 100644 --- a/config/hardware/axis/Y/0.9deg.cfg +++ b/config/hardware/axis/Y/0.9deg.cfg @@ -1,8 +1 @@ -[stepper_y] -rotation_distance: 40 -microsteps: 32 -full_steps_per_rotation: 400 - -# We also include the default wiring and speeds from here to avoid duplicating -[include default_wiring.cfg] -[include default_speed.cfg] +[include 0.9deg_1M.cfg] diff --git a/config/hardware/axis/Y/0.9deg_1M.cfg b/config/hardware/axis/Y/0.9deg_1M.cfg new file mode 100644 index 000000000..5237d304f --- /dev/null +++ b/config/hardware/axis/Y/0.9deg_1M.cfg @@ -0,0 +1,8 @@ +[stepper_y] +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation: 400 + +# We also include the default wiring and speeds from here to avoid duplicating +[include default_wiring_1M.cfg] +[include default_speed.cfg] diff --git a/config/hardware/axis/Y/0.9deg_2M.cfg b/config/hardware/axis/Y/0.9deg_2M.cfg new file mode 100644 index 000000000..eb45dad92 --- /dev/null +++ b/config/hardware/axis/Y/0.9deg_2M.cfg @@ -0,0 +1,13 @@ +[stepper_y] +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation: 400 + +[stepper_y1] +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation: 400 + +# We also include the default wiring and speeds from here to avoid duplicating +[include default_wiring_2M.cfg] +[include default_speed.cfg] diff --git a/config/hardware/axis/Y/1.8deg.cfg b/config/hardware/axis/Y/1.8deg.cfg index bd3fe24c4..0623ccea7 100644 --- a/config/hardware/axis/Y/1.8deg.cfg +++ b/config/hardware/axis/Y/1.8deg.cfg @@ -1,8 +1 @@ -[stepper_y] -rotation_distance: 40 -microsteps: 32 -full_steps_per_rotation: 200 - -# We also include the default wiring and speeds from here to avoid duplicating -[include default_wiring.cfg] -[include default_speed.cfg] +[include 1.8deg_1M.cfg] diff --git a/config/hardware/axis/Y/1.8deg_1M.cfg b/config/hardware/axis/Y/1.8deg_1M.cfg new file mode 100644 index 000000000..ec3147071 --- /dev/null +++ b/config/hardware/axis/Y/1.8deg_1M.cfg @@ -0,0 +1,8 @@ +[stepper_y] +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation: 200 + +# We also include the default wiring and speeds from here to avoid duplicating +[include default_wiring_1M.cfg] +[include default_speed.cfg] diff --git a/config/hardware/axis/Y/1.8deg_2M.cfg b/config/hardware/axis/Y/1.8deg_2M.cfg new file mode 100644 index 000000000..d0ee4226b --- /dev/null +++ b/config/hardware/axis/Y/1.8deg_2M.cfg @@ -0,0 +1,13 @@ +[stepper_y] +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation: 200 + +[stepper_y1] +rotation_distance: 40 +microsteps: 32 +full_steps_per_rotation: 200 + +# We also include the default wiring and speeds from here to avoid duplicating +[include default_wiring_2M.cfg] +[include default_speed.cfg] diff --git a/config/hardware/axis/Y/TMC/TMC2209.cfg b/config/hardware/axis/Y/TMC/TMC2209.cfg index 34d5a1119..56e76cc45 100644 --- a/config/hardware/axis/Y/TMC/TMC2209.cfg +++ b/config/hardware/axis/Y/TMC/TMC2209.cfg @@ -1,12 +1 @@ -# Y TMC2209 definition - -[gcode_macro _USER_VARIABLES] -variable_y_driver: "tmc2209" -gcode: - -[tmc2209 stepper_y] -uart_pin: Y_TMCUART -interpolate: True -run_current: 0.8 -sense_resistor: 0.110 -stealthchop_threshold: 0 +[include TMC2209_1-Motor.cfg] diff --git a/config/hardware/axis/Y/TMC/TMC2209_1-Motor.cfg b/config/hardware/axis/Y/TMC/TMC2209_1-Motor.cfg new file mode 100644 index 000000000..34d5a1119 --- /dev/null +++ b/config/hardware/axis/Y/TMC/TMC2209_1-Motor.cfg @@ -0,0 +1,12 @@ +# Y TMC2209 definition + +[gcode_macro _USER_VARIABLES] +variable_y_driver: "tmc2209" +gcode: + +[tmc2209 stepper_y] +uart_pin: Y_TMCUART +interpolate: True +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/Y/TMC/TMC2209_2-Motors.cfg b/config/hardware/axis/Y/TMC/TMC2209_2-Motors.cfg new file mode 100644 index 000000000..9f4321856 --- /dev/null +++ b/config/hardware/axis/Y/TMC/TMC2209_2-Motors.cfg @@ -0,0 +1,8 @@ +[include TMC2209_1-Motor.cfg] + +[tmc2209 stepper_y1] +uart_pin: Y1_TMCUART +interpolate: True +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/Y/TMC/TMC2240.cfg b/config/hardware/axis/Y/TMC/TMC2240.cfg index 307778d48..c002be5ca 100644 --- a/config/hardware/axis/Y/TMC/TMC2240.cfg +++ b/config/hardware/axis/Y/TMC/TMC2240.cfg @@ -1,15 +1 @@ -# Y TMC2240 definition - -[gcode_macro _USER_VARIABLES] -variable_y_driver: "tmc2240" -gcode: - -[tmc2240 stepper_y] -cs_pin: Y_TMCUART -spi_speed: 500000 -spi_software_sclk_pin: DRIVER_SPI_SCK -spi_software_mosi_pin: DRIVER_SPI_MOSI -spi_software_miso_pin: DRIVER_SPI_MISO -interpolate: True -run_current: 0.7 -stealthchop_threshold: 0 +[include TMC2240_1-Motor.cfg] diff --git a/config/hardware/axis/Y/TMC/TMC2240_1-Motor.cfg b/config/hardware/axis/Y/TMC/TMC2240_1-Motor.cfg new file mode 100644 index 000000000..307778d48 --- /dev/null +++ b/config/hardware/axis/Y/TMC/TMC2240_1-Motor.cfg @@ -0,0 +1,15 @@ +# Y TMC2240 definition + +[gcode_macro _USER_VARIABLES] +variable_y_driver: "tmc2240" +gcode: + +[tmc2240 stepper_y] +cs_pin: Y_TMCUART +spi_speed: 500000 +spi_software_sclk_pin: DRIVER_SPI_SCK +spi_software_mosi_pin: DRIVER_SPI_MOSI +spi_software_miso_pin: DRIVER_SPI_MISO +interpolate: True +run_current: 0.7 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/Y/TMC/TMC2240_2-Motors.cfg b/config/hardware/axis/Y/TMC/TMC2240_2-Motors.cfg new file mode 100644 index 000000000..694687a61 --- /dev/null +++ b/config/hardware/axis/Y/TMC/TMC2240_2-Motors.cfg @@ -0,0 +1,11 @@ +[include TMC2240_1-Motor.cfg] + +[tmc2240 stepper_y1] +cs_pin: Y1_TMCUART +spi_speed: 500000 +spi_software_sclk_pin: DRIVER_SPI_SCK +spi_software_mosi_pin: DRIVER_SPI_MOSI +spi_software_miso_pin: DRIVER_SPI_MISO +interpolate: True +run_current: 0.7 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/Y/TMC/TMC5160.cfg b/config/hardware/axis/Y/TMC/TMC5160.cfg index 92fe211d7..1dfa3f1ee 100644 --- a/config/hardware/axis/Y/TMC/TMC5160.cfg +++ b/config/hardware/axis/Y/TMC/TMC5160.cfg @@ -1,15 +1 @@ -# Y TMC5160 definition - -[gcode_macro _USER_VARIABLES] -variable_y_driver: "tmc5160" -gcode: - -[tmc5160 stepper_y] -cs_pin: Y_TMCUART -spi_software_sclk_pin: DRIVER_SPI_SCK -spi_software_mosi_pin: DRIVER_SPI_MOSI -spi_software_miso_pin: DRIVER_SPI_MISO -interpolate: True -run_current: 0.8 -sense_resistor: 0.075 -stealthchop_threshold: 0 +[include TMC5160_1-Motor.cfg] diff --git a/config/hardware/axis/Y/TMC/TMC5160_1-Motor.cfg b/config/hardware/axis/Y/TMC/TMC5160_1-Motor.cfg new file mode 100644 index 000000000..92fe211d7 --- /dev/null +++ b/config/hardware/axis/Y/TMC/TMC5160_1-Motor.cfg @@ -0,0 +1,15 @@ +# Y TMC5160 definition + +[gcode_macro _USER_VARIABLES] +variable_y_driver: "tmc5160" +gcode: + +[tmc5160 stepper_y] +cs_pin: Y_TMCUART +spi_software_sclk_pin: DRIVER_SPI_SCK +spi_software_mosi_pin: DRIVER_SPI_MOSI +spi_software_miso_pin: DRIVER_SPI_MISO +interpolate: True +run_current: 0.8 +sense_resistor: 0.075 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/Y/TMC/TMC5160_2-Motors.cfg b/config/hardware/axis/Y/TMC/TMC5160_2-Motors.cfg new file mode 100644 index 000000000..c8a2146f7 --- /dev/null +++ b/config/hardware/axis/Y/TMC/TMC5160_2-Motors.cfg @@ -0,0 +1,11 @@ +[include TMC5160_1-Motor.cfg] + +[tmc5160 stepper_y1] +cs_pin: Y1_TMCUART +spi_software_sclk_pin: DRIVER_SPI_SCK +spi_software_mosi_pin: DRIVER_SPI_MOSI +spi_software_miso_pin: DRIVER_SPI_MISO +interpolate: True +run_current: 0.8 +sense_resistor: 0.075 +stealthchop_threshold: 0 diff --git a/config/hardware/axis/Y/default_wiring.cfg b/config/hardware/axis/Y/default_wiring.cfg index 795e0b613..358fa2db4 100644 --- a/config/hardware/axis/Y/default_wiring.cfg +++ b/config/hardware/axis/Y/default_wiring.cfg @@ -1,5 +1 @@ -[stepper_y] -step_pin: Y_STEP -dir_pin: Y_DIR -enable_pin: !Y_ENABLE -endstop_pin: Y_STOP +[include default_wiring_1M.cfg] diff --git a/config/hardware/axis/Y/default_wiring_1M.cfg b/config/hardware/axis/Y/default_wiring_1M.cfg new file mode 100644 index 000000000..795e0b613 --- /dev/null +++ b/config/hardware/axis/Y/default_wiring_1M.cfg @@ -0,0 +1,5 @@ +[stepper_y] +step_pin: Y_STEP +dir_pin: Y_DIR +enable_pin: !Y_ENABLE +endstop_pin: Y_STOP diff --git a/config/hardware/axis/Y/default_wiring_2M.cfg b/config/hardware/axis/Y/default_wiring_2M.cfg new file mode 100644 index 000000000..21c2bc7e8 --- /dev/null +++ b/config/hardware/axis/Y/default_wiring_2M.cfg @@ -0,0 +1,6 @@ +[include default_wiring_1M.cfg] + +[stepper_y1] +step_pin: Y1_STEP +dir_pin: Y1_DIR +enable_pin: !Y1_ENABLE diff --git a/user_templates/mcu.cfg b/user_templates/mcu.cfg index cd9439758..cb637c619 100644 --- a/user_templates/mcu.cfg +++ b/user_templates/mcu.cfg @@ -20,15 +20,21 @@ # ---------------------------------------------------------------------- AXIS DRIVERS ----> optional, but only one line per axis need to be selected ### 1. X Drivers ------------------------------------------------------------------------- -# [include config/hardware/axis/X/TMC/TMC2209.cfg] +# [include config/hardware/axis/X/TMC/TMC2209_1-Motor.cfg] +# [include config/hardware/axis/X/TMC/TMC2209_2-Motors.cfg] # [include config/hardware/axis/X/TMC/TMC2209_V0specific.cfg] # Should only be used for early LDO V0 kits to mitigate the known VFAs issue -# [include config/hardware/axis/X/TMC/TMC2240.cfg] -# [include config/hardware/axis/X/TMC/TMC5160.cfg] +# [include config/hardware/axis/X/TMC/TMC2240_1-Motor.cfg] +# [include config/hardware/axis/X/TMC/TMC2240_2-Motors.cfg] +# [include config/hardware/axis/X/TMC/TMC5160_1-Motor.cfg] +# [include config/hardware/axis/X/TMC/TMC5160_2-Motors.cfg] ### 2. Y Drivers ------------------------------------------------------------------------- -# [include config/hardware/axis/Y/TMC/TMC2209.cfg] +# [include config/hardware/axis/Y/TMC/TMC2209_1-Motor.cfg] +# [include config/hardware/axis/Y/TMC/TMC2209_2-Motors.cfg] # [include config/hardware/axis/Y/TMC/TMC2209_V0specific.cfg] # Should only be used for early LDO V0 kits to mitigate the known VFAs issue -# [include config/hardware/axis/Y/TMC/TMC2240.cfg] -# [include config/hardware/axis/Y/TMC/TMC5160.cfg] +# [include config/hardware/axis/Y/TMC/TMC2240_1-Motor.cfg] +# [include config/hardware/axis/Y/TMC/TMC2240_2-Motors.cfg] +# [include config/hardware/axis/Y/TMC/TMC5160_1-Motor.cfg] +# [include config/hardware/axis/Y/TMC/TMC5160_2-Motors.cfg] ### 3. Z Drivers ------------------------------------------------------------------------- # [include config/hardware/axis/Z/TMC/TMC2209_1-Motor.cfg] # [include config/hardware/axis/Z/TMC/TMC2209_3-Motors.cfg] diff --git a/user_templates/printer.cfg b/user_templates/printer.cfg index 9db3d1afe..6daf7e461 100644 --- a/user_templates/printer.cfg +++ b/user_templates/printer.cfg @@ -24,11 +24,15 @@ # ---------------------------------------------------------------------- MACHINE AXIS ----> Select only one line for each axis ### X axis ------------------------------------------------------------------------------- -# [include config/hardware/axis/X/1.8deg.cfg] -# [include config/hardware/axis/X/0.9deg.cfg] +# [include config/hardware/axis/X/1.8deg_1M.cfg] # Single X motor +# [include config/hardware/axis/X/1.8deg_2M.cfg] # Dual X motor +# [include config/hardware/axis/X/0.9deg_1M.cfg] # Single X motor +# [include config/hardware/axis/X/0.9deg_2M.cfg] # Dual X motor ### Y axis ------------------------------------------------------------------------------- -# [include config/hardware/axis/Y/1.8deg.cfg] -# [include config/hardware/axis/Y/0.9deg.cfg] +# [include config/hardware/axis/Y/1.8deg_1M.cfg] # Single Y motor +# [include config/hardware/axis/Y/1.8deg_2M.cfg] # Dual Y motor +# [include config/hardware/axis/Y/0.9deg_1M.cfg] # Single Y motor +# [include config/hardware/axis/Y/0.9deg_2M.cfg] # Dual Y motor ### Z axis ------------------------------------------------------------------------------- # [include config/hardware/axis/Z/V2.4_stock_1.8deg.cfg] From dae4ec72171f9f117e31054d9960bd0cba02a190 Mon Sep 17 00:00:00 2001 From: dev-aphex Date: Wed, 19 Jun 2024 21:10:55 +0200 Subject: [PATCH 19/24] add built in adxl sensor from nitehawk sb board (#602) --- config/hardware/accelerometers/adxl345_nitehawk_sb.cfg | 8 ++++++++ user_templates/printer.cfg | 1 + 2 files changed, 9 insertions(+) create mode 100644 config/hardware/accelerometers/adxl345_nitehawk_sb.cfg diff --git a/config/hardware/accelerometers/adxl345_nitehawk_sb.cfg b/config/hardware/accelerometers/adxl345_nitehawk_sb.cfg new file mode 100644 index 000000000..d2840dbec --- /dev/null +++ b/config/hardware/accelerometers/adxl345_nitehawk_sb.cfg @@ -0,0 +1,8 @@ +[include generics/adxl345_software_spi.cfg] + +# As it's a toolhead ADXL, we add some default pins overrides from here +[adxl345] +cs_pin: toolhead:MCU_ADXL_CS +spi_software_sclk_pin: toolhead:MCU_ADXL_SCK +spi_software_mosi_pin: toolhead:MCU_ADXL_MOSI +spi_software_miso_pin: toolhead:MCU_ADXL_MISO diff --git a/user_templates/printer.cfg b/user_templates/printer.cfg index 9db3d1afe..4f93ead2c 100644 --- a/user_templates/printer.cfg +++ b/user_templates/printer.cfg @@ -198,6 +198,7 @@ # [include config/hardware/accelerometers/adxl345_sht.cfg] # For ADXL plugged in Mellow SHT36 or SHT42 boards # [include config/hardware/accelerometers/adxl345_BTT_SB22xx.cfg] # For ADXL plugged in BTT SB2209 or SB2240 boards # [include config/hardware/accelerometers/adxl345_Fysetc_SB_Can_TH.cfg] # For ADXL plugged in Fysetc SB Can TH boards +# [include config/hardware/accelerometers/adxl345_nitehawk_sb.cfg] # For built in ADXL sensor on the Nitehawk SB board # [include config/hardware/accelerometers/lis2dw_usb_rp2040_spi1.cfg] # For BTT S2DW V1.0, ... From 57c1bcc8d44cd17708017c60410f1b0a4bdac0de Mon Sep 17 00:00:00 2001 From: dev-aphex Date: Wed, 19 Jun 2024 21:12:37 +0200 Subject: [PATCH 20/24] Update LDO_Nitehawk-SB_v1.0.cfg (#594) --- user_templates/mcu_defaults/toolhead/LDO_Nitehawk-SB_v1.0.cfg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/user_templates/mcu_defaults/toolhead/LDO_Nitehawk-SB_v1.0.cfg b/user_templates/mcu_defaults/toolhead/LDO_Nitehawk-SB_v1.0.cfg index 4fd4d99b0..9c590faf5 100644 --- a/user_templates/mcu_defaults/toolhead/LDO_Nitehawk-SB_v1.0.cfg +++ b/user_templates/mcu_defaults/toolhead/LDO_Nitehawk-SB_v1.0.cfg @@ -18,7 +18,7 @@ mcu: toolhead aliases: E_STEP=MCU_EMOT_STEP , E_DIR=MCU_EMOT_DIR , E_ENABLE=MCU_EMOT_EN , E_TMCUART=MCU_EMOT_UART , - X_STOP=MCU_ENDSTOP_X , + X_STOP=MCU_ENDSTOP_X , Y_STOP=MCU_ENDSTOP_Y , PROBE_INPUT=MCU_HV_ENDSTOP , E_HEATER=MCU_HEAT , E_TEMPERATURE=MCU_TEMP , CHAMBER_TEMPERATURE=MCU_HEAT_CHAMBER , @@ -70,6 +70,8 @@ pin: toolhead:E_FAN ## and having the X endstop plugged to the toolhead MCU # [stepper_x] # endstop_pin: ^toolhead:X_STOP +# [stepper_y] +# endstop_pin: ^toolhead:Y_STOP [neopixel status_leds] pin: toolhead:STATUS_NEOPIXEL From 44f21b2576b074ffdc675a93583ad6a0f388cf2f Mon Sep 17 00:00:00 2001 From: Minims Date: Thu, 20 Jun 2024 16:37:13 +0200 Subject: [PATCH 21/24] add: mcu Fystec Cheetah v3 (#604) --- .../main/Fysetc_Cheetah_v3.x.cfg | 51 +++++++++++++++++ .../mcu_defaults/main/Fysetc_Cheetah_v3.x.cfg | 55 +++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 config/mcu_definitions/main/Fysetc_Cheetah_v3.x.cfg create mode 100644 user_templates/mcu_defaults/main/Fysetc_Cheetah_v3.x.cfg diff --git a/config/mcu_definitions/main/Fysetc_Cheetah_v3.x.cfg b/config/mcu_definitions/main/Fysetc_Cheetah_v3.x.cfg new file mode 100644 index 000000000..97ad9cf16 --- /dev/null +++ b/config/mcu_definitions/main/Fysetc_Cheetah_v3.x.cfg @@ -0,0 +1,51 @@ +[board_pins mcu_manufacturer] +aliases: + MCU_XM_STEP=PC0 , MCU_XM_DIR=PC1 , MCU_XM_ENABLE=PC3 , + MCU_YM_STEP=PC14 , MCU_YM_DIR=PC13 , MCU_YM_ENABLE=PC15 , + MCU_ZM_STEP=PB4 , MCU_ZM_DIR=PB5 , MCU_ZM_ENABLE=PC2 , + MCU_EM_STEP=PB2 , MCU_EM_DIR=PA15 , MCU_EM_ENABLE=PD2 , + MCU_TMCUART=PB3 , MCU_TMCTX=PA2 , + + MCU_XSTOP=PA2 , MCU_YSTOP=PA3 , MCU_ZSTOP=PC4 , + MCU_E0STOP=PA1 , + + MCU_HE0=PC7 , + MCU_BED=PC8 , + + MCU_TH0=PC5 , + MCU_THB=PB0 , + MCU_TH2=PB1 , + + MCU_FAN0=PA14 , MCU_FAN1=PA13 , MCU_FAN2=PA8 , + + # Z-Probe Header + MCU_SERVOS=PA0, MCU_PROBE=PC4 , + + # PI Header + MCU_Pi_PWR_UART_TX1=PA9 , + MCU_Pi_PWR_UART_RX1=PA10 , + + # ?? Header + MCU_P2_DP=PA11 , + MCU_P2_DM=PA12 , + + # EXP1 header + EXP1_1= , EXP1_2=<5V> , + EXP1_3=PB7 , EXP1_4=PB6 , + EXP1_5=PB14 , EXP1_6=PB13 , # Slot in the socket on this side + EXP1_7=PB12 , EXP1_8=PB15 , + EXP1_9=PC6 , EXP1_10=PB10 , + + # EXP2 header + EXP2_1= , EXP2_2=<5V> , + EXP2_3= , EXP2_4=PC12 , + EXP2_5=PA7 , EXP2_6=PC11 , # Slot in the socket on this side + EXP2_7=PA4 , EXP2_8=PC10 , + EXP2_9=PA5 ,EXP2_10=PA6 , + + # EXP3 header + EXP3_1=PB10 , EXP3_2=PC6 , + EXP3_3=PC10 , EXP3_4=PB14 , + EXP3_5=PC11 , EXP3_6=PB13 , # Slot in the socket on this side + EXP3_7=PB12 , EXP3_8=PB15 , + EXP3_9= , EXP3_10=<5V> \ No newline at end of file diff --git a/user_templates/mcu_defaults/main/Fysetc_Cheetah_v3.x.cfg b/user_templates/mcu_defaults/main/Fysetc_Cheetah_v3.x.cfg new file mode 100644 index 000000000..8942d8e74 --- /dev/null +++ b/user_templates/mcu_defaults/main/Fysetc_Cheetah_v3.x.cfg @@ -0,0 +1,55 @@ + +#------------------------------------# +#### Fystec Cheetah V3 definition #### +#------------------------------------# + +# https://github.com/FYSETC/Cheetah_V3.0 +[mcu] +##-------------------------------------------------------------------- +serial: /dev/serial/by-id/change-me-to-the-correct-mcu-path +##-------------------------------------------------------------------- + +[include config/mcu_definitions/main/Fysetc_Cheetah_v3.x.cfg] # Do not remove this line +[board_pins Cheetah_v3_mcu] +mcu: mcu +restart_method: command +aliases: + X_STEP=MCU_XM_STEP , X_DIR=MCU_XM_DIR , X_ENABLE=MCU_XM_ENABLE , + Y_STEP=MCU_YM_STEP , Y_DIR=MCU_YM_DIR , Y_ENABLE=MCU_YM_ENABLE , + Z_STEP=MCU_ZM_STEP , Z_DIR=MCU_ZM_DIR , Z_ENABLE=MCU_ZM_ENABLE , + E_STEP=MCU_EM_STEP , E_DIR=MCU_EM_DIR , E_ENABLE=MCU_EM_ENABLE , + + TMCUART=MCU_TMCUART , TMCTX=MCU_TMCTX , + + X_STOP=MCU_XSTOP , Y_STOP=MCU_YSTOP , Z_STOP=MCU_ZSTOP , + RUNOUT_SENSOR=MCU_E0STOP , + PROBE_INPUT=MCU_PROBE , + SERVO_PIN=MCU_SERVOS , + + E_HEATER=MCU_HE0 , E_TEMPERATURE=MCU_TH0 , + BED_HEATER=MCU_BED , BED_TEMPERATURE=MCU_THB , + + PART_FAN=MCU_FAN0 , E_FAN=MCU_FAN1 , CONTROLLER_FAN=MCU_FAN2 , + + +[tmc2209 stepper_x] +uart_pin: TMCUART +#tx_pin: TMCTX +uart_address: 0 + +[tmc2209 stepper_y] +uart_pin: TMCUART +#tx_pin: TMCTX +uart_address: 1 + +[tmc2209 stepper_z] +uart_pin: TMCUART +#tx_pin: TMCTX +uart_address: 2 + +# Comment this section if you are using a toolhead with its own MCU +[tmc2209 extruder] +uart_pin: TMCUART +#tx_pin: TMCTX +uart_address: 3 + From 963a3a063550bf6d7b1d8b3249df76b91fe289e8 Mon Sep 17 00:00:00 2001 From: Jan-Gerrit Drexhage <102791900+Surion79@users.noreply.github.com> Date: Mon, 24 Jun 2024 19:13:35 +0200 Subject: [PATCH 22/24] fixed default pins for SB2209 v1.0 (#609) --- user_templates/mcu_defaults/toolhead/BTT_SB2209_v1.0.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_templates/mcu_defaults/toolhead/BTT_SB2209_v1.0.cfg b/user_templates/mcu_defaults/toolhead/BTT_SB2209_v1.0.cfg index 0ebeabeea..58ef3a78e 100644 --- a/user_templates/mcu_defaults/toolhead/BTT_SB2209_v1.0.cfg +++ b/user_templates/mcu_defaults/toolhead/BTT_SB2209_v1.0.cfg @@ -24,7 +24,7 @@ aliases: E_HEATER=MCU_HE0 , E_TEMPERATURE=MCU_TH0 , - PART_FAN=MCU_FAN1_PWM , E_FAN=MCU_FAN2_PWM , + PART_FAN=MCU_FAN2_PWM , E_FAN=MCU_FAN1_PWM , STATUS_NEOPIXEL=MCU_RGB , From e679c21fb00cd0b88677072e4e8440a699ef840f Mon Sep 17 00:00:00 2001 From: Jan-Gerrit Drexhage <102791900+Surion79@users.noreply.github.com> Date: Mon, 24 Jun 2024 19:15:04 +0200 Subject: [PATCH 23/24] added function for pause at (next) layer (#606) --- macros/base/cancel_print.cfg | 4 ++++ macros/base/end_print.cfg | 5 ++++- macros/base/pause_resume.cfg | 40 ++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/macros/base/cancel_print.cfg b/macros/base/cancel_print.cfg index 82c3a8ade..70fb00ca1 100644 --- a/macros/base/cancel_print.cfg +++ b/macros/base/cancel_print.cfg @@ -77,4 +77,8 @@ gcode: SET_FILAMENT_SENSOR SENSOR="runout_sensor" ENABLE=1 {% endif %} + # clear pause_next_layer and pause_at_layer as preparation for next print + SET_PAUSE_NEXT_LAYER ENABLE=0 + SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0 + BASE_CANCEL_PRINT diff --git a/macros/base/end_print.cfg b/macros/base/end_print.cfg index 5228ba43a..851ba30b8 100644 --- a/macros/base/end_print.cfg +++ b/macros/base/end_print.cfg @@ -76,4 +76,7 @@ gcode: # If a filament sensor is connected, re-enable it in case it was disabled during printing {% if filament_sensor_enabled %} SET_FILAMENT_SENSOR SENSOR="runout_sensor" ENABLE=1 - {% endif %} \ No newline at end of file + {% endif %} + + SET_PAUSE_NEXT_LAYER ENABLE=0 + SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0 diff --git a/macros/base/pause_resume.cfg b/macros/base/pause_resume.cfg index 54b2af0bf..22b76887c 100644 --- a/macros/base/pause_resume.cfg +++ b/macros/base/pause_resume.cfg @@ -43,3 +43,43 @@ gcode: {% endif %} BASE_RESUME {% endif %} + + +# Usage: SET_PAUSE_NEXT_LAYER [ENABLE=[0|1]] [MACRO=] +[gcode_macro SET_PAUSE_NEXT_LAYER] +description: Enable a pause if the next layer is reached +gcode: + {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %} + {% set ENABLE = params.ENABLE|default(1)|int != 0 %} + {% set MACRO = params.MACRO|default(pause_next_layer.call, True) %} + SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}" + +# Usage: SET_PAUSE_AT_LAYER [ENABLE=[0|1]] [LAYER=] [MACRO=] +[gcode_macro SET_PAUSE_AT_LAYER] +description: Enable/disable a pause if a given layer number is reached +gcode: + {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %} + {% set ENABLE = params.ENABLE|int != 0 if params.ENABLE is defined + else params.LAYER is defined %} + {% set LAYER = params.LAYER|default(pause_at_layer.layer)|int %} + {% set MACRO = params.MACRO|default(pause_at_layer.call, True) %} + SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}" + +# Usage: SET_PRINT_STATS_INFO [TOTAL_LAYER=] [CURRENT_LAYER= ] +[gcode_macro SET_PRINT_STATS_INFO] +rename_existing: SET_PRINT_STATS_INFO_BASE +description: Overwrite, to get pause_next_layer and pause_at_layer feature +variable_pause_next_layer: { 'enable': False, 'call': "PAUSE" } +variable_pause_at_layer : { 'enable': False, 'layer': 0, 'call': "PAUSE" } +gcode: + {% if pause_next_layer.enable %} + RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}' + {pause_next_layer.call} ; execute the given gcode to pause, should be either M600 or PAUSE + SET_PAUSE_NEXT_LAYER ENABLE=0 + {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %} + RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}' + {pause_at_layer.call} ; execute the given gcode to pause, should be either M600 or PAUSE + SET_PAUSE_AT_LAYER ENABLE=0 + {% endif %} + SET_PRINT_STATS_INFO_BASE {rawparams} + \ No newline at end of file From df5ad5bfa6c82ddb293593711d20b22cf3629792 Mon Sep 17 00:00:00 2001 From: Minims Date: Mon, 24 Jun 2024 19:17:08 +0200 Subject: [PATCH 24/24] Add FYSETC Nozzle-Input-Shaper accelerometer support (#603) --- .../accelerometers/adxl345_Fystec_NIS.cfg | 26 +++++++++++++++++++ user_templates/printer.cfg | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 config/hardware/accelerometers/adxl345_Fystec_NIS.cfg diff --git a/config/hardware/accelerometers/adxl345_Fystec_NIS.cfg b/config/hardware/accelerometers/adxl345_Fystec_NIS.cfg new file mode 100644 index 000000000..a91b65471 --- /dev/null +++ b/config/hardware/accelerometers/adxl345_Fystec_NIS.cfg @@ -0,0 +1,26 @@ +[include generics/adxl345_software_spi.cfg] + +# https://github.com/FYSETC/Nozzle-Input-Shaper +# stm32f042 + +# You need to override the following to be able to set the proper serial in your overrides.cfg file +[mcu adxl] +serial: /dev/serial/by-id/xxx + +[adxl345] +cs_pin: NIS:PA4 +spi_software_sclk_pin: adxl:PA5 +spi_software_mosi_pin: adxl:PA7 +spi_software_miso_pin: adxl:PA6 +axes_map: x,y,z + +[resonance_tester] +accel_chip: adxl345 +probe_points: + -1,-1,-1 + +# Include the IS calibration macros to unlock them when +# an accelerometer is installed on the machine +[include ../../../macros/helpers/resonance_override.cfg] +[include ../../../scripts/K-ShakeTune/K-SnT_*.cfg] + diff --git a/user_templates/printer.cfg b/user_templates/printer.cfg index 4f93ead2c..ae4c1ca3f 100644 --- a/user_templates/printer.cfg +++ b/user_templates/printer.cfg @@ -191,6 +191,7 @@ # [include config/hardware/accelerometers/adxl345_usb.cfg] # For KUBSA, ... # [include config/hardware/accelerometers/adxl345_usb_rampon.cfg] # For KUBSA with Rampon firmware, ... # [include config/hardware/accelerometers/adxl345_usb_rp2040_spi1.cfg] # For Fysetc PortableInputShaper, ... +# [include config/hardware/accelerometers/adxl345_Fystec_NIS.cfg] # For USB Nozzle Input Shapers # [include config/hardware/accelerometers/adxl345_skr.cfg] # For ADXL plugged in SKRv1.4 (not a conventional way) # [include config/hardware/accelerometers/adxl345_sb2040.cfg] # For ADXL plugged in Mellow Fly-SB2040 boards @@ -200,7 +201,7 @@ # [include config/hardware/accelerometers/adxl345_Fysetc_SB_Can_TH.cfg] # For ADXL plugged in Fysetc SB Can TH boards # [include config/hardware/accelerometers/adxl345_nitehawk_sb.cfg] # For built in ADXL sensor on the Nitehawk SB board -# [include config/hardware/accelerometers/lis2dw_usb_rp2040_spi1.cfg] # For BTT S2DW V1.0, ... +# [include config/hardware/accelerometers/lis2dw_usb_rp2040_spi1.cfg] # For BTT S2DW V1.0, ... # [include config/hardware/accelerometers/beacon_accelerometer.cfg] # For Beacon Rev H make sure Beacon. Do not forget to include the beacon_virtual_probe in the PROBE section! # ----------------------------------------------------------------------------------------