From 1823d0ca37ef9b2140a1052a20daa3469a67f98b Mon Sep 17 00:00:00 2001 From: Bassam Husain Date: Wed, 19 Apr 2023 22:59:32 -0400 Subject: [PATCH 01/10] Updated readme: Download section. --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9c7f2a3..11160d4 100644 --- a/README.md +++ b/README.md @@ -86,8 +86,9 @@ You can choose *either* of the 2 following methods. ### Method 2: Download the ZIP 1. [Download](https://github.com/bassamanator/Sovol-SV06-firmware/archive/refs/heads/master.zip) the `ZIP` file containing the Klipper configuration. -2. The parent folder in the `ZIP` is `Sovol-SV06-firmware-master`. This is relevant in the next step. -3. Extract **only** the *contents* of the parent folder into `~/printer_data/config`. +2. See `Step 2` in `Method 1`. +3. The parent folder in the `ZIP` is `Sovol-SV06-firmware-master`. This is relevant in the next step. +4. Extract **only** the *contents* of the parent folder into `~/printer_data/config`. ## Initial Steps From 5e342261c8e7bad6ac9f57249b04476fb707cc34 Mon Sep 17 00:00:00 2001 From: Bassam Husain Date: Thu, 20 Apr 2023 12:19:06 -0400 Subject: [PATCH 02/10] Pulling in print_start from personal branch. --- README.md | 2 +- cfgs/misc-macros.cfg | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 11160d4..64147ac 100644 --- a/README.md +++ b/README.md @@ -275,7 +275,7 @@ The printhead is now parked front center waiting for you to insert filament. You - https://ellis3dp.com/Print-Tuning-Guide - https://github.com/strayr/strayr-k-macros - https://docs.vorondesign.com/build/software/miniE3_v20_klipper.html -- ⭐ https://github.com/spinixguy/Sovol-SV06-firmware +- https://github.com/spinixguy/Sovol-SV06-firmware - https://www.printables.com/model/378915-sovol-sv06-buildplate-texture-and-model-for-prusas - https://github.com/AndrewEllis93/Ellis-SuperSlicer-Profiles diff --git a/cfgs/misc-macros.cfg b/cfgs/misc-macros.cfg index 6872a33..e959bde 100644 --- a/cfgs/misc-macros.cfg +++ b/cfgs/misc-macros.cfg @@ -5,6 +5,11 @@ enable_force_move: True # [temperature_sensor raspberry_pi] # sensor_type: temperature_host +# NOTE If you're using a an Orange Pi, you can uncomment the next 2 lines, optionally. +# [temperature_sensor Orange_Pi] +# sensor_type: temperature_host +# sensor_path: /sys/class/thermal/thermal_zone0/temp + [virtual_sdcard] path: /home/pi/printer_data/gcodes @@ -122,9 +127,14 @@ gcode: {% set hotendtemp = params.HOTEND|int %} {% set chambertemp = params.CHAMBER|default(0)|int %} - # Set safe speeds {% set maxVelocity = printer.configfile.settings.printer.max_velocity|default(200)|int %} {% set maxVelocityAdjusted = (0.90 * maxVelocity * 60)|int %} + + {% if printer.configfile.settings.safe_z_home %} + {% set startX = printer.configfile.settings.safe_z_home.home_xy_position[0]|float %} + {% set startY = printer.configfile.settings.safe_z_home.home_xy_position[1]|float %} + {% endif %} + {% set bedtempAlmost = (bedtemp - 2)|int %} {% set hotendtempStepOne = 150|int %} {% set hotendtempStepTwo = 170|int %} @@ -132,18 +142,23 @@ gcode: BED_MESH_PROFILE LOAD=default ; NOTE if not using a mesh, comment out this line ADJUST_FILAMENT_SENSOR_STATUS ENABLE=1 - G90 + G90 ; absolute positioning M140 S{bedtempAlmost} ; set & don't wait for bed temp M104 S{hotendtempStepOne} ; set & don't wait for hotend temp G28 X Y + {% if printer.configfile.settings.safe_z_home %} + G1 X{startX} Y{startY} F{maxVelocityAdjusted} + {% endif %} M190 S{bedtempAlmost} ; set & wait for bed temp M104 S{hotendtempStepTwo} ; set & don't wait for hotend temp M190 S{bedtemp} ; set & wait for bed temp + + M104 S{hotendtemp} ; set & don't wait for hotend temp G28 Z ; final z homing - M109 S{hotendtemp} ; set & wait for hotend temp G1 X0 Y0 F{maxVelocityAdjusted} + M109 S{hotendtemp} ; set & wait for hotend temp G1 Z20 F3000 ; move nozzle away from bed 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 03/10] 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 04/10] 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 05/10] 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 06/10] 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 07/10] 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 08/10] 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. From 6ede72744901d0a021ea12d48406c6b10b84fb98 Mon Sep 17 00:00:00 2001 From: Bassam Husain <61985779+bassamanator@users.noreply.github.com> Date: Sun, 23 Apr 2023 08:57:17 -0400 Subject: [PATCH 09/10] Update README.md Flash Firmware section. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index aa9803b..073c518 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ Although I've made switching over to Klipper as easy as is possible, it can stil - Size: `8GB`. According to Sovol, the largest size that you can use is `16GB`. - File system: `FAT32`. +- Allocation unit size: `4096 bytes`. - Must not contain any files *except* the firmware file. ### Flashing Procedure From b0d122a1c1ab85cf04b74c47e0827cd0abc0ade3 Mon Sep 17 00:00:00 2001 From: Bassam Husain Date: Sun, 23 Apr 2023 09:39:20 -0400 Subject: [PATCH 10/10] Adjust Initial steps, step 1. --- .vscode/settings.json | 12 ++++++++++++ README.md | 12 +++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index cdb8a73..3e14150 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,12 +7,24 @@ "spellright.documentTypes": ["markdown", "plaintext"], "cSpell.words": [ "ADXL", + "cfgs", + "Fluidd", + "Fluiddpi", "gcode", + "githubstar", "hotend", + "KIAUH", "Klipper", "Klipperized", + "lrwxrwxrwx", + "moonraker", "octahedroflake", "PARKBED", + "PARKCENTER", + "PARKFRONT", + "PARKFRONTLOW", + "PARKREAR", + "Prusa", "runout", "Sovol" ] diff --git a/README.md b/README.md index 073c518..260aeb9 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Although I've made switching over to Klipper as easy as is possible, it can stil - If an error was reported at a step, do no proceed to the next step. - It is assumed that you are connected to your host Raspberry Pi (or other host device) via SSH, and that your printer motherboard is connected to the host via a data USB cable. Note that most of the micro USB cables that you find at home are *unlikely* to be data cables, and it's not possible to tell just by looking. - It is also assumed that the username on the host device is `pi`. If that is not the case, you will have to manually edit `moonraker.conf` and `cfgs/misc-macros.cfg` and change any mentions of `/home/pi` to `/home/yourUserName`. -- Klipper *must* be installed on the host Raspberry Pi for everything to work. Easiest is to use a [FluiddPi](https://docs.fluidd.xyz/installation/fluiddpi#download) or [MainsailOS](https://github.com/mainsail-crew/mainsail/releases/latest) image. [KIAUH](https://github.com/th33xitus/kiauh) is another excellent option, though it's not as simple as flashing MainsailOS on a microSD card, for example. +- Klipper *must* be installed on the host Raspberry Pi for everything to work. Easiest is to use a [~~FluiddPI~~](https://docs.fluidd.xyz/installation/fluiddpi#download) (⚠️ `FluiddPI` is not under active maintenance) or [MainsailOS](https://github.com/mainsail-crew/mainsail/releases/latest) image. Alternatively, you can install `Fluidd` or `Mainsail` via [KIAUH](https://github.com/th33xitus/kiauh). - Robert Redford's performance in *Spy Game (2001)* was superb! - It is assumed that there is one instance of Klipper installed. If you have multiple instances of Klipper installed, via `KIAUH` for example, then this guide is not for you. You can still use all the configs of course, but the steps in this guide will likely not work for you. - Your question has probably been answered already, but if it hasn't, please post in the [Discussion](https://github.com/bassamanator/Sovol-SV06-firmware/discussions) section. @@ -98,7 +98,17 @@ You can choose *either* of the 2 following methods. ### Step 1 1. Find what port the `mcu` (SV06 motherboard) is connected to via `ls -l /dev/serial/by-id/`. + 1. The output will be something along the lines of +`lrwxrwxrwx 13 root root 22 Apr 11:10 usb-1a86_USB2.0-Serial-if00-port0 -> ../../ttyUSB0`. + 2. `usb-1a86_USB2.0-Serial-if00-port0` is the relevant part. + 3. Therefore, the full path to your `mcu` is `/dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0`. 2. Adjust the `[mcu]` section in `printer.cfg` accordingly. + Based on this *example*, your `mcu` section will be: + ``` + [mcu] + serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0 + restart_method: command + ``` ### Step 2