From 4a38d34a0e56f8ae8a13f721946b5dfe9353e87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Marschollek?= Date: Thu, 20 Apr 2023 22:14:33 +0200 Subject: [PATCH 1/6] Add a minimum bed temperature of 0 degrees If the bed temperature is less than 2, the print job fails with an error message complaining about an invalid temperature. This happens, for instance, when printing ABS where the bed is not supposed to be heated. This change makes sure that the bed temperature cannot be negative. --- cfgs/misc-macros.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cfgs/misc-macros.cfg b/cfgs/misc-macros.cfg index e959bde..b952b20 100644 --- a/cfgs/misc-macros.cfg +++ b/cfgs/misc-macros.cfg @@ -135,7 +135,7 @@ gcode: {% set startY = printer.configfile.settings.safe_z_home.home_xy_position[1]|float %} {% endif %} - {% set bedtempAlmost = (bedtemp - 2)|int %} + {% set bedtempAlmost = (bedtemp - 2, 0)|max %} {% set hotendtempStepOne = 150|int %} {% set hotendtempStepTwo = 170|int %} @@ -307,4 +307,4 @@ gcode: G4 P{dur} SET_PIN PIN=beeper VALUE=0 G4 P{dur} - {% endfor %} \ No newline at end of file + {% endfor %} From 4df5ef2db319d591f35f03d641878409d6d824c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Marschollek?= Date: Fri, 21 Apr 2023 20:26:11 +0200 Subject: [PATCH 2/6] Add config for 2 ADXL345 via RasPi pico This adds a configuration supporting two ADXL345 sensors at the same time though a Raspberry Pi pico. Resonance measurements for both the head and the bed can be done without having to change the sensors. --- cfgs/adxl-rpi-pico-2x.cfg | 42 +++++++++++++++++++++++++++++++++++++++ printer.cfg | 1 + 2 files changed, 43 insertions(+) create mode 100644 cfgs/adxl-rpi-pico-2x.cfg diff --git a/cfgs/adxl-rpi-pico-2x.cfg b/cfgs/adxl-rpi-pico-2x.cfg new file mode 100644 index 0000000..f2a2e43 --- /dev/null +++ b/cfgs/adxl-rpi-pico-2x.cfg @@ -0,0 +1,42 @@ +##################################################################### +# Config that supports a print head and a bed sensor at the same time +# This requires a Raspberry Pi Pico. Instructions: +# https://klipper.discourse.group/t/raspberry-pi-pico-adxl345-portable-resonance-measurement/1757/9 +# +# Recommended mounts: +# https://www.printables.com/model/385334-sovol-sv06-adxl345-mount-printhead-and-bed +# +# ADXL345 related Settings +# https://www.klipper3d.org/Measuring_Resonances.html#adxl345 +##################################################################### + +[mcu RP2040] +baud: 115200 +restart_method: command +# Obtain definition by "ls -l /dev/serial/by-id/" +serial: /dev/serial/by-id/usb-Klipper_rp2040_E66138935F154C28-if00 + +[adxl345 head] +cs_pin: RP2040:gpio1 +spi_bus: spi0a +# update axes_map if your sensor is oriented differently. Note the print on your sensor. +# -y, -z, x means that +# - the x axis of your printer corresponds to the sensor's negative y axis +# - the y axis of your printer corresponds to the sensor's negative z axis +# - the z axis of your printer corresponds to the sensor's x axis +axes_map: -y, -z, x + +[adxl345 bed] +cs_pin: RP2040:gpio9 +spi_bus: spi1a + +[resonance_tester] +probe_points: 111.5, 116.5, 30 +accel_chip_x: adxl345 head +accel_chip_y: adxl345 bed + +[gcode_macro ADX] +description: Shortcut to ACCELEROMETER_QUERY for both sensors +gcode: + ACCELEROMETER_QUERY CHIP=head + ACCELEROMETER_QUERY CHIP=bed diff --git a/printer.cfg b/printer.cfg index 1d08719..a72b668 100644 --- a/printer.cfg +++ b/printer.cfg @@ -10,6 +10,7 @@ # NOTE Uncomment the ONE of the following lines if you're using an adxl345 # [include ./cfgs/adxl-rp2040.cfg] +# [include ./cfgs/adxl-rpi-pico-2x.cfg] # [include ./cfgs/adxl-direct.cfg] [mcu] From 51fd3f0b19f74b52ab559c2fea155f2312f1c3e3 Mon Sep 17 00:00:00 2001 From: Bassam Husain <61985779+bassamanator@users.noreply.github.com> Date: Fri, 21 Apr 2023 16:41:26 -0400 Subject: [PATCH 3/6] Update adxl-rpi-pico-2x.cfg Minor adjustments to adxl-rpi-pico-2x.cfg. --- cfgs/adxl-rpi-pico-2x.cfg | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cfgs/adxl-rpi-pico-2x.cfg b/cfgs/adxl-rpi-pico-2x.cfg index f2a2e43..363a301 100644 --- a/cfgs/adxl-rpi-pico-2x.cfg +++ b/cfgs/adxl-rpi-pico-2x.cfg @@ -1,7 +1,8 @@ ##################################################################### # Config that supports a print head and a bed sensor at the same time -# This requires a Raspberry Pi Pico. Instructions: -# https://klipper.discourse.group/t/raspberry-pi-pico-adxl345-portable-resonance-measurement/1757/9 +# This requires a Raspberry Pi Pico. +# Instructions: https://klipper.discourse.group/t/raspberry-pi-pico-adxl345-portable-resonance-measurement/1757/9 +# TLDR Instructions: The two sensors should use the spi0a (GPIO 0-3) and spi1a (GPIO 9-12) buses, respectively. # # Recommended mounts: # https://www.printables.com/model/385334-sovol-sv06-adxl345-mount-printhead-and-bed @@ -31,9 +32,9 @@ cs_pin: RP2040:gpio9 spi_bus: spi1a [resonance_tester] -probe_points: 111.5, 116.5, 30 accel_chip_x: adxl345 head accel_chip_y: adxl345 bed +probe_points: 111.5, 111.5, 20 [gcode_macro ADX] description: Shortcut to ACCELEROMETER_QUERY for both sensors From 835e990d888cf6605e42e1742751cae4e70823b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Marschollek?= Date: Fri, 21 Apr 2023 20:40:04 +0200 Subject: [PATCH 4/6] Avoid cooling down the extruder in PRINT_START The current `PRINT_START` macro heats the extruder to 150 degrees, then to 170, and finally to the target temperature. If the extruder is already hot, this unnecessarily cools it down and wastes time. This change only cools down the hotend if it's above the target temperature and then only to that temperature. If the extruder was colder than 150 degrees, this change maintains the current behaviour. --- cfgs/misc-macros.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cfgs/misc-macros.cfg b/cfgs/misc-macros.cfg index 007bf92..e987a76 100644 --- a/cfgs/misc-macros.cfg +++ b/cfgs/misc-macros.cfg @@ -136,8 +136,8 @@ gcode: {% endif %} {% set bedtempAlmost = (bedtemp - 2, 0)|max %} - {% set hotendtempStepOne = 150|int %} - {% set hotendtempStepTwo = 170|int %} + {% set hotendtempStepOne = ((hotendtemp, printer[printer.toolhead.extruder].temperature|int)|min, 150)|max %} + {% set hotendtempStepTwo = ((hotendtemp, printer[printer.toolhead.extruder].temperature|int)|min, 170)|max %} BED_MESH_PROFILE LOAD=default ; NOTE if not using a mesh, comment out this line ADJUST_FILAMENT_SENSOR_STATUS ENABLE=1 From 940ea48541bd4ef621e8fdf43755a58e28bffa55 Mon Sep 17 00:00:00 2001 From: Bassam Husain <61985779+bassamanator@users.noreply.github.com> Date: Sat, 22 Apr 2023 15:00:45 -0400 Subject: [PATCH 5/6] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 64147ac..3c07c14 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ This repository contains the Klipper configuration and firmware for the **Sovol SV06** 3D printer with completely *stock hardware*. +For the **Sovol SV06 Plus**, please refer to the [sv06-plus](https://github.com/bassamanator/Sovol-SV06-firmware/tree/sv06-plus) branch. + If you wanted to use the One-Stop-Shop Klipper Configuration for a *different printer*, please switch to the [any-printer](https://github.com/bassamanator/Sovol-SV06-firmware/tree/any-printer) branch. I am creating these files for my personal use and cannot be held responsible for what it might do to your printer. Use at your own risk. From 6eedc4bd60aa67720bd055913b89a97e5a1d3143 Mon Sep 17 00:00:00 2001 From: Bassam Husain <61985779+bassamanator@users.noreply.github.com> Date: Sat, 22 Apr 2023 16:53:46 -0400 Subject: [PATCH 6/6] Update README.md Edit Adjust Your Slicer section. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 3c07c14..aa9803b 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,12 @@ But first, adjust your slicer. You need to adjust the start and end gcode in your slicer. The relevant macros are `PRINT_START` and `PRINT_END`. Find instructions [here](https://ellis3dp.com/Print-Tuning-Guide/articles/passing_slicer_variables.html#slicer-start-g-code). +If you would like to print a purge line before your print starts, at the end of your start gcode, on a new line add `PURGE_LINE`. Here's an example: +``` +PRINT_START BED=[first_layer_bed_temperature] HOTEND={first_layer_temperature[initial_extruder]+extruder_temperature_offset[initial_extruder]} CHAMBER=[chamber_temperature] +PURGE_LINE +``` + ## Directory Structure This repository contains many files and folders. Some are *necessary* for this Klipper configuration to work, others are not.