diff --git a/.github/workflows/klipper3d-deploy.yaml b/.github/workflows/klipper3d-deploy.yaml index 609644bbc..076be8dac 100644 --- a/.github/workflows/klipper3d-deploy.yaml +++ b/.github/workflows/klipper3d-deploy.yaml @@ -26,7 +26,7 @@ jobs: - name: Install dependencies run: pip install -r docs/_klipper3d/mkdocs-requirements.txt - name: Build MkDocs Pages - run: docs/_klipper3d/build-translations.sh + run: docs/_klipper3d/build-website.sh - name: Deploy uses: JamesIves/github-pages-deploy-action@v4.4.3 with: diff --git a/config/example-generic-caretesian.cfg b/config/example-generic-caretesian.cfg index 2d6b3994e..7c8aa4a4b 100644 --- a/config/example-generic-caretesian.cfg +++ b/config/example-generic-caretesian.cfg @@ -7,36 +7,39 @@ # See docs/Config_Reference.md for a description of parameters. -[carriage x] +[carriage carriage_x] +axis: x position_endstop: 0 position_max: 300 homing_speed: 50 endstop_pin: ^PE5 -[carriage y] +[carriage carriage_y] +axis: y position_endstop: 0 position_max: 200 homing_speed: 50 endstop_pin: ^PJ1 -[extra_carriage y1] -primary_carriage: y +[extra_carriage carriage_y1] +primary_carriage: carriage_y endstop_pin: ^PB6 -[carriage z] +[carriage carriage_z] +axis: z position_endstop: 0.5 position_max: 100 endstop_pin: ^PD3 -[dual_carriage u] -primary_carriage: x +[dual_carriage carriage_u] +primary_carriage: carriage_x position_endstop: 300 position_max: 300 homing_speed: 50 endstop_pin: ^PE4 [stepper my_stepper_x] -carriages: x+y +carriages: carriage_x+carriage_y step_pin: PF0 dir_pin: PF1 enable_pin: !PD7 @@ -44,7 +47,7 @@ microsteps: 16 rotation_distance: 40 [stepper my_stepper_u] -carriages: u-y1 +carriages: carriage_u-carriage_y1 step_pin: PH1 dir_pin: PH0 enable_pin: !PA1 @@ -52,7 +55,7 @@ microsteps: 16 rotation_distance: 40 [stepper my_stepper_y0] -carriages: y +carriages: carriage_y step_pin: PF6 dir_pin: !PF7 enable_pin: !PF2 @@ -60,7 +63,7 @@ microsteps: 16 rotation_distance: 40 [stepper my_stepper_y1] -carriages: y1 +carriages: carriage_y1 step_pin: PE3 dir_pin: !PH6 enable_pin: !PG5 @@ -68,7 +71,7 @@ microsteps: 16 rotation_distance: 40 [stepper my_stepper_z0] -carriages: z +carriages: carriage_z step_pin: PL3 dir_pin: PL1 enable_pin: !PK0 @@ -76,7 +79,7 @@ microsteps: 16 rotation_distance: 8 [stepper my_stepper_z1] -carriages: z +carriages: carriage_z step_pin: PG1 dir_pin: PG0 enable_pin: !PH3 diff --git a/config/generic-bigtreetech-manta-e3ez.cfg b/config/generic-bigtreetech-manta-e3ez.cfg index 199eae708..39f12fd2a 100644 --- a/config/generic-bigtreetech-manta-e3ez.cfg +++ b/config/generic-bigtreetech-manta-e3ez.cfg @@ -133,44 +133,34 @@ max_z_accel: 100 #[tmc2130 stepper_x] #cs_pin: PB8 -#spi_software_miso_pin: PC11 -#spi_software_mosi_pin: PC12 -#spi_software_sclk_pin: PC10 +#spi_bus: spi3_PC11_PC12_PC10 ##diag1_pin: PF3 #run_current: 0.800 #stealthchop_threshold: 999999 #[tmc2130 stepper_y] #cs_pin: PC9 -#spi_software_miso_pin: PC11 -#spi_software_mosi_pin: PC12 -#spi_software_sclk_pin: PC10 +#spi_bus: spi3_PC11_PC12_PC10 ##diag1_pin: PF4 #run_current: 0.800 #stealthchop_threshold: 999999 #[tmc2130 stepper_z] #cs_pin: PD0 -#spi_software_miso_pin: PC11 -#spi_software_mosi_pin: PC12 -#spi_software_sclk_pin: PC10 +#spi_bus: spi3_PC11_PC12_PC10 ##diag1_pin: PF5 #run_current: 0.650 #stealthchop_threshold: 999999 #[tmc2130 extruder] #cs_pin: PD1 -#spi_software_miso_pin: PC11 -#spi_software_mosi_pin: PC12 -#spi_software_sclk_pin: PC10 +#spi_bus: spi3_PC11_PC12_PC10 #run_current: 0.800 #stealthchop_threshold: 999999 #[tmc2130 extruder1] #cs_pin: PB5 -#spi_software_miso_pin: PC11 -#spi_software_mosi_pin: PC12 -#spi_software_sclk_pin: PC10 +#spi_bus: spi3_PC11_PC12_PC10 #run_current: 0.800 #stealthchop_threshold: 999999 @@ -195,6 +185,4 @@ aliases: #[adxl345] #cs_pin: PC15 -#spi_software_miso_pin: PC11 -#spi_software_mosi_pin: PC12 -#spi_software_sclk_pin: PC10 +#spi_bus: spi3_PC11_PC12_PC10 diff --git a/config/generic-bigtreetech-manta-m8p-v1.0.cfg b/config/generic-bigtreetech-manta-m8p-v1.0.cfg index 2a801cded..4459076fa 100644 --- a/config/generic-bigtreetech-manta-m8p-v1.0.cfg +++ b/config/generic-bigtreetech-manta-m8p-v1.0.cfg @@ -39,7 +39,7 @@ position_max: 270 # Motor4 # The M8P only has 4 heater outputs which leaves an extra stepper # This can be used for a second Z stepper, dual_carriage, extruder co-stepper, -# or other accesory such as an MMU +# or other accessory such as an MMU #[stepper_] #step_pin: PD3 #dir_pin: PD2 diff --git a/config/generic-bigtreetech-manta-m8p-v1.1.cfg b/config/generic-bigtreetech-manta-m8p-v1.1.cfg index 36ef710cd..aadb5c453 100644 --- a/config/generic-bigtreetech-manta-m8p-v1.1.cfg +++ b/config/generic-bigtreetech-manta-m8p-v1.1.cfg @@ -40,7 +40,7 @@ position_max: 270 # Motor4 # The M8P only has 4 heater outputs which leaves an extra stepper # This can be used for a second Z stepper, dual_carriage, extruder co-stepper, -# or other accesory such as an MMU +# or other accessory such as an MMU #[stepper_] #step_pin: PD3 #dir_pin: PD2 diff --git a/config/generic-bigtreetech-octopus-max-ez.cfg b/config/generic-bigtreetech-octopus-max-ez.cfg index 60822b046..3ccc2c750 100644 --- a/config/generic-bigtreetech-octopus-max-ez.cfg +++ b/config/generic-bigtreetech-octopus-max-ez.cfg @@ -43,7 +43,7 @@ position_max: 200 # Motor-4 # The Octopus only has 4 heater outputs which leaves an extra stepper # This can be used for a second Z stepper, dual_carriage, extruder co-stepper, -# or other accesory such as an MMU +# or other accessory such as an MMU #[stepper_] #step_pin: PB8 #dir_pin: PB9 diff --git a/config/generic-bigtreetech-octopus-v1.1.cfg b/config/generic-bigtreetech-octopus-v1.1.cfg index f3a2b87c3..dcd0e97c6 100644 --- a/config/generic-bigtreetech-octopus-v1.1.cfg +++ b/config/generic-bigtreetech-octopus-v1.1.cfg @@ -52,7 +52,7 @@ position_max: 200 # Driver3 # The Octopus only has 4 heater outputs which leaves an extra stepper # This can be used for a second Z stepper, dual_carriage, extruder co-stepper, -# or other accesory such as an MMU +# or other accessory such as an MMU #[stepper_] #step_pin: PG4 #dir_pin: PC1 diff --git a/config/generic-mightyboard.cfg b/config/generic-mightyboard.cfg index 85dbe54da..13a63f450 100644 --- a/config/generic-mightyboard.cfg +++ b/config/generic-mightyboard.cfg @@ -89,32 +89,32 @@ max_z_velocity: 5 max_z_accel: 100 [mcp4018 x_axis_pot] -scl_pin: PJ5 -sda_pin: PF3 +i2c_software_scl_pin: PJ5 +i2c_software_sda_pin: PF3 wiper: 0.50 scale: 0.773 [mcp4018 y_axis_pot] -scl_pin: PJ5 -sda_pin: PF7 +i2c_software_scl_pin: PJ5 +i2c_software_sda_pin: PF7 wiper: 0.50 scale: 0.773 [mcp4018 z_axis_pot] -scl_pin: PJ5 -sda_pin: PK3 +i2c_software_scl_pin: PJ5 +i2c_software_sda_pin: PK3 wiper: 0.50 scale: 0.773 [mcp4018 a_axis_pot] -scl_pin: PJ5 -sda_pin: PA5 +i2c_software_scl_pin: PJ5 +i2c_software_sda_pin: PA5 wiper: 0.50 scale: 0.773 [mcp4018 b_axis_pot] -scl_pin: PJ5 -sda_pin: PJ6 +i2c_software_scl_pin: PJ5 +i2c_software_sda_pin: PJ6 wiper: 0.50 scale: 0.773 diff --git a/config/kit-voron2-250mm.cfg b/config/kit-voron2-250mm.cfg index 343e9c674..e82ee28a1 100644 --- a/config/kit-voron2-250mm.cfg +++ b/config/kit-voron2-250mm.cfg @@ -19,7 +19,7 @@ # FSR switch (z endstop) location [homing_override] section # FSR switch (z endstop) offset for Z0 [stepper_z] section # Probe points [quad_gantry_level] section -# Min & Max gantry corner postions [quad_gantry_level] section +# Min & Max gantry corner positions [quad_gantry_level] section # PID tune [extruder] and [heater_bed] sections # Fine tune E steps [extruder] section diff --git a/config/kit-zav3d-2019.cfg b/config/kit-zav3d-2019.cfg index e3b57b8ed..e2385c941 100644 --- a/config/kit-zav3d-2019.cfg +++ b/config/kit-zav3d-2019.cfg @@ -20,7 +20,7 @@ # FSR switch (z endstop) location [homing_override] section # FSR switch (z endstop) offset for Z0 [stepper_z] section # Probe points [quad_gantry_level] section -# Min & Max gantry corner postions [quad_gantry_level] section +# Min & Max gantry corner positions [quad_gantry_level] section # PID tune [extruder] and [heater_bed] sections # Fine tune E steps [extruder] section diff --git a/config/printer-anycubic-kossel-2016.cfg b/config/printer-anycubic-kossel-2016.cfg index 7df93b41f..1f7819f2e 100644 --- a/config/printer-anycubic-kossel-2016.cfg +++ b/config/printer-anycubic-kossel-2016.cfg @@ -17,7 +17,7 @@ endstop_pin: ^PE4 homing_speed: 60 # The next parameter needs to be adjusted for # your printer. You may want to start with 280 -# and meassure the distance from nozzle to bed. +# and measure the distance from nozzle to bed. # This value then needs to be added. position_endstop: 273.0 arm_length: 229.4 diff --git a/config/printer-creality-cr10-v3-2020.cfg b/config/printer-creality-cr10-v3-2020.cfg index 9bf84df59..af9e923ca 100644 --- a/config/printer-creality-cr10-v3-2020.cfg +++ b/config/printer-creality-cr10-v3-2020.cfg @@ -43,7 +43,7 @@ position_max: 400 #Uncomment if you have a BL-Touch: #position_min: -4 #endstop_pin: probe:z_virtual_endstop -#and comment the follwing lines: +#and comment the following lines: position_endstop: 0.0 endstop_pin: ^PD3 #ar18 diff --git a/config/printer-creality-ender5-s1-2023.cfg b/config/printer-creality-ender5-s1-2023.cfg index 68a89fa5e..17bb2a460 100644 --- a/config/printer-creality-ender5-s1-2023.cfg +++ b/config/printer-creality-ender5-s1-2023.cfg @@ -81,7 +81,7 @@ pin: PA0 kick_start_time: 0.5 # Hotend fan -# set fan runnig when extruder temperature is over 60 +# set fan running when extruder temperature is over 60 [heater_fan heatbreak_fan] pin: PC0 heater:extruder diff --git a/config/printer-creality-ender5pro-2020.cfg b/config/printer-creality-ender5pro-2020.cfg index ded26b408..2321cfb6d 100644 --- a/config/printer-creality-ender5pro-2020.cfg +++ b/config/printer-creality-ender5pro-2020.cfg @@ -1,7 +1,7 @@ # This file contains pin mappings for the stock 2020 Creality Ender 5 # Pro with the 32-bit Creality 4.2.2 board. To use this config, during # "make menuconfig" select the STM32F103 with a "28KiB bootloader" and -# with "Use USB for communication" disabled. +# communication interface set to "Serial (on USART1 PA10/PA9)". # If you prefer a direct serial connection, in "make menuconfig" # select "Enable extra low-level configuration options" and select the diff --git a/config/printer-flashforge-creator-pro-2018.cfg b/config/printer-flashforge-creator-pro-2018.cfg index 072f75afb..1ed04313a 100644 --- a/config/printer-flashforge-creator-pro-2018.cfg +++ b/config/printer-flashforge-creator-pro-2018.cfg @@ -127,32 +127,32 @@ max_z_velocity: 5 max_z_accel: 100 [mcp4018 x_axis_pot] -scl_pin: PJ5 -sda_pin: PF3 +i2c_software_scl_pin: PJ5 +i2c_software_sda_pin: PF3 wiper: 118 scale: 127 [mcp4018 y_axis_pot] -scl_pin: PJ5 -sda_pin: PF7 +i2c_software_scl_pin: PJ5 +i2c_software_sda_pin: PF7 wiper: 118 scale: 127 [mcp4018 z_axis_pot] -scl_pin: PJ5 -sda_pin: PK3 +i2c_software_scl_pin: PJ5 +i2c_software_sda_pin: PK3 wiper: 40 scale: 127 [mcp4018 a_axis_pot] -scl_pin: PJ5 -sda_pin: PA5 +i2c_software_scl_pin: PJ5 +i2c_software_sda_pin: PA5 wiper: 118 scale: 127 [mcp4018 b_axis_pot] -scl_pin: PJ5 -sda_pin: PJ6 +i2c_software_scl_pin: PJ5 +i2c_software_sda_pin: PJ6 wiper: 118 scale: 127 diff --git a/config/printer-lulzbot-mini1-2016.cfg b/config/printer-lulzbot-mini1-2016.cfg index 52b8061ee..cff0eee45 100644 --- a/config/printer-lulzbot-mini1-2016.cfg +++ b/config/printer-lulzbot-mini1-2016.cfg @@ -195,7 +195,7 @@ samples_tolerance: 0.200 samples_tolerance_retries: 2 [bed_tilt] -# Enable bed tilt measurments using the probe we defined above +# Enable bed tilt measurements using the probe we defined above # Probe points using X0 Y0 offsets @ 0.01mm/step points: -2, -6 156, -6 diff --git a/config/printer-lulzbot-taz6-dual-v3-2017.cfg b/config/printer-lulzbot-taz6-dual-v3-2017.cfg index f94b06846..f4b23fdb8 100644 --- a/config/printer-lulzbot-taz6-dual-v3-2017.cfg +++ b/config/printer-lulzbot-taz6-dual-v3-2017.cfg @@ -183,7 +183,7 @@ samples: 2 samples_tolerance: 0.100 [bed_tilt] -#Enable bed tilt measurments using the probe we defined above +#Enable bed tilt measurements using the probe we defined above #Probe points using X0 Y0 offsets @ 0.01mm/step points: -3, -6 282, -6 diff --git a/config/printer-robo3d-r2-2017.cfg b/config/printer-robo3d-r2-2017.cfg index a87f4befc..89fe127bf 100644 --- a/config/printer-robo3d-r2-2017.cfg +++ b/config/printer-robo3d-r2-2017.cfg @@ -37,7 +37,7 @@ microsteps: 16 rotation_distance: 4 # Required if not using probe for the virtual endstop # endstop_pin: ^PD3 -# position_endstop: 250 # Will need ajustment +# position_endstop: 250 # Will need adjustment endstop_pin: probe:z_virtual_endstop homing_speed: 10.0 position_max: 250 diff --git a/config/printer-seemecnc-rostock-max-v2-2015.cfg b/config/printer-seemecnc-rostock-max-v2-2015.cfg index 70ebd876c..09ea7bdbd 100644 --- a/config/printer-seemecnc-rostock-max-v2-2015.cfg +++ b/config/printer-seemecnc-rostock-max-v2-2015.cfg @@ -1,4 +1,4 @@ -# This file constains the pin mappings for the SeeMeCNC Rostock Max +# This file contains the pin mappings for the SeeMeCNC Rostock Max # (version 2) delta printer from 2015. To use this config, the # firmware should be compiled for the AVR atmega2560. diff --git a/config/sample-bigtreetech-ebb-canbus-v1.1.cfg b/config/sample-bigtreetech-ebb-canbus-v1.1.cfg index c84abf173..8da7cccd4 100644 --- a/config/sample-bigtreetech-ebb-canbus-v1.1.cfg +++ b/config/sample-bigtreetech-ebb-canbus-v1.1.cfg @@ -11,9 +11,7 @@ serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00 [adxl345] cs_pin: EBBCan:PB12 -spi_software_sclk_pin: EBBCan:PB10 -spi_software_mosi_pin: EBBCan:PB11 -spi_software_miso_pin: EBBCan:PB2 +spi_bus: spi2_PB2_PB11_PB10 axes_map: x,y,z [extruder] diff --git a/config/sample-bigtreetech-ebb-canbus-v1.2.cfg b/config/sample-bigtreetech-ebb-canbus-v1.2.cfg index 053b783c3..7b55a91cf 100644 --- a/config/sample-bigtreetech-ebb-canbus-v1.2.cfg +++ b/config/sample-bigtreetech-ebb-canbus-v1.2.cfg @@ -11,9 +11,7 @@ serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00 [adxl345] cs_pin: EBBCan:PB12 -spi_software_sclk_pin: EBBCan:PB10 -spi_software_mosi_pin: EBBCan:PB11 -spi_software_miso_pin: EBBCan:PB2 +spi_bus: spi2_PB2_PB11_PB10 axes_map: x,y,z [extruder] diff --git a/config/sample-bigtreetech-ebb-sb-canbus-v1.0.cfg b/config/sample-bigtreetech-ebb-sb-canbus-v1.0.cfg index 192d385e5..1e60467dd 100644 --- a/config/sample-bigtreetech-ebb-sb-canbus-v1.0.cfg +++ b/config/sample-bigtreetech-ebb-sb-canbus-v1.0.cfg @@ -15,9 +15,7 @@ sensor_pin: EBBCan:PA2 [adxl345] cs_pin: EBBCan:PB12 -spi_software_sclk_pin: EBBCan:PB10 -spi_software_mosi_pin: EBBCan:PB11 -spi_software_miso_pin: EBBCan:PB2 +spi_bus: spi2_PB2_PB11_PB10 axes_map: x,y,z [extruder] diff --git a/config/sample-cartographer-v3.cfg b/config/sample-cartographer-v3.cfg new file mode 100644 index 000000000..ee1a6fd41 --- /dev/null +++ b/config/sample-cartographer-v3.cfg @@ -0,0 +1,52 @@ +# This file contains common pin mappings for the Cartographer board V3 +# To use this config, the firmware should be compiled for the +# STM32F042 with "24 MHz crystal" and +# "USB (on PA9/PA10)" or "CAN bus (on PA9/PA10)". +# CAN bus requires PA1 GPIO pin to be set at micro-controller start-up +# The "carto" micro-controller will be used to control +# the components on the board. + +# See docs/Config_Reference.md for a description of parameters. + +[mcu carto] +serial: /dev/serial/by-id/usb-Klipper_stm32f042x6_29000380114330394D363620-if00 +#canbus_uuid: 92cf532ef122 + +#[adxl345 carto] +#cs_pin: carto:PA3 +#spi_bus: spi1_PA6_PA7_PA5 +#axes_map: x,y,z + +[thermistor 50k] +temperature1: 25 +resistance1: 50000 +temperature2: 50 +resistance2: 17940 +temperature3: 100 +resistance3: 3090 + +[temperature_probe carto] +pullup_resistor: 10000 +sensor_type: 50k +sensor_pin: carto:PA4 +min_temp: 0 +max_temp: 125 + +[led carto_led] +white_pin: carto:PB5 +initial_WHITE: 0.03 + +[output_pin _LDC1612_en] +pin: carto:PA15 +value: 0 # enable + +[static_pwm_clock ldc1612_clk_in] +pin: carto:PB4 +frequency: 24000000 + +[probe_eddy_current carto] +sensor_type: ldc1612 +frequency: 24000000 +i2c_address: 42 +i2c_mcu: carto +i2c_bus: i2c1_PB6_PB7 diff --git a/config/sample-corexyuv.cfg b/config/sample-corexyuv.cfg index 368b64647..156c3f183 100644 --- a/config/sample-corexyuv.cfg +++ b/config/sample-corexyuv.cfg @@ -3,28 +3,30 @@ # See docs/Config_Reference.md for a description of parameters. -[carriage x] +[carriage carriage_x] +axis: x position_endstop: 0 position_max: 300 homing_speed: 50 endstop_pin: ^PE5 -[carriage y] +[carriage carriage_y] +axis: y position_endstop: 0 position_max: 200 homing_speed: 50 endstop_pin: ^PJ1 -[dual_carriage u] -primary_carriage: x +[dual_carriage carriage_u] +primary_carriage: carriage_x safe_distance: 70 position_endstop: 300 position_max: 300 homing_speed: 50 endstop_pin: ^PE4 -[dual_carriage v] -primary_carriage: y +[dual_carriage carriage_v] +primary_carriage: carriage_y safe_distance: 50 position_endstop: 200 position_max: 200 @@ -32,7 +34,7 @@ homing_speed: 50 endstop_pin: ^PD4 [stepper a] -carriages: x+y +carriages: carriage_x+carriage_y step_pin: PF0 dir_pin: PF1 enable_pin: !PD7 @@ -40,7 +42,7 @@ microsteps: 16 rotation_distance: 40 [stepper b] -carriages: u-v +carriages: carriage_u-carriage_v step_pin: PH1 dir_pin: PH0 enable_pin: !PA1 @@ -48,7 +50,7 @@ microsteps: 16 rotation_distance: 40 [stepper c] -carriages: x-y +carriages: carriage_x-carriage_y step_pin: PF6 dir_pin: !PF7 enable_pin: !PF2 @@ -56,7 +58,7 @@ microsteps: 16 rotation_distance: 40 [stepper d] -carriages: u+v +carriages: carriage_u+carriage_v step_pin: PE3 dir_pin: !PH6 enable_pin: !PG5 @@ -83,8 +85,8 @@ max_temp: 250 [gcode_macro PARK_extruder] gcode: - SET_DUAL_CARRIAGE CARRIAGE=x - SET_DUAL_CARRIAGE CARRIAGE=y + SET_DUAL_CARRIAGE CARRIAGE=carriage_x + SET_DUAL_CARRIAGE CARRIAGE=carriage_y G90 G1 X0 Y0 @@ -92,8 +94,8 @@ gcode: gcode: PARK_{printer.toolhead.extruder} ACTIVATE_EXTRUDER EXTRUDER=extruder - SET_DUAL_CARRIAGE CARRIAGE=x - SET_DUAL_CARRIAGE CARRIAGE=y + SET_DUAL_CARRIAGE CARRIAGE=carriage_x + SET_DUAL_CARRIAGE CARRIAGE=carriage_y [extruder1] step_pin: PC1 @@ -115,8 +117,8 @@ max_temp: 250 [gcode_macro PARK_extruder1] gcode: - SET_DUAL_CARRIAGE CARRIAGE=u - SET_DUAL_CARRIAGE CARRIAGE=v + SET_DUAL_CARRIAGE CARRIAGE=carriage_u + SET_DUAL_CARRIAGE CARRIAGE=carriage_v G90 G1 X300 Y200 @@ -124,37 +126,59 @@ gcode: gcode: PARK_{printer.toolhead.extruder} ACTIVATE_EXTRUDER EXTRUDER=extruder1 - SET_DUAL_CARRIAGE CARRIAGE=u - SET_DUAL_CARRIAGE CARRIAGE=v + SET_DUAL_CARRIAGE CARRIAGE=carriage_u + SET_DUAL_CARRIAGE CARRIAGE=carriage_v # A helper script to activate copy mode [gcode_macro ACTIVATE_COPY_MODE] gcode: - SET_DUAL_CARRIAGE CARRIAGE=x MODE=PRIMARY - SET_DUAL_CARRIAGE CARRIAGE=y MODE=PRIMARY + SET_DUAL_CARRIAGE CARRIAGE=carriage_x MODE=PRIMARY + SET_DUAL_CARRIAGE CARRIAGE=carriage_y MODE=PRIMARY G1 X0 Y0 ACTIVATE_EXTRUDER EXTRUDER=extruder - SET_DUAL_CARRIAGE CARRIAGE=u MODE=PRIMARY - SET_DUAL_CARRIAGE CARRIAGE=v MODE=PRIMARY + SET_DUAL_CARRIAGE CARRIAGE=carriage_u MODE=PRIMARY + SET_DUAL_CARRIAGE CARRIAGE=carriage_v MODE=PRIMARY G1 X150 Y100 - SET_DUAL_CARRIAGE CARRIAGE=u MODE=COPY - SET_DUAL_CARRIAGE CARRIAGE=v MODE=COPY + SET_DUAL_CARRIAGE CARRIAGE=carriage_u MODE=COPY + SET_DUAL_CARRIAGE CARRIAGE=carriage_v MODE=COPY SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=extruder # A helper script to activate mirror mode [gcode_macro ACTIVATE_MIRROR_MODE] gcode: - SET_DUAL_CARRIAGE CARRIAGE=x MODE=PRIMARY - SET_DUAL_CARRIAGE CARRIAGE=y MODE=PRIMARY + SET_DUAL_CARRIAGE CARRIAGE=carriage_x MODE=PRIMARY + SET_DUAL_CARRIAGE CARRIAGE=carriage_y MODE=PRIMARY G1 X0 Y0 ACTIVATE_EXTRUDER EXTRUDER=extruder - SET_DUAL_CARRIAGE CARRIAGE=u MODE=PRIMARY - SET_DUAL_CARRIAGE CARRIAGE=v MODE=PRIMARY + SET_DUAL_CARRIAGE CARRIAGE=carriage_u MODE=PRIMARY + SET_DUAL_CARRIAGE CARRIAGE=carriage_v MODE=PRIMARY G1 X300 Y100 - SET_DUAL_CARRIAGE CARRIAGE=u MODE=MIRROR - SET_DUAL_CARRIAGE CARRIAGE=v MODE=COPY + SET_DUAL_CARRIAGE CARRIAGE=carriage_u MODE=MIRROR + SET_DUAL_CARRIAGE CARRIAGE=carriage_v MODE=COPY SYNC_EXTRUDER_MOTION EXTRUDER=extruder1 MOTION_QUEUE=extruder +[gcode_macro _DISABLE_AND_PARK_EXTRUDER] +gcode: + SAVE_GCODE_STATE NAME=disable_extruder + SAVE_DUAL_CARRIAGE_STATE NAME=disable_extruder + SET_HEATER_TEMPERATURE HEATER={params.EXTRUDER} TARGET=0 + SYNC_EXTRUDER_MOTION EXTRUDER={params.EXTRUDER} MOTION_QUEUE= + PARK_{params.EXTRUDER} + RESTORE_DUAL_CARRIAGE_STATE NAME=disable_extruder MOVE=0 + RESTORE_GCODE_STATE NAME=disable_extruder MOVE=0 + +[gcode_macro DISABLE_T0] +gcode: + SET_DUAL_CARRIAGE CARRIAGE=carriage_x MODE=INACTIVE + SET_DUAL_CARRIAGE CARRIAGE=carriage_y MODE=INACTIVE + _DISABLE_AND_PARK_EXTRUDER EXTRUDER=extruder + +[gcode_macro DISABLE_T1] +gcode: + SET_DUAL_CARRIAGE CARRIAGE=carriage_u MODE=INACTIVE + SET_DUAL_CARRIAGE CARRIAGE=carriage_v MODE=INACTIVE + _DISABLE_AND_PARK_EXTRUDER EXTRUDER=extruder + [printer] kinematics: generic_cartesian max_velocity: 300 @@ -169,9 +193,9 @@ max_z_accel: 100 #[delayed_gcode init_shaper] #initial_duration: 0.1 #gcode: -# SET_DUAL_CARRIAGE CARRIAGE=u -# SET_DUAL_CARRIAGE CARRIAGE=v -# SET_INPUT_SHAPER SHAPER_TYPE_X= SHAPER_FREQ_X= SHAPER_TYPE_Y= SHAPER_FREQ_Y= -# SET_DUAL_CARRIAGE CARRIAGE=x MODE=PRIMARY -# SET_DUAL_CARRIAGE CARRIAGE=y MODE=PRIMARY -# SET_INPUT_SHAPER SHAPER_TYPE_X= SHAPER_FREQ_X= SHAPER_TYPE_Y= SHAPER_FREQ_Y= +# SET_DUAL_CARRIAGE CARRIAGE=carriage_u +# SET_DUAL_CARRIAGE CARRIAGE=carriage_v +# SET_INPUT_SHAPER SHAPER_TYPE_X= SHAPER_FREQ_X= SHAPER_TYPE_Y= SHAPER_FREQ_Y= +# SET_DUAL_CARRIAGE CARRIAGE=carriage_x MODE=PRIMARY +# SET_DUAL_CARRIAGE CARRIAGE=carriage_y MODE=PRIMARY +# SET_INPUT_SHAPER SHAPER_TYPE_X= SHAPER_FREQ_X= SHAPER_TYPE_Y= SHAPER_FREQ_Y= diff --git a/config/sample-duet3-1lc.cfg b/config/sample-duet3-1lc.cfg index ef7e40428..1e0eaf10d 100644 --- a/config/sample-duet3-1lc.cfg +++ b/config/sample-duet3-1lc.cfg @@ -6,7 +6,7 @@ # Communication interface of "CAN bus (on PA25/PA24)" # To flash the board use a debugger, or use a raspberry pi and follow -# the instructions at docs/Bootloaders.md fot the SAMC21. You may +# the instructions at docs/Bootloaders.md for the SAMC21. You may # supply power to the 1LC by connecting the 3.3v rail on the Pi to the # 5v input of the SWD header on the 1LC. diff --git a/config/sample-mmu2s-diy.cfg b/config/sample-mmu2s-diy.cfg index d1d7793e9..c4634761c 100644 --- a/config/sample-mmu2s-diy.cfg +++ b/config/sample-mmu2s-diy.cfg @@ -96,7 +96,7 @@ switch_pin: !P1.28 # P1.28 for X-max # variable_pause_z : z lift when MMU2S need intervention and the printer is paused # variable_min_temp_extruder : minimal required heater temperature to load/unload filament from the extruder gear to the nozzle # variable_extruder_eject_temp : heater temperature used to eject filament during home if the filament is already loaded -# variable_enable_5in1 : pass from MMU2S standart (0) to MMU2S-5in1 mode with splitter +# variable_enable_5in1 : pass from MMU2S standard (0) to MMU2S-5in1 mode with splitter # ################################ [gcode_macro VAR_MMU2S] @@ -394,7 +394,7 @@ gcode: {% endif %} {% endif %} -# Retry unload, try correct misalignement of bondtech gear +# Retry unload, try correct misalignment of bondtech gear [gcode_macro RETRY_UNLOAD_FILAMENT_IN_EXTRUDER] gcode: {% if printer["filament_switch_sensor ir_sensor"].filament_detected == True %} @@ -444,7 +444,7 @@ gcode: {% endif %} {% endif %} -# Ramming process for standart PLA, code extracted from slic3r gcode +# Ramming process for standard PLA, code extracted from slic3r gcode [gcode_macro RAMMING_SLICER] gcode: G91 @@ -506,7 +506,7 @@ gcode: {% if printer["gcode_macro SELECT_TOOL"].tool_selected|int != -1 %} M118 Loading filament to PINDA ... MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0 - MANUAL_STEPPER STEPPER=gear_stepper MOVE={printer["gcode_macro VAR_MMU2S"].pinda_load_length} STOP_ON_ENDSTOP=2 + MANUAL_STEPPER STEPPER=gear_stepper MOVE={printer["gcode_macro VAR_MMU2S"].pinda_load_length} STOP_ON_ENDSTOP=try_home MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0 MANUAL_STEPPER STEPPER=gear_stepper MOVE=10 IS_FILAMENT_IN_PINDA @@ -579,7 +579,7 @@ gcode: M118 Unloading filament from extruder to PINDA ... MANUAL_STEPPER STEPPER=gear_stepper SET_POSITION=0 {% if printer["gcode_macro VAR_MMU2S"].enable_5in1 == 0 %} - MANUAL_STEPPER STEPPER=gear_stepper MOVE=-{printer["gcode_macro VAR_MMU2S"].bowden_unload_length} SPEED=120 ACCEL=80 STOP_ON_ENDSTOP=-2 + MANUAL_STEPPER STEPPER=gear_stepper MOVE=-{printer["gcode_macro VAR_MMU2S"].bowden_unload_length} SPEED=120 ACCEL=80 STOP_ON_ENDSTOP=try_inverted_home IS_FILAMENT_STUCK_IN_PINDA {% else %} MANUAL_STEPPER STEPPER=gear_stepper MOVE=-{printer["gcode_macro VAR_MMU2S"].bowden_unload_length} SPEED=120 ACCEL=80 @@ -792,7 +792,7 @@ gcode: {% if printer["gcode_macro VAR_MMU2S"].enable_5in1 == 0 %} M118 Homing selector MANUAL_STEPPER STEPPER=selector_stepper SET_POSITION=0 - MANUAL_STEPPER STEPPER=selector_stepper MOVE=-76 STOP_ON_ENDSTOP=1 + MANUAL_STEPPER STEPPER=selector_stepper MOVE=-76 STOP_ON_ENDSTOP=home MANUAL_STEPPER STEPPER=selector_stepper SET_POSITION=0 {% endif %} MANUAL_STEPPER STEPPER=idler_stepper MOVE=0 diff --git a/docs/Bed_Mesh.md b/docs/Bed_Mesh.md index 9956de9c4..0859913fd 100644 --- a/docs/Bed_Mesh.md +++ b/docs/Bed_Mesh.md @@ -267,7 +267,7 @@ by heat or interference. This can make calculating the probe's z-offset challenging, particularly at different bed temperatures. As such, some printers use an endstop for homing the Z axis and a probe for calibrating the mesh. In this configuration it is possible offset the mesh so that the (X, Y) -`reference position` applies zero adjustment. The `reference postion` should +`reference position` applies zero adjustment. The `reference position` should be the location on the bed where a [Z_ENDSTOP_CALIBRATE](./Manual_Level.md#calibrating-a-z-endstop) paper test is performed. The bed_mesh module provides the @@ -292,33 +292,6 @@ probe_count: 5, 3 z-offset. Note that this coordinate must NOT be in a location specified as a `faulty_region` if a probe is necessary. -#### The deprecated relative_reference_index - -Existing configurations using the `relative_reference_index` option must be -updated to use the `zero_reference_position`. The response to the -[BED_MESH_OUTPUT PGP=1](#output) gcode command will include the (X, Y) -coordinate associated with the index; this position may be used as the value for -the `zero_reference_position`. The output will look similar to the following: - -``` -// bed_mesh: generated points -// Index | Tool Adjusted | Probe -// 0 | (1.0, 1.0) | (24.0, 6.0) -// 1 | (36.7, 1.0) | (59.7, 6.0) -// 2 | (72.3, 1.0) | (95.3, 6.0) -// 3 | (108.0, 1.0) | (131.0, 6.0) -... (additional generated points) -// bed_mesh: relative_reference_index 24 is (131.5, 108.0) -``` - -_Note: The above output is also printed in `klippy.log` during initialization._ - -Using the example above we see that the `relative_reference_index` is -printed along with its coordinate. Thus the `zero_reference_position` -is `131.5, 108`. - - - ### Faulty Regions It is possible for some areas of a bed to report inaccurate results when diff --git a/docs/Bootloaders.md b/docs/Bootloaders.md index 56a810955..ee125ae1c 100644 --- a/docs/Bootloaders.md +++ b/docs/Bootloaders.md @@ -194,7 +194,7 @@ Alternatively, one can use a When using OpenOCD with the SAMC21, extra steps must be taken to first put the chip into Cold Plugging mode if the board makes use of the -SWD pins for other purposes. If using OpenOCD on a Rasberry Pi, this +SWD pins for other purposes. If using OpenOCD on a Raspberry Pi, this can be done by running the following commands before invoking OpenOCD. ``` SWCLK=25 diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index db664c86e..31267b999 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -323,7 +323,7 @@ a month without updates. Once the requirements are met, you need to: -1. update klipper-tranlations repository +1. update klipper-translations repository [active_translations](https://github.com/Klipper3d/klipper-translations/blob/translations/active_translations) 2. Optional: add a manual-index.md file in klipper-translations repository's `docs\locals\` folder to replace the language specific index.md (generated diff --git a/docs/Code_Overview.md b/docs/Code_Overview.md index fd0e90a38..50666da04 100644 --- a/docs/Code_Overview.md +++ b/docs/Code_Overview.md @@ -102,20 +102,35 @@ some functionality in C code. Initial execution starts in **klippy/klippy.py**. This reads the command-line arguments, opens the printer config file, instantiates the main printer objects, and starts the serial connection. The main -execution of G-code commands is in the process_commands() method in +execution of G-code commands is in the _process_commands() method in **klippy/gcode.py**. This code translates the G-code commands into printer object calls, which frequently translate the actions to commands to be executed on the micro-controller (as declared via the DECL_COMMAND macro in the micro-controller code). -There are four threads in the Klippy host code. The main thread -handles incoming gcode commands. A second thread (which resides -entirely in the **klippy/chelper/serialqueue.c** C code) handles -low-level IO with the serial port. The third thread is used to process -response messages from the micro-controller in the Python code (see -**klippy/serialhdl.py**). The fourth thread writes debug messages to -the log (see **klippy/queuelogger.py**) so that the other threads -never block on log writes. +There are several threads in the Klipper host code: +* There is a Python "main thread" that handles incoming G-Code + commands and is the starting point for most actions. This thread + runs the [reactor](https://en.wikipedia.org/wiki/Reactor_pattern) + (**klippy/reactor.py**) and most high-level actions originate from + IO and timer event callbacks from that reactor. +* A thread for writing messages to the log so that the other threads + do not block on log writes. This thread resides in the + **klippy/queuelogger.py** code and its multi-threaded nature is not + exposed to the main Python thread. +* A thread per micro-controller that performs the low-level reading + and writing of messages to that micro-controller. It resides in the + **klippy/chelper/serialqueue.c** C code and its multi-threaded + nature is not exposed to the Python code. +* A thread per micro-controller for processing messages received from + that micro-controller in the Python code. This thread is created in + **klippy/serialhdl.py**. Care must be taken in Python callbacks + invoked from this thread as this thread may directly interact with + the main Python thread. +* A thread per stepper motor that calculates the timing of stepper + motor step pulses and compresses those times. This thread resides in + the **klippy/chelper/steppersync.c** C code and its multi-threaded + nature is not exposed to the Python code. ## Code flow of a move command @@ -136,9 +151,10 @@ provides further information on the mechanics of moves. * The ToolHead class (in toolhead.py) handles "look-ahead" and tracks the timing of printing actions. The main codepath for a move is: - `ToolHead.move() -> LookAheadQueue.add_move() -> - LookAheadQueue.flush() -> Move.set_junction() -> - ToolHead._process_moves()`. + `ToolHead.move() -> LookAheadQueue.add_move()`, then + `ToolHead.move() -> ToolHead._process_lookahead() -> + LookAheadQueue.flush() -> Move.set_junction()`, and then + `ToolHead._process_lookahead() -> trapq_append()`. * ToolHead.move() creates a Move() object with the parameters of the move (in cartesian space and in units of seconds and millimeters). * The kinematics class is given the opportunity to audit each move @@ -157,39 +173,47 @@ provides further information on the mechanics of moves. phase, followed by a constant deceleration phase. Every move contains these three phases in this order, but some phases may be of zero duration. - * When ToolHead._process_moves() is called, everything about the + * When ToolHead._process_lookahead() resumes, everything about the move is known - its start location, its end location, its acceleration, its start/cruising/end velocity, and distance traveled during acceleration/cruising/deceleration. All the information is stored in the Move() class and is in cartesian space in units of millimeters and seconds. + * The moves are then placed on a "trapezoid motion queue" via + trapq_append() (in klippy/chelper/trapq.c). The trapq stores all the + information in the Move() class in a C struct accessible to the host + C code. + +* Note that the extruder is handled in its own kinematic class: + `ToolHead._process_lookahead() -> PrinterExtruder.process_move()`. + Since the Move() class specifies the exact movement time and since + step pulses are sent to the micro-controller with specific timing, + stepper movements produced by the extruder class will be in sync + with head movement even though the code is kept separate. + +* For efficiency reasons, stepper motion is generated in the C code in + a thread per stepper motor. The threads are notified when steps + should be generated by the motion_queuing module + (klippy/extras/motion_queuing.py): + `PrinterMotionQueuing._flush_handler() -> + PrinterMotionQueuing._advance_move_time() -> + steppersyncmgr_gen_steps() -> se_start_gen_steps()`. * Klipper uses an [iterative solver](https://en.wikipedia.org/wiki/Root-finding_algorithm) - to generate the step times for each stepper. For efficiency reasons, - the stepper pulse times are generated in C code. The moves are first - placed on a "trapezoid motion queue": `ToolHead._process_moves() -> - trapq_append()` (in klippy/chelper/trapq.c). The step times are then - generated: `ToolHead._process_moves() -> - ToolHead._advance_move_time() -> ToolHead._advance_flush_time() -> - MCU_Stepper.generate_steps() -> itersolve_generate_steps() -> - itersolve_gen_steps_range()` (in klippy/chelper/itersolve.c). The - goal of the iterative solver is to find step times given a function - that calculates a stepper position from a time. This is done by - repeatedly "guessing" various times until the stepper position - formula returns the desired position of the next step on the - stepper. The feedback produced from each guess is used to improve - future guesses so that the process rapidly converges to the desired - time. The kinematic stepper position formulas are located in the - klippy/chelper/ directory (eg, kin_cart.c, kin_corexy.c, - kin_delta.c, kin_extruder.c). - -* Note that the extruder is handled in its own kinematic class: - `ToolHead._process_moves() -> PrinterExtruder.move()`. Since - the Move() class specifies the exact movement time and since step - pulses are sent to the micro-controller with specific timing, - stepper movements produced by the extruder class will be in sync - with head movement even though the code is kept separate. + to generate the step times for each stepper. The step times are + generated from the background thread (klippy/chelper/steppersync.c): + `se_background_thread() -> se_generate_steps() -> + itersolve_generate_steps() -> itersolve_gen_steps_range()` (in + klippy/chelper/itersolve.c). The goal of the iterative solver is to + find step times given a function that calculates a stepper position + from a time. This is done by repeatedly "guessing" various times + until the stepper position formula returns the desired position of + the next step on the stepper. The feedback produced from each guess + is used to improve future guesses so that the process rapidly + converges to the desired time. The kinematic stepper position + formulas are located in the klippy/chelper/ directory (eg, + kin_cart.c, kin_corexy.c, kin_delta.c, kin_extruder.c). * After the iterative solver calculates the step times they are added to an array: `itersolve_gen_steps_range() -> stepcompress_append()` @@ -206,7 +230,7 @@ provides further information on the mechanics of moves. commands that correspond to the list of stepper step times built in the previous stage. These "queue_step" commands are then queued, prioritized, and sent to the micro-controller (via - stepcompress.c:steppersync and serialqueue.c:serialqueue). + steppersync.c:steppersync and serialqueue.c:serialqueue). * Processing of the queue_step commands on the micro-controller starts in src/command.c which parses the command and calls diff --git a/docs/Config_Changes.md b/docs/Config_Changes.md index 87bcc9716..d50a0f8e6 100644 --- a/docs/Config_Changes.md +++ b/docs/Config_Changes.md @@ -8,6 +8,81 @@ All dates in this document are approximate. ## Changes +20260214: The `MANUAL_STEPPER` G-Code command `STOP_ON_ENDSTOP` +parameter has changed. See the +[MANUAL_STEPPER](G-Codes.md#manual_stepper) documentation for +details. Using the previous integer values (-2, -1, 1, 2) is +deprecated and support will be removed in the near future. + +20260207: The low-level i2c behavior of sx1509 and uc1701 devices has +changed. Previously an i2c error would result in a shutdown, and now +i2c errors when communicating with these devices will only generate +warnings in the log file. + +20260109: The status value `{printer.probe.last_z_result}` is +deprecated; it will be removed in the near future. Use +`{printer.probe.last_probe_position}` instead, and note that this new +value already has the probe's configured xyz offsets applied. + +20260109: The g-code console text output from the `PROBE`, +`PROBE_ACCURACY`, and similar commands has changed. Now Z heights are +reported relative to the nominal bed Z position instead of relative to +the probe's configured `z_offset`. Similarly, intermediate probe x and +y console reports will also have the probe's configured `x_offset` and +`y_offset` applied. + +20260109: The `[screws_tilt_adjust]` module now reports the status +variable `{printer.screws_tilt_adjust.result.screw1.z}` with the +probe's `z_offset` applied. That is, one would previously need to +subtract the probe's configured `z_offset` to find the absolute Z +deviation at the given screw location and now one must not apply the +`z_offset`. + +20251122: An option `axis` has been added to `[carriage ]` +sections for `generic_cartesian` kinematics, allowing arbitrary names +for primary carriages. Users are encouraged to explicitly specify +`axis` option now. + +20251106: The status fields `{printer.toolhead.position}`, +`{printer.gcode_move.position}`, +`{printer.gcode_move.gcode_position}`, and +`{printer.motion_report.live_position}` are changing. These +coordinates used to always contain four components, but now may +contain additional components. The ordering and number of components +may change at run-time - see the +[status reference](Status_Reference.md#accessing-coordinates) for +important details. Accessing any of these coordinates in macros using +the ".e" accessor is deprecated - use something like +`{printer.toolhead.position[printer.gcode_move.axis_map.E]}` as an +alternative. + +20251106: The status fields `{printer.gcode_move.homing_origin}`, +`{printer.toolhead.axis_min}`, and `{printer.toolhead.axis_max}` +currently contain four components where the fourth component is always +zero. This behavior is deprecated. In the future these coordinates may +contain only three components. For additional information see the +[status reference](Status_Reference.md#accessing-coordinates). + +20251010: During normal printing the command processing will now +attempt to stay one second ahead of printer movement (reduced from two +seconds previously). + +20251003: Support for the undocumented `max_stepper_error` option in +the `[printer]` config section has been removed. + +20250916: The definitions of EI, 2HUMP_EI, and 3HUMP_EI input shapers +were updated. For best performance it is recommended to recalibrate +input shapers, especially if some of these shapers are currently used. + +20250811: Support for the `max_accel_to_decel` parameter in the +`[printer]` config section has been removed and support for the +`ACCEL_TO_DECEL` parameter in the `SET_VELOCITY_LIMIT` command has +been removed. These capabilities were deprecated on 20240313. + +20250721: The `[pca9632]` and `[mcp4018]` modules no longer accept the +`scl_pin` and `sda_pin` options. Use `i2c_software_scl_pin` and +`i2c_software_sda_pin` instead. + 20250428: The maximum `cycle_time` for pwm `[output_pin]`, `[pwm_cycle_time]`, `[pwm_tool]`, and similar config sections is now 3 seconds (reduced from 5 seconds). The `maximum_mcu_duration` in @@ -58,7 +133,7 @@ object were issued faster than the minimum scheduling time (typically 100ms) then actual updates could be queued far into the future. Now if many updates are issued in rapid succession then it is possible that only the latest request will be applied. If the previous behavior is -requried then consider adding explicit `G4` delay commands between +required then consider adding explicit `G4` delay commands between updates. 20240912: Support for `maximum_mcu_duration` and `static_value` @@ -131,7 +206,7 @@ carriage are exported as `printer.dual_carriage.carriage_0` and `printer.dual_carriage.carriage_1`. 20230619: The `relative_reference_index` option has been deprecated -and superceded by the `zero_reference_position` option. Refer to the +and superseded by the `zero_reference_position` option. Refer to the [Bed Mesh Documentation](./Bed_Mesh.md#the-deprecated-relative_reference_index) for details on how to update the configuration. With this deprecation the `RELATIVE_REFERENCE_INDEX` is no longer available as a parameter @@ -365,7 +440,7 @@ endstop phases by running the ENDSTOP_PHASE_CALIBRATE command. `gear_ratio` for their rotary steppers, and they may no longer specify a `step_distance` parameter. See the [config reference](Config_Reference.md#stepper) for the format of the -new gear_ratio paramter. +new gear_ratio parameter. 20201213: It is not valid to specify a Z "position_endstop" when using "probe:z_virtual_endstop". An error will now be raised if a Z diff --git a/docs/Config_Reference.md b/docs/Config_Reference.md index 8b2aee0ec..10d616a5d 100644 --- a/docs/Config_Reference.md +++ b/docs/Config_Reference.md @@ -126,8 +126,6 @@ max_accel: # decelerate to zero at each corner. The value specified here may be # changed at runtime using the SET_VELOCITY_LIMIT command. The # default is 5mm/s. -#max_accel_to_decel: -# This parameter is deprecated and should no longer be used. ``` ### [stepper] @@ -740,16 +738,17 @@ max_velocity: max_accel: #minimum_cruise_ratio: #square_corner_velocity: -#max_accel_to_decel: #max_z_velocity: #max_z_accel: ``` -Then a user must define the following three carriages: `[carriage x]`, -`[carriage y]`, and `[carriage z]`, e.g. +Then a user must define three primary carriages for X, Y, and Z axes, e.g.: ``` -[carriage x] +[carriage carriage_x] +axis: +# Axis of a carriage, either x, y, or z. This parameter must be provided, +# unless a carriage name is x, y, or z itself. endstop_pin: # Endstop switch detection pin. If this endstop pin is on a # different mcu than the stepper motor(s) moving this carriage, @@ -791,7 +790,8 @@ for instance carriages: # A string describing the carriages the stepper moves. All defined # carriages can be specified here, as well as their linear combinations, -# e.g. x, x+y, y-0.5*z, x-z, etc. This parameter must be provided. +# e.g. carriage_x, carriage_x+carriage_y, carriage_y-0.5*carriage_z, +# carriage_x-carriage_z, etc. This parameter must be provided. step_pin: dir_pin: enable_pin: @@ -803,28 +803,29 @@ microsteps: ``` See [stepper](#stepper) section for more information on the regular stepper parameters. The `carriages` parameter defines how the stepper -affects the motion of the carriages. For example, `x+y` indicates that -the motion of the stepper in the positive direction by the distance `d` -moves the carriages `x` and `y` by the same distance `d` in the positive -direction, while `x-0.5*y` means the motion of the stepper in the positive -direction by the distance `d` moves the carriage `x` by the distance `d` -in the positive direction, but the carriage `y` will travel distance `d/2` -in the negative direction. +affects the motion of the carriages. For example, `carriage_x+carriage_y` +indicates that the motion of the stepper in the positive direction by the +distance `d` moves the carriages `carriage_x` and `carriage_y` by the same +distance `d` in the positive direction, while `carriage_x-0.5*carriage_y` +means the motion of the stepper in the positive direction by the distance +`d` moves the carriage `carriage_x` by the distance `d` in the positive +direction, but the carriage `carriage_y` will travel distance `d/2` in +the negative direction. More than a single stepper motor can be defined to drive the same axis or belt. For example, on a CoreXY AWD setups two motors driving the same belt can be defined as ``` -[carriage x] +[carriage carriage_x] endstop_pin: ... ... -[carriage y] +[carriage carriage_y] endstop_pin: ... ... [stepper a0] -carriages: x-y +carriages: carriage_x-carriage_y step_pin: ... dir_pin: ... enable_pin: ... @@ -832,7 +833,7 @@ rotation_distance: ... ... [stepper a1] -carriages: x-y +carriages: carriage_x-carriage_y step_pin: ... dir_pin: ... enable_pin: ... @@ -845,7 +846,7 @@ sharing the same `carriages` and corresponding endstops. There are situations when a user wants to have more than one endstop per axis. Examples of such configurations include Y axis driven by two independent stepper motors with belts attached to both ends of the -X beam, with effectively two carriages on Y axis each having an +X gantry, with effectively two carriages on Y axis each having an independent endstop, and multi-stepper Z axis with each stepper having its own endstop (not to be confused with the configurations with multiple Z motors but only a single endstop). These configurations @@ -863,12 +864,12 @@ endstop_pin: and the corresponding stepper motors, for example: ``` -[extra_carriage y1] -primary_carriage: y +[extra_carriage carriage_y1] +primary_carriage: carriage_y endstop_pin: ... [stepper sy1] -carriages: y1 +carriages: carriage_y1 ... ``` Notably, an `[extra_carriage]` does not define parameters such as @@ -1783,17 +1784,22 @@ the [command reference](G-Codes.md#input_shaper). # input shapers, this parameter can be set from different # considerations. The default value is 0, which disables input # shaping for Y axis. +#shaper_freq_z: 0 +# A frequency (in Hz) of the input shaper for Z axis. The default +# value is 0, which disables input shaping for Z axis. #shaper_type: mzv -# A type of the input shaper to use for both X and Y axes. Supported +# A type of the input shaper to use for all axes. Supported # shapers are zv, mzv, zvd, ei, 2hump_ei, and 3hump_ei. The default # is mzv input shaper. #shaper_type_x: #shaper_type_y: -# If shaper_type is not set, these two parameters can be used to -# configure different input shapers for X and Y axes. The same +#shaper_type_z: +# If shaper_type is not set, these parameters can be used to +# configure different input shapers for X, Y, and Z axes. The same # values are supported as for shaper_type parameter. #damping_ratio_x: 0.1 #damping_ratio_y: 0.1 +#damping_ratio_z: 0.1 # Damping ratios of vibrations of X and Y axes used by input shapers # to improve vibration suppression. Default value is 0.1 which is a # good all-round value for most printers. In most circumstances this @@ -1946,6 +1952,39 @@ Support for LIS3DH accelerometers. # See the "adxl345" section for information on this parameter. ``` +### [bmi160] + +BMI160 accelerometer. This sensor can be queried via I2C or SPI bus. +``` +[bmi160] +#i2c_address: +# Default is 105 (0x69). If SA0 is tied to GND, use 104 (0x68). +# Only used for I2C. +#i2c_mcu: +#i2c_bus: +#i2c_speed: +# See the "common I2C settings" section for a description of the +# above parameters. Only used for I2C. +#cs_pin: +#spi_speed: +#spi_bus: +#spi_software_sclk_pin: +#spi_software_mosi_pin: +#spi_software_miso_pin: +# See the "common SPI settings" section for a description of the +# above parameters. Only used for SPI. +#axes_map: x, y, z +# See the "adxl345" section for information on this parameter. +``` + +**Important:** Many BMI160 modules use ambiguous pin labels. For SPI: +- Use **SCL** for clock (not SCX) +- Use **SDA** for MOSI (not SDX) +- Use **SA0** for MISO +- Use **CS** for chip select + +The pins labeled SCX/SDX are for the auxiliary magnetometer bus. + ### [mpu9250] Support for MPU-9250, MPU-9255, MPU-6515, MPU-6050, and MPU-6500 @@ -2001,6 +2040,10 @@ section of the measuring resonances guide for more information on # and on the toolhead (for X axis). These parameters have the same # format as 'accel_chip' parameter. Only 'accel_chip' or these two # parameters must be provided. +#accel_chip_z: +# A name of the accelerometer chip to use for measurements of Z axis. +# This parameter has the same format as 'accel_chip'. The default is +# not to configure an accelerometer for Z axis. #max_smoothing: # Maximum input shaper smoothing to allow for each axis during shaper # auto-calibration (with 'SHAPER_CALIBRATE' command). By default no @@ -2011,16 +2054,20 @@ section of the measuring resonances guide for more information on # during the calibration. The default is 50. #min_freq: 5 # Minimum frequency to test for resonances. The default is 5 Hz. -#max_freq: 133.33 -# Maximum frequency to test for resonances. The default is 133.33 Hz. +#max_freq: 135 +# Maximum frequency to test for resonances. The default is 135 Hz. +#max_freq_z: 100 +# Maximum frequency to test Z axis for resonances. The default is 100 Hz. #accel_per_hz: 60 # This parameter is used to determine which acceleration to use to # test a specific frequency: accel = accel_per_hz * freq. Higher the # value, the higher is the energy of the oscillations. Can be set to # a lower than the default value if the resonances get too strong on -# the printer. However, lower values make measurements of -# high-frequency resonances less precise. The default value is 75 -# (mm/sec). +# the printer. However, lower values make measurements of high-frequency +# resonances less precise. The default value is 60 (mm/sec). +#accel_per_hz_z: 15 +# This parameter has the same meaning as accel_per_hz, but applies to +# Z axis specifically. The default is 15 (mm/sec). #hz_per_sec: 1 # Determines the speed of the test. When testing all frequencies in # range [min_freq, max_freq], each second the frequency increases by @@ -2029,6 +2076,8 @@ section of the measuring resonances guide for more information on # (Hz/sec == sec^-2). #sweeping_accel: 400 # An acceleration of slow sweeping moves. The default is 400 mm/sec^2. +#sweeping_accel_z: 50 +# Same as sweeping_accel above, but for Z axis. The default is 50 mm/sec^2. #sweeping_period: 1.2 # A period of slow sweeping moves. Setting this parameter to 0 # disables slow sweeping moves. Avoid setting it to a too small @@ -2308,6 +2357,16 @@ sensor_type: ldc1612 #samples_tolerance: #samples_tolerance_retries: # See the "probe" section for information on these parameters. +#tap_threshold: +# Noise cutoff/stop trigger threshold (in Hz). Specify this value to +# enable support for "METHOD=tap" probe commands. See Eddy_Probe.md +# for more information. Larger values make the tap detection less +# sensitive. That is, larger values make it less likely the toolhead +# will incorrectly stop early due to noise, while increasing the +# risk of the toolhead not correctly stopping when it first contacts +# the bed. If this value is specified then one may override its +# value at run-time using the "TAP_THRESHOLD" parameter on probe +# commands. The default is to not enable support for "tap" probing. ``` ### [axis_twist_compensation] @@ -2467,10 +2526,16 @@ Please note that in this case the `[dual_carriage]` configuration deviates from the configuration described above: ``` [dual_carriage my_dc_carriage] -primary_carriage: -# Defines the matching primary carriage of this dual carriage and -# the corresponding IDEX axis. Valid choices are x, y, z. -# This parameter must be provided. +#primary_carriage: +# Defines the matching carriage on the same gantry as this dual carriage and +# the corresponding dual axis. Must match a name of a defined `[carriage]` or +# another independent `[dual_carriage]`. If not set, which is a default, +# defines a dual carriage independent of a `[carriage]` with the same axis +# as this one (e.g. on a different gantry). +#axis: +# Axis of a carriage, either x or y. If 'primary_carriage' is defined, then +# this parameter defaults to the 'axis' parameter of that primary carriage, +# otherwise this parameter must be defined. #safe_distance: # The minimum distance (in mm) to enforce between the dual and the primary # carriages. If a G-Code command is executed that will bring the carriages @@ -2479,7 +2544,8 @@ primary_carriage: # position_min and position_max for the dual and primary carriages. If set # to 0 (or safe_distance is unset and position_min and position_max are # identical for the primary and dual carriages), the carriages proximity -# checks will be disabled. +# checks will be disabled. Only valid for a dual_carriage with a defined +# 'primary_carriage'. endstop_pin: #position_min: position_endstop: @@ -2497,18 +2563,18 @@ on the regular `carriage` parameters. Then a user must define one or more stepper motors moving the dual carriage (and other carriages as appropriate), for instance ``` -[carriage x] +[carriage carriage_x] ... -[carriage y] +[carriage carriage_y] ... -[dual_carriage u] -primary_carriage: x +[dual_carriage carriage_u] +primary_carriage: carriage_x ... [stepper dc_stepper] -carriages: u-y +carriages: carriage_u-carriage_y ... ``` @@ -2524,14 +2590,14 @@ example above: [delayed_gcode init_shaper] initial_duration: 0.1 gcode: - SET_DUAL_CARRIAGE CARRIAGE=u - SET_INPUT_SHAPER SHAPER_TYPE_X= SHAPER_FREQ_X= SHAPER_TYPE_Y= SHAPER_FREQ_Y= - SET_DUAL_CARRIAGE CARRIAGE=x - SET_INPUT_SHAPER SHAPER_TYPE_X= SHAPER_FREQ_X= SHAPER_TYPE_Y= SHAPER_FREQ_Y= + SET_DUAL_CARRIAGE CARRIAGE=carriage_u + SET_INPUT_SHAPER SHAPER_TYPE_X= SHAPER_FREQ_X= SHAPER_TYPE_Y= SHAPER_FREQ_Y= + SET_DUAL_CARRIAGE CARRIAGE=carriage_x + SET_INPUT_SHAPER SHAPER_TYPE_X= SHAPER_FREQ_X= SHAPER_TYPE_Y= SHAPER_FREQ_Y= ``` Note that `SHAPER_TYPE_Y` and `SHAPER_FREQ_Y` must be the same in both commands in this case, since the same motors drive Y axis when either -of the `x` and `u` carriages are active. +of the `carriage_x` and `carriage_u` carriages are active. It is worth noting that `generic_cartesian` kinematic can support two dual carriages for X and Y axes. For reference, see for instance a @@ -2960,7 +3026,7 @@ sensor_type: BME280 ### AHT10/AHT20/AHT21 temperature sensor -AHT10/AHT20/AHT21 two wire interface (I2C) environmental sensors. +AHT10/AHT15/AHT20/AHT21/AHT30 two wire interface (I2C) environmental sensors. Note that these sensors are not intended for use with extruders and heater beds, but rather for monitoring ambient temperature (C) and relative humidity. See @@ -2968,8 +3034,9 @@ relative humidity. See that may be used to report humidity in addition to temperature. ``` -sensor_type: AHT10 -# Also use AHT10 for AHT20 and AHT21 sensors. +sensor_type: AHT1X +# Must be "AHT1X" , "AHT2X", "AHT3X" +# Some AHT20 sensors can use "AHT1X" #i2c_address: # Default is 56 (0x38). Some AHT10 sensors give the option to use # 57 (0x39) by moving a resistor. @@ -3507,11 +3574,6 @@ PCA9632 LED support. The PCA9632 is used on the FlashForge Dreamer. #i2c_speed: # See the "common I2C settings" section for a description of the # above parameters. -#scl_pin: -#sda_pin: -# Alternatively, if the pca9632 is not connected to a hardware I2C -# bus, then one may specify the "clock" (scl_pin) and "data" -# (sda_pin) pins. The default is to use hardware I2C. #color_order: RGBW # Set the pixel order of the LED (using a string containing the # letters R, G, B, W). The default is RGBW. @@ -3635,6 +3697,20 @@ pin: # These options are deprecated and should no longer be specified. ``` +### [static_pwm_clock] + +Static configurable output pin (one may define any number of +sections with an "static_pwm_clock" prefix). +Pins configured here will be set up as clock output pins. +Generally used to provide clock input to other hardware on the board. +``` +[static_pwm_clock my_pin] +pin: +# The pin to configure as an output. This parameter must be provided. +#frequency: 100 +# Target output frequency. +``` + ### [pwm_tool] Pulse width modulation digital output pins capable of high speed @@ -4427,16 +4503,21 @@ prefix). ### [mcp4018] -Statically configured MCP4018 digipot connected via two gpio "bit -banging" pins (one may define any number of sections with an "mcp4018" -prefix). +Statically configured MCP4018 digipot connected via i2c (one may +define any number of sections with an "mcp4018" prefix). ``` [mcp4018 my_digipot] -scl_pin: -# The SCL "clock" pin. This parameter must be provided. -sda_pin: -# The SDA "data" pin. This parameter must be provided. +#i2c_address: 47 +# The i2c address that the chip is using on the i2c bus. The default +# is 47. +#i2c_mcu: +#i2c_bus: +#i2c_software_scl_pin: +#i2c_software_sda_pin: +#i2c_speed: +# See the "common I2C settings" section for a description of the +# above parameters. wiper: # The value to statically set the given MCP4018 "wiper" to. This is # typically set to a number between 0.0 and 1.0 with 1.0 being the @@ -4977,8 +5058,8 @@ detection_length: 7.0 # a state change on the switch_pin # Default is 7 mm. extruder: -# The name of the extruder section this sensor is associated with. -# This parameter must be provided. +# The name of the extruder or extruder_stepper section this sensor +# is associated with. This parameter must be provided. switch_pin: #pause_on_runout: #runout_gcode: @@ -5210,7 +5291,7 @@ sensor_type: # load cell will be igfiltered outnored. This option requires the SciPy # library. Default: None #buzz_filter_delay: 2 -# The delay, or 'order', of the buzz filter. This controle the number of +# The delay, or 'order', of the buzz filter. This controls the number of # samples required to make a trigger detection. Can be 1 or 2, the default # is 2. #notch_filter_frequencies: 50, 60 @@ -5344,7 +5425,7 @@ chip: ADS1115 # scales all values read from the ADC. Options are: 6.144V, 4.096V, 2.048V, # 1.024V, 0.512V, 0.256V #adc_voltage: 3.3 -# The suppy voltage for the device. This allows additional software scaling +# The supply voltage for the device. This allows additional software scaling # for all values read from the ADC. i2c_mcu: host i2c_bus: i2c.1 @@ -5363,7 +5444,7 @@ sensor_pin: my_ads1x1x:AIN0 # A combination of the name of the ads1x1x chip and the pin. Possible # pin values are AIN0, AIN1, AIN2 and AIN3 for single ended lines and # DIFF01, DIFF03, DIFF13 and DIFF23 for differential between their -# correspoding lines. For example +# corresponding lines. For example # DIFF03 measures the differential between line 0 and 3. Only specific # combinations for the differentials are allowed. ``` diff --git a/docs/Debugging.md b/docs/Debugging.md index be3699c28..b400d6e95 100644 --- a/docs/Debugging.md +++ b/docs/Debugging.md @@ -90,7 +90,7 @@ later analyzed. To use this feature, Klipper must be started with the Data logging is enabled with the `data_logger.py` tool. For example: ``` -~/klipper/scripts/motan/data_logger.py /tmp/klippy_uds mylog +~/klipper/scripts/motan/data_logger.py /tmp/klippy_uds mylog -s '*' ``` This command will connect to the Klipper API Server, subscribe to diff --git a/docs/Eddy_Probe.md b/docs/Eddy_Probe.md index 3c36a613c..aaf50b7ff 100644 --- a/docs/Eddy_Probe.md +++ b/docs/Eddy_Probe.md @@ -4,8 +4,10 @@ This document describes how to use an [eddy current](https://en.wikipedia.org/wiki/Eddy_current) inductive probe in Klipper. -Currently, an eddy current probe can not be used for Z homing. The -sensor can only be used for Z probing. +Currently, an eddy current probe can not precisely home Z (i.e., `G28 Z`). +The sensor can precisely do Z probing (i.e., `PROBE ...`). +Look at the [homing correction](Eddy_Probe.md#homing-correction-macros) +for further details. Start by declaring a [probe_eddy_current config section](Config_Reference.md#probe_eddy_current) @@ -24,18 +26,29 @@ named `[probe_eddy_current my_eddy_probe]` then one would run complete in a few seconds. After it completes, issue a `SAVE_CONFIG` command to save the results to the printer.cfg and restart. +Eddy current is used as a proximity/distance sensor (similar to a laser ruler). The second step in calibration is to correlate the sensor readings to the corresponding Z heights. Home the printer and navigate the -toolhead so that the nozzle is near the center of the bed. Then run an +toolhead so that the nozzle is near the center of the bed. Then run a `PROBE_EDDY_CURRENT_CALIBRATE CHIP=my_eddy_probe` command. Once the tool starts, follow the steps described at ["the paper test"](Bed_Level.md#the-paper-test) to determine the actual distance between the nozzle and bed at the given location. Once those steps are complete one can `ACCEPT` the position. The tool will -then move the the toolhead so that the sensor is above the point where -the nozzle used to be and run a series of movements to correlate the +then move the toolhead so that the sensor is above the point where the +nozzle used to be and run a series of movements to correlate the sensor to Z positions. This will take a couple of minutes. After the -tool completes, issue a `SAVE_CONFIG` command to save the results to +tool completes it will output the sensor performance data: +``` +probe_eddy_current: noise 0.000642mm, MAD_Hz=11.314 in 2525 queries +Total frequency range: 45000.012 Hz +z_offset: 0.250 # noise 0.000200mm, MAD_Hz=11.000 +z_offset: 0.530 # noise 0.000300mm, MAD_Hz=12.000 +z_offset: 1.010 # noise 0.000400mm, MAD_Hz=14.000 +z_offset: 2.010 # noise 0.000600mm, MAD_Hz=12.000 +z_offset: 3.010 # noise 0.000700mm, MAD_Hz=9.000 +``` +issue a `SAVE_CONFIG` command to save the results to the printer.cfg and restart. After initial calibration it is a good idea to verify that the @@ -55,6 +68,133 @@ surface temperature or sensor hardware temperature can skew the results. It is important that calibration and probing is only done when the printer is at a stable temperature. +## Homing correction macros + +Because of current limitations, homing and probing +are implemented differently for the eddy sensors. +As a result, homing suffers from an offset error, +while probing handles this correctly. + +To correct the homing offset. +One can use the suggested macro inside the homing override or +inside the starting G-Code. + +[Force move](Config_Reference.md#force_move) section +have to be defined in the config. + +``` +[gcode_macro _RELOAD_Z_OFFSET_FROM_PROBE] +gcode: + {% set Z = printer.toolhead.position.z %} + SET_KINEMATIC_POSITION Z={Z - printer.probe.last_probe_position.z} + +[gcode_macro SET_Z_FROM_PROBE] +gcode: + {% set METHOD = params.METHOD | default("automatic") %} + PROBE METHOD={METHOD} + _RELOAD_Z_OFFSET_FROM_PROBE + G0 Z5 +``` + +## Tap calibration + +The Eddy probe measures the resonance frequency of the coil. +By the absolute value of the frequency and the calibration curve from +`PROBE_EDDY_CURRENT_CALIBRATE`, it is therefore possible to detect +where the bed is without physical contact. + +By use of the same knowledge, we know that frequency changes with +the distance. It is possible to track that change in real time and +detect the time/position where contact happens - a change of frequency +starts to change in a different way. +For example, stopped to change because of the collision. + +Because eddy output is not perfect: there is sensor noise, +mechanical oscillation, thermal expansion and other discrepancies, +it is required to calibrate the stop threshold for your machine. +Practically, it ensures that the Eddy's output data absolute value +change per second (velocity) is high enough - higher than the noise level, +and that upon collision it always decreases by at least this value. + +``` +[probe_eddy_current my_probe] +# eddy probe configuration... +# Recommended starting values for the tap +#samples: 3 +#samples_tolerance: 0.025 +#samples_tolerance_retries: 3 +``` + +Before setting it to any other value, it is necessary to install `scipy`: + +```bash +~/klippy-env/bin/pip install scipy +``` + +The suggested calibration routine works as follows: +1. Home Z +2. Place the toolhead at the center of the bed. +3. Move the Z axis far away (30 mm, for example). +4. Run `PROBE METHOD=tap` +5. If it stops before colliding, increase the `tap_threshold`. + +Repeat until the nozzle softly touches the bed. +This is easier to do with a clean nozzle and +by visually inspecting the process. + +You can streamline the process by placing the toolhead in the center once. +Then, upon config restart, trick the machine into thinking that Z is homed. +``` +SET_KINEMATIC_POSITION X= Y= Z=0 +G0 Z5 # Optional retract +PROBE METHOD=tap +``` + +Here is an example sequence of threshold values to test: +``` +1 -> 5 -> 10 -> 20 -> 40 -> 80 -> 160 +160 -> 120 -> 100 +``` +Your value will normally be between those. +- Too high a value leaves a less safe margin for early collision - +if something is between the nozzle and the bed, or if the nozzle +is too close to the bed before the tap. +- Too low - can make the toolhead stop in mid-air +because of the noise. + +You can estimate the initial threshold value by analyzing your own +calibration routine output: +``` +probe_eddy_current: noise 0.000642mm, MAD_Hz=11.314 +... +z_offset: 1.010 # noise 0.000400mm, MAD_Hz=14.000 +``` +The estimation will be: +``` +MAD_Hz * 2 +11.314 * 2 = 22.628 +``` + +To further fine tune threshold, one can use `PROBE_ACCURACY METHOD=tap`. +The range is expected to be about 0.02 mm, +with the default probe speed of 5 mm/s. +Elevated coil temperature may increase noise and may require additional tuning. + +You can validate the tap precision by measuring the paper thickness +from the initial calibration guide. It is expected to be ~0.1mm. + +Tap precision is limited by the sampling frequency and +the speed of the descent. +If you take 24 photos per second of the moving train, you can only estimate +where the train was between photos. + +It is possible to reduce the descending speed. It may require decrease of +absolute `tap_threshold` value. + +It is possible to tap over non-conductive surfaces as long as there is metal +behind it within the sensor's sensitivity range. +Max distance can be approximated to be about 1.5x of the coil's narrowest part. + ## Thermal Drift Calibration As with all inductive probes, eddy current probes are subject to @@ -144,3 +284,38 @@ to perform thermal drift calibration: As one may conclude, the calibration process outlined above is more challenging and time consuming than most other procedures. It may require practice and several attempts to achieve an optimal calibration. + +## Errors description + +Possible homing errors and actionables: + +- Sensor error + - Check logs for detailed error +- Eddy I2C STATUS/DATA error. + - Check loose wiring. + - Try software I2C/decrease I2C rate +- Invalid read data + - Same as I2C + +Possible sensor errors and actionables: +- Frequency over valid hard range + - Check frequency configuration + - Hardware fault +- Frequency over valid soft range + - Check frequency configuration +- Conversion Watchdog timeout + - Hardware fault + +Amplitude Low/High warning messages can mean: +- Sensor close to the bed +- Sensor far from the bed +- Higher temperature than was at the current calibration +- Capacitor missing + +On some sensors, it is not possible to completely avoid amplitude +warning indicator. + +You can try to redo the `LDC_CALIBRATE_DRIVE_CURRENT` calibration at work +temperature or increase `reg_drive_current` by 1-2 from the calibrated value. + +Generally, it is like an engine check light. It may indicate an issue. diff --git a/docs/FAQ.md b/docs/FAQ.md index 417fb1d4f..dbea920f0 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -98,17 +98,16 @@ bootloaders. ## Can I run Klipper on something other than a Raspberry Pi 3? -The recommended hardware is a Raspberry Pi 2, Raspberry Pi 3, or -Raspberry Pi 4. +The recommended hardware is a Raspberry Pi Zero2w, Raspberry Pi 3, +Raspberry Pi 4 or Raspberry Pi 5. Klipper will also run on other SBC +devices as well as x86 hardware, as described below. -Klipper will run on a Raspberry Pi 1 and on the Raspberry Pi Zero, but -these boards don't have enough processing power to run OctoPrint +Klipper will run on a Raspberry Pi 1, 2 and on the Raspberry Pi Zero1, +but these boards don't have enough processing power to run Klipper well. It is common for print stalls to occur on these slower machines -when printing directly from OctoPrint. (The printer may move faster -than OctoPrint can send movement commands.) If you wish to run on one -one of these slower boards anyway, consider using the "virtual_sdcard" -feature when printing (see -[config reference](Config_Reference.md#virtual_sdcard) for details). +when printing (The printer may move faster than Klipper can send +movement commands.) It is not reccomended to run Klipper on these older +machines. For running on the Beaglebone, see the [Beaglebone specific installation instructions](Beaglebone.md). diff --git a/docs/Features.md b/docs/Features.md index 6c5520d1b..ad0d81a81 100644 --- a/docs/Features.md +++ b/docs/Features.md @@ -120,7 +120,7 @@ Klipper supports many standard 3d printer features: * Support for common temperature sensors (eg, common thermistors, AD595, AD597, AD849x, PT100, PT1000, MAX6675, MAX31855, MAX31856, - MAX31865, BME280, HTU21D, DS18B20, AHT10, SHT3x, and LM75). Custom + MAX31865, BME280, HTU21D, DS18B20, AHT1X, AHT2X, AHT3X, SHT3x, and LM75). Custom thermistors and custom analog temperature sensors can also be configured. One can monitor the internal micro-controller temperature sensor and the internal temperature sensor of a diff --git a/docs/G-Codes.md b/docs/G-Codes.md index e495965ec..c8d5b8d3f 100644 --- a/docs/G-Codes.md +++ b/docs/G-Codes.md @@ -350,18 +350,25 @@ The following command is available when the enabled. #### SET_DUAL_CARRIAGE -`SET_DUAL_CARRIAGE CARRIAGE= [MODE=[PRIMARY|COPY|MIRROR]]`: +`SET_DUAL_CARRIAGE CARRIAGE= [MODE=[PRIMARY|COPY|MIRROR|INACTIVE]]`: This command will change the mode of the specified carriage. If no `MODE` is provided it defaults to `PRIMARY`. `` must reference a defined primary or dual carriage for `generic_cartesian` kinematics or be 0 (for primary carriage) or 1 (for dual carriage) for all other kinematics supporting IDEX. Setting the mode to `PRIMARY` -deactivates the other carriage and makes the specified carriage execute -subsequent G-Code commands as-is. `COPY` and `MIRROR` modes are supported -only for dual carriages. When set to either of these modes, dual carriage -will then track the subsequent moves of its primary carriage and either -copy relative movements of it (in `COPY` mode) or execute them in the -opposite (mirror) direction (in `MIRROR` mode). +deactivates all other carriages on the same axis and makes the specified +carriage execute subsequent G-Code movement commands as-is. Before activating +`COPY` or `MIRROR` mode for a carriage, a different one must be activated as +`PRIMARY` on the same axis. When set to either of these two modes, the carriage +will track the subsequent G-Code moves and either copy relative movements +(in `COPY` mode) or execute them in the opposite (mirror) direction (in +`MIRROR` mode). Setting the mode to `INACTIVE` deactivates the carriage and +makes it ignore further G-Code moves. Note that deactivating the primary +carriage on the axis does not disable other carriages working in `COPY` or +`MIRROR` mode, which can be used to disable printing a failed part by any of +the tools and park that tool to prevent collisions with an unfinished part, see +this [sample configuration](../config/sample-corexyuv.cfg) for macros examples. + #### SAVE_DUAL_CARRIAGE_STATE `SAVE_DUAL_CARRIAGE_STATE [NAME=]`: Save the current positions @@ -372,14 +379,18 @@ to the given string. If NAME is not provided it defaults to "default". #### RESTORE_DUAL_CARRIAGE_STATE `RESTORE_DUAL_CARRIAGE_STATE [NAME=] [MOVE=[0|1] [MOVE_SPEED=]]`: -Restore the previously saved positions of the dual carriages and their modes, -unless "MOVE=0" is specified, in which case only the saved modes will be -restored, but not the positions of the carriages. If positions are being -restored and "MOVE_SPEED" is specified, then the toolhead moves will be -performed with the given speed (in mm/s); otherwise the toolhead move will -use the rail homing speed. Note that the carriages restore their positions -only over their own axis, which may be necessary to correctly restore COPY -and MIRROR mode of the dual carraige. +Restore the previously saved states of all dual and their primary carriages. +This command restores the modes of the carriages and moves them to their +previously saved positions, unless "MOVE=0" is specified. If positions are being +restored and "MOVE_SPEED" is specified, then the carriages will move with at +most the provided speed (in mm/s); otherwise the homing speeds of the +corresponding carriages will be used as a reference. Note that the carriages +restore their positions only over their own axes, which may be necessary to +correctly restore COPY and MIRROR mode of the dual carriage. In addition, this +command updates the Klipper toolhead position for each axis that has some dual +carriages: it is set to match the actual position of the activated primary +carriage of an axis or, if an axis does not have a saved primary carriage, +to the axis position when `SAVE_DUAL_CARRIAGE_STATE` command was called. ### [endstop_phase] @@ -500,7 +511,7 @@ enabled. `SET_FAN_SPEED FAN=config_name SPEED=` This command sets the speed of a fan. "speed" must be between 0.0 and 1.0. -`SET_FAN_SPEED PIN=config_name TEMPLATE= +`SET_FAN_SPEED FAN=config_name TEMPLATE= [=]`: If `TEMPLATE` is specified then it assigns a [display_template](Config_Reference.md#display_template) to the given fan. For example, if one defined a `[display_template @@ -760,11 +771,11 @@ stepper at a time, some sequences of changes can lead to invalid intermediate kinematic configurations, even if the final configuration is valid. In such cases a user can pass `DISABLE_CHECKS=1` parameters to all but the last command to disable intermediate checks. For example, -if `stepper a` and `stepper b` initially have `x-y` and `x+y` carriages -correspondingly, then the following sequence of commands will let a user -effectively swap the carriage controls: -`SET_STEPPER_CARRIAGES STEPPER=a CARRIAGES=x+y DISABLE_CHECKS=1` -and `SET_STEPPER_CARRIAGES STEPPER=b CARRIAGES=x-y`, while +if `stepper a` and `stepper b` initially have `carriage_x-carriage_y` and +`carriage_x+carriage_y` carriages correspondingly, then the following +sequence of commands will let a user effectively swap the carriage controls: +`SET_STEPPER_CARRIAGES STEPPER=a CARRIAGES=carriage_x+carriage_y DISABLE_CHECKS=1` +and `SET_STEPPER_CARRIAGES STEPPER=b CARRIAGES=carriage_x-carriage_y`, while still validating the final kinematics state. ### [hall_filament_width_sensor] @@ -835,15 +846,17 @@ been enabled (also see the #### SET_INPUT_SHAPER `SET_INPUT_SHAPER [SHAPER_FREQ_X=] -[SHAPER_FREQ_Y=] [DAMPING_RATIO_X=] -[DAMPING_RATIO_Y=] [SHAPER_TYPE=] -[SHAPER_TYPE_X=] [SHAPER_TYPE_Y=]`: +[SHAPER_FREQ_Y=] [SHAPER_FREQ_Y=] +[DAMPING_RATIO_X=] [DAMPING_RATIO_Y=] +[DAMPING_RATIO_Z=] [SHAPER_TYPE=] +[SHAPER_TYPE_X=] [SHAPER_TYPE_Y=] +[SHAPER_TYPE_Z=]`: Modify input shaper parameters. Note that SHAPER_TYPE parameter resets -input shaper for both X and Y axes even if different shaper types have +input shaper for all axes even if different shaper types have been configured in [input_shaper] section. SHAPER_TYPE cannot be used -together with either of SHAPER_TYPE_X and SHAPER_TYPE_Y parameters. -See [config reference](Config_Reference.md#input_shaper) for more -details on each of these parameters. +together with any of SHAPER_TYPE_X, SHAPER_TYPE_Y, and SHAPER_TYPE_Z +parameters. See [config reference](Config_Reference.md#input_shaper) +for more details on each of these parameters. ### [led] @@ -924,10 +937,27 @@ is calibrated a force in grams is also reported. ### [load_cell_probe] -The following commands are enabled if a +The commands below are enabled if a [load_cell config section](Config_Reference.md#load_cell_probe) has been enabled. +In addition, commands that perform probes, such as [`PROBE`](#probe), +[`PROBE_ACCURACY`](#probe_accuracy), +[`BED_MESH_CALIBRATE`](#bed_mesh_calibrate) etc. will accept +additional parameters if a `[load_cell_probe]` is defined. The +parameters override the corresponding settings from the +[`[load_cell_probe]`](./Config_Reference.md#load_cell_probe) +configuration: +- `FORCE_SAFETY_LIMIT=` +- `TRIGGER_FORCE=` +- `DRIFT_FILTER_CUTOFF_FREQUENCY=` +- `DRIFT_FILTER_DELAY=<1|2>` +- `BUZZ_FILTER_CUTOFF_FREQUENCY=` +- `BUZZ_FILTER_DELAY=<1|2>` +- `NOTCH_FILTER_FREQUENCIES=` +- `NOTCH_FILTER_QUALITY=` +- `TARE_TIME=` + ### LOAD_CELL_TEST_TAP `LOAD_CELL_TEST_TAP [TAPS=] [TIMEOUT=]`: Run a testing routine that reports taps on the load cell. The toolhead will not move but the load cell @@ -938,23 +968,6 @@ QUERY_ENDSTOPS and QUERY_PROBE for load cell probes. - `TIMEOOUT`: the time, in seconds, that the tool waits for each tab before aborting. -### Load Cell Command Extensions -Commands that perform probes, such as [`PROBE`](#probe), -[`PROBE_ACCURACY`](#probe_accuracy), -[`BED_MESH_CALIBRATE`](#bed_mesh_calibrate) etc. will accept additional -parameters if a `[load_cell_probe]` is defined. The parameters override the -corresponding settings from the -[`[load_cell_probe]`](./Config_Reference.md#load_cell_probe) configuration: -- `FORCE_SAFETY_LIMIT=` -- `TRIGGER_FORCE=` -- `DRIFT_FILTER_CUTOFF_FREQUENCY=` -- `DRIFT_FILTER_DELAY=<1|2>` -- `BUZZ_FILTER_CUTOFF_FREQUENCY=` -- `BUZZ_FILTER_DELAY=<1|2>` -- `NOTCH_FILTER_FREQUENCIES=` -- `NOTCH_FILTER_QUALITY=` -- `TARE_TIME=` - ### [manual_probe] The manual_probe module is automatically loaded. @@ -994,22 +1007,34 @@ enabled. #### MANUAL_STEPPER `MANUAL_STEPPER STEPPER=config_name [ENABLE=[0|1]] -[SET_POSITION=] [SPEED=] [ACCEL=] [MOVE= -[STOP_ON_ENDSTOP=[1|2|-1|-2]] [SYNC=0]]`: This command will alter the -state of the stepper. Use the ENABLE parameter to enable/disable the -stepper. Use the SET_POSITION parameter to force the stepper to think -it is at the given position. Use the MOVE parameter to request a -movement to the given position. If SPEED and/or ACCEL is specified -then the given values will be used instead of the defaults specified -in the config file. If an ACCEL of zero is specified then no -acceleration will be performed. If STOP_ON_ENDSTOP=1 is specified then -the move will end early should the endstop report as triggered (use -STOP_ON_ENDSTOP=2 to complete the move without error even if the -endstop does not trigger, use -1 or -2 to stop when the endstop -reports not triggered). Normally future G-Code commands will be -scheduled to run after the stepper move completes, however if a manual -stepper move uses SYNC=0 then future G-Code movement commands may run -in parallel with the stepper movement. +[SET_POSITION=] [SPEED=] [ACCEL=] [MOVE=] +[SYNC=0]]`: This command will alter the state of the stepper. Use the +ENABLE parameter to enable/disable the stepper. Use the SET_POSITION +parameter to force the stepper to think it is at the given +position. Use the MOVE parameter to request a movement to the given +position. If SPEED and/or ACCEL is specified then the given values +will be used instead of the defaults specified in the config file. If +an ACCEL of zero is specified then no acceleration will be +performed. Normally future G-Code commands will be scheduled to run +after the stepper move completes, however if a manual stepper move +uses SYNC=0 then future G-Code movement commands may run in parallel +with the stepper movement. + +`MANUAL_STEPPER STEPPER=config_name [SPEED=] [ACCEL=] +MOVE= STOP_ON_ENDSTOP=`: If STOP_ON_ENDSTOP is +specified then the move will end early if an endstop event occurs. The +`STOP_ON_ENDSTOP` parameter may be set to one of the following values: + +* `probe`: The movement will stop when the endstop reports triggered. +* `home`: The movement will stop when the endstop reports triggered + and the final position of the manual_stepper will be set such that + the trigger position matches the position specified in the `MOVE` + parameter. +* `inverted_probe`, `inverted_home`: As above, however, the movement + will stop when the endstop reports it is in a non-triggered state. +* `try_probe`, `try_inverted_probe`, `try_home`, `try_inverted_home`: + As above, but no error will be reported if the movement fully + completes without an endstop event stopping the move early. `MANUAL_STEPPER STEPPER=config_name GCODE_AXIS=[A-Z] [LIMIT_VELOCITY=] [LIMIT_ACCEL=] @@ -1200,10 +1225,39 @@ Requires a `SAVE_CONFIG` to take effect. ### [probe_eddy_current] -The following commands are available when a +The commands below are available when a [probe_eddy_current config section](Config_Reference.md#probe_eddy_current) is enabled. +In addition, commands that perform probes, such as [`PROBE`](#probe), +[`PROBE_ACCURACY`](#probe_accuracy), +[`BED_MESH_CALIBRATE`](#bed_mesh_calibrate) etc. will accept +additional parameters if a `[probe_eddy_current]` section is defined: +- `METHOD=`: This alters the probing mechanism: + - `METHOD=scan`: The toolhead does not descend. Instead the toolhead + will pause briefly above each target location and return the + measured height at that position. + - `METHOD=rapid_scan`: The toolhead does not descend and does not + pause at each target location. The value returned is the measured + height around the time that the toolhead was near each target + position. + - `METHOD=tap`: The toolhead will descend until the nozzle makes + contact with the bed. This method is only available if + `tap_threshold` is specified in the `[probe_eddy_current]` config + section. + - default: If no `METHOD` parameter is specified then the default + behavior is for the toolhead to descend until the sensor detects + that the distance to the bed is at or below the `z_offset` + parameter specified in the `[probe_eddy_current]` config section. +- `SAMPLE_TIME=