Created any-printer branch.

This commit is contained in:
Bassam Husain
2023-03-27 18:18:13 -04:00
parent 38cabc7513
commit eb029fe891
12 changed files with 50 additions and 399 deletions

1
.github/FUNDING.yml vendored
View File

@@ -1 +0,0 @@
ko_fi: bassamanator

143
README.md
View File

@@ -1,8 +1,6 @@
# 🚨 *One-Stop-Shop* Sovol SV06 Klipper Configuration
# 🚨 *One-Stop-Shop* Klipper Configuration
This repository contains the Klipper configuration and firmware for the Sovol SV06 3D printer with completely *stock hardware*.
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.
This repository contains the OSS Klipper configuration that can be used with any printer running klipper.
# Highlights
@@ -12,7 +10,7 @@ I am creating these files for my personal use and cannot be held responsible for
- SuperSlicer config bundle that contains the printer configuration, as well as what are considered by many to be the best print settings available for any FDM printer ([Ellis' SuperSlicer Profiles](https://github.com/AndrewEllis93/Ellis-SuperSlicer-Profiles)). Find the differences between the different print setting profiles [here](https://github.com/AndrewEllis93/Ellis-SuperSlicer-Profiles/tree/master/SuperSlicer). But basically, the 45 degree profile places the seam at the back.
- Bed model and texture to use in SuperSlicer/PrusaSlicer.
- Macros
- **Improved** mechanical gantry calibration/`G34` macro that provides the user audio feedback, and time to check the calibration.
- **Improved** mechanical gantry calibration/`G34` macro that provides the user audio feedback, and time to check the calibration. ⚠️ This is for i3 style printers only, see example video [here](https://youtu.be/aVdIeIIpUAk).
- Misc macros: `PRINT_START`, `CANCEL_PRINT`, `PRINT_END`, `PAUSE`, `RESUME`.
- Parking macros (parks the printhead at various locations): `PARKFRONT`, `PARKFRONTLOW`, `PARKREAR`, `PARKCENTER`, `PARKBED`.
- Load/unload filament macros.
@@ -21,7 +19,7 @@ I am creating these files for my personal use and cannot be held responsible for
## To do:
- [x] Replace M109/M190 with `TEMPERATURE_WAIT`.
- [ ] Get the Ellis `TEST_SPEED` macro working.
- [x] Get the Ellis `TEST_SPEED` macro working.This works on Vorons only!.
- [x] Add information about directory structure.
- [x] Create FAQ section.
- [x] Get filament sensor working with hotend PCB.
@@ -43,98 +41,27 @@ I work on this repository all the time and a lot of new features are coming. Wat
- Know what you're getting into by reading this documentation *fully!*
- 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 USB.
- 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.
- 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 not work for you.
- It is 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`.
- It is assumed that you already have a working `printer.cfg` and you already have your printer up and running Klipper.
- 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.
- If you see any errors, or encounter any issues, please create an [Issue](https://github.com/bassamanator/Sovol-SV06-firmware/issues/new), or a [Pull request](https://github.com/bassamanator/Sovol-SV06-firmware/pulls).
- I would recommend searching for the word `NOTE` in this repository. There are roughly half a dozen short points amongst the various files that you should be aware of if you're using this configuration.
## Flash Firmware
## Download the Configuration
💡 *If you have already flashed klipper onto your motherboard in the past, you can skip this step.*
💡 For the sake of simplicity, I will refer to the klipper firmware file as `klipper.bin` even though the actual filename is something along the lines of `klipper-v0.11.0-148-g52f4e20c.bin`.
### Prepare the microSD Card for Flashing
- Size: `8GB`. According to Sovol, the largest size that you can use is `16GB`.
- File system: `FAT32`.
- Must not contain any files *except* the firmware file.
### Flashing Procedure
1. Disconnect any USB cables that might be connected to the motherboard.
2. Copy `klipper.bin` to the microSD card.
3. Make sure the printer is off.
4. Insert the microSD card into printer.
4. Turn on the printer and wait a minute (usually takes 10 seconds).
5. Turn off the printer and remove the microSD.
You may find this [video](https://youtu.be/p6l253OJa34) useful.
⚠️ **Caveat**: Flashing will only work if current firmware filename is *different from previous flashing procedure*. The `.bin` is also important.
## Download Klipper Configuration
You can choose *either* of the 2 following methods.
### Clone the Repository
1. `cd ~/printer_data/config`
2. Empty entire `~/printer_data/config` folder. Unfortunately, for safety reasons I will not post this command here. However, in linux, you can delete files via `rm filename`.
3. `git clone -b master --single-branch https://github.com/bassamanator/Sovol-SV06-firmware.git .`
### 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.
1. [Download](https://github.com/bassamanator/Sovol-SV06-firmware/archive/refs/heads/any-printer.zip) the `ZIP` file containing the Klipper configuration.
2. The parent folder in the `ZIP` is `Sovol-SV06-firmware-any-printer`. This is relevant in the next step.
3. Extract **only** the *contents* of the parent folder into `~/printer_data/config`.
## Initial Steps
💡 If you already have a `moonraker.conf` (which you probably do since you're already up and running Klipper), and *you're not using a low powered device such as the RPi Zero*, you need to simply paste the following into your `moonraker.conf`:
```
[file_manager]
enable_object_processing: True
```
### Step 1
## Setup Instructions
1. Find what port the `mcu` (SV06 motherboard) is connected to via `ls -l /dev/serial/by-id/`.
2. Adjust the `[mcu]` section in `printer.cfg` accordingly.
### Step 2
❗☠️ **Your finger should be on the power switch for most of these steps** ☠️❗
❗☠️ **Power off if there is a collision/problem** ☠️❗
💡 I recommend no filament be loaded for any of these steps.
1. Do a `G28`; home all.
1. Check to see if `X` and `Y` max positions (`G1 X223 F3000`, `G1 Y223 F3000`) can be reached, and adjust `position_max`, if necessary. You can probably go all the way up to `225` for `X` and `Y` both, however, I would not recommend it.
2. Do a `G34`; mechanical gantry calibration. After the controlled collision against the beam at the top, there will be a 10 second pause for you to verify that both sides of the gantry are pressed up agaisnt the `stoppers` at the top. You will hear a succession of beeps.
1. Figure out your `Z` `position_max` by baby stepping your way up to the beam. The range is 250 to 261 from what I've seen, could be even higher for you. Adjust `position_max`, if necessary. I can go all the way to 258 over and over again, however, I would not print anything higher than 255 probably.
3. Pid tune the bed, but first move the printhead to the center. Ideally, all Pid tuning should occur at the temperatures that you print most at.
1. `G28`
2. `G1 X111 Y111 Z40 F6000`
3. `PID_CALIBRATE HEATER=heater_bed TARGET=70`
4. `SAVE_CONFIG` (once completed)
4. Pid tune the extruder while part cooling fan runs at 25%.
1. `G28`
2. `G1 X111 Y111 Z10 F6000`
3. `M106 S64`
4. `PID_CALIBRATE HEATER=extruder TARGET=245`
5. `SAVE_CONFIG` (once completed)
5. Adjust `z_offset`. Make sure your nozzle if very clean. Paper test [reference](https://www.klipper3d.org/Bed_Level.html?h=probe_calibrate#the-paper-test).
1. `SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=60`
2. `SET_HEATER_TEMPERATURE HEATER=extruder TARGET=180`
3. Proceed to next steps after both temperatures have been reached.
4. `G28`
5. `PROBE_CALIBRATE`
6. `SAVE_CONFIG` (once completed)
6. Create a bed mesh.
1. `SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=60`
2. `SET_HEATER_TEMPERATURE HEATER=extruder TARGET=180`
3. Proceed to next steps after both temperatures have been reached.
4. `G28`
5. `BED_MESH_CALIBRATE`
6. `SAVE_CONFIG` (once completed)
Simply add `[include ./osskc.cfg]` somewhere at the top of your `printer.cfg`.
## Directory Structure
@@ -144,26 +71,22 @@ This repository contains many files and folders. Some are *necessary* for this K
```
├── cfgs ✅
   ├── adxl-direct.cfg
   ├── adxl-rp2040.cfg
   ├── beeper.cfg
   ├── misc-macros.cfg
   ├── MECHANICAL_GANTRY_CALIBRATION.cfg
   ├── PARKING.cfg
│   └── TEST_SPEED.cfg [☠Not ready for use☠]
├── adxl-direct.cfg
├── adxl-rp2040.cfg
├── MECHANICAL_GANTRY_CALIBRATION.cfg
├── misc-macros.cfg
├── PARKING.cfg
└── TEST_SPEED.cfg
├── images ❌
  ── githubstar.gif
── githubstar.gif
│ ├── heart.gif
│ └── party_blob.gif
├── misc ❌
   ├── cup-border.png
   ├── klipper.bin
   ├── logo_white_stroke.png
│   ├── M503-output.yml
│   ├── SuperSlicer_config_bundle.ini
│   ├── sv06-buildPlate.png
│   ├── SV06-buildPlate.stl
│   └── SV06-texture.svg
├── moonraker.conf ✅
├── printer.cfg ✅
├── cup-border.png
├── logo_white_stroke.png
└── SuperSlicer_config_bundle.ini
├── moonraker.conf ✅ ❌ (depends if you already have this file or not)
├── osskc.cfg ✅
└── README.md ❌
```
@@ -220,15 +143,9 @@ A simple runout sensor can only detect a change in state. So, if you start a pri
## Useful Resources
- [Everything Sovol SV06](https://github.com/bassamanator/everything-sovol-sv06)
- [RP2040-Zero ADXL345 Connection Klipper](https://github.com/bassamanator/rp2040-zero-adxl345-klipper)
- ⭐⭐⭐ [Ellis' Print Tuning Guide](https://ellis3dp.com/Print-Tuning-Guide)
## Links
- [SV06 Official Marlin Source Code](https://github.com/Sovol3d/Sv06-Source-Code)
- [SV06 Official Models](https://github.com/Sovol3d/SV06-Fully-Open-Source)
## Sources
- https://www.klipper3d.org

View File

@@ -1,4 +1,4 @@
# NOTE This macro is not ready for use. ☠️☠️☠️
# NOTE Guide here https://ellis3dp.com/Print-Tuning-Guide/articles/determining_max_speeds_accels.html
# Home, get position, throw around toolhead, home again.
# If MCU stepper positions (first line in GET_POSITION) are greater than a full step different (your number of microsteps), then skipping occured.
# We only measure to a full step to accomodate for endstop variance.

View File

@@ -14,14 +14,15 @@ path: /home/pi/printer_data/gcodes
[pause_resume]
[display_status]
[delayed_gcode DISABLEFILAMENTSENSOR]
initial_duration: 1
gcode:
SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=0
# NOTE If you have a filament sensor, uncomment the following 4 lines
# [delayed_gcode DISABLEFILAMENTSENSOR]
# initial_duration: 1
# gcode:
# SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=0
[gcode_macro _globals]
variable_filament_sensor_enabled: 0 # NOTE Enable(1) or disable(0) the filament sensor, if one is connected
variable_beeping_enabled: 1 # NOTE Enable(1) or disable(0) beeping everywhere except during gantry calibration
variable_filament_sensor_enabled: 0 # NOTE Enable(1) or disable(0) the filament sensor (if you have a sensor configured in your printer.cfg)
variable_beeping_enabled: 0 # NOTE Enable(1) or disable(0) beeping (if you have a beeper pin set in your printer.cfg)
variable_pre_purge_prime_length: 1.4
gcode:
SET_GCODE_VARIABLE MACRO=_globals VARIABLE=pre_purge_prime_length VALUE={ variable_pre_purge_prime_length }

View File

@@ -1,48 +0,0 @@
echo:; Linear Units:
echo: G21 ; (mm)
echo:; Temperature Units:
echo: M149 C ; Units in Celsius
echo:; Filament settings (Disabled):
echo: M200 S0 D1.75
echo:; Steps per unit:
echo: M92 X80.00 Y80.00 Z800.00 E691.50
echo:; Max feedrates (units/s):
echo: M203 X500.00 Y500.00 Z10.00 E30.00
echo:; Max Acceleration (units/s2):
echo: M201 X500.00 Y500.00 Z100.00 E5000.00
echo:; Acceleration (units/s2) (P<print-accel> R<retract-accel> T<travel-accel>):
echo: M204 P500.00 R500.00 T1000.00
echo:; Advanced (B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> X<max_x_jerk> Y<max_y_jerk> Z<max_z_jerk> E<max_e_jerk>):
echo: M205 B20000.00 S0.00 T0.00 X8.00 Y8.00 Z0.40 E5.00
echo:; Home offset:
echo: M206 X0.00 Y0.00 Z0.00
echo:; Auto Bed Leveling:
echo: M420 S0 Z10.00 ; Leveling OFF
echo:; Material heatup parameters:
echo: M145 S0 H185.00 B60.00 F255
echo: M145 S1 H240.00 B80.00 F255
echo:; Hotend PID:
echo: M301 P15.95 I1.30 D48.96
echo:; Bed PID:
echo:echo: M304 P110.38 I6.12 D497.30
echo:; User thermistors:
echo: M305 P0 R4700.0 T94162.0 B4160.0 C0.000000000 ; HOTEND 0
echo:; Power-loss recovery:
echo: M413 S1 ; ON
echo:; Z-Probe Offset:
echo: M851 X25.00 Y-25.00 Z0.00 ; (mm)
echo:; Stepper driver current:
echo: M906 X860 Y900 Z800
echo: M906 T0 E550
echo:; Hybrid Threshold:
echo: M913 X183 Y183 Z41
echo: M913 T0 E60
echo:; StallGuard threshold:
echo: M914 X68 Y70
echo:; Driver stepping mode:
echo: M569 S1 X Y Z
echo: M569 S1 T0 E
echo:; Linear Advance:
echo: M900 K0.04
echo:; Filament load/unload:
echo: M603 L0.00 U50.00 ; (mm)

Binary file not shown.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

12
osskc.cfg Normal file
View File

@@ -0,0 +1,12 @@
# One-Stop-Shop Klipper Configuration
#
# Find installation instructions at https://github.com/bassamanator/Sovol-SV06-firmware/tree/any-printer
[include ./cfgs/misc-macros.cfg]
[include ./cfgs/PARKING.cfg]
[include ./cfgs/MECHANICAL_GANTRY_CALIBRATION.cfg]
[include ./cfgs/TEST_SPEED.cfg]
# NOTE Uncomment the ONE of the following lines if you're using an adxl345
# [include ./cfgs/adxl-rp2040.cfg]
# [include ./cfgs/adxl-direct.cfg]

View File

@@ -1,229 +0,0 @@
# This file contains pin mappings for the stock Sovol SV06.
#
# Find installation instructions at https://github.com/bassamanator/Sovol-SV06-firmware
#
# See https://www.klipper3d.org/Config_Reference.html for configuration reference.
[include ./cfgs/misc-macros.cfg]
[include ./cfgs/PARKING.cfg]
[include ./cfgs/MECHANICAL_GANTRY_CALIBRATION.cfg]
# NOTE Uncomment the ONE of the following lines if you're using an adxl345
# [include ./cfgs/adxl-rp2040.cfg]
# [include ./cfgs/adxl-direct.cfg]
[mcu]
# NOTE Obtain definition by "ls -l /dev/serial/by-id/"
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 200
max_accel: 3000
max_z_velocity: 15
max_z_accel: 45
#####################################################################
# X/Y/Z Stepper Settings
#####################################################################
[stepper_x]
step_pin: PC2
dir_pin: !PB9
enable_pin: !PC3
microsteps: 64
rotation_distance: 40
endstop_pin: tmc2209_stepper_x:virtual_endstop
position_endstop: 0
position_max: 223 # NOTE You can adjust this if you have more room
homing_speed: 40
homing_retract_dist: 0
[tmc2209 stepper_x]
uart_pin: PC1
run_current: 0.860
stealthchop_threshold: 0
interpolate: False
sense_resistor: 0.150
uart_address: 3
driver_SGTHRS: 81
diag_pin: PA5
[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 64
rotation_distance: 40
endstop_pin: tmc2209_stepper_y:virtual_endstop
position_endstop: 0
position_max: 223 # NOTE You can adjust this if you have more room
homing_speed: 40
homing_retract_dist: 0
[tmc2209 stepper_y]
uart_pin: PC0
run_current: 0.900
stealthchop_threshold: 0
interpolate: False
sense_resistor: 0.150
uart_address: 3
driver_SGTHRS: 81
diag_pin: PA6
[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
microsteps: 64
rotation_distance: 4
endstop_pin: probe:z_virtual_endstop
position_min: -4
position_max: 258 # NOTE You can adjust this if you have more room
homing_speed: 5
[tmc2209 stepper_z]
uart_pin: PA15
run_current: 1.000
stealthchop_threshold: 0
interpolate: False
sense_resistor: 0.150
uart_address: 3
diag_pin: PA7
#####################################################################
# Extruder
#####################################################################
[extruder]
step_pin: PB4
dir_pin: !PB3
enable_pin: !PC3
microsteps: 64
rotation_distance: 4.65 # NOTE Calibrate e-steps and adjust https://www.klipper3d.org/Rotation_Distance.html
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
control: pid
pid_kd: 86.991
pid_kp: 21.479
pid_ki: 1.326
min_temp: 0
max_temp: 300
max_extrude_only_distance: 150.0
[tmc2209 extruder]
uart_pin: PC14
run_current: 0.550
stealthchop_threshold: 0
interpolate: False
sense_resistor: 0.150
uart_address: 3
#####################################################################
# Bed Heater
#####################################################################
[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: pid
pid_kp: 64.440
pid_ki: 0.773
pid_kd: 1343.571
min_temp: 0
max_temp: 110
#####################################################################
# Probe Related
#####################################################################
[probe]
pin: PB1
x_offset: 27
y_offset: -20
z_offset: 0
samples: 3
samples_result: median
samples_tolerance: 0.01
samples_tolerance_retries: 5
[safe_z_home]
home_xy_position: 84.50, 135 # NOTE The probe is at the center of the bed.
speed: 100.0
z_hop: 10
z_hop_speed: 15
[bed_mesh]
speed: 175
mesh_min: 27, 5
mesh_max: 222, 203
probe_count: 5,5
algorithm: bicubic
fade_start: 1
fade_end: 10
fade_target: 0
#####################################################################
# Fans
#####################################################################
[fan]
pin: PA0
#####################################################################
# Misc
#####################################################################
[display]
lcd_type: st7920
cs_pin: PB12
sclk_pin: PB13
sid_pin: PB15
encoder_pins: ^PB14, ^PB10
click_pin: ^!PB2
[bed_screws]
screw1: 26.5, 31
screw1_name: front left
screw2: 196.75, 31
screw2_name: front right
screw3: 196.75, 201
screw3_name: back right
screw4: 26.5, 201
screw4_name: back left
[screws_tilt_adjust]
screw1: 111.5, 116.5
screw1_name: center
screw2: 26.5, 31
screw2_name: front left
screw3: 196.75, 31
screw3_name: front right
screw4: 196.75, 201
screw4_name: back right
screw5: 26.5, 201
screw5_name: back left
speed: 50
horizontal_move_z: 10
screw_thread: CCW-M4
[output_pin beeper]
pin: PC6
value: 0
shutdown_value: 0
pwm: True
cycle_time: 0.0005 ; Default beeper tone in kHz. 1 / 0.0005 = 2000Hz (2kHz)
[filament_switch_sensor filament_sensor]
switch_pin: !PA4 # "Pulled-high"
pause_on_runout: True
insert_gcode:
M117 Insert Detected
runout_gcode:
M117 Runout Detected
CONDITIONAL_BEEP i=3 dur=300 freq=400