├── Firmware Robin Nano 1.2 v10 ├── README.MD └── Robin_nano35.bin ├── scripts ├── USB_Check.sh ├── LOG_CPU_START.sh ├── LOG_CPU_STOP.sh ├── USB_KEY.sh ├── tasmota.sh ├── Change_WIFI.sh ├── USB_MOUNT.sh ├── USB_UNMOUNT.sh ├── LOG_CPU │ └── etc_systemd_system │ │ ├── log_cpu.service │ │ └── log_cpu.timer ├── USB_COPY.sh ├── generate-shaper-graph-y.sh ├── generate-shaper-graph-x.sh ├── LOG_CPU.sh ├── Cura_Start_End.txt ├── generate-belt-tension-graph.sh ├── plr.sh └── plr_z.cfg ├── Firmware Robin Nano 1.2 v0.12.0-12 ├── README.MD ├── Robin_nano35.bin └── Robin_nano43.bin ├── .theme └── README.MD ├── RP2040_Firmware ├── klipper.uf2 ├── klipper_03H.uf2 └── README.MD ├── Firmware Robin Nano 1.2 v11 ├── Robin_nano35.bin ├── README.MD └── Robin_nano35.bin_v0.11.0-169-g83308a10 ├── webcam.cfg ├── autotune_tmc.cfg ├── Orca_Start_End.gcode ├── Cura_Start_End.txt ├── DYZE_500.cfg ├── °TMC_Spread.cfg ├── °TMC_Stealth.cfg ├── fuidd.cfg ├── KAMP_Settings.cfg ├── README.MD ├── webcam.txt ├── crowsnest.conf ├── skrat.cfg ├── START_VzBot.cfg ├── moonraker.conf ├── START.cfg ├── btt-skrat-10.cfg ├── °START.cfg ├── z_filament_switch_unload.cfg ├── z_filament_switch_loop_unload.cfg.cfg ├── mainsail.cfg ├── macro.cfg ├── printer_SP3_MicroProbe.cfg ├── printer_SP3.cfg ├── timelapse.cfg └── printer_Troodon_2.0.cfg /Firmware Robin Nano 1.2 v10/README.MD: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /scripts/USB_Check.sh: -------------------------------------------------------------------------------- 1 | ls /dev/serial/by-id/* 2 | -------------------------------------------------------------------------------- /scripts/LOG_CPU_START.sh: -------------------------------------------------------------------------------- 1 | systemctl start log_cpu.timer 2 | -------------------------------------------------------------------------------- /scripts/LOG_CPU_STOP.sh: -------------------------------------------------------------------------------- 1 | systemctl stop log_cpu.timer 2 | -------------------------------------------------------------------------------- /Firmware Robin Nano 1.2 v0.12.0-12/README.MD: -------------------------------------------------------------------------------- 1 | Version: v0.12.0-12-g38221df8 2 | -------------------------------------------------------------------------------- /scripts/USB_KEY.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | fdisk -l | grep -oE '/dev/sd[a-z][0-9]+' 3 | -------------------------------------------------------------------------------- /scripts/tasmota.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | curl http://192.168.0.115/cm?cmnd=Power2%20ON 3 | -------------------------------------------------------------------------------- /.theme/README.MD: -------------------------------------------------------------------------------- 1 | # Themes for Klipper 2 | 3 | ## Diamond_Theme & Diamond_Theme_Green by Giuseppe Di Resta 4 | -------------------------------------------------------------------------------- /RP2040_Firmware/klipper.uf2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Travis90x/Klipper-config/HEAD/RP2040_Firmware/klipper.uf2 -------------------------------------------------------------------------------- /scripts/Change_WIFI.sh: -------------------------------------------------------------------------------- 1 | iwlist wlan0 scan 2 | nmcli dev wifi list 3 | nmcli dev wifi connect ${1} password ${2} 4 | -------------------------------------------------------------------------------- /RP2040_Firmware/klipper_03H.uf2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Travis90x/Klipper-config/HEAD/RP2040_Firmware/klipper_03H.uf2 -------------------------------------------------------------------------------- /Firmware Robin Nano 1.2 v10/Robin_nano35.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Travis90x/Klipper-config/HEAD/Firmware Robin Nano 1.2 v10/Robin_nano35.bin -------------------------------------------------------------------------------- /Firmware Robin Nano 1.2 v11/Robin_nano35.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Travis90x/Klipper-config/HEAD/Firmware Robin Nano 1.2 v11/Robin_nano35.bin -------------------------------------------------------------------------------- /Firmware Robin Nano 1.2 v11/README.MD: -------------------------------------------------------------------------------- 1 | - Rename the firmware as Robin_nano35.bin if the TFT Display is connected 2 | otherwhise, rename it Robin_nano43.bin 3 | -------------------------------------------------------------------------------- /Firmware Robin Nano 1.2 v0.12.0-12/Robin_nano35.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Travis90x/Klipper-config/HEAD/Firmware Robin Nano 1.2 v0.12.0-12/Robin_nano35.bin -------------------------------------------------------------------------------- /Firmware Robin Nano 1.2 v0.12.0-12/Robin_nano43.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Travis90x/Klipper-config/HEAD/Firmware Robin Nano 1.2 v0.12.0-12/Robin_nano43.bin -------------------------------------------------------------------------------- /scripts/USB_MOUNT.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for usb_device in /dev/sd[a-z][0-9]*; do 4 | device_name=$(basename "$usb_device") 5 | udisksctl mount -b "$usb_device" 6 | done 7 | -------------------------------------------------------------------------------- /scripts/USB_UNMOUNT.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | for usb_device in /dev/sd[a-z][0-9]*; do 3 | device_name=$(basename "$usb_device") 4 | udisksctl unmount -b "$usb_device" 5 | done 6 | -------------------------------------------------------------------------------- /Firmware Robin Nano 1.2 v11/Robin_nano35.bin_v0.11.0-169-g83308a10: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Travis90x/Klipper-config/HEAD/Firmware Robin Nano 1.2 v11/Robin_nano35.bin_v0.11.0-169-g83308a10 -------------------------------------------------------------------------------- /scripts/LOG_CPU/etc_systemd_system/log_cpu.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Log the CPU load 3 | 4 | [Service] 5 | Type=oneshot 6 | ExecStart=/bin/bash /home/pi/printer_data/config/scripts/LOG_CPU.sh 7 | -------------------------------------------------------------------------------- /scripts/LOG_CPU/etc_systemd_system/log_cpu.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=reload log_cpu service 3 | 4 | [Timer] 5 | OnUnitActiveSec=10s 6 | OnBootSec=10s 7 | 8 | [Install] 9 | WantedBy=timers.target 10 | -------------------------------------------------------------------------------- /scripts/USB_COPY.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | destination_folder="/home/pi/printer_data/gcodes" 3 | for gcodes_folder in /media/pi/*/gcodes; do 4 | if [[ "$gcodes_folder" =~ ^/media/pi/[^/]+/gcodes$ ]]; then 5 | cp -r "$gcodes_folder"/* "$destination_folder" 6 | fi 7 | done 8 | -------------------------------------------------------------------------------- /webcam.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro WEBCAM_OFF] 2 | gcode: 3 | RUN_SHELL_COMMAND CMD=webcam_stop 4 | 5 | [gcode_shell_command webcam_stop] 6 | command: sh /home/pi/printer_data/config/scripts/webcam_stop.sh 7 | timeout: 5. 8 | verbose: True 9 | 10 | [gcode_macro WEBCAM_ON] 11 | gcode: 12 | RUN_SHELL_COMMAND CMD=webcam_start 13 | 14 | [gcode_shell_command webcam_start] 15 | command: sh /home/pi/printer_data/config/scripts/webcam_start.sh 16 | timeout: 5. 17 | verbose: True 18 | -------------------------------------------------------------------------------- /RP2040_Firmware/README.MD: -------------------------------------------------------------------------------- 1 | # Firmware for RP2040 with Klipper 2 | Compiled from Klipper v10. 3 | Disconnect the RP2040 from usb, press and hold "Boot" button, connect to usb, stop to press Boot button (it will be mounted as a storage device); 4 | open the folder of RP2040 and copy inside the firmware "klipper.uf2": after the copy, the RP2040 will disconnect automatically and it will be ready. 5 | If you can't find RP2040 after disconnect/reconnect, use klipper_03H.uf2 6 | 7 | # Build firmware 8 | https://travis90x.altervista.org/klipper-adxl345-raspberry-pi-rp2040-zero/ 9 | -------------------------------------------------------------------------------- /scripts/generate-shaper-graph-y.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ## set -x #echo on # don't activate if use script in klipper 3 | # set -u pipefail 4 | # INPUT SHAPING Y 5 | # COPY THIS FILE IN /HOME/PI/KLIPPER/SCRIPT/ 6 | 7 | # Take last files 8 | FILENAME=$(ls -Art /tmp/resonances_y_*.csv | tail -n 1) 9 | 10 | ALLCSV=/tmp/resonances_y_*.csv 11 | 12 | DATE=$(date +'%Y-%m-%d-%H%M%S') 13 | 14 | OUTDIR=~/printer_data/config/input_shaper/ 15 | if [ ! -d "${OUTDIR}" ]; then 16 | mkdir "${OUTDIR}" 17 | chown $USER:$USER "${OUTDIR}" 18 | fi 19 | chown $USER:$USER ~/klipper/scripts/ 20 | 21 | 22 | ## File renamed with date from last two CSV files 23 | ~/klipper/scripts/calibrate_shaper.py $FILENAME -o "${OUTDIR}/shaper_calibrate_y_$DATE.png" 24 | 25 | ## Replace old png 26 | cp "${OUTDIR}/shaper_calibrate_y_$DATE.png" "${OUTDIR}/2_shaper_calibrate_y.png" 27 | 28 | mv /tmp/resonances_y_*.csv "${OUTDIR}" > /dev/null 2>&1 29 | 30 | mv $ALLCSV "$OUTDIR" > /dev/null 2>&1 31 | -------------------------------------------------------------------------------- /scripts/generate-shaper-graph-x.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ## set -x #echo on # don't activate if use script in klipper 3 | # set -u pipefail 4 | # INPUT SHAPING X 5 | # COPY THIS FILE IN /HOME/PI/KLIPPER/SCRIPT/ 6 | 7 | # Take last files 8 | FILENAME=$(ls -Art /tmp/resonances_x_*.csv | tail -n 1) 9 | 10 | ALLCSV=/tmp/resonances_x_*.csv 11 | 12 | DATE=$(date +'%Y-%m-%d-%H%M%S') 13 | 14 | OUTDIR=~/printer_data/config/input_shaper 15 | if [ ! -d "${OUTDIR}" ]; then 16 | mkdir "${OUTDIR}" 17 | chown $USER:$USER "${OUTDIR}" 18 | fi 19 | chown $USER:$USER ~/klipper/scripts/ 20 | 21 | 22 | ## File renamed with date from last two CSV files 23 | ~/klipper/scripts/calibrate_shaper.py $FILENAME -o "${OUTDIR}/shaper_calibrate_x_$DATE.png" 24 | 25 | ## Replace old png 26 | cp "${OUTDIR}/shaper_calibrate_x_$DATE.png" "${OUTDIR}/1_shaper_calibrate_x.png" 27 | 28 | mv /tmp/resonances_x_*.csv "${OUTDIR}/" > /dev/null 2>&1 29 | 30 | mv $ALLCSV "${OUTDIR}/" > /dev/null 2>&1 31 | -------------------------------------------------------------------------------- /scripts/LOG_CPU.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | MaxFileSize=204800 3 | DaysToKeep=3 4 | echo -e "\n Fecha:"`date` >> /home/pi/printer_data/config/scripts/logs/CPU/CPU.txt 5 | echo -e "\n Uptime: "`uptime` >> /home/pi/printer_data/config/scripts/logs/CPU/CPU.txt 6 | ps -e -o pcpu,pmem,args --sort=pcpu | tail >> /home/pi/printer_data/config/scripts/logs/CPU/CPU.txt 7 | #Get size in bytes** 8 | file_size=`du -b /home/pi/printer_data/config/scripts/CPU.txt | tr -s '\t' ' ' | cut -d' ' -f1` 9 | if [ $file_size -gt $MaxFileSize ];then 10 | timestamp=`date +%s` 11 | mv /home/pi/printer_data/config/scripts/logs/CPU/CPU.txt /home/pi/printer_data/config/scripts/logs/CPU/CPU.txt.$timestamp 12 | gzip /home/pi/printer_data/config/scripts/logs/CPU/CPU.txt.$timestamp 13 | touch /home/pi/printer_data/config/scripts/logs/CPU/CPU.txt 14 | # remove old files 15 | find /home/pi/printer_data/config/scripts/logs/CPU -name "CPU.txt.*" -type f -mtime +$DaysToKeep -delete 16 | fi 17 | -------------------------------------------------------------------------------- /scripts/Cura_Start_End.txt: -------------------------------------------------------------------------------- 1 | ################### 2 | START 3 | ################### 4 | 5 | ; G28 ;Home 6 | ; M420 S1 ;Enable ABL using saved Mesh and Fade Height 7 | G92 E0 ;Reset Extruder 8 | G1 Z2.0 F3000 ;Move bed down 9 | G1 X4.5 Y20 Z0.2 F5000.0 ;Move to start position 10 | G1 X4.5 Y100.0 Z0.2 F1500.0 E15 ;Draw the first line 11 | G1 X5 Y100.0 Z0.2 F5000.0 ;Move to side a little 12 | G1 X5 Y20 Z0.2 F1500.0 E30 ;Draw the second line 13 | G92 E0 ;Reset Extruder 14 | G1 Z2.0 F3000 ;Move Bed up 15 | 16 | 17 | ################### 18 | END 19 | ################### 20 | 21 | G91 ; Relative positioning 22 | G1 E-2 F2700 ;Retract a bit 23 | G1 E-2 Z3 F2400 ;Retract and raise Z 24 | G1 Z10 ;Raise Z more 25 | G90 ;Absolute positioning 26 | G1 X150 Y150 F3000 ; go to center and cool 27 | ; G1 X0 Y{machine_depth} ;Present print 28 | M104 S0 ;Turn-off hotend 29 | M140 S0 ;Turn-off bed 30 | M18 X Y E ;Disable all steppers but Z 31 | M109 R50 ; wait temp extruder low 32 | M106 S0 ;Turn-off fan 33 | -------------------------------------------------------------------------------- /autotune_tmc.cfg: -------------------------------------------------------------------------------- 1 | # https://github.com/andrewmcgr/klipper_tmc_autotune?fbclid=IwAR3lTsB4jyymoDnmPpJLwLTREaX_fCvank6BcYvzFCfTrxdk_WSXFr65Y2s 2 | 3 | # # # # Parameters 4 | 5 | # tuning_goal: auto # auto, silent, performance, autoswitch 6 | # extra_hysteresis: 0 # 0 to 8 7 | # tbl: 2 # 0 to 3 8 | # toff: 0 # 0 to 15 9 | # sgt: 1 # -64 to 63 10 | # sg4_thrs: 10 # 0 to 255 11 | # voltage: 24 # 0.0 to 60.0 12 | # overvoltage_vth: # 0.0 to 60.0 13 | 14 | 15 | # MACRO example 16 | # AUTOTUNE_TMC STEPPER=stepper_x PARAMETER=tbl 1 17 | 18 | [autotune_tmc stepper_x] 19 | motor: monoprice-17hs4401s 20 | tuning_goal: performance 21 | voltage: 24 22 | 23 | [autotune_tmc stepper_y] 24 | motor: monoprice-17hs4401s 25 | tuning_goal: performance 26 | voltage: 24 27 | 28 | [autotune_tmc stepper_z] 29 | motor: monoprice-17hs4401s 30 | tuning_goal: silent 31 | voltage: 24 32 | 33 | [autotune_tmc extruder] 34 | motor: monoprice-17hs4401s 35 | tuning_goal: performance 36 | voltage: 24 37 | -------------------------------------------------------------------------------- /scripts/generate-belt-tension-graph.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ## set -x #echo on # don't activate if use script in klipper 3 | # set -e -u -o pipefail 4 | # RESONANCE SINGLE BELTS 5 | # COPY THIS FILE IN /HOME/PI/KLIPPER/SCRIPT/ 6 | 7 | # sleep 3 8 | ## Time to write the files of the tests 9 | 10 | # Take last files 11 | BELTX=$(ls -Art /tmp/raw_data_axis=1.000,1*.csv | tail -n 1) 12 | BELTY=$(ls -Art /tmp/raw_data_axis=1.000,-1*.csv | tail -n 1) 13 | 14 | rm /tmp/File_raw_data*.csv > /dev/null 2>&1 15 | cp "$BELTX" /tmp/Belt_Up.csv 16 | cp "$BELTY" /tmp/Belt_Down.csv 17 | 18 | ALLCSV=/tmp/raw_data_axis*.csv 19 | 20 | DATE=$(date +'%Y-%m-%d-%H%M%S') 21 | 22 | OUTDIR=~/printer_data/config/input_shaper 23 | if [ ! -d "${OUTDIR}" ]; then 24 | mkdir "${OUTDIR}" 25 | chown $USER:$USER "${OUTDIR}" 26 | fi 27 | chown $USER:$USER ~/klipper/scripts/ 28 | 29 | 30 | ## File renamed with date from last two CSV files 31 | ~/klipper/scripts/graph_accelerometer.py -c /tmp/Belt_*.csv -o "${OUTDIR}/belts_$DATE.png" 32 | 33 | ## Replace old png 34 | cp "${OUTDIR}/belts_$DATE.png" "${OUTDIR}/0_belts.png" 35 | 36 | ## Clean TMP folder and let you see all files from klipper 37 | rm /tmp/Belt_*.csv > /dev/null 2>&1 38 | mv $ALLCSV "${OUTDIR}/" > /dev/null 2>&1 39 | -------------------------------------------------------------------------------- /Orca_Start_End.gcode: -------------------------------------------------------------------------------- 1 | ; ORCA SLICER START G-CODE 2 | CLEAR_PAUSE 3 | START_PRINT EXTRUDER_TEMP=[nozzle_temperature_initial_layer] BED_TEMP=[bed_temperature_initial_layer_single] 4 | 5 | ; Absolute positioning 6 | G90 7 | ; Reset Extruder and load 8 | G92 E0 9 | G1 X150 Y-12 Z10 10 | G1 E50 F1000 11 | G1 E49 F1000 12 | 13 | ; Reset Extruder and purge line 14 | G92 E0 15 | G1 Z0.3 F3000 ; Move bed down 16 | G1 X10 Y13 Z0.2 F15000.0 ; Move to start position 17 | G1 X200 Y13 Z0.2 F1500.0 E10 ; Draw the first line 18 | G1 Z0.5 F3000 E-2 ; Move Bed up and retract 19 | 20 | ; Reset Extruder and print 21 | G92 E0 22 | LAST_START_PRINT ; Enable PLR, Encoder etc. 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | ; ORCA SLICER END G-CODE 31 | ; Cooldown 32 | TURN_OFF_HEATERS 33 | M106 S26 ; Fan 10% 34 | G91 ; Relative positioning 35 | G1 Z1 ; Raise Z more 36 | G10 ; Firmware Retraction 37 | ; Retract a bit slowly 38 | G1 E-2 F2700 39 | ; Retract 3cm and raise 40 | G1 E-30 Z3 F2400 41 | DISABLE_EXTRUDER 42 | M106 S51 ; Fan 20% 43 | 44 | ; Go to center and cooldown 20 45 | G90 ; Absolute positioning 46 | G1 X150 Y150 F3000 47 | M18 ; Klipper disables All Motors 48 | M84 ; Klipper disables All Motors 49 | clear_last_file ; PLR 50 | TIMELAPSE_RENDER ; Cura 51 | 52 | ; Coldown 30 and turn off Fans 53 | M106 S77 ; Fan 30% 54 | G4 P10000 ; pause cooldown 55 | M107 ; Turn-off fan 56 | end_tune ; Beeper 57 | 58 | END_PRINT 59 | 60 | ; total layers count = {total_layer_count} 61 | -------------------------------------------------------------------------------- /Cura_Start_End.txt: -------------------------------------------------------------------------------- 1 | ; CURA START GCODE 2 | 3 | START_PRINT ; Cura 4 | ; G28 ; Cura Home 5 | ; M420 S1 ; Cura Enable ABL using saved Mesh and Fade Height 6 | CLEAR_PAUSE ; Cura 7 | G90 ; Cura 8 | G92 E0 ; Cura Reset Extruder 9 | M190 S{material_bed_temperature} ; Cura wait bed temperature and continue on 10 | M109 S{material_print_temperature}; Cura wait extruder temperature and continue on 11 | G1 Z0.3 F3000 ; Cura Move bed down 12 | G1 X10 Y13 Z0.2 F15000.0 ; Cura Move to start position 13 | G1 X150 Y13 Z0.2 F1500.0 E10 ;Draw the first line 14 | ;G1 X10 Y150 Z0.2 F5000.0 ;Move to side a little 15 | ; G1 X7 Y155 Z0.025 F2000.0 ;Draw the second line 16 | G92 E0 ;Reset Extruder 17 | G1 Z0.3 F3000 E-2 ;Move Bed up 18 | G92 E0 ;Reset Extruder 19 | LAST_START_PRINT ; macro purge 20 | 21 | 22 | ; CURA END GCODE 23 | 24 | ; M83 ; Cura 25 | G90 X150 Y-10 26 | G91 ; Relative positioning ; Cura 27 | G10 ; Cura Retract - Firmware Retraction 28 | G1 E-2 F2700 ;Retract a bit ; Cura 29 | G1 E-30 Z3 F2400 ;Retract 3cm and raise Z ; Cura 30 | DISABLE_EXTRUDER ; Cura 31 | G1 Z10 ;Raise Z more ; Cura 32 | G90 ;Absolute positioning ; Cura 33 | ; G1 X150 Y150 F3000 ; Cura go to center and cool 34 | ; end_tune ; Cura Beeper 35 | clear_last_file ;Cura macro 36 | M106 S100 ; Cura fan 37 | TURN_OFF_HEATERS ; Cura 38 | TIMELAPSE_RENDER ; Cura 39 | M18 ;Klipper disables ALL Motors ; Cura 40 | M84 ;Klipper disables ALL Motors ; Cura 41 | G4 P10000 ; Cura 42 | M107 ;Turn-off fan ; Cura 43 | ;G1 X0 Y{machine_depth} ;Cura Present print 44 | G90 ; Cura 45 | END_PRINT ; Cura 46 | -------------------------------------------------------------------------------- /DYZE_500.cfg: -------------------------------------------------------------------------------- 1 | [thermistor DYZE] 2 | # https://www.aliexpress.com/item/4000591370691.html 3 | # https://docs.dyzedesign.com/hotends.html#klipper-firmware 4 | # R(200C) = 8K +- 5% 5 | # B(150/250) = 5300k +- 3% 6 | 7 | # dyze300 8 | # temperature1: 20 9 | # resistance1: 123800 10 | # temperature2: 200 11 | # resistance2: 550 12 | # temperature3: 300 13 | # resistance3: 106 14 | 15 | # dyze500 clone 16 | temperature1: 60 17 | resistance1: 666000 #450000 18 | temperature2: 162 19 | resistance2: 22200 20 | temperature3: 280 21 | resistance3: 1555 22 | 23 | 24 | # dyze500 25 | # temperature1: 10 26 | # resistance1: 8100000 27 | # temperature2: 20 28 | # resistance2: 5200000 29 | # temperature1: 25 30 | # resistance1: 4500000 31 | # temperature4: 30 32 | # resistance4: 2830000 33 | # temperature5: 60 34 | # resistance5: 666000 35 | # temperature6: 80 36 | # resistance6: 288000 37 | # temperature7: 100 38 | # resistance7: 136000 39 | # temperature8: 120 40 | # resistance8: 70000 41 | # temperature9: 140 42 | # resistance9: 38500 43 | # temperature10: 162 44 | # resistance10: 22200 45 | # temperature11: 180 46 | # resistance11: 13200 47 | # temperature12: 200 48 | # resistance12: 8070 49 | # temperature13: 220 50 | # resistance13: 5120 51 | # temperature14: 240 52 | # resistance14: 3380 53 | # temperature2: 260 54 | # resistance2: 2240 55 | # temperature16: 280 56 | # resistance16: 1555 57 | # temperature17: 300 58 | # resistance17: 1100 59 | # temperature18: 320 60 | # resistance18: 790 61 | # temperature19: 340 62 | # resistance19: 578 63 | # temperature20: 360 64 | # resistance20: 434 65 | # temperature21: 380 66 | # resistance21: 333 67 | # temperature22: 400 68 | # resistance22: 253 69 | # temperature23: 420 70 | # resistance23: 196 71 | # temperature24: 440 72 | # resistance24: 157 73 | # temperature3: 460 74 | # resistance3: 125.4 75 | # temperature26: 480 76 | # resistance26: 102 77 | # temperature27: 500 78 | # resistance27: 83.7 79 | 80 | -------------------------------------------------------------------------------- /°TMC_Spread.cfg: -------------------------------------------------------------------------------- 1 | [tmc2240 stepper_x] 2 | cs_pin: PF10 3 | diag1_pin: PB5 4 | spi_software_mosi_pin: PC12 5 | spi_software_miso_pin: PC11 6 | spi_software_sclk_pin: PC10 7 | 8 | # uart_pin: PA10 9 | # uart_address: 3 10 | # tx_pin: 11 | # sense_resistor: 0.110 12 | 13 | interpolate: True # Reduce Noise. For best positional accuracy consider using spreadCycle mode and disable interpolation 14 | run_current: 1 15 | 16 | stealthchop_threshold: 0 17 | # The velocity (in mm/s) to set the "stealthChop" threshold to. 18 | # When set, "stealthChop" mode will be enabled if the stepper motor 19 | # velocity is below this value. The default is 0, which disables "stealthChop" mode. 20 | 21 | # diag_pin: ^PA15 # sensorless homing 22 | # hold_current: 0.80 # Disable for sensorless Homing - The current for motor in idle: it's not recommended use it. 23 | # If defined, TMC driver can reduce current to the stepper motor when it detects that the stepper is not moving. 24 | # The switch from run_current to hold_current has a negative impact on precision. 25 | 26 | # driver_SGTHRS: 100 # Sensorless homing, 0-255, high has more sensibility 27 | # endstop_pin: tmc2209_stepper_x:virtual_endstop 28 | 29 | #[temperature_sensor stepper_x] 30 | #sensor_type: temperature_driver 31 | #sensor_driver: tmc2240 stepper_x 32 | 33 | 34 | [tmc2240 stepper_y] 35 | cs_pin: PD4 36 | spi_software_mosi_pin: PC12 37 | spi_software_miso_pin: PC11 38 | spi_software_sclk_pin: PC10 39 | diag1_pin: PC1 40 | 41 | # uart_pin: PA10 42 | # uart_address: 2 43 | # sense_resistor: 0.110 44 | 45 | interpolate: True 46 | run_current: 1 47 | 48 | stealthchop_threshold: 0 # Max 999999 49 | # diag_pin: ^PA12 # sensorless homing 50 | # driver_SGTHRS: 100 # Sensorless homing, 0-255, high has more sensibility 51 | 52 | 53 | [tmc2209 stepper_z] 54 | uart_pin: PC8 55 | # uart_address: 1 56 | diag_pin: PC0 57 | interpolate: True 58 | run_current: 0.9 59 | sense_resistor: 0.110 60 | stealthchop_threshold: 0 61 | # don't use 0.1 = stealthchop enabled only when the bed is static 62 | # avoid to switch spreadcycle to stealthchop and viceversa during printing 63 | 64 | 65 | 66 | [tmc2209 stepper_z1] 67 | uart_pin: PD8 68 | # uart_address: 0 69 | diag_pin: PF4 70 | interpolate: True 71 | run_current: 0.9 72 | sense_resistor: 0.110 73 | stealthchop_threshold: 0 74 | 75 | -------------------------------------------------------------------------------- /°TMC_Stealth.cfg: -------------------------------------------------------------------------------- 1 | [tmc2240 stepper_x] 2 | cs_pin: PF10 3 | diag1_pin: PB5 4 | spi_software_mosi_pin: PC12 5 | spi_software_miso_pin: PC11 6 | spi_software_sclk_pin: PC10 7 | 8 | # uart_pin: PA10 9 | # uart_address: 3 10 | # tx_pin: 11 | # sense_resistor: 0.110 12 | 13 | interpolate: True # Reduce Noise. For best positional accuracy consider using spreadCycle mode and disable interpolation 14 | run_current: 1 15 | 16 | stealthchop_threshold: 99999 17 | # The velocity (in mm/s) to set the "stealthChop" threshold to. 18 | # When set, "stealthChop" mode will be enabled if the stepper motor 19 | # velocity is below this value. The default is 0, which disables "stealthChop" mode. 20 | 21 | # diag_pin: ^PA15 # sensorless homing 22 | # hold_current: 0.80 # Disable for sensorless Homing - The current for motor in idle: it's not recommended use it. 23 | # If defined, TMC driver can reduce current to the stepper motor when it detects that the stepper is not moving. 24 | # The switch from run_current to hold_current has a negative impact on precision. 25 | 26 | # driver_SGTHRS: 100 # Sensorless homing, 0-255, high has more sensibility 27 | # endstop_pin: tmc2209_stepper_x:virtual_endstop 28 | 29 | #[temperature_sensor stepper_x] 30 | #sensor_type: temperature_driver 31 | #sensor_driver: tmc2240 stepper_x 32 | 33 | 34 | [tmc2240 stepper_y] 35 | cs_pin: PD4 36 | spi_software_mosi_pin: PC12 37 | spi_software_miso_pin: PC11 38 | spi_software_sclk_pin: PC10 39 | diag1_pin: PC1 40 | 41 | # uart_pin: PA10 42 | # uart_address: 2 43 | # sense_resistor: 0.110 44 | 45 | interpolate: True 46 | run_current: 1 47 | 48 | stealthchop_threshold: 99999 # Max 999999 49 | # diag_pin: ^PA12 # sensorless homing 50 | # driver_SGTHRS: 100 # Sensorless homing, 0-255, high has more sensibility 51 | 52 | 53 | [tmc2209 stepper_z] 54 | uart_pin: PC8 55 | # uart_address: 1 56 | diag_pin: PC0 57 | interpolate: True 58 | run_current: 0.9 59 | sense_resistor: 0.110 60 | stealthchop_threshold: 99999 61 | # don't use 0.1 = stealthchop enabled only when the bed is static 62 | # avoid to switch spreadcycle to stealthchop and viceversa during printing 63 | 64 | 65 | 66 | [tmc2209 stepper_z1] 67 | uart_pin: PD8 68 | # uart_address: 0 69 | diag_pin: PF4 70 | interpolate: True 71 | run_current: 0.9 72 | sense_resistor: 0.110 73 | stealthchop_threshold: 99999 74 | 75 | -------------------------------------------------------------------------------- /fuidd.cfg: -------------------------------------------------------------------------------- 1 | [virtual_sdcard] 2 | path: /home/pi/gcode_files 3 | 4 | [pause_resume] 5 | 6 | [display_status] 7 | 8 | [gcode_macro CANCEL_PRINT] 9 | description: Cancel the actual running print 10 | rename_existing: CANCEL_PRINT_BASE 11 | gcode: 12 | TURN_OFF_HEATERS 13 | CANCEL_PRINT_BASE 14 | 15 | [gcode_macro PAUSE] 16 | description: Pause the actual running print 17 | rename_existing: PAUSE_BASE 18 | # change this if you need more or less extrusion 19 | variable_extrude: 1.0 20 | gcode: 21 | ##### read E from pause macro ##### 22 | {% set E = printer["gcode_macro PAUSE"].extrude|float %} 23 | ##### set park positon for x and y ##### 24 | # default is your max posion from your printer.cfg 25 | {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %} 26 | {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %} 27 | ##### calculate save lift position ##### 28 | {% set max_z = printer.toolhead.axis_maximum.z|float %} 29 | {% set act_z = printer.toolhead.position.z|float %} 30 | {% if act_z < (max_z - 2.0) %} 31 | {% set z_safe = 2.0 %} 32 | {% else %} 33 | {% set z_safe = max_z - act_z %} 34 | {% endif %} 35 | ##### end of definitions ##### 36 | PAUSE_BASE 37 | G91 38 | {% if printer.extruder.can_extrude|lower == 'true' %} 39 | G1 E-{E} F2100 40 | {% else %} 41 | {action_respond_info("Extruder not hot enough")} 42 | {% endif %} 43 | {% if "xyz" in printer.toolhead.homed_axes %} 44 | G1 Z{z_safe} F900 45 | G90 46 | G1 X{x_park} Y{y_park} F6000 47 | {% else %} 48 | {action_respond_info("Printer not homed")} 49 | {% endif %} 50 | 51 | [gcode_macro RESUME] 52 | description: Resume the actual running print 53 | rename_existing: RESUME_BASE 54 | gcode: 55 | ##### read E from pause macro ##### 56 | {% set E = printer["gcode_macro PAUSE"].extrude|float %} 57 | #### get VELOCITY parameter if specified #### 58 | {% if 'VELOCITY' in params|upper %} 59 | {% set get_params = ('VELOCITY=' + params.VELOCITY) %} 60 | {%else %} 61 | {% set get_params = "" %} 62 | {% endif %} 63 | ##### end of definitions ##### 64 | {% if printer.extruder.can_extrude|lower == 'true' %} 65 | G91 66 | G1 E{E} F2100 67 | {% else %} 68 | {action_respond_info("Extruder not hot enough")} 69 | {% endif %} 70 | RESUME_BASE {get_params} 71 | -------------------------------------------------------------------------------- /scripts/plr.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ############################################ 3 | SD_PATH=~/printer_data/gcodes 4 | ############################################ 5 | 6 | cat ${SD_PATH}/${2} > /tmp/plrtmpA.$$ 7 | 8 | isInFile=$(cat /tmp/plrtmpA.$$ | grep -c "thumbnail") 9 | if [ $isInFile -eq 0 ]; then 10 | echo 'M109 S200.0' > ${SD_PATH}/plr.gcode 11 | cat /tmp/plrtmpA.$$ | sed -e '1,/Z'${1}'/ d' | sed -ne '/ Z/,$ p' | grep -m 1 ' Z' | sed -ne 's/.* Z\([^ ]*\)/SET_KINEMATIC_POSITION Z=\1/p' >> ${SD_PATH}/plr.gcode 12 | else 13 | sed -i '1s/^/;start copy\n/' /tmp/plrtmpA.$$ 14 | sed -n '/;start copy/, /thumbnail end/ p' < /tmp/plrtmpA.$$ > ${SD_PATH}/plr.gcode 15 | echo ';' >> ${SD_PATH}/plr.gcode 16 | echo '' >> ${SD_PATH}/plr.gcode 17 | echo 'M109 S199.0' >> ${SD_PATH}/plr.gcode 18 | cat /tmp/plrtmpA.$$ | sed -e '1,/Z'${1}'/ d' | sed -ne '/ Z/,$ p' | grep -m 1 ' Z' | sed -ne 's/.* Z\([^ ]*\)/SET_KINEMATIC_POSITION Z=\1/p' >> ${SD_PATH}/plr.gcode 19 | fi 20 | 21 | echo 'G91' >> ${SD_PATH}/plr.gcode 22 | echo 'G1 Z5' >> ${SD_PATH}/plr.gcode 23 | echo 'G90' >> ${SD_PATH}/plr.gcode 24 | echo 'G28 X Y' >> ${SD_PATH}/plr.gcode 25 | echo 'M118 START_TEMPS...' >> ${SD_PATH}/plr.gcode 26 | cat /tmp/plrtmpA.$$ | sed '/ Z'${1}'/q' | sed -ne '/\(M104\|M140\|M109\|M190\|M106\)/p' >> ${SD_PATH}/plr.gcode 27 | cat /tmp/plrtmpA.$$ | sed -ne '/;End of Gcode/,$ p' | tr '\n' ' ' | sed -ne 's/ ;[^ ]* //gp' | sed -ne 's/\\\\n/;/gp' | tr ';' '\n' | grep material_bed_temperature | sed -ne 's/.* = /M140 S/p' | head -1 >> ${SD_PATH}/plr.gcode 28 | cat /tmp/plrtmpA.$$ | sed -ne '/;End of Gcode/,$ p' | tr '\n' ' ' | sed -ne 's/ ;[^ ]* //gp' | sed -ne 's/\\\\n/;/gp' | tr ';' '\n' | grep material_print_temperature | sed -ne 's/.* = /M104 S/p' | head -1 >> ${SD_PATH}/plr.gcode 29 | cat /tmp/plrtmpA.$$ | sed -ne '/;End of Gcode/,$ p' | tr '\n' ' ' | sed -ne 's/ ;[^ ]* //gp' | sed -ne 's/\\\\n/;/gp' | tr ';' '\n' | grep material_bed_temperature | sed -ne 's/.* = /M190 S/p' | head -1 >> ${SD_PATH}/plr.gcode 30 | cat /tmp/plrtmpA.$$ | sed -ne '/;End of Gcode/,$ p' | tr '\n' ' ' | sed -ne 's/ ;[^ ]* //gp' | sed -ne 's/\\\\n/;/gp' | tr ';' '\n' | grep material_print_temperature | sed -ne 's/.* = /M109 S/p' | head -1 >> ${SD_PATH}/plr.gcode 31 | # cat /tmp/plrtmpA.$$ | sed -e '1,/Z'${1}'/ d' | sed -e '/ Z/q' | tac | grep -m 1 ' E' | sed -ne 's/.* E\([^ ]*\)/G92 E\1/p' >> ${SD_PATH}/plr.gcode 32 | tac /tmp/plrtmpA.$$ | sed -e '/ Z'${1}'[^0-9]*$/q' | tac | tail -n+2 | sed -e '/ Z[0-9]/ q' | tac | sed -e '/ E[0-9]/ q' | sed -ne 's/.* E\([^ ]*\)/G92 E\1/p' >> ${SD_PATH}/plr.gcode 33 | echo 'G91' >> ${SD_PATH}/plr.gcode 34 | echo 'G1 Z-5' >> ${SD_PATH}/plr.gcode 35 | echo 'G90' >> ${SD_PATH}/plr.gcode 36 | # cat /tmp/plrtmpA.$$ | sed -e '1,/Z'${1}'/ d' | sed -ne '/ Z/,$ p' >> ${SD_PATH}/plr.gcode 37 | tac /tmp/plrtmpA.$$ | sed -e '/ Z'${1}'[^0-9]*$/q' | tac | tail -n+2 | sed -ne '/ Z/,$ p' >> ${SD_PATH}/plr.gcode 38 | /bin/sleep 5 39 | -------------------------------------------------------------------------------- /KAMP_Settings.cfg: -------------------------------------------------------------------------------- 1 | # Below you can include specific configuration files depending on what you want KAMP to do: 2 | 3 | [include ./KAMP/Adaptive_Meshing.cfg] # Include to enable adaptive meshing configuration. 4 | [include ./KAMP/Line_Purge.cfg] # Include to enable adaptive line purging configuration. 5 | # [include ./KAMP/Voron_Purge.cfg] # Include to enable adaptive Voron logo purging configuration. 6 | # [include ./KAMP/Smart_Park.cfg] # Include to enable the Smart Park function, which parks the printhead near the print area for final heating. 7 | 8 | [gcode_macro _KAMP_Settings] 9 | description: This macro contains all adjustable settings for KAMP 10 | 11 | # The following variables are settings for KAMP as a whole. 12 | variable_verbose_enable: True # Set to True to enable KAMP information output when running. This is useful for debugging. 13 | 14 | # The following variables are for adjusting adaptive mesh settings for KAMP. 15 | variable_mesh_margin: 100 # Expands the mesh size in millimeters if desired. Leave at 0 to disable. 16 | variable_fuzz_amount: 0 # Slightly randomizes mesh points to spread out wear from nozzle-based probes. Leave at 0 to disable. 17 | 18 | # The following variables are for those with a dockable probe like Klicky, Euclid, etc. # ---------------- Attach Macro | Detach Macro 19 | variable_probe_dock_enable: False # Set to True to enable the usage of a dockable probe. # --------------------------------------------- 20 | variable_attach_macro: 'Attach_Probe' # The macro that is used to attach the probe. # Klicky Probe: 'Attach_Probe' | 'Dock_Probe' 21 | variable_detach_macro: 'Dock_Probe' # The macro that is used to store the probe. # Euclid Probe: 'Deploy_Probe' | 'Stow_Probe' 22 | # Legacy Gcode: 'M401' | 'M402' 23 | 24 | # The following variables are for adjusting adaptive purge settings for KAMP. 25 | variable_purge_height: 0.8 # Z position of nozzle during purge, default is 0.8. 26 | variable_tip_distance: 10 # Distance between tip of filament and nozzle before purge. Should be similar to PRINT_END final retract amount. 27 | variable_purge_margin: 10 # Distance the purge will be in front of the print area, default is 10. 28 | variable_purge_amount: 80 # Amount of filament to be purged prior to printing. 29 | variable_flow_rate: 12 # Flow rate of purge in mm3/s. Default is 12. 30 | 31 | # The following variables are for adjusting the Smart Park feature for KAMP, which will park the printhead near the print area at a specified height. 32 | variable_smart_park_height: 1 # Z position for Smart Park, default is 10. 33 | 34 | gcode: # Gcode section left intentionally blank. Do not disturb. 35 | 36 | {action_respond_info(" Running the KAMP_Settings macro does nothing, it is only used for storing KAMP settings. ")} 37 | -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | ## ALERT! Read carefully the commented code 2 | 3 | ### The Main brach 4 | is the backup of my modded Sapphire Plus V1 (SP5) 5 | modded Top Frame with 4x 2020, Mellow CNC Gantry X and Sfanella' MGN adapters and support idlers in CNC Aluminum 6 | with modded VzPrinthead CNC Aluminum (Sfanella version: with Belts tensioner) 7 | Pheatus Dragon UHF + VZ-Hextrudort-low Liquid + LDO STH20 Motor 8 | Optical Endstops on X Y 2x Z not synced, Bed AC 1000W 9 | BTT SKRat with 2x TMC2240 in SPI and 3x TMC2209 in UART in this order: X Y Z1 Z2 E 10 | BTT Smart Filament Sensor (Encoder) 11 | and other mods are written in the code, like RP2040 for input shaping, webcam etc etc... 12 | 13 | ### The VzBot brach 14 | is the backup of VzBot 330 AWD Mellow Kit Full Alu (Goliat + VZ-Hextrudort-Low 15 | With RSCS (M106 P2) Exhaust Fan (Hepa Filter with timeout). 16 | 17 | ### The SP5 Branch 18 | is from my old Sapphire Plus V1 (SP5) 19 | with Diamond Mount Modded for NF Crazy Copper Volcano High Flow + VZ-Hextrudort-Low + Moon's Motor, Optical Endstops on X Y 2xZ, Bed AC 1000W 20 | on Robin Nano v1.2 the TMC2209x5 in UART are in this order: X Y Z1 Z2 E; 21 | the endstops pins on the board are for 2x Z Endstops and BLTouch, 22 | and other mods are written in the code, like RP2040 for input shaping, webcam etc etc... 23 | 24 | # WIKI - Klipper for TwoTrees Sapphire Plus SP5 25 | 26 | https://github.com/Travis90x/TwoTrees-Sapphire-Plus-SP5-Marlin/wiki 27 | 28 | 29 | ### ADXL345.cfg 30 | is needed for ADXL345 with RP4020 (a clone of Raspberry Pi Pico) 31 | as a secondary MCU (usb connected, ex. to Android TV Box with Armbian) 32 | or for ADXL345 connected to Robin Nano SDcard pins 33 | is needed for TEST_RESONANCES AXIS and calibrate input_shaper 34 | 35 | Important: with ACCELEROMETER_QUERY and similar, only on the first time you will got an error, so retry the test. 36 | 37 | ### Shell_command.cfg 38 | It is needed for consulting png result resonance. 39 | In one click, it generates resutls of the last tests with ADXL345, ignoring old tests, but move all the files in a folder that you can see directly in Klipper (Mainsail). 40 | 41 | ![Macro](https://dub01pap001files.storage.live.com/y4me3X9sHo0mlxEPl14J44P0kUcC9DutL3y4LBRyJYCaCwRD00IB1aLeXp1I73yg-vymvh9_WSyMV2jhT8UUz2gXLod1gejmHUPvg4TBsDVluEyL-Os4_4RZgJLtRIl8uwEnCDGO5upZpTI9LIc72pZx468lNts_QtMfPML8cIZgTz8rHgyRXyxV-svl3gNb4HG?width=1642&height=955&cropmode=none) 42 | 43 | 44 | ## ADXL345 with Robin Nano 45 | ![ADXL345_Robin_Nano](https://dub01pap001files.storage.live.com/y4me5RW18GIwK_fcUlf7w3nj4w6YMyhTDQUd6DP1olaTgDhr4POYXx636IYYhGHbak8CHpBY5_Dn_FWNWXboiyP17WVmhjfsN_AX_O1amrQrQMvW7O_NV1VgcRobJkIY-zDPruqq5zr07cvk5YB6Xz6V0cT93ciUPWYEXY3Ms8zbQKO7gTfXNDRqOA_E7hh5vAE?width=1031&height=708&cropmode=none) 46 | 47 | 48 | ### Scheme by Giuseppe di Resta - klippertv.altervista.org 49 | ![ADXL345_Robin_Nano](https://dub01pap001files.storage.live.com/y4m7IK1BJNt1vKKy8NUyUgY2JDpA7482tIFzu7aFM2l6qReDuUjdhjDP-nApw9XFoc9ub_OlT-Epp4Sf9oqNyEabtPqdv2lteD3IFX947QojT8bwA-xvfb2iBzdVtwOfSdwvqWQZjpb6Ur5XaDAjLe93wcdcejz8Mz-PI_eILencPtmI5IO7DWBWK59edyt5C5Q?width=1280&height=895&cropmode=none) 50 | 51 | ### ADXL345 pinout 52 | ![ADXL345_pinout](https://dub01pap001files.storage.live.com/y4mKxhwHVDSZLjzOQcg5WlnUhuhdurpEAQ6HTXmlfnY9xxaveY89mcY_HXsd2Bqhqn3jMvKN4GiZ0mJW8cHS5uFaO0H3vk9vf4c9uaF_c7d-NQMQF5Qy3ZCw_0cMAI8Kscw01p4HFWRZJnKZ0gYU2VPkLoKZ2yTHXEZfI8lfd5Yzn0GwikAys0azAwTvgvKQgVk?width=1280&height=687&cropmode=none) 53 | 54 | ### ADXL345 RP4020 55 | ![ADXL345_RP4020](https://dub01pap001files.storage.live.com/y4mbyKgSxpsTJOKh0bNi1_yDFcTyLpyhM2GWWuWQriXEeu4FaKGBUOKrUtDFcNDLtxx3LlkDI2l4MIKxq8miDGla-wMsuOAyZLqq6OLsj2CnK9LhogGMkH0L0SL7lFVwZ2J9I-f4mmpnukfnQUOvUu7P23GJIauCJwKRNR9_lA-kGr8lXM8HSJRnfvdTL-6s1mX?width=599&height=660&cropmode=none) 56 | 57 | -------------------------------------------------------------------------------- /webcam.txt: -------------------------------------------------------------------------------- 1 | ### Windows users: To edit this file use Notepad++, VSCode, Atom or SublimeText. 2 | ### Do not use Notepad or WordPad. 3 | 4 | ### MacOSX users: If you use Textedit to edit this file make sure to use 5 | ### "plain text format" and "disable smart quotes" in "Textedit > Preferences" 6 | 7 | ### Configure which camera to use 8 | # 9 | # Available options are: 10 | # - auto: tries first usb webcam, if that's not available tries raspi cam 11 | # - usb: only tries usb webcam 12 | # - raspi: only tries raspi cam 13 | # 14 | # Defaults to auto 15 | # camera="usb" 16 | 17 | ### Additional options to supply to MJPG Streamer for the USB camera 18 | # 19 | # See https://faq.octoprint.org/mjpg-streamer-config for available options 20 | # 21 | # Defaults to a resolution of 640x480 px and a framerate of 10 fps 22 | # camera_usb_options="-r 640x480 -f 5 -d /dev/video1 -q 10" 23 | # 24 | # don't edit with winscp or ein editor, these are the results of an error input 25 | # 1280 960 1280 720 26 | # 1920x1080 27 | 28 | # camera_usb_options="-r 640x480 -f 5 -d /dev/video1 -q 10" 29 | # 30 | # camera_usb_options="-r 1920x1080 -f 5 -d /dev/video1 -q 100" 31 | camera_usb_options="-r 1920x1080 -f 5 -d /dev/v4l/by-id/usb-Sonix_Technology_Co.__Ltd._USB_2.0_Camera_SN0001-video-index0 -q 100 -ex 50" 32 | 33 | # -ex 10 # manuale eposure 34 | # -br 20 # brightness 35 | # -co 30 # contrast 36 | 37 | # test with 38 | # sudo service webcamd restart 39 | # sudo service webcamd status 40 | 41 | # find device -d 42 | # ls /dev/v4l/by-id/* 43 | # or 44 | # v4l2-ctl --list-devices 45 | 46 | # restore logs 47 | # sudo ln -s /var/log/webcamd.log /home/pi/printer_data/logs/webcamd.log 48 | 49 | ### Additional webcam devices known to cause problems with -f 50 | # 51 | # Apparently there a some devices out there that with the current 52 | # mjpg_streamer release do not support the -f parameter (for specifying 53 | # the capturing framerate) and will just refuse to output an image if it 54 | # is supplied. 55 | # 56 | # The webcam daemon will detect those devices by their USB Vendor and Product 57 | # ID and remove the -f parameter from the options provided to mjpg_streamer. 58 | # 59 | # By default, this is done for the following devices: 60 | # Logitech C170 (046d:082b) 61 | # GEMBIRD (1908:2310) 62 | # Genius F100 (0458:708c) 63 | # Cubeternet GL-UPC822 UVC WebCam (1e4e:0102) 64 | # 65 | # Using the following option it is possible to add additional devices. If 66 | # your webcam happens to show above symptoms, try determining your cam's 67 | # vendor and product id via lsusb, activating the line below by removing # and 68 | # adding it, e.g. for two broken cameras "aabb:ccdd" and "aabb:eeff" 69 | # 70 | # additional_brokenfps_usb_devices=("aabb:ccdd" "aabb:eeff") 71 | # 72 | # additional_brokenfps_usb_devices=("0c45:636b") 73 | 74 | ### Additional options to supply to MJPG Streamer for the RasPi Cam 75 | # 76 | # See https://faq.octoprint.org/mjpg-streamer-config for available options 77 | # 78 | # Defaults to 10fps 79 | # 80 | #camera_raspi_options="-fps 10" 81 | 82 | ### Configuration of camera HTTP output 83 | # 84 | # Usually you should NOT need to change this at all! Only touch if you 85 | # know what you are doing and what the parameters mean. 86 | # 87 | # Below settings are used in the mjpg-streamer call like this: 88 | # 89 | # -o "output_http.so -w $camera_http_webroot $camera_http_options" 90 | # 91 | # Current working directory is the mjpg-streamer base directory. 92 | # 93 | # camera_http_webroot="./www-mainsail" 94 | # camera_http_options="-n" 95 | 96 | ### EXPERIMENTAL 97 | # Support for different streamer types. 98 | # 99 | # Available options: 100 | # mjpeg [default] - stable MJPG-streamer 101 | # camera_streamer=mjpeg 102 | -------------------------------------------------------------------------------- /crowsnest.conf: -------------------------------------------------------------------------------- 1 | #### crowsnest.conf 2 | #### This is a typical default config. 3 | #### Also used as default in mainsail / MainsailOS 4 | #### See: 5 | #### https://github.com/mainsail-crew/crowsnest/blob/master/README.md 6 | #### for details to configure to your needs. 7 | 8 | 9 | ##################################################################### 10 | #### ##### 11 | #### Information about ports and according URL's ##### 12 | #### ##### 13 | ##################################################################### 14 | #### ##### 15 | #### Port 8080 equals /webcam/?action=[stream/snapshot] ##### 16 | #### Port 8081 equals /webcam2/?action=[stream/snapshot] ##### 17 | #### Port 8082 equals /webcam3/?action=[stream/snapshot] ##### 18 | #### Port 8083 equals /webcam4/?action=[stream/snapshot] ##### 19 | #### ##### 20 | ##################################################################### 21 | 22 | # find device -d 23 | # ls /dev/v4l/by-id/* 24 | # or 25 | # v4l2-ctl --list-devices 26 | 27 | # systemctl status crowsnest.service 28 | [crowsnest] 29 | log_path: ~/printer_data/logs/crowsnest.log 30 | log_level: verbose # Valid Options are quiet/verbose/debug 31 | delete_log: false # Deletes log on every restart, if set to true 32 | 33 | 34 | # FLAGS 35 | # https://github.com/mainsail-crew/crowsnest/blob/20ed6a8b585a92e8a0e7d8333e81b6e8ca7044e1/ustreamer_manpage.md 36 | [cam 1] 37 | mode: mjpg # mjpg/rtsp 38 | port: 8080 # Port 39 | device: /dev/v4l/by-id/usb-Sonix_Technology_Co.__Ltd._USB_2.0_Camera_SN0001-video-index0 # /dev/video0 # See Log for available ... 40 | resolution: 1920x1080 # 640x480 # widthxheight format 41 | max_fps: 5 42 | custom_flags: --backlight-compensation 0 --contrast 30 --brightness 32 43 | 44 | # --contrast 0/64 def 32 45 | # --brightness -64/64 def 0 46 | # --backlight-compensation min=0 max=2 47 | 48 | #v4l2ctl: focus_auto=0 49 | 50 | 51 | 52 | 53 | ######## 54 | # webcamd service 55 | # camera_usb_options="-r 1920x1080 -f 5 -d /dev/v4l/by-id/usb-Sonix_Technology_Co.__Ltd._USB_2.0_Camera_SN0001-video-index0 -q 100" 56 | # 57 | # If Hardware Supports this it will be forced, ohterwise ignored/coerced. 58 | # custom_flags: --exposure_auto 0 --exposure_absolute 110 59 | #custom_flags: # You can run the Stream Services with custom flags. 60 | #v4l2ctl: # Add v4l2-ctl parameters to setup your camera, see Log what your cam is capable of. 61 | # brightness: 10 62 | 63 | # exposure_auto: 0 64 | # --gamma 400 65 | 66 | ## Custom flags Supported Controls: --namecontrol X 67 | # brightness 0x00980900 (int) : min=-64 max=64 step=1 default=0 value=-10 68 | # contrast 0x00980901 (int) : min=0 max=64 step=1 default=32 value=32 69 | # saturation 0x00980902 (int) : min=0 max=128 step=1 default=64 value=64 70 | # hue 0x00980903 (int) : min=-40 max=40 step=1 default=0 value=0 71 | # white_balance_temperature_auto 0x0098090c (bool) : default=1 value=1 72 | # gamma 0x00980910 (int) : min=72 max=500 step=1 default=100 value=100 73 | # gain 0x00980913 (int) : min=0 max=100 step=1 default=0 value=0 74 | # power_line_frequency 0x00980918 (menu) : min=0 max=2 default=1 value=1 75 | # 0: Disabled 76 | # 1: 50 Hz 77 | # 2: 60 Hz 78 | # white_balance_temperature 0x0098091a (int) : min=2800 max=6500 step=1 default=4600 value=4600 flags=inactive 79 | # sharpness 0x0098091b (int) : min=0 max=10 step=1 default=9 value=9 80 | # backlight_compensation 0x0098091c (int) : min=0 max=2 step=1 default=1 value=1 81 | # exposure_auto 0x009a0901 (menu) : min=0 max=3 default=3 value=3 82 | # 1: Manual Mode 83 | # 3: Aperture Priority Mode 84 | # exposure_absolute 0x009a0902 (int) : min=1 max=5000 step=1 default=157 value=157 flags=inactive 85 | # exposure_auto_priority 0x009a0903 (bool) : default=0 value=1 86 | 87 | -------------------------------------------------------------------------------- /scripts/plr_z.cfg: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ############################################ 3 | SD_PATH=~/printer_data/gcodes 4 | ############################################ 5 | 6 | cp /home/pi/printer_data/gcodes/.thumbs/${4}.png /home/pi/printer_data/gcodes/.thumbs/plr.png 7 | cp /home/pi/printer_data/gcodes/.thumbs/${4}-32x32.png /home/pi/printer_data/gcodes/.thumbs/plr-32x32.png 8 | cp /home/pi/printer_data/gcodes/.thumbs/${4}-400x400.png /home/pi/printer_data/gcodes/.thumbs/plr-400x400.png 9 | 10 | 11 | 12 | # clean old temp files 13 | rm /tmp/plrtmpA.* > /dev/null 2>&1 14 | 15 | # create new temp files 16 | cat ${SD_PATH}/"${2}" > /tmp/plrtmpA.$$ 17 | 18 | 19 | 20 | isInFile=$(cat /tmp/plrtmpA.$$ | grep -c "thumbnail") 21 | if [ $isInFile -eq 0 ]; then 22 | echo 'M109 S240.0' > ${SD_PATH}/plr.gcode 23 | # cat /tmp/plrtmpA.$$ | sed -e '1,/Z'${1}'/ d' | sed -ne '/ Z/,$ p' | grep -m 1 ' Z' | sed -ne 's/.* Z\([^ ]*\)/SET_KINEMATIC_POSITION Z=\1/p' >> ${SD_PATH}/plr.gcode 24 | else 25 | sed -i '1s/^/;start copy\n/' /tmp/plrtmpA.$$ 26 | sed -n '/;start copy/, /thumbnail end/ p' < /tmp/plrtmpA.$$ > ${SD_PATH}/plr.gcode 27 | echo ';' >> ${SD_PATH}/plr.gcode 28 | echo '' >> ${SD_PATH}/plr.gcode 29 | echo 'M109 S240.0' >> ${SD_PATH}/plr.gcode 30 | # cat /tmp/plrtmpA.$$ | sed -e '1,/Z'${1}'/ d' | sed -ne '/ Z/,$ p' | grep -m 1 ' Z' | sed -ne 's/.* Z\([^ ]*\)/SET_KINEMATIC_POSITION Z=\1/p' >> ${SD_PATH}/plr.gcode 31 | fi 32 | 33 | echo '; z_height = '${1} >> ${SD_PATH}/plr.gcode 34 | echo '; last_file = '${2} >> ${SD_PATH}/plr.gcode 35 | echo '; print_temp = '${3} >> ${SD_PATH}/plr.gcode 36 | echo '; thumbnail = '${4} >> ${SD_PATH}/plr.gcode 37 | 38 | echo 'SET_KINEMATIC_POSITION Z=0' >> ${SD_PATH}/plr.gcode 39 | echo 'G91' >> ${SD_PATH}/plr.gcode 40 | echo 'G1 Z1' >> ${SD_PATH}/plr.gcode 41 | echo 'G90' >> ${SD_PATH}/plr.gcode 42 | echo 'M84' >> ${SD_PATH}/plr.gcode 43 | echo 'G28' >> ${SD_PATH}/plr.gcode 44 | 45 | # Extruder Temp 46 | # Bring print_temp in save_variables.cfg 47 | echo 'M104 S'${3} >> ${SD_PATH}/plr.gcode 48 | echo 'M109 S'${3} >> ${SD_PATH}/plr.gcode 49 | 50 | # cat /tmp/plrtmpA.$$ | sed '/ Z'${1}'/q' | sed -ne '/\(M104\|M140\|M109\|M190\|M106\)/p' >> ${SD_PATH}/plr.gcode 51 | # cat /tmp/plrtmpA.$$ | sed '/ Z'${1}'/q' | sed -ne '/\(M140\|M190\|M106\)/p' >> ${SD_PATH}/plr.gcode 52 | 53 | # Find the last M106 before Z_LOG 54 | cat /tmp/plrtmpA.$$ | sed '/ Z'${1}'/q' | sed -ne '/\(M106\)/p' | head -1 >> ${SD_PATH}/plr.gcode 55 | 56 | # Bed Temp 57 | # Find material_bed_temperature after ;End of Gcode 58 | # cat /tmp/plrtmpA.$$ | sed -ne '/;End of Gcode/,$ p' | tr '\n' ' ' | sed -ne 's/ ;[^ ]* //gp' | sed -ne 's/\\\\n/;/gp' | tr ';' '\n' | grep material_print_temperature | sed -ne 's/.* = /M104 S/p' | head -1 >> ${SD_PATH}/plr.gcode 59 | # cat /tmp/plrtmpA.$$ | sed -ne '/;End of Gcode/,$ p' | tr '\n' ' ' | sed -ne 's/ ;[^ ]* //gp' | sed -ne 's/\\\\n/;/gp' | tr ';' '\n' | grep material_bed_temperature | sed -ne 's/.* = /M140 S/p' | head -1 >> ${SD_PATH}/plr.gcode 60 | # cat /tmp/plrtmpA.$$ | sed -ne '/;End of Gcode/,$ p' | tr '\n' ' ' | sed -ne 's/ ;[^ ]* //gp' | sed -ne 's/\\\\n/;/gp' | tr ';' '\n' | grep nmaterial_print_temperature | sed -ne 's/.* = /M109 S/p' | head -1 >> ${SD_PATH}/plr.gcode 61 | # cat /tmp/plrtmpA.$$ | sed -ne '/;End of Gcode/,$ p' | tr '\n' ' ' | sed -ne 's/ ;[^ ]* //gp' | sed -ne 's/\\\\n/;/gp' | tr ';' '\n' | grep material_bed_temperature | sed -ne 's/.* = /M190 S/p' | head -1 >> ${SD_PATH}/plr.gcode 62 | 63 | 64 | # Set Position for Extruder: G92 EXXX at first Z(z_height) 65 | # cat /tmp/plrtmpA.$$ | sed -e '1,/Z'${1}'/ d' | sed -e '/ Z/q' | tac | grep -m 1 ' E' | sed -ne 's/.* E\([^ ]*\)/G92 E\1/p' >> ${SD_PATH}/plr.gcode 66 | # tac /tmp/plrtmpA.$$ | sed -e '/ Z'${1}'[^0-9]*$/q' | tac | tail -n+2 | sed -e '/ Z[0-9]/ q' | tac | sed -e '/ E[0-9]/ q' | sed -ne 's/.* E\([^ ]*\)/G92 E\1/p' >> ${SD_PATH}/plr.gcode 67 | # cat /tmp/plrtmpA.$$ | sed -e '1,/Z'${1}'/ d' | sed -ne '/ Z/,$ p' >> ${SD_PATH}/plr.gcode 68 | tac /tmp/plrtmpA.$$ | sed -e '/ Z'${1}'[^0-9]* /q' | tac | sed -ne '/ Z/,$ p' | sed -e '/ E[0-9]/ q' | sed -ne 's/.* E\([^ ]*\)/G92 E\1/p' >> ${SD_PATH}/plr.gcode 69 | 70 | 71 | 72 | # echo 'G91' >> ${SD_PATH}/plr.gcode 73 | # echo 'G1 Z-5' >> ${SD_PATH}/plr.gcode 74 | # echo 'G90' >> ${SD_PATH}/plr.gcode 75 | 76 | # Copy from fisrt G1 Z... 77 | tac /tmp/plrtmpA.$$ | sed -e '/ Z'${1}'[^0-9]* /q' | tac | tail -n+1| sed -ne '/ Z/,$ p' >> ${SD_PATH}/plr.gcode 78 | # tac /tmp/plrtmpA.$$ | sed -e '/ Z'${1}'[^0-9]*$/q' | tac | tail -n+2 | sed -ne '/ Z/,$ p' >> ${SD_PATH}/plr.gcode 79 | /bin/sleep 5 80 | -------------------------------------------------------------------------------- /skrat.cfg: -------------------------------------------------------------------------------- 1 | # This file contains common pin mappings for the BIGTREETECH SKRat V1.0. 2 | # To use this config, the firmware should be compiled for the 3 | # STM32G0B1 with a "8KiB bootloader" and USB communication. 4 | 5 | # See docs/Config_Reference.md for a description of parameters. 6 | 7 | [stepper_x] 8 | step_pin: PF9 9 | dir_pin: !PD7 10 | enable_pin: !PD6 11 | microsteps: 16 12 | rotation_distance: 40 13 | endstop_pin: ^PB5 14 | position_endstop: 0 15 | position_max: 200 16 | homing_speed: 50 17 | 18 | [stepper_y] 19 | step_pin: PD3 20 | dir_pin: !PD2 21 | enable_pin: !PD5 22 | microsteps: 16 23 | rotation_distance: 40 24 | endstop_pin: ^PC1 25 | position_endstop: 0 26 | position_max: 200 27 | homing_speed: 50 28 | 29 | [stepper_z] 30 | step_pin: PA15 31 | dir_pin: PF8 32 | enable_pin: !PC9 33 | microsteps: 16 34 | rotation_distance: 8 35 | endstop_pin: ^PC0 36 | position_endstop: 0.0 37 | position_max: 200 38 | 39 | [extruder] 40 | step_pin: PC7 41 | dir_pin: !PC6 42 | enable_pin: !PD9 43 | microsteps: 16 44 | rotation_distance: 33.500 45 | nozzle_diameter: 0.400 46 | filament_diameter: 1.750 47 | heater_pin: PE11 48 | sensor_type: EPCOS 100K B57560G104F 49 | sensor_pin: PA3 50 | control: pid 51 | pid_Kp: 21.527 52 | pid_Ki: 1.063 53 | pid_Kd: 108.982 54 | min_temp: 0 55 | max_temp: 250 56 | 57 | #sensor_type:MAX31865 58 | #sensor_pin: PA4 59 | #spi_bus: spi1 60 | #rtd_nominal_r: 100 61 | #rtd_reference_r: 430 62 | #rtd_num_of_wires: 2 63 | 64 | #[filament_switch_sensor material_0] 65 | #switch_pin: PF4 66 | 67 | #[extruder1] 68 | #step_pin: PB10 69 | #dir_pin: PE15 70 | #enable_pin: !PA8 71 | #heater_pin: PE13 72 | #sensor_pin: PA2 73 | #... 74 | 75 | #[filament_switch_sensor material_1] 76 | #switch_pin: PF5 77 | 78 | [heater_bed] 79 | heater_pin: PB3 80 | sensor_type: Generic 3950 81 | sensor_pin: PB2 82 | control: watermark 83 | min_temp: 0 84 | max_temp: 130 85 | 86 | #[temperature_sensor TH2] 87 | #sensor_type: Generic 3950 88 | #sensor_pin: PA1 89 | 90 | #[temperature_sensor TH3] 91 | #sensor_type: Generic 3950 92 | #sensor_pin: PA0 93 | 94 | [fan] 95 | pin: PD15 96 | 97 | #[heater_fan fan1] 98 | #pin: PD14 99 | 100 | #[heater_fan fan2] 101 | #pin: PD13 102 | 103 | #[heater_fan fan3] 104 | #pin: PD12 105 | 106 | #[heater_fan 4W_FAN0] 107 | #pin: PE9 108 | #tachometer_pin: PD11 109 | #tachometer_ppr: 1 110 | 111 | #[heater_fan 4W_FAN1] 112 | #pin: PE14 113 | #tachometer_pin: PD10 114 | #tachometer_ppr: 1 115 | 116 | [mcu] 117 | serial: /dev/serial/by-id/usb-Klipper_Klipper_firmware_12345-if00 118 | 119 | [printer] 120 | kinematics: cartesian 121 | max_velocity: 300 122 | max_accel: 3000 123 | max_z_velocity: 5 124 | max_z_accel: 100 125 | 126 | [board_pins] 127 | aliases: 128 | # EXP1 header 129 | EXP1_1=PC13, EXP1_3=PC3, EXP1_5=PB1, EXP1_7=PC5, EXP1_9=, 130 | EXP1_2=PF3, EXP1_4=PC2, EXP1_6=PB0, EXP1_8=PC4, EXP1_10=<5V>, 131 | # EXP2 header 132 | EXP2_1=PA6, EXP2_3=PE7, EXP2_5=PE8, EXP2_7=PE10, EXP2_9=, 133 | EXP2_2=PA5, EXP2_4=PF7, EXP2_6=PA7, EXP2_8=, EXP2_10= 134 | 135 | # See the sample-lcd.cfg file for definitions of common LCD displays. 136 | 137 | #[bltouch] 138 | #sensor_pin: PE5 139 | #control_pin: PE6 140 | #z_offset: 0 141 | 142 | # Proximity switch port, isolated by optocoupler 143 | #[probe] 144 | #pin: PB9 145 | 146 | #[neopixel my_neopixel] 147 | #pin: PE4 148 | 149 | ######################################## 150 | # TMC2209 configuration 151 | ######################################## 152 | 153 | #[tmc2209 stepper_x] 154 | #uart_pin: PF10 155 | #run_current: 0.800 156 | #diag_pin: 157 | 158 | #[tmc2209 stepper_y] 159 | #uart_pin: PD4 160 | #run_current: 0.800 161 | #diag_pin: 162 | 163 | #[tmc2209 stepper_z] 164 | #uart_pin: PC8 165 | #run_current: 0.800 166 | #diag_pin: 167 | 168 | #[tmc2209 extruder] 169 | #uart_pin: PD8 170 | #run_current: 0.600 171 | #diag_pin: 172 | 173 | #[tmc2209 extruder1] 174 | #uart_pin: PB11 175 | #run_current: 0.600 176 | #diag_pin: 177 | 178 | ######################################## 179 | # TMC2130 configuration 180 | ######################################## 181 | 182 | #[tmc2130 stepper_x] 183 | #cs_pin: PF10 184 | #spi_software_mosi_pin: PC12 185 | #spi_software_miso_pin: PC11 186 | #spi_software_sclk_pin: PC10 187 | #run_current: 0.800 188 | #stealthchop_threshold: 999999 189 | #diag1_pin: PB5 190 | 191 | #[tmc2130 stepper_y] 192 | #cs_pin: PD4 193 | #spi_software_mosi_pin: PC12 194 | #spi_software_miso_pin: PC11 195 | #spi_software_sclk_pin: PC10 196 | #run_current: 0.800 197 | #stealthchop_threshold: 999999 198 | #diag1_pin: PC1 199 | 200 | #[tmc2130 stepper_z] 201 | #cs_pin: PC8 202 | #spi_software_mosi_pin: PC12 203 | #spi_software_miso_pin: PC11 204 | #spi_software_sclk_pin: PC10 205 | #run_current: 0.650 206 | #stealthchop_threshold: 999999 207 | #diag1_pin: PC0 208 | 209 | #[tmc2130 extruder] 210 | #cs_pin: PD8 211 | #spi_software_mosi_pin: PC12 212 | #spi_software_miso_pin: PC11 213 | #spi_software_sclk_pin: PC10 214 | #run_current: 0.800 215 | #stealthchop_threshold: 999999 216 | #diag1_pin: PF4 217 | 218 | #[tmc2130 extruder1] 219 | #cs_pin: PB11 220 | #spi_software_mosi_pin: PC12 221 | #spi_software_miso_pin: PC11 222 | #spi_software_sclk_pin: PC10 223 | #run_current: 0.800 224 | #stealthchop_threshold: 999999 225 | #diag1_pin: PF5 226 | -------------------------------------------------------------------------------- /START_VzBot.cfg: -------------------------------------------------------------------------------- 1 | 2 | [delayed_gcode _START_PRINTER] 3 | # description: The macros when start the printer 4 | initial_duration: 2.0 5 | gcode: 6 | # WEBCAM_ON 7 | BED_MESH_PROFILE LOAD=default 8 | SET_VELOCITY_LIMIT ACCEL_TO_DECEL=7500 9 | SET_VELOCITY_LIMIT ACCEL=15000 10 | SET_VELOCITY_LIMIT VELOCITY=500 11 | # BL_RESET 12 | # BL_DOWN 13 | G4 P1500 14 | # BL_UP 15 | # BL_RESET 16 | # SET_PIN PIN=LED_Strip VALUE=5 # Set Led Strip 5% 17 | # UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK DURATION=600 # FOR TIMEOUT - Set Timeout 600s 18 | # SET_BED_TEMP_TO_SENSOR # set the bed temperature as the temp measured at boot 19 | 20 | 21 | [gcode_macro START_PRINT] # Recall as "FIRST" START PRINT MACRO in the Slicer 22 | description: The macros when start a print 23 | gcode: 24 | {% set macro = printer['gcode_macro _MACRO_VARIABLE']|default({}) %} 25 | # HOMING_IF_NOT 26 | SAVE_VARIABLE VARIABLE=power_resume_z VALUE=0 27 | # DEBUG_OFF # FOR TIMEOUT 28 | CLEAR_PAUSE 29 | 30 | # RUN_SHELL_COMMAND CMD=LOG_CPU_START 31 | # SAVE_LAST_FILE # Recall as last MACRO in slicer: needed to generate PLR gcode without purge column in the Start Gcode of slicer 32 | 33 | # SET_FILAMENT_SENSOR SENSOR=encoder_sensor ENABLE=0 # Disable Filament Sensor for purge line 34 | 35 | HOMING_IF_NOT 36 | # PRECISE_HOMING 37 | 38 | # PARK FOR HEATING 39 | G1 X0 Y0 Z5 F{macro.speed_move*60} 40 | 41 | # ORCA SLICER 42 | {% set BED_TEMP = params.BED_TEMP|default(70)|int %} 43 | {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(225)|int %} 44 | 45 | # Heat nozzle for probing 46 | M104 S{EXTRUDER_TEMP} 47 | # Heat bed for probing 48 | M140 S{BED_TEMP} 49 | 50 | # Heat nozzle for probing 51 | M109 S{EXTRUDER_TEMP} 52 | # Heat bed for probing 53 | M190 S{BED_TEMP} 54 | 55 | M118 Purging... 56 | M117 Purging... 57 | PURGE_LINE 58 | 59 | LAST_START_PRINT ; Enable PLR, Encoder etc 60 | 61 | 62 | [gcode_macro PURGE_LINE] 63 | gcode: 64 | {% set macro = printer['gcode_macro _MACRO_VARIABLE']|default({}) %} 65 | # LOAD FILAMENT 66 | G90 67 | G92 E0 68 | G1 X{macro.purge_park_x} Y{macro.purge_park_x} 69 | G1 E{macro.start_purge_long_lenght} F{macro.start_purge_long_speed} 70 | G1 E{macro.start_purge_short_lenght} F{macro.start_purge_short_speed} 71 | G11 # retract a bit 72 | 73 | # PURGE LINE 74 | G92 E0 75 | G1 Z0.3 F3000 ; Move bed down 76 | G1 X150 Y0 Z0.2 F15000.0 ; Move to start position 77 | G1 X0 Y0 Z0.2 F1500.0 E5 ; Draw the first line 78 | G1 Z3 F3000 E-1 79 | G92 E0 80 | 81 | 82 | [gcode_macro LAST_START_PRINT] # Recall as the "LAST" START PRINT MACRO in the Slicer 83 | description: The last macros when start a print 84 | gcode: 85 | {% set macro = printer['gcode_macro _MACRO_VARIABLE']|default({}) %} 86 | 87 | # SET_FILAMENT_SENSOR SENSOR=encoder_sensor ENABLE=1 # Enable Filament Sensor after purge line 88 | 89 | 90 | [gcode_macro END_PRINT] # Recall as END PRINT MACRO in the Slicer 91 | description: The macros when end a print 92 | gcode: 93 | {% set macro = printer['gcode_macro _MACRO_VARIABLE']|default({}) %} 94 | 95 | ; Go to center 96 | M118 Go to center 97 | {% set x_med = printer.toolhead.axis_maximum.x / 2 %} 98 | {% set y_med = printer.toolhead.axis_maximum.x / 2 %} 99 | G90 100 | G1 X{macro.cooling_park_x} Y{macro.cooling_park_x} F{macro.speed_move*6} 101 | 102 | M118 Z SAFE 103 | FILAMENT_Z_SAFE ; Raise Z more 104 | 105 | M118 Short retract 106 | G91 ; Relative positioning 107 | # Retract short 108 | G1 E-{macro.start_purge_short_lenght} F{macro.start_purge_short_speed} 109 | # G10 ; Firmware Retraction 110 | 111 | ; Cooldown 20% 112 | M118 Cooling at center 113 | M106 S26 ; Fan 10% 114 | 115 | G4 P1000 ; pause between retractions 116 | 117 | M118 Long retract 118 | ; Retract long 119 | G1 E-{macro.start_purge_long_lenght} F{macro.start_purge_long_speed} 120 | 121 | ; Cooldown 122 | M118 Turn Off Heaters 123 | TURN_OFF_HEATERS 124 | M106 S51 ; Fan 20% 125 | 126 | M118 Motor OFF 127 | DISABLE_EXTRUDER 128 | M18 ; Klipper disables All Motors 129 | M84 ; Klipper disables All Motors 130 | 131 | 132 | # TIMELAPSE_RENDER ; Webcam 133 | G4 P10000 ; pause cooldown 134 | M118 Fan OFF 135 | M107 ; Turn-off fan 136 | SET_FAN_SPEED FAN=RSCS SPEED=0 137 | 138 | # end_tune ; Beeper 139 | 140 | # clear_last_file 141 | 142 | 143 | # RUN_SHELL_COMMAND CMD=LOG_CPU_STOP 144 | # WEBCAM_OFF 145 | # {% if printer.configfile.save_config_pending|lower == 'true' or printer["gcode_macro global"].restart_inpending|lower == 'true' %} 146 | {% if printer.configfile.save_config_pending %} 147 | M117 save in pending 148 | M118 save in pending 149 | SAVE_VARIABLE VARIABLE=dariavviare VALUE=1 150 | SAVE_CONFIG 151 | {% endif %} 152 | 153 | 154 | M118 Clean Air 155 | EXHAUST_FAN_ON 156 | # EXHAUST_FAN_ON EXHAUST_TIME=120 157 | 158 | M118 Printing finished 159 | 160 | # UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK DURATION=60 161 | -------------------------------------------------------------------------------- /moonraker.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | [server] 5 | host: 0.0.0.0 6 | port: 7125 7 | klippy_uds_address: /home/pi/printer_data/comms/klippy.sock 8 | 9 | [authorization] 10 | trusted_clients: 11 | 10.0.0.0/8 12 | 127.0.0.0/8 13 | 169.254.0.0/16 14 | 172.16.0.0/12 15 | 192.168.0.0/16 16 | FE80::/10 17 | ::1/128 18 | cors_domains: 19 | *.lan 20 | *.local 21 | *://localhost 22 | *://localhost:* 23 | *://my.mainsail.xyz 24 | *://app.fluidd.xyz 25 | 26 | [octoprint_compat] 27 | 28 | [include octoeverywhere-system.cfg] 29 | 30 | [file_manager] 31 | enable_object_processing: True 32 | 33 | [history] 34 | 35 | [spoolman] 36 | server: http://192.168.1.112:7912 37 | # URL to the Spoolman instance. This parameter must be provided. 38 | sync_rate: 5 39 | # The interval, in seconds, between sync requests with the 40 | # Spoolman server. The default is 5. 41 | 42 | [update_manager spoolman] 43 | type: web 44 | channel: stable 45 | repo: Donkie/Spoolman 46 | path: ~/Spoolman 47 | 48 | 49 | # [power homeassistant_switch] 50 | # type: homeassistant 51 | # address: 192.168.1.112 52 | # port: 8123 53 | # device: switch.0x385b44fffe4e9e3a 54 | # The token option may be a template 55 | # token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIwMTNiZDVjOWRjOWY0ZjFjYTZiY2Q2MzIzZTQwODM2MCIsImlhdCI6MTcxMTM5MTI2MCwiZXhwIjoyMDI2NzUxMjYwfQ.clKx6ZPV3tzJVT7uA7AXMB5r--UOZaCRNNc7XRKEoFE 56 | # domain: switch 57 | 58 | 59 | # command_topic: zigbee2mqtt/bridge/state 60 | # query_topic: zigbee2mqtt/bridge/state 61 | # state_topic: zigbee2mqtt/bridge/state 62 | # command_topic: cmnd/sapphire/POWER 63 | # query_topic: cmnd/sapphire/POWER 64 | # state_topic: stat/sapphire/POWER 65 | 66 | [power Power] 67 | type: tasmota 68 | address: 192.168.1.115 69 | # object_name: gcode_macro WEBCAMD_OFF 70 | # object_name: gcode_macro poweroff 71 | password: $TAzsq2xaw1 72 | locked_while_printing: true 73 | restart_klipper_when_powered: True 74 | restart_delay: 5. 75 | 76 | 77 | 78 | 79 | # [power ON_tasmota_webcam] 80 | # type: klipper_device 81 | # object_name: gcode_macro POWER_ON 82 | # locked_while_printing: false 83 | 84 | [power OFF_tasmota_webcam] 85 | type: klipper_device 86 | object_name: gcode_macro POWER_OFF 87 | locked_while_printing: true 88 | 89 | [mqtt] 90 | address: 192.168.1.112 91 | port: 1883 92 | username: mqtt_user 93 | password: $MTzsq2xaw1 94 | mqtt_protocol: v3.1.1 95 | enable_moonraker_api: True 96 | #instance_name: Printer_SP5 97 | 98 | 99 | 100 | 101 | 102 | 103 | [update_manager klipper-configuration] 104 | type: git_repo 105 | primary_branch: main 106 | path: ~/Klipper-configuration 107 | origin: https://github.com/Travis90x/Klipper-configuration.git 108 | install_script: config/scripts/update/klipper-configuration/klipper-configuration.sh # Deprecated by Moonraker 109 | # Manual Update with putty: 110 | # cp -r ~/Klipper-configuration/* ~/printer_data/config 111 | managed_services: klipper moonraker 112 | 113 | [update_manager kiauh] 114 | type: git_repo 115 | ###primary_branch: main 116 | path: ~/kiauh 117 | origin: https://github.com/th33xitus/kiauh.git 118 | ###install_script: kiauh.sh 119 | managed_services: klipper moonraker 120 | 121 | 122 | [update_manager] 123 | channel: dev 124 | refresh_interval: 168 125 | 126 | [update_manager mainsail-config] 127 | type: git_repo 128 | primary_branch: master 129 | path: ~/mainsail-config 130 | origin: https://github.com/mainsail-crew/mainsail-config.git 131 | managed_services: klipper 132 | 133 | [update_manager mainsail] 134 | type: web 135 | channel: stable 136 | repo: mainsail-crew/mainsail 137 | path: ~/mainsail 138 | 139 | [update_manager KlipperScreen] 140 | type: git_repo 141 | path: ~/KlipperScreen 142 | origin: https://github.com/jordanruthe/KlipperScreen.git 143 | env: ~/.KlipperScreen-env/bin/python 144 | requirements: scripts/KlipperScreen-requirements.txt 145 | install_script: scripts/KlipperScreen-install.sh 146 | managed_services: KlipperScreen 147 | 148 | # Adds PrettyGCode to Moonrakers update manager 149 | 150 | [update_manager pgcode] 151 | type: git_repo 152 | primary_branch: main 153 | origin: https://github.com/Kragrathea/pgcode.git 154 | path: ~/pgcode 155 | is_system_service: False 156 | 157 | [update_manager Klipper-Adaptive-Meshing-Purging] 158 | type: git_repo 159 | channel: dev 160 | path: ~/Klipper-Adaptive-Meshing-Purging 161 | origin: https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging.git 162 | managed_services: klipper 163 | primary_branch: main 164 | 165 | [timelapse] 166 | # https://github.com/mainsail-crew/moonraker-timelapse/blob/main/docs/configuration.md 167 | enabled: True 168 | # output_path: /home/pi/timelapse/ 169 | # mode: layermacro #needs the slicer to be setup 170 | # mode: hyperlapse #every x seconds 171 | # hyperlapse_cycle: 10 #time 172 | autorender: True # if false add end gcode TIMELAPSE_RENDER 173 | time_format_code: %Y%m%d_%H%M 174 | saveFrames: False 175 | previewimage: True 176 | gcode_verbose: False 177 | park_custom_pos_x: 150 178 | park_custom_pos_y: 150 179 | # parkhead: True 180 | #parkpos: custom 181 | 182 | [update_manager timelapse] 183 | type: git_repo 184 | primary_branch: main 185 | path: ~/moonraker-timelapse 186 | origin: https://github.com/mainsail-crew/moonraker-timelapse.git 187 | managed_services: klipper moonraker 188 | 189 | 190 | [update_manager crowsnest] 191 | type: git_repo 192 | path: ~/crowsnest 193 | origin: https://github.com/mainsail-crew/crowsnest.git 194 | install_script: tools/pkglist.sh 195 | 196 | [update_manager idm] 197 | type: git_repo 198 | channel: dev 199 | path: ~/IDM 200 | origin: https://gitee.com/NBTP/IDM.git 201 | env: ~/klippy-env/bin/python 202 | requirements: requirements.txt 203 | install_script: install.sh 204 | is_system_service: False 205 | managed_services: klipper 206 | info_tags: 207 | desc=idm 208 | 209 | [update_manager Klippain-ShakeTune] 210 | type: git_repo 211 | origin: https://github.com/Frix-x/klippain-shaketune.git 212 | path: ~/klippain_shaketune 213 | virtualenv: ~/klippain_shaketune-env 214 | requirements: requirements.txt 215 | system_dependencies: system-dependencies.json 216 | primary_branch: main 217 | managed_services: klipper 218 | 219 | 220 | [update_manager z_calibration] 221 | type: git_repo 222 | path: /home/pi/klipper_z_calibration 223 | origin: https://github.com/protoloft/klipper_z_calibration.git 224 | managed_services: klipper 225 | 226 | 227 | -------------------------------------------------------------------------------- /START.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro TEST_MACRO] 2 | gcode: 3 | M118 { bedMeshConfig.mesh_min.split(",")[0]|float } 4 | M118 { bedMeshConfig.mesh_min.split(",")[1]|float } 5 | M118 { bedMeshConfig.mesh_max.split(",")[0]|float } 6 | M118 { bedMeshConfig.mesh_max.split(",")[1]|float } 7 | 8 | 9 | [delayed_gcode _START_PRINTER] 10 | # description: The macros when start the printer 11 | initial_duration: 2.0 12 | gcode: 13 | WEBCAM_ON 14 | 15 | {% if printer.bed_mesh.profiles.default %} 16 | BED_MESH_PROFILE LOAD=default 17 | {% else %} 18 | M118 Bed Mesh "default" not present 19 | {% endif %} 20 | 21 | SET_VELOCITY_LIMIT ACCEL_TO_DECEL=6000 22 | SET_VELOCITY_LIMIT ACCEL=12000 23 | SET_VELOCITY_LIMIT VELOCITY=300 24 | BL_RESET 25 | BL_DOWN 26 | G4 P1500 27 | BL_UP 28 | BL_RESET 29 | SET_PIN PIN=LED_Strip VALUE=5 # Set Led Strip 5% 30 | UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK DURATION=600 # Set Timeout 600s 31 | SET_BED_TEMP_TO_SENSOR # set the bed temperature as the temp measured at boot 32 | 33 | 34 | [gcode_macro START_PRINT] # Recall as "FIRST" START PRINT MACRO in the Slicer 35 | description: The macros when start a print 36 | gcode: 37 | {% set macro = printer['gcode_macro _MACRO_VARIABLE']|default({}) %} 38 | # EXHAUST_FAN_OFF 39 | # HOMING_IF_NOT 40 | SAVE_VARIABLE VARIABLE=power_resume_z VALUE=0 41 | DEBUG_OFF 42 | CLEAR_PAUSE 43 | RUN_SHELL_COMMAND CMD=LOG_CPU_START 44 | SAVE_LAST_FILE # Recall as last MACRO in slicer: needed to generate PLR gcode without purge column in the Start Gcode of slicer 45 | SET_FILAMENT_SENSOR SENSOR=encoder_sensor ENABLE=0 # Disable Filament Sensor for purge line 46 | 47 | 48 | # ORCA SLICER 49 | {% set BED_TEMP = params.BED_TEMP|default(70)|int %} 50 | {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(225)|int %} 51 | 52 | # Heat nozzle for probing 53 | M104 S{EXTRUDER_TEMP} 54 | # Heat bed for probing 55 | M140 S{BED_TEMP} 56 | 57 | # PRECISE_HOMING 58 | 59 | # PARK FOR HEATING 60 | _TOOLHEAD_PARK_PAUSE_CANCEL 61 | # G1 X0 Y0 Z5 F{macro.speed_move*60} 62 | 63 | # Heat nozzle for probing 64 | M109 S{EXTRUDER_TEMP} 65 | # Heat bed for probing 66 | M190 S{BED_TEMP} 67 | 68 | # MESH_PRINT 69 | 70 | # PURGE_LINE 71 | 72 | LAST_START_PRINT ; Enable PLR, Encoder etc 73 | 74 | 75 | [gcode_macro PURGE_LINE] 76 | gcode: 77 | {% set macro = printer['gcode_macro _MACRO_VARIABLE']|default({}) %} 78 | M118 Purging... 79 | M117 Purging... 80 | 81 | # LOAD FILAMENT 82 | G90 83 | G92 E0 84 | G1 X{macro.purge_park_x} Y{macro.purge_park_x} 85 | G1 E{macro.start_purge_long_lenght} F{macro.start_purge_long_speed} 86 | G92 E0 87 | G4 P4000 88 | G1 E{macro.start_purge_short_lenght} F{macro.start_purge_short_speed} 89 | G11 # retract a bit 90 | G92 E0 91 | 92 | # PURGE LINE 93 | G92 E0 94 | G1 Z0.3 F3000 ; Move bed down 95 | G1 X10 Y5 Z0.2 F15000.0 ; Move to start position 96 | G1 X200 Y5 Z0.2 F1500.0 E5 ; Draw the first line 97 | G92 E0 98 | G1 Z3 F3000 E-1 99 | G92 E0 100 | 101 | [gcode_macro MESH_PRINT] 102 | gcode: 103 | # Mesh for print 104 | # Set Accel for Bed Mesh 105 | SET_VELOCITY_LIMIT ACCEL=3000 106 | SET_VELOCITY_LIMIT ACCEL_TO_DECEL=3000 107 | M118 MESH Temporanea 108 | 109 | {% if not printer.bed_mesh.profiles.print %} 110 | BED_MESH_CALIBRATE PROFILE="print" 111 | {% else %} 112 | M118 Bed Mesh "print" present 113 | {% endif %} 114 | 115 | [gcode_macro LAST_START_PRINT] # Recall as the "LAST" START PRINT MACRO in the Slicer 116 | description: The last macros when start a print 117 | gcode: 118 | {% set macro = printer['gcode_macro _MACRO_VARIABLE']|default({}) %} 119 | SET_FILAMENT_SENSOR SENSOR=encoder_sensor ENABLE=1 # Enable Filament Sensor after purge line 120 | 121 | 122 | [gcode_macro END_PRINT] # Recall as END PRINT MACRO in the Slicer 123 | description: The macros when end a print 124 | gcode: 125 | {% set macro = printer['gcode_macro _MACRO_VARIABLE']|default({}) %} 126 | 127 | 128 | 129 | M118 Z SAFE 130 | Z_SAFE ; Raise Z more 131 | 132 | # Short Retract 133 | M118 Short retract 134 | G91 ; Relative positioning 135 | # Retract short 136 | G1 E-{macro.start_purge_short_lenght} F{macro.start_purge_short_speed} 137 | # G10 ; Firmware Retraction 138 | G92 E0 139 | 140 | _TOOLHEAD_PARK_PAUSE_CANCEL 141 | 142 | ; Go to center 143 | M118 Go to center 144 | {% set x_med = printer.toolhead.axis_maximum.x / 2 %} 145 | {% set y_med = printer.toolhead.axis_maximum.x / 2 %} 146 | G90 147 | G1 X{macro.cooling_park_x} Y{macro.cooling_park_x} F{macro.speed_move*6} 148 | 149 | 150 | # Cooldown 20% 151 | M118 Cooling at center 152 | M106 S26 ; Fan 10% 153 | 154 | G4 P1000 ; pause between retractions 155 | 156 | M118 Long retract 157 | # Retract long 158 | G1 E-{macro.start_purge_long_lenght} F{macro.start_purge_long_speed} 159 | 160 | # Cooldown 161 | M118 Turn Off Heaters 162 | TURN_OFF_HEATERS 163 | M106 S51 ; Fan 20% 164 | 165 | Z_SAFE Z=100 166 | 167 | 168 | M106 S102 ; Fan 40% 169 | 170 | M118 Motor OFF 171 | SET_STEPPER_ENABLE STEPPER=extruder ENABLE=0 172 | M18 ; Klipper disables All Motors 173 | M84 ; Klipper disables All Motors 174 | 175 | 176 | 177 | TIMELAPSE_RENDER ; Webcam 178 | G4 P10000 ; pause cooldown 179 | M107 ; Turn-off fan 180 | 181 | # SET_FAN_SPEED FAN=RSCS SPEED=0 182 | # end_tune ; Beeper 183 | 184 | 185 | # Remove Mesh "print" 186 | # BED_MESH_PROFILE REMOVE="print" 187 | 188 | clear_last_file # PLR 189 | 190 | 191 | RUN_SHELL_COMMAND CMD=LOG_CPU_STOP 192 | # WEBCAM_OFF 193 | # {% if printer.configfile.save_config_pending|lower == 'true' or printer["gcode_macro global"].restart_inpending|lower == 'true' %} 194 | {% if printer.configfile.save_config_pending %} 195 | M117 save in pending 196 | M118 save in pending 197 | SAVE_VARIABLE VARIABLE=dariavviare VALUE=1 198 | SAVE_CONFIG 199 | {% endif %} 200 | 201 | # M118 Clean Air 202 | # EXHAUST_FAN_ON 203 | # EXHAUST_FAN_ON EXHAUST_TIME=120 204 | 205 | M118 Printing finished 206 | 207 | UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK DURATION=60 208 | 209 | 210 | -------------------------------------------------------------------------------- /btt-skrat-10.cfg: -------------------------------------------------------------------------------- 1 | # SKART GITHUB https://github.com/bigtreetech/SKRat/tree/master 2 | # RATOS https://github.com/Rat-OS/RatOS-configuration/tree/v2.x/boards/btt-skrat-10 3 | 4 | [mcu] 5 | serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_4000150012504B4633373520-if00 6 | 7 | [include mainsail.cfg] 8 | [include macro.cfg] 9 | 10 | [adxl345] 11 | cs_pin: PB12 # adxl345_cs_pin=PB12, adxl345_sclk_pin=PB13, adxl345_mosi_pin=PB15, adxl345_miso_pin=PB14, # SPI2 12 | spi_bus: spi2 13 | 14 | [stepper_x] 15 | step_pin: PF9 16 | dir_pin: !PD7 17 | enable_pin: !PD6 18 | microsteps: 64 19 | rotation_distance: 40 20 | endstop_pin: ^PB5 21 | position_endstop: 0 22 | position_max: 200 23 | homing_speed: 50 24 | 25 | [tmc2240 stepper_x] 26 | cs_pin: PF10 27 | spi_software_mosi_pin: PC12 28 | spi_software_miso_pin: PC11 29 | spi_software_sclk_pin: PC10 30 | run_current: 0.9 31 | stealthchop_threshold: 0 32 | interpolate: False 33 | diag1_pin: PB5 34 | 35 | [stepper_y] 36 | step_pin: PD3 37 | dir_pin: !PD2 38 | enable_pin: !PD5 39 | microsteps: 64 40 | rotation_distance: 40 41 | endstop_pin: ^PC1 42 | position_endstop: 0 43 | position_max: 200 44 | homing_speed: 50 45 | 46 | [tmc2240 stepper_y] 47 | cs_pin: PD4 48 | spi_software_mosi_pin: PC12 49 | spi_software_miso_pin: PC11 50 | spi_software_sclk_pin: PC10 51 | run_current: 0.9 52 | stealthchop_threshold: 0 53 | interpolate: False 54 | diag1_pin: PC1 55 | 56 | [stepper_z] 57 | step_pin: PA15 58 | dir_pin: PF8 59 | enable_pin: !PC9 60 | microsteps: 16 61 | rotation_distance: 8 62 | endstop_pin: ^PC0 63 | position_endstop: 0.0 64 | position_max: 200 65 | 66 | 67 | [tmc2208 stepper_z] 68 | uart_pin: PC8 69 | run_current: 0.9 70 | #diag_pin: PC0 71 | interpolate: False 72 | sense_resistor: 0.110 73 | stealthchop_threshold: 0 74 | 75 | 76 | 77 | [stepper_z1] 78 | step_pin: PC7 79 | dir_pin: PC6 80 | enable_pin: !PF4 81 | microsteps: 16 82 | rotation_distance: 8 83 | endstop_pin: PC4 # 2nd Green 84 | # endstop_pin: PA11 # as Z0 85 | 86 | 87 | 88 | [tmc2208 stepper_z1] 89 | uart_pin: PD8 90 | run_current: 0.9 91 | #diag_pin: PF4 92 | interpolate: False 93 | sense_resistor: 0.110 94 | stealthchop_threshold: 0 95 | 96 | 97 | [extruder] 98 | step_pin: PB10 99 | dir_pin: !PE15 100 | enable_pin: !PA8 101 | microsteps: 32 102 | full_steps_per_rotation: 200 103 | rotation_distance: 22.6 104 | nozzle_diameter: 0.400 105 | filament_diameter: 1.750 106 | 107 | 108 | ### Heater Sensor MAX31865 ### 109 | sensor_type: MAX31865 110 | sensor_pin: PA4 # CS SPI1_NSS MAX31865 111 | spi_bus: spi1 # SCK PA5 - MISO PA6 - MOSI PA7 112 | rtd_nominal_r: 100 113 | rtd_reference_r: 430 114 | rtd_num_of_wires: 2 115 | 116 | ### Heater Sensor H0 ### 117 | # heater_pin: PE11 118 | # sensor_type: PT1000 119 | # sensor_pin: PA3 120 | # pullup_resistor: 4700 121 | 122 | min_temp: -230 123 | max_temp: 999999999 124 | 125 | max_extrude_only_distance: 1400.0 126 | max_extrude_only_accel: 1700 # mm/s^2 127 | max_extrude_only_velocity: 100.0 # G1 EX mm/s 128 | # Maximum velocity (in mm/s) and acceleration (in mm/s^2) of the extruder motor for retractions and extrude-only moves 129 | # max_extrude_only_velocity: 75 # SHERPA MINI 130 | # max_extrude_only_accel: 1500 # SHERPA MINI 131 | # https://github.com/Annex-Engineering/Sherpa_Mini-Extruder/blob/master/Klipper_Config_Block.txt 132 | max_extrude_cross_section: 100.0 # The default is: 4x nozzle_diameter^2 133 | 134 | 135 | #################### 136 | # PID EXTRUDER 137 | #################### 138 | 139 | pwm_cycle_time: 0.02 # default pwm_cycle_time: 0.1 (10Hz,the max for SSR) 140 | max_power: 1.0 141 | smooth_time: 0.5 # default 1.0 142 | control: pid 143 | pid_Kp: 21.527 144 | pid_Ki: 1.063 145 | pid_Kd: 108.982 146 | 147 | ######################### 148 | pressure_advance: 0.05 149 | # PLA 0.045 100mm/s 150 | # PLA 0.08 40mm/s 151 | # PETG 152 | ######################### 153 | 154 | [tmc2208 extruder] 155 | uart_pin: PB11 156 | run_current: 0.85 157 | #diag_pin: PF5 158 | interpolate: False 159 | sense_resistor: 0.110 160 | stealthchop_threshold: 0 161 | 162 | ######################################## 163 | # TMC2209 configuration 164 | ######################################## 165 | 166 | 167 | 168 | 169 | [heater_bed] 170 | heater_pin: PB3 171 | pullup_resistor: 4700 # default 4700 172 | smooth_time: 1.0 # default 1.0 173 | max_power: 1.0 #default 1.0 174 | pwm_cycle_time: 0.1 #default 0.1 (10Hz, tha max for SSR relay) 175 | 176 | sensor_type: EPCOS 100K B57560G104F 177 | sensor_pin: PB2 178 | 179 | control: watermark 180 | min_temp: -230 181 | max_temp: 999999999 182 | 183 | [board_pins btt_skrat_10] 184 | aliases: 185 | # steppers 186 | x_step_pin=PF9, x_dir_pin=PD7, x_enable_pin=PD6, x_uart_pin=PF10, x_diag_pin=PB5, x_endstop_pin=PB5, 187 | y_step_pin=PD3, y_dir_pin=PD2, y_enable_pin=PD5, y_uart_pin=PD4, y_diag_pin=PC1, y_endstop_pin=PC1, 188 | z0_step_pin=PA15, z0_dir_pin=PF8, z0_enable_pin=PC9, z0_uart_pin=PC8, z0_diag_pin=PC0, z_endstop_pin=PC0, 189 | z1_step_pin=null, z1_dir_pin=null, z1_enable_pin=null, z1_uart_pin=null, z1_diag_pin=null, 190 | z2_step_pin=null, z2_dir_pin=null, z2_enable_pin=null, z2_uart_pin=null, z2_diag_pin=null, 191 | e_step_pin=PB10, e_dir_pin=PE15, e_enable_pin=PA8, e_uart_pin=PB11, e_diag_pin=PF5, e_endstop_pin=PF5, 192 | # Extrusion 193 | e_heater_pin=PE11, e_sensor_pin=PA3, 194 | # accel 195 | adxl345_cs_pin=PB12, adxl345_sclk_pin=PB13, adxl345_mosi_pin=PB15, adxl345_miso_pin=PB14, # SPI2 196 | # auto leveling 197 | bltouch_sensor_pin=PE5, bltouch_control_pin=PE6, 198 | probe_pin=PE5, 199 | # 2p fans 200 | fan_part_cooling_pin=PD15, 201 | fan_toolhead_cooling_pin=PD14, 202 | fan_controller_board_pin=PD13, 203 | # 4p fans 204 | 4p_fan_part_cooling_pin=PE9, 205 | 4p_fan_part_cooling_tach_pin=PD11, 206 | 4p_toolhead_cooling_pin=PE14, 207 | 4p_toolhead_cooling_tach_pin=PD10, 208 | 4p_controller_board_pin=PE14, 209 | 4p_controller_board_tach_pin=PD10, 210 | # Bed heater 211 | heater_bed_heating_pin=PB3, 212 | heater_bed_sensor_pin=PB2 213 | 214 | # EXP1 header 215 | EXP1_1=PC13, # BEEP 216 | EXP1_3=PC3, # EN 217 | EXP1_5=PB1, # D4 218 | EXP1_7=PC5, # D6 219 | EXP1_9=, # GND 220 | 221 | EXP1_2=PF3, # BTN 222 | EXP1_4=PC2, # LCD_NSS 223 | EXP1_6=PB0, # D5 224 | EXP1_8=PC4, # D7 225 | EXP1_10=<5V>, # +5v 226 | 227 | # EXP2 header 228 | EXP2_1=PA6, # MISO 229 | EXP2_3=PE7, # ENCA 230 | EXP2_5=PE8, # ENCB 231 | EXP2_7=PE10, # SD_DET 232 | EXP2_9=, # GND 233 | 234 | EXP2_2=PA5, # SCK 235 | EXP2_4=PF7, # SD_NSS 236 | EXP2_6=PA7, #MOSI 237 | EXP2_8=, # REST 238 | EXP2_10= # NC 239 | 240 | ## Expansion ports 241 | # EXP1 header 242 | # EXP1_1=PB5, EXP1_3=PA9, EXP1_5=PA10, EXP1_7=PB8, EXP1_9=, 243 | # EXP1_2=PA15, EXP1_4=, EXP1_6=PB9, EXP1_8=PD6, EXP1_10=<5V>, 244 | 245 | 246 | [temperature_sensor SKRat] 247 | sensor_type: temperature_mcu 248 | min_temp: 0 249 | max_temp: 100 250 | 251 | [printer] 252 | kinematics: cartesian 253 | max_velocity: 500 254 | max_accel: 10000 255 | -------------------------------------------------------------------------------- /°START.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro TEST_MACRO] 2 | gcode: 3 | M118 { bedMeshConfig.mesh_min.split(",")[0]|float } 4 | M118 { bedMeshConfig.mesh_min.split(",")[1]|float } 5 | M118 { bedMeshConfig.mesh_max.split(",")[0]|float } 6 | M118 { bedMeshConfig.mesh_max.split(",")[1]|float } 7 | 8 | 9 | 10 | [delayed_gcode _START_PRINTER] 11 | # description: The macros when start the printer 12 | initial_duration: 2.0 13 | gcode: 14 | # TIMER_ON # TIMER_OFF Disable Timeout 15 | WEBCAM_ON 16 | BACKUP_MOVE 17 | LOG_CPU_CLEAN 18 | 19 | BRUSH_CLEAN_OFF 20 | 21 | 22 | # SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=0 23 | 24 | {% if printer.bed_mesh.profiles.default %} 25 | # BED_MESH_PROFILE LOAD=default 26 | {% else %} 27 | M118 Bed Mesh "default" not present 28 | {% endif %} 29 | 30 | # SET_VELOCITY_LIMIT ACCEL_TO_DECEL=6000 31 | SET_VELOCITY_LIMIT MINIMUM_CRUISE_RATIO=0.5 32 | SET_VELOCITY_LIMIT ACCEL=12000 33 | SET_VELOCITY_LIMIT VELOCITY=300 34 | # BL_TEST 35 | SET_PIN PIN=LED_Strip VALUE=5 # Set Led Strip 5% 36 | 37 | 38 | 39 | # SET_BED_TEMP_TO_SENSOR # set the bed temperature as the temp measured at boot 40 | 41 | 42 | [gcode_macro START_PRINT] # Recall as "FIRST" START PRINT MACRO in the Slicer 43 | description: The macros when start a print 44 | gcode: 45 | {% set macro = printer['gcode_macro _MACRO_VARIABLE']|default({}) %} 46 | # EXHAUST_FAN_OFF 47 | 48 | FILAMENT_SENSORS_DISABLE # Disable Filament Sensor and Encoder for purge line 49 | 50 | LOG_CPU_CLEAN 51 | SAVE_VARIABLE VARIABLE=power_resume_z VALUE=0 52 | TIMER_OFF 53 | CLEAR_PAUSE 54 | RUN_SHELL_COMMAND CMD=LOG_CPU_START 55 | SAVE_LAST_FILE # Recall as last MACRO in slicer: needed to generate PLR gcode without purge column in the Start Gcode of slicer 56 | 57 | 58 | 59 | 60 | 61 | # ORCA SLICER 62 | {% set BED_TEMP = params.BED_TEMP|default(70)|int %} 63 | {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(225)|int %} 64 | 65 | # Heat nozzle for probing 66 | M104 S{EXTRUDER_TEMP} 67 | # Heat bed for probing 68 | M140 S{BED_TEMP} 69 | 70 | HOMING_IF_NOT 71 | ####### 72 | PRECISE_HOMING 73 | G1 Z10 F5000 74 | 75 | Z_TILT_ADJUST 76 | 77 | Z_SAFE Z=50 # Height "brush in your hand" 78 | # PARK FOR HEATING 79 | _TOOLHEAD_PARK_PAUSE_CANCEL 80 | # G1 X0 Y0 Z5 F{macro.speed_move*60} 81 | 82 | DISABLE_EXTRUDER 83 | 84 | # Heat nozzle for probing 85 | M109 S{EXTRUDER_TEMP} 86 | # Heat bed for probing 87 | M190 S{BED_TEMP} 88 | 89 | MESH_PRINT # KAMP MESH 90 | DISABLE_EXTRUDER 91 | LINE_PURGE # KAMP PURGE 92 | DISABLE_EXTRUDER 93 | # PURGE_LOAD_FILAMENT 94 | # PURGE_LINE 95 | 96 | LAST_START_PRINT ; Enable PLR, Encoder etc 97 | 98 | [gcode_macro LAST_START_PRINT] 99 | description: The last macros after START_PRINT 100 | gcode: 101 | {% set macro = printer['gcode_macro _MACRO_VARIABLE']|default({}) %} 102 | 103 | FILAMENT_SENSORS_RESTORE # RESTORE FILAMENT SWITCH ENCODER AFTER PURGE 104 | 105 | 106 | [gcode_macro PURGE_LOAD_FILAMENT] 107 | gcode: 108 | {% set macro = printer['gcode_macro _MACRO_VARIABLE']|default({}) %} 109 | M118 Purging... 110 | M117 Purging... 111 | # LOAD FILAMENT 112 | G90 113 | G92 E0 114 | G1 X{macro.purge_park_x} Y{macro.purge_park_x} 115 | G1 E{macro.start_purge_long_lenght} F{macro.start_purge_long_speed} 116 | G92 E0 117 | G4 P4000 118 | G1 E{macro.start_purge_short_lenght} F{macro.start_purge_short_speed} 119 | G92 E0 120 | G11 121 | G11 122 | G1 E-3 F{macro.start_purge_long_speed} 123 | G92 E0 124 | 125 | [gcode_macro PURGE_LINE] 126 | gcode: 127 | {% set macro = printer['gcode_macro _MACRO_VARIABLE']|default({}) %} 128 | M118 Purging... 129 | M117 Purging... 130 | 131 | # PURGE LINE 132 | G1 Z1 F5000 133 | # SET_VELOCITY_LIMIT ACCEL=500 ACCEL_TO_DECEL=250 134 | G90 135 | G1 Z1 136 | G92 E0 137 | M83 138 | G1 X0 Y0 F12000 139 | G1 Z.32 140 | G1 F2400 141 | G1 X275 Y0 E15 142 | G92 E0 143 | G1 Z.64 144 | G1 X1 Y0 E12 F12000 145 | G1 Z0 146 | G92 E0 147 | G11 148 | G1 Z3 F3000 149 | G92 E0 150 | 151 | [gcode_macro MESH_PRINT] 152 | gcode: 153 | # Mesh for print 154 | # Set Accel for Bed Mesh 155 | SET_VELOCITY_LIMIT ACCEL=3000 156 | # SET_VELOCITY_LIMIT ACCEL_TO_DECEL=3000 157 | M118 MESH Temporanea 158 | 159 | {% if not printer.bed_mesh.profiles.print %} 160 | BED_MESH_CALIBRATE PROFILE="print" 161 | {% else %} 162 | M118 Bed Mesh "print" present 163 | {% endif %} 164 | 165 | 166 | 167 | 168 | [gcode_macro END_PRINT] # Recall as END PRINT MACRO in the Slicer 169 | description: The macros when end a print 170 | gcode: 171 | {% set macro = printer['gcode_macro _MACRO_VARIABLE']|default({}) %} 172 | {% set x_min = printer.toolhead.axis_minimum.x %} 173 | {% set y_min = printer.toolhead.axis_minimum.y %} 174 | {% set x_med = printer.toolhead.axis_maximum.x / 2 %} 175 | {% set y_med = printer.toolhead.axis_maximum.y / 2 %} 176 | {% set x_max = printer.toolhead.axis_maximum.x %} 177 | {% set y_max = printer.toolhead.axis_maximum.y %} 178 | G0 X{x_max} Y{y_max} F18000 # Avoid last blob 179 | 180 | M118 Z SAFE 181 | Z_SAFE ; Raise Z more 182 | 183 | # _TOOLHEAD_PARK_PAUSE_CANCEL 184 | 185 | # Short Retract 186 | M118 Short retract 187 | G91 ; Relative positioning 188 | # Retract short 189 | G1 E-{macro.start_purge_short_lenght} F{macro.start_purge_short_speed*60} 190 | DISABLE_EXTRUDER 191 | # G10 ; Firmware Retraction 192 | G92 E0 193 | 194 | 195 | 196 | # Go to center 197 | # M118 Go to center 198 | 199 | G90 200 | # G1 X{macro.cooling_park_x} Y{macro.cooling_park_x} F{macro.speed_move*6} 201 | G1 X{x_max} Y{y_max} F{macro.speed_move*6} 202 | 203 | M118 Motor OFF 204 | M18 ; Klipper disables All Motors 205 | M84 ; Klipper disables All Motors 206 | 207 | # Cooldown 20% 208 | # M118 Cooling at center 209 | # M106 S26 ; Fan 10% 210 | 211 | G4 P1000 ; pause between retractions 212 | 213 | M118 Long retract 214 | # Retract long 215 | G1 E-{macro.start_purge_long_lenght} F{macro.start_purge_long_speed*60} 216 | 217 | DISABLE_EXTRUDER 218 | 219 | # Cooldown 220 | M118 Turn Off Heaters 221 | TURN_OFF_HEATERS 222 | # M106 S51 ; Fan 20% 223 | 224 | 225 | TIMELAPSE_RENDER ; Webcam 226 | G4 P10000 ; pause cooldown 227 | M107 ; Turn-off fan 228 | 229 | # SET_FAN_SPEED FAN=RSCS SPEED=0 230 | # end_tune ; Beeper 231 | 232 | 233 | # Remove Mesh "print" 234 | # BED_MESH_PROFILE REMOVE="print" 235 | 236 | clear_last_file # PLR 237 | 238 | 239 | RUN_SHELL_COMMAND CMD=LOG_CPU_STOP 240 | # WEBCAM_OFF 241 | 242 | 243 | # M118 Clean Air 244 | # EXHAUST_FAN_ON 245 | # EXHAUST_FAN_ON EXHAUST_TIME=120 246 | 247 | M118 Printing finished 248 | TIMER_ON 249 | 250 | SAVE_PENDING 251 | 252 | -------------------------------------------------------------------------------- /z_filament_switch_unload.cfg: -------------------------------------------------------------------------------- 1 | # Use a switch as filament runnout sensor 2 | # Use a swithc for manual unload filament 3 | 4 | # Need [virtual_sdcard] and PAUSE macro in mainsail.cfg 5 | 6 | [respond] 7 | default_type: echo 8 | 9 | [delayed_gcode clear_display] 10 | gcode: 11 | M117 # clear display message 12 | 13 | 14 | # needed for manual filament load/unload 15 | [force_move] 16 | enable_force_move: True 17 | 18 | 19 | ################################################## 20 | # Macro Manual Load/Unload Filament with a switch 21 | ################################################## 22 | 23 | [gcode_button fil_load] 24 | pin: PA11 # PIN switch to load filament 25 | release_gcode: 26 | {% if (printer.print_stats.state != "printing")%} 27 | filament_load 28 | {% else %} 29 | M117 Printing, can't load now! 30 | M118 Printing, can't load now! 31 | {% endif %} 32 | press_gcode: # do not add macro here 33 | 34 | [gcode_button fil_unload] 35 | pin: PA10 # PIN switch to unload filament 36 | release_gcode: 37 | {% if (printer.print_stats.state != "printing")%} 38 | filament_unload 39 | {% else %} 40 | M117 Printing, can't unload now! 41 | M118 Printing, can't unload now! 42 | {% endif %} 43 | press_gcode: # do not add macro here 44 | 45 | 46 | 47 | ######################################## 48 | # Filament runnout sensor with a switch 49 | ######################################## 50 | 51 | [gcode_button fil_runnout] 52 | pin: PA9 ######## PIN FILAMENT SENSOR SWITCH ######## 53 | press_gcode: # FILAMENT NOT DETECTED 54 | {% if (printer.print_stats.state == "printing") %} 55 | filament_change_state1 56 | {% endif %} 57 | UPDATE_DELAYED_GCODE ID=clear_loadbusy DURATION=2 58 | UPDATE_DELAYED_GCODE ID=clear_unloadbusy DURATION=2 59 | SET_GCODE_VARIABLE MACRO=filament_unload VARIABLE=filamentpresent VALUE=0 60 | 61 | release_gcode: # Macro when reload filament, switch pressed after runnout 62 | {% if (printer.print_stats.state != "printing") %} 63 | filament_load 64 | {% else %} 65 | M117 Printing! Can't load filament right now! 66 | M118 Printing! Can't load filament right now! 67 | UPDATE_DELAYED_GCODE ID=clear_display DURATION=10 68 | {% endif %} 69 | SET_GCODE_VARIABLE MACRO=filament_unload VARIABLE=filamentpresent VALUE=1 70 | UPDATE_DELAYED_GCODE ID=clear_changebusy DURATION=2 71 | 72 | # PAUSE and ALERT 73 | [gcode_macro filament_change_state1] 74 | variable_changebusy: 0 75 | gcode: 76 | {% if changebusy == 0 %} 77 | PAUSE 78 | SET_GCODE_VARIABLE MACRO=filament_change_state1 VARIABLE=changebusy VALUE=1 79 | M118 Filament runnout! 80 | M117 Filament runnout! 81 | filament_change_state2 # comment this to avoid automatically unload filament when runnout detected. 82 | {% else %} 83 | {% endif %} 84 | 85 | [delayed_gcode clear_changebusy] 86 | gcode: 87 | SET_GCODE_VARIABLE MACRO=filament_change_state1 VARIABLE=changebusy VALUE=0 88 | # M118 Clear Load busy! 89 | 90 | # BEEP, ALERT, HEAT and UNLOAD FILAMENT 91 | [gcode_macro filament_change_state2] 92 | gcode: 93 | SET_GCODE_VARIABLE MACRO=filament_load VARIABLE=loadbusy VALUE=1 94 | #M300 # Your BEEPER macro 95 | M118 Unloading filament... 96 | M117 Unloading filament... 97 | M83 98 | G92 E0 99 | 100 | # {% if printer[printer.toolhead.extruder].temperature < 240 %} 101 | # CHECK or SET minimum extrusion temperature 102 | {% if (printer.extruder.can_extrude|lower != 'true') or (printer.extruder.target == 0) %} 103 | M118 Hotend heating! 104 | M109 S240 T0 ###### set temperature to 240 ##### 105 | {% endif %} 106 | 107 | G0 E-5 F3600 #extract filament to cold end 108 | G4 P2000 # wait for two seconds 109 | G0 E4.5 F3600 # push the filament back 110 | G0 E-5 F3600 #extract filament to cold end 111 | G0 E-60 F300 # continue extraction slow allow filament to be cooled enough before reaches the gears 112 | M400 113 | M117 Load new filament, then resume. 114 | M118 Load new filament, then resume. 115 | #SET_GCODE_VARIABLE MACRO=filament_load VARIABLE=loadbusy VALUE=0 116 | UPDATE_DELAYED_GCODE ID=clear_loadbusy DURATION=2.5 # wait to remove filament before reload 117 | 118 | 119 | ######################################## 120 | # Filament load 121 | ######################################## 122 | 123 | [gcode_macro filament_load] 124 | variable_loadbusy: 0 125 | gcode: 126 | {% if loadbusy == 0 %} 127 | SET_GCODE_VARIABLE MACRO=filament_load VARIABLE=loadbusy VALUE=1 128 | SET_GCODE_VARIABLE MACRO=filament_unload VARIABLE=unloadbusy VALUE=1 129 | 130 | # CHECK or SET minimum extrusion temperature 131 | {% if printer.extruder.can_extrude|lower != 'true' %} 132 | M104 S235 T0 # set temp and wait. 133 | {% endif %} 134 | 135 | #M300 # Your BEEPER macro 136 | M117 Filament loading! 137 | M118 Filament loading! 138 | M82 # extruder absolute movement 139 | G92 E0 # extruder start from 0 140 | G4 P2000 # wait in ms 141 | FORCE_MOVE STEPPER=extruder DISTANCE=15 VELOCITY=5 ACCEL=1000 142 | 143 | # CHECK or SET minimum extrusion temperature 144 | {% if printer.extruder.can_extrude|lower != 'true' %} 145 | M118 Hotend heating! 146 | M109 S240 T0 ###### set temperature to 240 ##### 147 | {% endif %} 148 | 149 | G1 E150 F300 # extrude 150mm 150 | M400 151 | 152 | {% if (printer.print_stats.state != "printing") and (printer.print_stats.state != "paused")%} 153 | M104 S0 T0 # Cooldown if not printing or paused 154 | {% endif %} 155 | 156 | M117 Filament loaded! 157 | M118 Filament loaded! 158 | UPDATE_DELAYED_GCODE ID=clear_display DURATION=10 159 | UPDATE_DELAYED_GCODE ID=clear_unloadbusy DURATION=2 160 | {% else %} 161 | M118 Filament already loaded! 162 | {% endif %} 163 | 164 | 165 | [delayed_gcode set_loadbusy] 166 | gcode: 167 | SET_GCODE_VARIABLE MACRO=filament_load VARIABLE=loadbusy VALUE=1 168 | #M118 Set Load busy! 169 | 170 | 171 | [delayed_gcode clear_loadbusy] 172 | gcode: 173 | SET_GCODE_VARIABLE MACRO=filament_load VARIABLE=loadbusy VALUE=0 174 | #M118 Clear Load busy! 175 | 176 | ######################################## 177 | # Filament unload 178 | ######################################## 179 | 180 | [gcode_macro filament_unload] 181 | variable_unloadbusy: 0 182 | variable_filamentpresent: 0 183 | gcode: 184 | #{% if unloadbusy == 0 and filamentpresent == 1 %} 185 | {% if unloadbusy == 0 %} 186 | SET_GCODE_VARIABLE MACRO=filament_unload VARIABLE=unloadbusy VALUE=1 187 | SET_GCODE_VARIABLE MACRO=filament_load VARIABLE=loadbusy VALUE=1 188 | #M300 # Your BEEPER macro 189 | M118 Filament unloading! 190 | M117 Filament unloading! 191 | M83 192 | G92 E0 193 | 194 | # CHECK or SET minimum extrusion temperature 195 | {% if (printer.extruder.can_extrude|lower != 'true') or (printer.extruder.target == 0)%} 196 | M118 Hotend heating! 197 | M109 S240 T0 ###### set temperature to 240 ##### 198 | {% endif %} 199 | 200 | G0 E-5 F3600 # move 5mm of filament to a cold zone 201 | G4 P2000 # wait 2s 202 | G0 E4.5 F3600 # extrude a bit 203 | G0 E-5 F3600 # retract again 204 | G0 E-60 F300 # retract slowly to cool 205 | M104 S0 T0 # Cooldown 206 | M400 207 | M118 Filament unloaded! 208 | M117 Filament unloaded! 209 | 210 | #SET_GCODE_VARIABLE MACRO=filament_load VARIABLE=loadbusy VALUE=0 211 | UPDATE_DELAYED_GCODE ID=clear_display DURATION=10 212 | {% else %} 213 | M118 Already unloaded! 214 | {% endif %} 215 | 216 | 217 | [delayed_gcode clear_unloadbusy] 218 | gcode: 219 | SET_GCODE_VARIABLE MACRO=filament_unload VARIABLE=unloadbusy VALUE=0 220 | #M118 Clear Unload busy! 221 | -------------------------------------------------------------------------------- /z_filament_switch_loop_unload.cfg.cfg: -------------------------------------------------------------------------------- 1 | # Use a switch as filament runnout sensor 2 | # Use a swithc for manual unload filament 3 | 4 | # Need [virtual_sdcard] and PAUSE macro in mainsail.cfg 5 | 6 | [respond] 7 | default_type: echo 8 | 9 | [delayed_gcode clear_display] 10 | gcode: 11 | M117 # clear display message 12 | 13 | 14 | # needed for manual filament load/unload 15 | [force_move] 16 | enable_force_move: True 17 | 18 | 19 | ################################################## 20 | # Macro Manual Load/Unload Filament with a switch 21 | ################################################## 22 | 23 | [gcode_button fil_unload] # VERDE 24 | pin: !PE6 # PIN switch to unload filament - PULSANTE VERDE 25 | # release_gcode: 26 | press_gcode: # do not add macro here 27 | M117 PULSANTE VERDE PREMUTO 28 | M118 PULSANTE VERDE PREMUTO 29 | UPDATE_DELAYED_GCODE ID=LOOP_FIL_UNLOAD DURATION=2 30 | 31 | [delayed_gcode LOOP_FIL_UNLOAD] 32 | initial_duration: 0 # Set 0 to interrupt the timeout ? 33 | gcode: 34 | M117 Loop partito 35 | M118 Loop partito 36 | # {% if pin_status.PA15 %} ### ROMPE LE PALLE 37 | {% if (printer.print_stats.state != "printing")%} 38 | M118 Not Printing! 39 | M117 Not Printing! 40 | M83 # Estrusore relativo 41 | G92 E0 # Reset Extruder 42 | # CHECK or SET minimum extrusion temperature 43 | {% if (printer.extruder.can_extrude|lower != 'true') or (printer.extruder.target == 0)%} 44 | M118 Hotend heating! 45 | M109 S240 T0 ###### set temperature to 240 ##### 46 | {% endif %} 47 | #G0 E-5 F500 # move 5mm of filament to a cold zone 48 | # G4 P2000 # wait 2s 49 | # G0 E4.5 F500 # extrude a bit 50 | #G0 E-5 F500 # retract again 51 | G0 E-10 F300 # RETRACT 10mm 52 | # M104 S0 T0 # Cooldown 53 | M400 # WAIT MOVEMENTS 54 | M118 Filament unloading! 55 | M117 Filament unloading! 56 | {% else %} # IF PRINTING 57 | M118 Printing! 58 | M117 Printing! 59 | UPDATE_DELAYED_GCODE ID=LOOP_FIL_UNLOAD DURATION=0 # 60 | {% endif %} 61 | # {% else %} 62 | M117 Filament unloaded! 63 | M118 Filament unloaded! 64 | UPDATE_DELAYED_GCODE ID=LOOP_FIL_UNLOAD DURATION=2 # ripeti tra 2 secondi 65 | # {% endif %} 66 | 67 | 68 | 69 | [gcode_button fil_load] 70 | pin: PA2 # PIN switch to load filament - BOTTONE ROSSO 71 | 72 | # release_gcode: 73 | 74 | press_gcode: # do not add macro here 75 | {% if (printer.print_stats.state != "printing")%} 76 | # CHECK or SET minimum extrusion temperature 77 | {% if printer.extruder.can_extrude|lower != 'true' %} 78 | M118 Hotend heating! 79 | M104 S100 T0 # set temp and wait. 80 | {% endif %} 81 | 82 | #M300 # Your BEEPER macro 83 | M117 Filament loading! 84 | M118 Filament loading! 85 | M82 # extruder absolute movement 86 | G92 E0 # extruder start from 0 87 | # G4 P2000 # wait in ms 88 | #FORCE_MOVE STEPPER=extruder DISTANCE=15 VELOCITY=5 ACCEL=1000 89 | G1 E10 F300 # extrude 150mm 90 | # M400 91 | M117 Filament loaded! 92 | M118 Filament loaded! 93 | {% else %} 94 | M117 Printing, can't load now! 95 | M118 Printing, can't load now! 96 | {% endif %} 97 | 98 | 99 | 100 | 101 | ######################################## 102 | # Filament runnout sensor with a switch 103 | ######################################## 104 | 105 | 106 | # PAUSE and ALERT 107 | [gcode_macro filament_change_state1] 108 | variable_changebusy: 0 109 | gcode: 110 | {% if changebusy == 0 %} 111 | PAUSE 112 | SET_GCODE_VARIABLE MACRO=filament_change_state1 VARIABLE=changebusy VALUE=1 113 | M118 Filament runnout! 114 | M117 Filament runnout! 115 | filament_change_state2 # comment this to avoid automatically unload filament when runnout detected. 116 | {% else %} 117 | {% endif %} 118 | 119 | [delayed_gcode clear_changebusy] 120 | gcode: 121 | SET_GCODE_VARIABLE MACRO=filament_change_state1 VARIABLE=changebusy VALUE=0 122 | # M118 Clear Load busy! 123 | 124 | # BEEP, ALERT, HEAT and UNLOAD FILAMENT 125 | [gcode_macro filament_change_state2] 126 | gcode: 127 | SET_GCODE_VARIABLE MACRO=filament_load VARIABLE=loadbusy VALUE=1 128 | #M300 # Your BEEPER macro 129 | M118 Unloading filament... 130 | M117 Unloading filament... 131 | M83 132 | G92 E0 133 | 134 | # {% if printer[printer.toolhead.extruder].temperature < 240 %} 135 | # CHECK or SET minimum extrusion temperature 136 | {% if (printer.extruder.can_extrude|lower != 'true') or (printer.extruder.target == 0) %} 137 | M118 Hotend heating! 138 | M109 S100 T0 ###### set temperature to 240 ##### 139 | {% endif %} 140 | 141 | G0 E-5 F3600 #extract filament to cold end 142 | G4 P2000 # wait for two seconds 143 | G0 E4.5 F3600 # push the filament back 144 | G0 E-5 F3600 #extract filament to cold end 145 | G0 E-60 F300 # continue extraction slow allow filament to be cooled enough before reaches the gears 146 | M400 147 | M117 Load new filament, then resume. 148 | M118 Load new filament, then resume. 149 | #SET_GCODE_VARIABLE MACRO=filament_load VARIABLE=loadbusy VALUE=0 150 | UPDATE_DELAYED_GCODE ID=clear_loadbusy DURATION=2.5 # wait to remove filament before reload 151 | 152 | 153 | ######################################## 154 | # Filament load 155 | ######################################## 156 | 157 | [gcode_macro filament_load] 158 | variable_loadbusy: 0 159 | gcode: 160 | {% if loadbusy == 0 %} 161 | SET_GCODE_VARIABLE MACRO=filament_load VARIABLE=loadbusy VALUE=1 162 | SET_GCODE_VARIABLE MACRO=filament_unload VARIABLE=unloadbusy VALUE=1 163 | 164 | # CHECK or SET minimum extrusion temperature 165 | {% if printer.extruder.can_extrude|lower != 'true' %} 166 | M118 Hotend heating! 167 | M104 S100 T0 # set temp and wait. 168 | {% endif %} 169 | 170 | #M300 # Your BEEPER macro 171 | M117 Filament loading! 172 | M118 Filament loading! 173 | M82 # extruder absolute movement 174 | G92 E0 # extruder start from 0 175 | G4 P2000 # wait in ms 176 | FORCE_MOVE STEPPER=extruder DISTANCE=15 VELOCITY=5 ACCEL=1000 177 | 178 | # CHECK or SET minimum extrusion temperature 179 | {% if printer.extruder.can_extrude|lower != 'true' %} 180 | M118 Hotend heating! 181 | M109 S100 T0 ###### set temperature to 240 ##### 182 | {% endif %} 183 | 184 | G1 E150 F300 # extrude 150mm 185 | M400 186 | 187 | {% if (printer.print_stats.state != "printing") and (printer.print_stats.state != "paused")%} 188 | M104 S0 T0 # Cooldown if not printing or paused 189 | {% endif %} 190 | 191 | M117 Filament loaded! 192 | M118 Filament loaded! 193 | UPDATE_DELAYED_GCODE ID=clear_display DURATION=10 194 | UPDATE_DELAYED_GCODE ID=clear_unloadbusy DURATION=2 195 | {% else %} 196 | M118 Filament already loaded! 197 | {% endif %} 198 | SET_GCODE_VARIABLE MACRO=filament_unload VARIABLE=filamentpresent VALUE=1 199 | UPDATE_DELAYED_GCODE ID=clear_changebusy DURATION=2 200 | 201 | [delayed_gcode set_loadbusy] 202 | gcode: 203 | SET_GCODE_VARIABLE MACRO=filament_load VARIABLE=loadbusy VALUE=1 204 | #M118 Set Load busy! 205 | 206 | 207 | [delayed_gcode clear_loadbusy] 208 | gcode: 209 | SET_GCODE_VARIABLE MACRO=filament_load VARIABLE=loadbusy VALUE=0 210 | #M118 Clear Load busy! 211 | 212 | ######################################## 213 | # Filament unload 214 | ######################################## 215 | 216 | [gcode_macro filament_unload] 217 | variable_unloadbusy: 0 218 | variable_filamentpresent: 0 219 | gcode: 220 | #{% if unloadbusy == 0 and filamentpresent == 1 %} 221 | {% if unloadbusy == 0 %} 222 | SET_GCODE_VARIABLE MACRO=filament_unload VARIABLE=unloadbusy VALUE=1 223 | SET_GCODE_VARIABLE MACRO=filament_load VARIABLE=loadbusy VALUE=1 224 | #M300 # Your BEEPER macro 225 | M118 Filament unloading! 226 | M117 Filament unloading! 227 | M83 228 | G92 E0 229 | 230 | # CHECK or SET minimum extrusion temperature 231 | {% if (printer.extruder.can_extrude|lower != 'true') or (printer.extruder.target == 0)%} 232 | M118 Hotend heating! 233 | M109 S100 T0 ###### set temperature to 240 ##### 234 | {% endif %} 235 | 236 | G0 E-5 F500 # move 5mm of filament to a cold zone 237 | G4 P2000 # wait 2s 238 | G0 E4.5 F500 # extrude a bit 239 | G0 E-5 F500 # retract again 240 | G0 E-60 F300 # retract slowly to cool 241 | M104 S0 T0 # Cooldown 242 | M400 243 | M118 Filament unloaded! 244 | M117 Filament unloaded! 245 | 246 | SET_GCODE_VARIABLE MACRO=filament_load VARIABLE=loadbusy VALUE=0 247 | UPDATE_DELAYED_GCODE ID=clear_display DURATION=10 248 | {% else %} 249 | M118 Already unloaded! 250 | {% endif %} 251 | 252 | 253 | [delayed_gcode clear_unloadbusy] 254 | gcode: 255 | SET_GCODE_VARIABLE MACRO=filament_unload VARIABLE=unloadbusy VALUE=0 256 | #M118 Clear Unload busy! 257 | -------------------------------------------------------------------------------- /mainsail.cfg: -------------------------------------------------------------------------------- 1 | ## Client klipper macro definitions 2 | ## 3 | ## Copyright (C) 2022 Alex Zellner 4 | ## 5 | ## This file may be distributed under the terms of the GNU GPLv3 license 6 | ## 7 | ## !!! This file is read-only. Maybe the used editor indicates that. !!! 8 | ## 9 | ## Customization: 10 | ## 1) copy the gcode_macro _CLIENT_VARIABLE (see below) to your printer.cfg 11 | ## 2) remove the comment mark (#) from all lines 12 | ## 3) change any value in there to your needs 13 | ## 14 | ## Use the PAUSE macro direct in your M600: 15 | ## e.g. with a different park position front left and a minimal height of 50 16 | ## [gcode_macro M600] 17 | ## description: Filament change 18 | ## gcode: PAUSE X=10 Y=10 Z_MIN=50 19 | ## Z_MIN will park the toolhead at a minimum of 50 mm above to bed to make it easier for you to swap filament. 20 | ## 21 | ## Client variable macro for your printer.cfg 22 | #[gcode_macro _CLIENT_VARIABLE] 23 | #variable_use_custom_pos : False ; use custom park coordinates for x,y [True/False] 24 | #variable_custom_park_x : 0.0 ; custom x position; value must be within your defined min and max of X 25 | #variable_custom_park_y : 0.0 ; custom y position; value must be within your defined min and max of Y 26 | #variable_custom_park_dz : 2.0 ; custom dz value; the value in mm to lift the nozzle when move to park position 27 | #variable_retract : 1.0 ; the value to retract while PAUSE 28 | #variable_cancel_retract : 5.0 ; the value to retract while CANCEL_PRINT 29 | #variable_speed_retract : 35.0 ; retract speed in mm/s 30 | #variable_unretract : 1.0 ; the value to unretract while RESUME 31 | #variable_speed_unretract : 35.0 ; unretract speed in mm/s 32 | #variable_speed_hop : 15.0 ; z move speed in mm/s 33 | #variable_speed_move : 100.0 ; move speed in mm/s 34 | #variable_park_at_cancel : False ; allow to move the toolhead to park while execute CANCEL_PRINT [True/False] 35 | #variable_park_at_cancel_x : None ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True 36 | #variable_park_at_cancel_y : None ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True 37 | ## !!! Caution [firmware_retraction] must be defined in the printer.cfg if you set use_fw_retract: True !!! 38 | #variable_use_fw_retract : False ; use fw_retraction instead of the manual version [True/False] 39 | #gcode: 40 | 41 | [virtual_sdcard] 42 | path: ~/printer_data/gcodes 43 | on_error_gcode: CANCEL_PRINT 44 | 45 | [pause_resume] 46 | 47 | [display_status] 48 | 49 | [gcode_macro CANCEL_PRINT] 50 | description: Cancel the actual running print 51 | rename_existing: CANCEL_PRINT_BASE 52 | gcode: 53 | ##### get user parameters or use default ##### 54 | {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} 55 | {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} 56 | {% set allow_park = False if not macro_found 57 | else False if client.park_at_cancel is not defined 58 | else True if client.park_at_cancel|lower == 'true' 59 | else False %} 60 | {% set retract = 5.0 if not macro_found else client.cancel_retract|default(5.0)|abs %} 61 | ##### define park position ##### 62 | {% set park_x = "" if not macro_found 63 | else "" if client.park_at_cancel_x is not defined 64 | else "X=" + client.park_at_cancel_x|string if client.park_at_cancel_x is not none %} 65 | {% set park_y = "" if not macro_found 66 | else "" if client.park_at_cancel_y is not defined 67 | else "Y=" + client.park_at_cancel_y|string if client.park_at_cancel_y is not none %} 68 | {% set custom_park = True if (park_x|length > 0 or park_y|length > 0) else False %} 69 | ##### end of definitions ##### 70 | {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %} 71 | _CLIENT_RETRACT LENGTH={retract} 72 | TURN_OFF_HEATERS 73 | M106 S0 74 | # clear pause_next_layer and pause_at_layer as preparation for next print 75 | SET_PAUSE_NEXT_LAYER ENABLE=0 76 | SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0 77 | CANCEL_PRINT_BASE 78 | 79 | [gcode_macro PAUSE] 80 | description: Pause the actual running print 81 | rename_existing: PAUSE_BASE 82 | gcode: 83 | SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{printer[printer.toolhead.extruder].target}" 84 | 85 | PAUSE_BASE 86 | _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams} 87 | 88 | [gcode_macro RESUME] 89 | description: Resume the actual running print 90 | rename_existing: RESUME_BASE 91 | variable_last_extruder_temp: 0 92 | gcode: 93 | ##### get user parameters or use default ##### 94 | {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} 95 | {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} 96 | {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} 97 | {% set sp_move = velocity if not macro_found else client.speed_move|default(velocity) %} 98 | ##### end of definitions ##### 99 | M109 S{last_extruder_temp} 100 | 101 | _CLIENT_EXTRUDE 102 | RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)} 103 | 104 | # Usage: SET_PAUSE_NEXT_LAYER [ENABLE=[0|1]] [MACRO=] 105 | [gcode_macro SET_PAUSE_NEXT_LAYER] 106 | description: Enable a pause if the next layer is reached 107 | gcode: 108 | {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %} 109 | {% set ENABLE = params.ENABLE | default(1) | int != 0 %} 110 | {% set MACRO = params.MACRO | default(pause_next_layer.call, True) %} 111 | SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}" 112 | 113 | # Usage: SET_PAUSE_AT_LAYER [ENABLE=[0|1]] [LAYER=] [MACRO=] 114 | [gcode_macro SET_PAUSE_AT_LAYER] 115 | description: Enable/disable a pause if a given layer number is reached 116 | gcode: 117 | {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %} 118 | {% set ENABLE = params.ENABLE | int != 0 if params.ENABLE is defined 119 | else params.LAYER is defined %} 120 | {% set LAYER = params.LAYER | default(pause_at_layer.layer) | int %} 121 | {% set MACRO = params.MACRO | default(pause_at_layer.call, True) %} 122 | SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}" 123 | 124 | # Usage: SET_PRINT_STATS_INFO [TOTAL_LAYER=] [CURRENT_LAYER= ] 125 | [gcode_macro SET_PRINT_STATS_INFO] 126 | rename_existing: SET_PRINT_STATS_INFO_BASE 127 | description: Overwrite, to get pause_next_layer and pause_at_layer feature 128 | variable_pause_next_layer: { 'enable': False, 'call': "PAUSE" } 129 | variable_pause_at_layer : { 'enable': False, 'layer': 0, 'call': "PAUSE" } 130 | gcode: 131 | {% if pause_next_layer.enable %} 132 | {action_respond_info("%s, forced by pause_next_layer" % pause_next_layer.call)} 133 | {pause_next_layer.call} ; execute the given gcode to pause, should be either M600 or PAUSE 134 | SET_PAUSE_NEXT_LAYER ENABLE=0 135 | {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %} 136 | {action_respond_info("%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer))} 137 | {pause_at_layer.call} ; execute the given gcode to pause, should be either M600 or PAUSE 138 | SET_PAUSE_AT_LAYER ENABLE=0 139 | {% endif %} 140 | SET_PRINT_STATS_INFO_BASE {rawparams} 141 | 142 | ##### internal use ##### 143 | [gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL] 144 | description: Helper: park toolhead used in PAUSE and CANCEL_PRINT 145 | gcode: 146 | ##### get user parameters or use default ##### 147 | {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} 148 | {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} 149 | {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} 150 | {% set use_custom = False if not macro_found 151 | else False if client.use_custom_pos is not defined 152 | else True if client.use_custom_pos|lower == 'true' 153 | else False %} 154 | {% set custom_park_x = 0.0 if not macro_found else client.custom_park_x|default(0.0) %} 155 | {% set custom_park_y = 0.0 if not macro_found else client.custom_park_y|default(0.0) %} 156 | {% set park_dz = 2.0 if not macro_found else client.custom_park_dz|default(2.0)|abs %} 157 | {% set sp_hop = 900 if not macro_found else client.speed_hop|default(15) * 60 %} 158 | {% set sp_move = velocity * 60 if not macro_found else client.speed_move|default(velocity) * 60 %} 159 | ##### get config and toolhead values ##### 160 | {% set origin = printer.gcode_move.homing_origin %} 161 | {% set act = printer.gcode_move.gcode_position %} 162 | {% set max = printer.toolhead.axis_maximum %} 163 | {% set cone = printer.toolhead.cone_start_z|default(max.z) %} ; height as long the toolhead can reach max and min of an delta 164 | {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch'] 165 | else False %} 166 | ##### define park position ##### 167 | {% set z_min = params.Z_MIN|default(0)|float %} 168 | {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %} 169 | {% set x_park = params.X if params.X is defined 170 | else custom_park_x if use_custom 171 | else 0.0 if round_bed 172 | else (max.x - 5.0) %} 173 | {% set y_park = params.Y if params.Y is defined 174 | else custom_park_y if use_custom 175 | else (max.y - 5.0) if round_bed and z_park < cone 176 | else 0.0 if round_bed 177 | else (max.y - 5.0) %} 178 | ##### end of definitions ##### 179 | _CLIENT_RETRACT 180 | {% if "xyz" in printer.toolhead.homed_axes %} 181 | G90 182 | G1 Z{z_park} F{sp_hop} 183 | G1 X{x_park} Y{y_park} F{sp_move} 184 | {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %} 185 | {% else %} 186 | {action_respond_info("Printer not homed")} 187 | {% endif %} 188 | 189 | [gcode_macro _CLIENT_EXTRUDE] 190 | description: Extrudes, if the extruder is hot enough 191 | gcode: 192 | {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} 193 | {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} 194 | {% set use_fw_retract = False if not macro_found 195 | else False if client.use_fw_retract is not defined 196 | else True if client.use_fw_retract|lower == 'true' and printer.firmware_retraction is defined 197 | else False %} 198 | 199 | {% set length = (params.LENGTH|float) if params.LENGTH is defined 200 | else 1.0 if not macro_found 201 | else client.unretract|default(1.0) %} 202 | 203 | {% set speed = params.SPEED if params.SPEED is defined 204 | else 35 if not macro_found 205 | else client.speed_unretract|default(35) %} 206 | 207 | {% set absolute_extrude = printer.gcode_move.absolute_extrude %} 208 | 209 | {% if printer.extruder.can_extrude %} 210 | {% if use_fw_retract %} 211 | {% if length < 0 %} 212 | G10 213 | {% else %} 214 | G11 215 | {% endif %} 216 | {% else %} 217 | M83 218 | G1 E{length} F{(speed|float|abs) * 60} 219 | {% if absolute_extrude %} 220 | M82 221 | {% endif %} 222 | {% endif %} 223 | {% else %} 224 | {action_respond_info("Extruder not hot enough")} 225 | {% endif %} 226 | 227 | [gcode_macro _CLIENT_RETRACT] 228 | description: Retracts, if the extruder is hot enough 229 | gcode: 230 | {% set macro_found = True if printer['gcode_macro _CLIENT_VARIABLE'] is defined else False %} 231 | {% set client = printer['gcode_macro _CLIENT_VARIABLE'] %} 232 | 233 | {% set length = (params.LENGTH|float) if params.LENGTH is defined 234 | else 1.0 if not macro_found 235 | else client.retract|default(1.0) %} 236 | 237 | {% set speed = params.SPEED if params.SPEED is defined 238 | else 35 if not macro_found 239 | else client.speed_retract|default(35) %} 240 | 241 | _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs} 242 | 243 | -------------------------------------------------------------------------------- /macro.cfg: -------------------------------------------------------------------------------- 1 | # https://github.com/Travis90x/Klipper-configuration/blob/main/printer.example.cfg 2 | 3 | ## INLCUDE WHAT YOU NEED IN YOUR PRINTER.CFG 4 | 5 | # Macro UPDATE_KLIPPER_CONFIGURATION - to update GIT & reinstall Klipper-configuration 6 | [include config/scripts/update/klipper-configuration/klipper-configuration.cfg] 7 | 8 | 9 | # ███╗ ███╗ █████╗ ██████╗██████╗ ██████╗ ███████╗ 10 | # ████╗ ████║██╔══██╗██╔════╝██╔══██╗██╔═══██╗██╔════╝ 11 | # ██╔████╔██║███████║██║ ██████╔╝██║ ██║███████╗ 12 | # ██║╚██╔╝██║██╔══██║██║ ██╔══██╗██║ ██║╚════██║ 13 | # ██║ ╚═╝ ██║██║ ██║╚██████╗██║ ██║╚██████╔╝███████║ 14 | # ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝ 15 | # 16 | 17 | # BEEPER 18 | # [include config/output/beeper.cfg] 19 | # [include config/macros/beeper.cfg] 20 | [board_pins beeper_pin] 21 | aliases: 22 | beeper_pin=PC5 23 | 24 | # BL Touch Tests 25 | [include config/macros/bl-touch.cfg] 26 | 27 | # CPU LOG 28 | [include config/scripts/cpu/cpu-log.cfg] # CPU log load 29 | 30 | # Custom Bed Mesh 31 | # [include config/macros/custom_bed_mesh.cfg] 32 | 33 | # Exclude Objects 34 | [include config/macros/exclude_object.cfg] 35 | 36 | # Extruder disable 37 | [include config/macros/extruder.cfg] 38 | 39 | # Fake Homing - Set Kinematic Position 40 | [include config/macros/fake_homing.cfg] 41 | 42 | # Homing only if not homed 43 | [include config/macros/homing_if_not.cfg] 44 | 45 | # INPUT SHAPING 46 | [include config/scripts/input-shaping/input-shaping.cfg] # Macro for Input Shaping 47 | [include config/scripts/input-shaping/shaper-graphs.cfg] # Shaper Graphs for Input Shaping 48 | 49 | # KLIPPERSCREEN ANDROID 50 | [include config/scripts/klipperscreen/klipperscreen-android.cfg] # Switch Klipperscreen USB adb or Wifi on Android 51 | 52 | # LED STRIP 53 | # [include config/neopixel/led.cfg] 54 | 55 | [board_pins led_strip] 56 | aliases: 57 | led_1_strip_pin=PE3 # Set the PWM Pin for LED Strip 58 | # Add in your START_PRINTER macro the command SET_PIN PIN=LED_Strip VALUE=5 # Set Led Strip at 5% 59 | 60 | # Mainsail Pause/Macro at/next layer 61 | [include config/macros/mainsail.cfg] 62 | 63 | # Multiple Homing for precise calibration 64 | [include config/macros/precise_homing.cfg] 65 | 66 | # Multiple Homing Override with Precise Homing 67 | # [include config/macros/homing_override.cfg] 68 | 69 | # PID Tuning 70 | [include config/macros/pid_tuning.cfg] 71 | 72 | # POWER LOSS RECOVERY 73 | [include config/scripts/power-loss-recovery/power-loss-recovery.cfg] # Power Loss Recovery 74 | 75 | # Set bed to sensor 76 | [include config/scripts/start/set_bed_to_sensor.cfg] 77 | 78 | # Silent Mode 79 | [include config/macros/silent_mode.cfg] 80 | 81 | # Speed Test 82 | [include config/macros/speed_test_delta.cfg] 83 | [include config/macros/speet_test_corexy.cfg] 84 | 85 | # TASMOTA 86 | [include config/scripts/timeout/tasmota.cfg] # SonOff tasmota turn on printer 87 | [include config/scripts/timeout/timeout.cfg] # Timeout turn off with SonOff tasmota 88 | # use UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK DURATION=300 in your START_PRINTER with the time you need 89 | 90 | # Tuning Towers - Accel, Temp, Retraction Distance, Retraction Speed, Pressure Advance 91 | [include config/macros/tuning_tower.cfg] 92 | 93 | # TVbox Temp 94 | [include config/boards/tvbox_temp.cfg] 95 | 96 | # USB 97 | [include config/scripts/usb/usb.cfg] # USB key mount & copy gcodes from "gcodes" folder in the root 98 | 99 | # Wait temp faster, with custom tolerance 100 | [include config/macros/wait_temp.cfg] 101 | 102 | # WEBCAM 103 | [include config/scripts/webcam/webcam-service.cfg] # Start & Stop Webcam Service: crowsnest & webcamd 104 | 105 | # WIFI 106 | [include config/scripts/wifi/wifi.cfg] # CHANGE DELETE SHOW WIFI 107 | 108 | 109 | 110 | 111 | # █████╗ ██████╗ ██╗ ██╗██╗ ██████╗ ██╗ ██╗███████╗ 112 | # ██╔══██╗██╔══██╗╚██╗██╔╝██║ ╚════██╗██║ ██║██╔════╝ 113 | # ███████║██║ ██║ ╚███╔╝ ██║ █████╔╝███████║███████╗ 114 | # ██╔══██║██║ ██║ ██╔██╗ ██║ ╚═══██╗╚════██║╚════██║ 115 | # ██║ ██║██████╔╝██╔╝ ██╗███████╗██████╔╝ ██║███████║ 116 | # ╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝ ╚═╝╚══════╝ 117 | # 118 | 119 | ## Enable this for ADXL345 with Bed 300x300 min_freq: 25 max_freq: 150 120 | # Or add the code of this CFG in your printer.cfg 121 | # [include config/adxl345/adxl345.cfg] 122 | 123 | 124 | ## Enable one of these for ADXL345 MCU 125 | 126 | # [include config/adxl345/raspberry.cfg] # Adxl345 connected to Raspberry 127 | # [include config/adxl345/rp2040/clkdiv.cfg] # Adxl345 connected to General RP2040 128 | # [include config/adxl345/rp2040/03H.cfg] # Adxl345 connected to RP2040 03H CHIP - https://travis90x.altervista.org/it/klipper-adxl345-raspberry-pi-rp2040-zero/ 129 | # [include config/adxl345/rp2040/fysetc.cfg] # FYSETC USB - https://github.com/FYSETC/FYSETC-PortableInputShaper 130 | # [include config/adxl345/rp2040/mellow.cfg] # MELLOW USB - https://it.aliexpress.com/i/1005005486458306.html?gatewayAdapt=glo2ita 131 | 132 | # ADXL on Octopus SPI3 133 | # [include config/adxl345/mcu/octopus/adxl_spi.cfg] 134 | 135 | # [include config/adxl345/rp2040/led.cfg] # Led RP2040 136 | # [include config/adxl345/rp2040/rp2040_temperature.cfg] # Temperature RP2040 137 | 138 | 139 | 140 | ###################################################################### 141 | # ███████╗██╗██╗ █████╗ ███╗ ███╗███████╗███╗ ██╗████████╗ 142 | # ██╔════╝██║██║ ██╔══██╗████╗ ████║██╔════╝████╗ ██║╚══██╔══╝ 143 | # █████╗ ██║██║ ███████║██╔████╔██║█████╗ ██╔██╗ ██║ ██║ 144 | # ██╔══╝ ██║██║ ██╔══██║██║╚██╔╝██║██╔══╝ ██║╚██╗██║ ██║ 145 | # ██║ ██║███████╗██║ ██║██║ ╚═╝ ██║███████╗██║ ╚████║ ██║ 146 | # ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═╝ 147 | # 148 | # Filament Runout or Encoder 149 | ###################################################################### 150 | 151 | ######### Buttons for manual Load Unload Filament ######### 152 | 153 | # Set PINS for your board 154 | # [board_pins filament_button] 155 | # button_load_pin= Your PIN, # Uncomment only if there is a dedicated "load button" (a button for manual load) 156 | # button_unload_pin= Your PIN # Uncomment only if there is a dedicated "unload button" (a button for manual unload) 157 | 158 | # FILAMENT BUTTON MACRO LOAD/UNLOAD # ( uncomment above button_load_pin button_unload_pin) 159 | # [include config/sensors/filament_runout/button_load.cfg] 160 | # [include config/sensors/filament_runout/button_unload.cfg] 161 | 162 | ############################################################# 163 | 164 | ############################# 165 | # SWITCH and/or ENCODER PINS 166 | ############################# 167 | 168 | # Set PINS for your board 169 | [board_pins filament_runout] 170 | aliases: 171 | # filament_switch_pin= Your PIN, # set your runnout switch PIN 172 | filament_encoder_pin=PF5, # set your encoder PIN 173 | 174 | [duplicate_pin_override] #needed for debug 175 | pins: 176 | filament_switch_pin, filament_encoder_pin, filament_unload, filament_load 177 | 178 | # ADVANCED LOAD UNLOAD PURGE FILAMENT # 179 | [include config/sensors/filament_runout/FILAMENT_LOAD.cfg] 180 | [include config/sensors/filament_runout/FILAMENT_UNLOAD.cfg] 181 | [include config/sensors/filament_runout/FILAMENT_PURGE.cfg] 182 | 183 | # SIMPLE LOAD UNLOAD - CHANGE FILAMENT: M600, M701, M702 (change during printing) 184 | [include config/sensors/filament_runout/filament_change.cfg] 185 | # [include config/sensors/filament_runout/simple_load_unload.cfg] 186 | 187 | 188 | # DEBUG MACRO # 189 | # Macro to Activate/Deactivate/Test Filament Sensor 190 | # [include config/sensors/filament_runout/debug_sensor.cfg] 191 | # Macro to Activate/Deactivate/Test Filament Encoder 192 | [include config/sensors/filament_runout/debug_encoder.cfg] 193 | 194 | 195 | 196 | ########################################### 197 | ######### SIMPLE MACRO FOR RUNOUT ######### 198 | ########################################### 199 | 200 | # FILAMENT SENSOR WITH SWITCH 201 | # [include config/sensors/filament_runout/filament_sensor.cfg] # Filament sensor with switch 202 | 203 | # FILAMENT SENSOR WITH ENCODER 204 | # [include config/sensors/filament_runout/filament_encoder.cfg] # Filament sensor with encoder (Smart Filament BTT) 205 | 206 | ############################################### 207 | # NOW YOU NEED "MACRO LOAD UNLOAD" FOR SENSOR # 208 | 209 | 210 | # SIMPLE MACRO LOAD UNLOAD FILAMENT (Not compatibile with ORBITER MACRO LOAD UNLOAD FILAMENT) 211 | # [include config/macros/filament_load_unload.cfg] 212 | 213 | 214 | # BigTreeTech BTT Smart Filament Sensor V2 has both SWITCH and ENCODER 215 | # so you can use both "FILAMENT SENSOR WITH SWITCH" and "FILAMENT SENSOR WITH ENCODER" 216 | # or mix them with Orbiter Macro, example enabling: 217 | # "FILAMENT SENSOR WITH SWITCH" and "ORBITER MACRO FILAMENT SENSOR WITH ENCODER" 218 | 219 | ################################################################# 220 | ######### ORBITER MACRO - COMPATIBILE WITH ALL EXTRUDER ######### 221 | ################################################################# 222 | 223 | # REQUISITES: include " ADVANCED LOAD UNLOAD PURGE FILAMENT " 224 | 225 | # Facoltative - Replace your PAUSE code with Orbiter Code 226 | # [include config/sensors/filament_runout/pause_orbiter.cfg] 227 | 228 | 229 | # With BTT Smart Filament Sensor V2 you can enable both "...WITH SWITCH" and "...WITH ENCODER" 230 | 231 | # ORBITER MACRO FILAMENT SENSOR WITH SWITCH (Disabile with Comment: FILAMENT SENSOR WITH SWITCH) 232 | # [include config/sensors/filament_runout/orbiter_filament_sensor.cfg] 233 | 234 | # ORBITER MACRO FILAMENT SENSOR WITH ENCODER (Disabile with Comment: FILAMENT SENSOR WITH ENCODER) 235 | [include config/sensors/filament_runout/orbiter_filament_encoder.cfg] 236 | 237 | ############################################### 238 | # NOW YOU NEED "MACRO LOAD UNLOAD" FOR SENSOR # 239 | 240 | # ORBITER MACRO LOAD UNLOAD FILAMENT (DISABLE - "SIMPLE MACRO LOAD UNLOAD FILAMENT") 241 | # [include config/sensors/filament_runout/orbiter_filament_macro.cfg] 242 | 243 | # If you use an ENCODER, it is recommended to use the macro below to avoid false positives of the encoder by performing X attempts of purge 244 | # ORBITER MACRO LOAD UNLOAD FILAMENT WITH ATTEMPTS TO PURGE INSTEAD RUNNOUT (DISABLE - "SIMPLE MACRO LOAD UNLOAD FILAMENT") 245 | # DISABLE "ORBITER MACRO LOAD UNLOAD FILAMENT" AND ENABLE BOTH MACROS BELOW 246 | [include config/sensors/filament_runout/orbiter_filament_macro_purge.cfg] 247 | [include config/sensors/filament_runout/filament_z_safe.cfg] 248 | 249 | 250 | 251 | [gcode_macro _SENSOR_VARIABLES] # change here macro configurables, enable disable functions!************************* 252 | variable_filament_load_temp :222 # temperature to heat up hotend for filament loading, default is 235 253 | variable_filament_load_min_temp :201 # minimum hotend set temperature allowed in filament load macro, default is 190 254 | variable_filament_unload_temp :212 # temperature to heat up hotend for filament un-loading, default is 185 255 | variable_filament_unload_min_temp :211 # temperature to heat up hotend for filament un-loading, default is 185 256 | 257 | variable_nozzle_purge_length :30 # filament extrude amount during load sequenc, hotend purge from old filament, default is 200 258 | variable_nozzle_purge_speed :450 # filament extrude speed in mm/min adjust this value lower if flow is too high and extruder skips during loading, default is 300 259 | variable_unload_distance :65 # filament retract distance for unload procedure. this length shall be long enough to extract the filament above the drive gears 260 | variable_long_unload_distance :65 # filament retract distance for unload procedure. this length shall be long enough to extract the filament above the drive gears 261 | variable_disable_autoload :False # disable filament autoload feature by setting this variable True 262 | variable_disable_runnout :False # disable runnout by setting this variable True 263 | variable_disable_autounload :False # disable auto unload filament by setting this variable to True 264 | variable_enable_beep :False # uses M300 sound feature, set it True to enable 265 | variable_park_position_x :250 # edit your X parking position here for pause macro trigerred by runnout 266 | variable_park_position_y :-6 # edit your Y parking position here for pause macro trigerred by runnout 267 | variable_park_lift_z :3 # edit your Z lift amount for parking position here, default is 10 268 | Variable_park_retraction :1 # edit your retraction amount for parking, default is 1 269 | 270 | variable_enable_attempts_purge :True # On runnout try to purge and resume print, if runnout persists go to the runout procedure 271 | variable_attempts_purge :0 # How many purge attempts to make before proceeding with the runout 272 | variable_attempts_temp :231 # temperature to heat up hotend for attempts purge 273 | variable_attempts_retraction :5 # retraction before attempts purge 274 | variable_attempts_purge_speed :450 # filament purge speed in mm/min 275 | variable_attempts_purge_length :30 # filament purge amount 276 | variable_attempts_park_position_x :250 # edit your X parking position here for purge 277 | variable_attempts_park_position_y :-6 # edit your Y parking position here for purge 278 | variable_attempts_park_lift_z :3 # edit your Z lift amount for purge 279 | gcode: 280 | ############################################ 281 | ########## END ORBITER MACRO END ########### 282 | ############################################ 283 | 284 | 285 | 286 | 287 | # ██████╗ ██████╗ ██████╗ ██╗███╗ ██╗ 288 | # ██╔══██╗██╔═══██╗██╔══██╗██║████╗ ██║ 289 | # ██████╔╝██║ ██║██████╔╝██║██╔██╗ ██║ 290 | # ██╔══██╗██║ ██║██╔══██╗██║██║╚██╗██║ 291 | # ██║ ██║╚██████╔╝██████╔╝██║██║ ╚████║ 292 | # ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝╚═╝ ╚═══╝ 293 | # 294 | # ███╗ ██╗ █████╗ ███╗ ██╗ ██████╗ 295 | # ████╗ ██║██╔══██╗████╗ ██║██╔═══██╗ 296 | # ██╔██╗ ██║███████║██╔██╗ ██║██║ ██║ 297 | # ██║╚██╗██║██╔══██║██║╚██╗██║██║ ██║ 298 | # ██║ ╚████║██║ ██║██║ ╚████║╚██████╔╝ 299 | # ╚═╝ ╚═══╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ 300 | # 301 | # Only for MKS Robin Nano 1.2 302 | 303 | # ROBIN NANO 1.2 304 | # [include config/boards/mks-robin-nano-1.2/config.cfg] 305 | 306 | # So you can set Motor pin in this way 307 | ############################## 308 | # [stepper_x] 309 | # step_pin: 1_step_pin 310 | # dir_pin: 1_dir_pin 311 | # enable_pin: !1_enable_pin 312 | # endstop_pin: 1_endstop_pin 313 | 314 | # [tmc2209 stepper_x] 315 | # uart_pin: wifi_rx 316 | ############################## 317 | 318 | # BUZZER MKS Robin Nano 1.2 319 | # [include config/boards/mks-robin-nano-1.2/buzzer.cfg] # Buzzer from Robin Nano Display 320 | 321 | 322 | # ADXL Robin Nano 1.2 on SD card pins # https://travis90x.altervista.org/klipper-adxl345-raspberry-pi-rp2040-zero/ 323 | # [include config/adxl345/mcu/mks-robin-nano-1.2/robin-nano.cfg] 324 | -------------------------------------------------------------------------------- /printer_SP3_MicroProbe.cfg: -------------------------------------------------------------------------------- 1 | # https://github.com/Travis90x/Klipper-configuration/tree/main 2 | # BIG TEXT ASCII http://patorjk.com/software/taag/#p=display&c=bash&f=ANSI%20Shadow&t=BED%20MESH 3 | ## ############################################### 4 | # This is the backup from my modded Sapphire Plus 5 | 6 | 7 | # Compiler Klipper Firmware with PIN GPIO 8 | # !PC6,!PD13,PB0) 9 | # rispectively: display, display light, heater_fan 10 | 11 | 12 | # Klipper Sapphire PRO SP3 13 | # https://github.com/Klipper3d/klipper/blob/master/config/printer-twotrees-sapphire-pro-sp-3-2020.cfg 14 | 15 | 16 | 17 | # [output_pin relay] 18 | # PIN: PA2 19 | # value: 1 20 | 21 | 22 | 23 | # [include °TIMC_Auto.cfg] 24 | [include °TMC_Stealth.cfg] 25 | # [include °TMC_Spread.cfg] 26 | 27 | 28 | 29 | # [include START.cfg] 30 | [include °ADV_macro.cfg] 31 | [include mainsail.cfg] 32 | [include °START.cfg] 33 | # [include timelapse.cfg] # Webcam timelapse 34 | # [include KAMP_Settings.cfg] 35 | 36 | [verify_heater extruder] 37 | max_error: 999 # 120 38 | check_gain_time: 30 39 | hysteresis: 10 40 | heating_gain: 1 41 | 42 | [input_shaper] 43 | shaper_freq_x: 98.8 # 28k 44 | shaper_freq_y: 79.8 # 16k 45 | shaper_type_x: mzv 46 | shaper_type_y: mzv 47 | 48 | 49 | 50 | # 51 | # ███╗ ███╗ ██████╗██╗ ██╗ 52 | # ████╗ ████║██╔════╝██║ ██║ 53 | # ██╔████╔██║██║ ██║ ██║ 54 | # ██║╚██╔╝██║██║ ██║ ██║ 55 | # ██║ ╚═╝ ██║╚██████╗╚██████╔╝ 56 | # ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ 57 | # 58 | # mcu 59 | # ###################################### 60 | # This file contains common pin mappings for MKS Robin Nano (v1.2.004) boards. To use this config, the firmware should be compiled for the 61 | # STM32F103. When running "make menuconfig", enable "extra low-level configuration setup", select the 28KiB bootloader, disable "USB for 62 | # communication", and select USART3 for the "Serial Port". 63 | # Note that the "make flash" command does not work with MKS Robin boards. After running "make", run the following command: 64 | # ./scripts/update_mks_robin.py out/klipper.bin out/Robin_nano.bin 65 | # Copy the file out/Robin_nano.bin to an SD card and then restart the printer with that SD card. 66 | # See docs/Config_Reference.md for a description of parameters. 67 | # KLIPPER CONFIG EXAMPLE 68 | # https://github.com/Klipper3d/klipper/blob/master/docs/Config_Reference.md 69 | 70 | 71 | [mcu] 72 | # serial: /dev/ttyUSB0 73 | serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 74 | # to find correct usb, in command type: ls /dev/serial/by-id/* 75 | restart_method: command 76 | 77 | 78 | 79 | # ###################################### 80 | # STEPPERS 81 | # ###################################### 82 | 83 | # ██╗ ██╗ 84 | # ╚██╗██╔╝ 85 | # ╚███╔╝ 86 | # ██╔██╗ 87 | # ██╔╝ ██╗ 88 | # ╚═╝ ╚═╝ 89 | 90 | 91 | [stepper_x] 92 | step_pin: 4_step_pin 93 | dir_pin: !4_dir_pin 94 | enable_pin: !4_enable_pin 95 | microsteps: 64 96 | rotation_distance: 40 97 | # endstop_pin: tmc2209_stepper_x:virtual_endstop # Sensorless homing 98 | endstop_pin: 1_endstop_pin # PA15 Orange - add ! if physic endstop - physical/optical endstop 99 | 100 | homing_speed: 100 101 | homing_retract_dist: 10.0 # retract as optical probe is long from the complete collision 102 | homing_retract_speed: 100 # 103 | second_homing_speed: 5 # useful for optical 104 | # homing_retract_dist: 0 # sensorless homing = 0 105 | 106 | # 310x310 BED 0,0 is your 0,0 107 | # Measure Screw 4 (coordinate 35,35) if nozzle on X is over 108 | # increase position endstop. If under, decrease 109 | ################ 110 | position_endstop: 5 111 | ################ 112 | 113 | position_min: 0 # position_endstop - how many mm you can "press" the endstop 114 | position_max: 225 115 | 116 | # Toolhead phisical limit with Diamond and Optical Endstop 117 | # position_endstop: -1 118 | 119 | # position_min: -1 120 | # position_max: 300 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | # ██╗ ██╗ 129 | # ╚██╗ ██╔╝ 130 | # ╚████╔╝ 131 | # ╚██╔╝ 132 | # ██║ 133 | # ╚═╝ 134 | 135 | 136 | [stepper_y] 137 | step_pin: 2_step_pin 138 | dir_pin: !2_dir_pin 139 | enable_pin: !2_enable_pin 140 | microsteps: 64 141 | rotation_distance: 40 142 | # endstop_pin: tmc2209_stepper_y:virtual_endstop # Sensorless homing 143 | endstop_pin: 2_endstop_pin # PA12 # Blue - add ! if physic endstop, remove if optical - physical/optical endstop 144 | 145 | homing_speed: 100 146 | homing_retract_dist: 10.0 # retract as optical probe is long from the complete collision 147 | homing_retract_speed: 100 # 148 | second_homing_speed: 5 # useful for optical 149 | 150 | # 310x310 BED 0,0 is your 0,0 151 | # Measure Screw 4 (coordinate 35,35) if nozzle on Y is over the screw 152 | # increase position endstop. If under the screw, decrease. 153 | ################ 154 | position_endstop: 227 155 | ################ 156 | 157 | position_min: 0 # optical 158 | position_max: 228 # position_endstop + how many mm you can "press" the endstop 159 | 160 | 161 | 162 | 163 | 164 | # ███████╗ 165 | # ╚══███╔╝ 166 | # ███╔╝ 167 | # ███╔╝ 168 | # ███████╗ 169 | # ╚══════╝ 170 | 171 | 172 | [stepper_z] 173 | step_pin: 3_step_pin 174 | dir_pin: !3_dir_pin 175 | enable_pin: !3_enable_pin 176 | microsteps: 16 177 | rotation_distance: 2 178 | endstop_pin: probe:z_virtual_endstop # for Endstop Z with BL Touch 179 | # endstop_pin: 3_endstop_pin # PA11 # 1st Green on Robin Nano 1.2 - disable with BLtouch as endstop - endstop pin PB3 without >!< 180 | ############################################################################################################# 181 | # disable with bltouch as endstop 182 | # position_endstop: 1 183 | 184 | # increase for nozzle far from bed at Z0 185 | #(nozzle touch bed in negative value) 186 | 187 | position_min: -2.5 # your 0-position_endstop 188 | position_max: 230.5 # 330 with oldham and stepper lowered with thicknesses 189 | # 320 with Pom anti backlash, oldham and stepper lowered with thicknesses 190 | homing_speed: 20 191 | homing_retract_dist: 2.0 # retract as optical/physic probe is long 192 | homing_retract_speed: 20 # 193 | second_homing_speed: 1 # increase precision 194 | 195 | [safe_z_home] 196 | home_xy_position: 110, 140 # Cambiare le coordinate per il centro del tuo piatto 197 | speed: 100 198 | z_hop: 4 # Move up 10mm 199 | z_hop_speed: 20 200 | 201 | 202 | 203 | 204 | # [tmc2208 stepper_z1] 205 | # uart_pin: PC13 206 | # uart_address: 0 207 | # interpolate: True 208 | # run_current: 0.9 209 | # sense_resistor: 0.100 210 | # stealthchop_threshold: 0 211 | # don't use 0.1 = stealthchop enabled only when the bed is static 212 | # avoid to switch spreadcycle to stealthchop and viceversa during printing 213 | 214 | 215 | ############################################################ 216 | # 217 | # ███████╗██╗ ██╗████████╗██████╗ ██╗ ██╗██████╗ ███████╗██████╗ 218 | # ██╔════╝╚██╗██╔╝╚══██╔══╝██╔══██╗██║ ██║██╔══██╗██╔════╝██╔══██╗ 219 | # █████╗ ╚███╔╝ ██║ ██████╔╝██║ ██║██║ ██║█████╗ ██████╔╝ 220 | # ██╔══╝ ██╔██╗ ██║ ██╔══██╗██║ ██║██║ ██║██╔══╝ ██╔══██╗ 221 | # ███████╗██╔╝ ██╗ ██║ ██║ ██║╚██████╔╝██████╔╝███████╗██║ ██║ 222 | # ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ 223 | # 224 | # EXTRUDER 225 | ############################################################ 226 | 227 | [extruder] 228 | # invert direction !PB4 Nema17 229 | 230 | step_pin: 1_step_pin 231 | dir_pin: !1_dir_pin 232 | enable_pin: !1_enable_pin 233 | microsteps: 16 234 | 235 | 236 | # rotation_distance: 22.65 # diminuisci se sottoestrude - 237 | # 23.3 = Sherpa Mini + Moon 14 8th 238 | # rotation_distance: 22 #diminuisci se sottoestrude 20 25 -- 22.5 = 10cm microsteps: 32 microstep 32 -> 23 # microstep 64 -> 45 239 | rotation_distance: 22.6 # Vz-Hextrudort-Low # 23.23 default 240 | # rotation_distance: 22.65 # Libra mini 241 | 242 | 243 | full_steps_per_rotation: 200 # 200 for 1.8 degree Motor - 400 for 0.9 deg 244 | gear_ratio: 50:8 # 50:17 for BMG clone extruder otherwise 3:1 245 | # 50:8 Moon 8t # 50:10 Moon 10 tooths 246 | # 50:8 8th and Sherpa Mini, Libra Mini, Vz-Hextrudort 247 | nozzle_diameter: 0.6 248 | 249 | filament_diameter: 1.750 250 | # 251 | max_extrude_only_distance: 1400.0 252 | max_extrude_only_accel: 5000 # mm/s^2 253 | max_extrude_only_velocity: 100.0 # G1 EX mm/s 254 | # Maximum velocity (in mm/s) and acceleration (in mm/s^2) of the extruder motor for retractions and extrude-only moves 255 | # max_extrude_only_velocity: 75 # SHERPA MINI 256 | # max_extrude_only_accel: 1500 # SHERPA MINI 257 | # https://github.com/Annex-Engineering/Sherpa_Mini-Extruder/blob/master/Klipper_Config_Block.txt 258 | 259 | max_extrude_cross_section: 100.0 # The default is: 4x nozzle_diameter^2 260 | 261 | heater_pin: PC3 # Default PC3 262 | sensor_pin: PC1 # Black TH2 PC1 - Violet TH1 PC2 263 | sensor_type: PT1000 264 | 265 | pullup_resistor: 4700 266 | # sensor_type: DYZE 267 | # sensor_type: EPCOS 100K B57560G104F 268 | # sensor_type: ATC Semitec 104GT-2 #stock 269 | # sensor_type: ATC Semitec 104NT-4-R025H42G 270 | # sensor_type: Generic 3950 271 | # sensor_type: Honeywell 100K 135-104LAG-J01 272 | # sensor_type: NTC 100K MGB18-104F39050L32 273 | # sensor_type: SliceEngineering 450 274 | # sensor_type: TDK NTCG104LH104JT1 275 | 276 | # pullup_resistor: 4700 277 | min_temp: -3.15 # min is -273.15 # debug 278 | max_temp: 350 # 350 # 279 | min_extrude_temp: 0.15 # 140 # min 5.15 # debug 280 | 281 | #################### 282 | # PID EXTRUDER 283 | #################### 284 | 285 | pwm_cycle_time: 0.02 # default pwm_cycle_time: 0.1 (10Hz,the max for SSR) 286 | max_power: 1.0 287 | smooth_time: 0.5 # default 1.0 288 | 289 | 290 | # NF CRAZY VOL CO HF 70W 2x 4020 60% 291 | # smooth 0.1 cycle_time: 0.02 292 | #control: pid 293 | #pid_kp: 22.609 294 | #pid_ki: 1.311 295 | #pid_kd: 97.503 296 | 297 | 298 | 299 | ######################### 300 | pressure_advance: 0.02 301 | # PLA 0.045 100mm/s 302 | # PLA 0.08 40mm/s 303 | # PETG 304 | ######################### 305 | 306 | 307 | 308 | 309 | 310 | 311 | ####################################### 312 | # 313 | # ██████╗ ██████╗ ██████╗ ██████╗ ███████╗ 314 | # ██╔══██╗██╔══██╗██╔═══██╗██╔══██╗██╔════╝ 315 | # ██████╔╝██████╔╝██║ ██║██████╔╝█████╗ 316 | # ██╔═══╝ ██╔══██╗██║ ██║██╔══██╗██╔══╝ 317 | # ██║ ██║ ██║╚██████╔╝██████╔╝███████╗ 318 | # ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ 319 | # PROBE 320 | ####################################### 321 | 322 | # SCREWS 323 | # 1-----2 324 | # | X | 325 | # 4-----3 326 | 327 | [probe] 328 | pin: ^!PC4 # NOTE FOR V2 users: Set this to ^!PC14 to set the low level trigger 329 | deactivate_on_each_sample: False 330 | x_offset: 0 331 | y_offset: -40 332 | # Will be overridden when you do a PROBE_CALIBRATE 333 | #z_offset: 0 334 | samples: 2 335 | samples_result: average 336 | samples_tolerance: 0.05 337 | samples_tolerance_retries: 3 338 | speed: 5 339 | lift_speed: 20 340 | ################### 341 | sample_retract_dist: 2.0 # the distance (in mm) to lift the toolhead between each sample 342 | ################### 343 | 344 | 345 | # ███╗ ███╗███████╗███████╗██╗ ██╗ 346 | # ████╗ ████║██╔════╝██╔════╝██║ ██║ 347 | # ██╔████╔██║█████╗ ███████╗███████║ 348 | # ██║╚██╔╝██║██╔══╝ ╚════██║██╔══██║ 349 | # ██║ ╚═╝ ██║███████╗███████║██║ ██║ 350 | # ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ 351 | # 352 | 353 | # SCREWS 354 | # 1-----2 355 | # | X | 356 | # 4-----3 357 | 358 | [bed_mesh] 359 | probe_count: 7,7 360 | speed: 400 361 | 362 | mesh_min: 5, 5 363 | 364 | # X_mesh_min = X coordinate - BL-Touch |y_offset| 365 | # the result must be > Xmin position 366 | # Y_mesh_min = Y coordinate - BL-Touch |y_offset| 367 | # the result must be > Ymin position 368 | 369 | 370 | mesh_max: 220, 185 # 275, 275 if the BED 0,0 is your 0,0 371 | # X= X_Bed_max - X_mesh_min (Ex: X bed 310, X_mesh_min=5 X_mesh_max= 305 ) 372 | # Y= Y_Bed_max - Y_mesh_min - Y BLtouch offset (Ex: Y bed 310, Y_mesh_min=35 X_mesh_max= 275 ) 373 | # Y< Ymax Printer limit - Y BLtouch offset 374 | 375 | ################### 376 | horizontal_move_z: 4 # >z_offset probe The Z coordinate the probe rises to prior to traveling between points. 377 | ################### 378 | 379 | fade_start: 1.0 380 | fade_end: 10.0 381 | split_delta_z: .025 382 | move_check_distance: 5.0 383 | mesh_pps: 2,2 384 | algorithm: bicubic 385 | bicubic_tension: .2 386 | 387 | 388 | [screws_tilt_adjust] 389 | screw1: 5, 225 # Y=Y_max 390 | screw1_name: fondo sx 391 | screw2: 225, 225 392 | screw2_name: fondo dx 393 | screw3: 225, 40 # Y = Y_zoffset 394 | screw3_name: avanti dx 395 | screw4: 5, 40 396 | screw4_name: avanti sx 397 | speed: 200 398 | horizontal_move_z: 5 399 | screw_thread: CW-M3 400 | 401 | 402 | ####################################### 403 | # ██████╗ ███████╗██████╗ 404 | # ██╔══██╗██╔════╝██╔══██╗ 405 | # ██████╔╝█████╗ ██║ ██║ 406 | # ██╔══██╗██╔══╝ ██║ ██║ 407 | # ██████╔╝███████╗██████╔╝ 408 | # ╚═════╝ ╚══════╝╚═════╝ 409 | # BED 410 | ####################################### 411 | 412 | [heater_bed] 413 | heater_pin: PA0 # Default PA0 414 | pullup_resistor: 4700 # default 4700 415 | smooth_time: 1.0 # default 1.0 416 | max_power: 1.0 #default 1.0 417 | pwm_cycle_time: 0.1 #default 0.1 (10Hz, tha max for SSR relay) 418 | 419 | 420 | sensor_type: EPCOS 100K B57560G104F 421 | # sensor_type: NTC 100K beta 3950 422 | sensor_pin: PC0 # lateral 423 | 424 | 425 | min_temp: -0.15 # min -273.15 426 | max_temp: 130 # 130 427 | 428 | # control: watermark 429 | control: pid 430 | 431 | # [heater_bed] 432 | 433 | # PID 45 434 | # pid_kp = 60.495 435 | # pid_ki = 0.715 436 | # pid_kd = 1279.463 437 | 438 | # PID 439 | # pid_kp = 71.215 440 | # pid_ki = 2.272 441 | # pid_kd = 558.145 442 | 443 | # Stock BED SP3 444 | pid_Kp: 325.10 445 | pid_Ki: 63.35 446 | pid_Kd: 417.10 447 | 448 | # BED SP3 449 | 450 | # pid_kp: 71.215 451 | # pid_ki: 2.272 452 | # pid_kd: 558.145 453 | 454 | 455 | 456 | ####################################### 457 | # 458 | # ████████╗███████╗███╗ ███╗██████╗ 459 | # ╚══██╔══╝██╔════╝████╗ ████║██╔══██╗ 460 | # ██║ █████╗ ██╔████╔██║██████╔╝ 461 | # ██║ ██╔══╝ ██║╚██╔╝██║██╔═══╝ 462 | # ██║ ███████╗██║ ╚═╝ ██║██║ 463 | # ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ 464 | # TEMPERATURES 465 | ####################################### 466 | 467 | 468 | 469 | ####################################### 470 | # 471 | # ███████╗ █████╗ ███╗ ██╗ 472 | # ██╔════╝██╔══██╗████╗ ██║ 473 | # █████╗ ███████║██╔██╗ ██║ 474 | # ██╔══╝ ██╔══██║██║╚██╗██║ 475 | # ██║ ██║ ██║██║ ╚████║ 476 | # ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ 477 | # 478 | # FANS 479 | ####################################### 480 | 481 | #FAN 3030 on Hotend + on TMC 482 | [heater_fan extruder] 483 | heater: extruder 484 | #stepper: # default all 485 | pin: PB0 # Default PB1 486 | kick_start_time: 0.4 487 | max_power: 1 488 | off_below: 0.1 489 | shutdown_speed: 0 490 | cycle_time: 0.010 491 | heater_temp: 65.0 492 | fan_speed: 1 493 | #tachometer_pin: 494 | #tachometer_ppr: 2 495 | #tachometer_poll_interval: 0.0015 496 | #hardware_pwm: False 497 | #enable_pin: 498 | 499 | [duplicate_pin_override] 500 | pins: PB0 501 | 502 | [controller_fan TMC] 503 | heater: extruder 504 | pin: PB0 # Default PB1 505 | kick_start_time: 0.4 506 | max_power: 1 507 | off_below: 0.1 508 | shutdown_speed: 0 509 | cycle_time: 0.010 510 | fan_speed: 1 511 | 512 | # FANDUCT 513 | [fan_generic fan0] 514 | pin: PB1 515 | kick_start_time: 0.5 516 | max_power: 1.0 517 | off_below: 0 518 | 519 | 520 | # [multi_pin dual_fan_extruder] 521 | # pins:PB1,PB2 522 | 523 | # Turn ON fan when a stepper is ON 524 | 525 | # [controller_fan driver_fan] 526 | # if not declared, default is 527 | # stepper: stepper_x, stepper_y, stepper_z, stepper_z1, ecc... , extruder 528 | # heater: extruder 529 | # Name of the config section defining the heater/stepper that this fan 530 | # is associated with. If a comma separated list of heater/stepper names 531 | # is provided here, then the fan will be enabled when any of the given 532 | # heaters/steppers are enabled. The default heater is "extruder", the 533 | # default stepper is all of them. 534 | # stepper: stepper_x, stepper_y, stepper_z, stepper_z1 535 | # heater: extruder 536 | # pin: PE5 # pwm fan pin 537 | # max_power: 1 538 | # shutdown_speed: 0 # in soft pwm is allowed 1 or 0 539 | # kick_start_time: 0.1 540 | # off_below: 0.40 541 | # idle_speed: 0.7 # Fan speed when stepper/heater are off 542 | # idle_timeout: 1 # Turn off fan after x secondos from stepper/heater is off 543 | 544 | # to exclude activation fan with extruder 545 | # I find a workaround creating a fake sensor and heater on an free pin, so: 546 | # [duplicate_pin_override] # needed to use only 1 not connected PIN for FAKE_HEATER 547 | # pins: PC2 548 | 549 | # [heater_generic fake_heater] 550 | # sensor_type: PT1000 # Put here whatever sensor you want 551 | # heater_pin: PC2 # use a not connected PIN 552 | # sensor_pin: PC2 # use a not connected PIN 553 | # gcode_id: 1 554 | # min_temp: -273.15 # min -273.15 555 | # max_temp: 9999 556 | # control: watermark 557 | # max_delta: 9999 558 | 559 | # SENSOR TYPE not provided from Klipper 560 | # you have to define 3 value of resistance/temperature, measure your temperature probe with a tester 561 | # [thermistor DYZE] 562 | # https://www.aliexpress.com/item/4000591370691.html 563 | # https://docs.dyzedesign.com/hotends.html#klipper-firmware 564 | # dyze500 clone 565 | # temperature1: 60 566 | # resistance1: 666000 #450000 567 | # temperature2: 162 568 | # resistance2: 22200 569 | # temperature3: 280 570 | # resistance3: 1555 571 | 572 | 573 | 574 | ####################################### 575 | # 576 | # ██████╗ ██████╗ ██╗███╗ ██╗████████╗███████╗██████╗ 577 | # ██╔══██╗██╔══██╗██║████╗ ██║╚══██╔══╝██╔════╝██╔══██╗ 578 | # ██████╔╝██████╔╝██║██╔██╗ ██║ ██║ █████╗ ██████╔╝ 579 | # ██╔═══╝ ██╔══██╗██║██║╚██╗██║ ██║ ██╔══╝ ██╔══██╗ 580 | # ██║ ██║ ██║██║██║ ╚████║ ██║ ███████╗██║ ██║ 581 | # ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ 582 | # 583 | # PRINTER 584 | ####################################### 585 | 586 | 587 | [idle_timeout] 588 | timeout: 1800 589 | gcode: 590 | SET_HEATER_TEMPERATURE HEATER=extruder TARGET=0 591 | DISABLE_EXTRUDER 592 | 593 | [firmware_retraction] 594 | retract_length: 0.7 # default 0 mm 595 | # The length of filament (in mm) to retract when G10 is activated, and to unretract when G11 is activated (but see unretract_extra_length below). 596 | retract_speed: 40 # default is 20 mm/s 597 | # The speed of retraction, in mm/s. 598 | #unretract_extra_length: 0 599 | # The length (in mm) of *additional* filament to add when unretracting. 600 | unretract_speed: 40 # default is 10 mm/s. 601 | # The speed of unretraction, in mm/s. The default is 10 mm/s. 602 | 603 | 604 | 605 | 606 | # SCREWS 607 | # 1-----2 608 | # | X | 609 | # 4-----3 610 | 611 | # 310x310 BED 0,0 is your 0,0 612 | [bed_screws] 613 | screw1: 15, 210 614 | screw2: 210, 210 615 | screw3: 210, 15 616 | screw4: 15, 15 617 | 618 | # if your 0,0 is the BED phisical limit of your printer with Diamond and enstop optical 619 | # [bed_screws] 620 | # screw1: 26, 265 621 | # screw2: 266, 265 622 | # screw3: 266, 25 623 | # screw4: 26, 25 624 | 625 | 626 | 627 | ### to enalbe M117 628 | [display_status] 629 | 630 | ### to enable M118 631 | [respond] 632 | # default_type: echo 633 | 634 | [pause_resume] 635 | 636 | 637 | 638 | [printer] 639 | kinematics: corexy 640 | #♥ kinematics: limited_corexy 641 | # https://github.com/Piezoid/klipper/blob/work-peraxis/klippy/kinematics/limited_corexy.py 642 | max_velocity: 600 643 | # max_x_velocity: 250 # only on limited_cartesian.py 644 | # max_y_velocity: 20 645 | max_accel: 15000 646 | minimum_cruise_ratio: 0.5 647 | # max_accel_to_decel: 6000 648 | # max_x_accel: 8000 # limited_corexy 649 | # max_y_accel: 6000 # limited_corexy 650 | max_z_velocity: 35 651 | max_z_accel: 1000 652 | square_corner_velocity: 5 653 | 654 | [force_move] 655 | enable_force_move: True 656 | 657 | [save_variables] 658 | filename: /home/pi/printer_data/config/save_variables.cfg # needed for Power Loss Recovery plr.cfg 659 | # filename: ~/variable.cfg # needed for Power Loss Recovery plr.cfg 660 | # filename: /home/pi/printer_data/config/printer_variables.cfg 661 | # filename: /home/pi/klipper_config/.variables.stb 662 | 663 | # ATTENTION: never use '#*#' above 664 | 665 | #*# <---------------------- SAVE_CONFIG ----------------------> 666 | #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. 667 | #*# 668 | #*# [extruder] 669 | #*# control = pid 670 | #*# pid_kp = 23.967 671 | #*# pid_ki = 1.795 672 | #*# pid_kd = 79.989 673 | #*# 674 | #*# [probe] 675 | #*# z_offset = 0.600 676 | #*# 677 | #*# [bed_mesh oseq_hot] 678 | #*# version = 1 679 | #*# points = 680 | #*# -0.296562, -0.171875, -0.129062, -0.116250, -0.181562, -0.262812, -0.353437 681 | #*# -0.253125, -0.157812, -0.110312, -0.090625, -0.148750, -0.213437, -0.272187 682 | #*# -0.235937, -0.155937, -0.098125, -0.080937, -0.135937, -0.199375, -0.245625 683 | #*# -0.230312, -0.135312, -0.066875, -0.060312, -0.114375, -0.184062, -0.220625 684 | #*# -0.230000, -0.132500, -0.075625, -0.059375, -0.115000, -0.180312, -0.224687 685 | #*# -0.249062, -0.131250, -0.074062, -0.053125, -0.104687, -0.178125, -0.218750 686 | #*# -0.220312, -0.105625, -0.043437, -0.035000, -0.095937, -0.165937, -0.240625 687 | #*# x_count = 7 688 | #*# y_count = 7 689 | #*# mesh_x_pps = 2 690 | #*# mesh_y_pps = 2 691 | #*# algo = bicubic 692 | #*# tension = 0.2 693 | #*# min_x = 5.0 694 | #*# max_x = 219.98 695 | #*# min_y = 5.0 696 | #*# max_y = 185.0 697 | #*# 698 | #*# [bed_mesh default] 699 | #*# version = 1 700 | #*# points = 701 | #*# -0.275625, -0.172187, -0.130000, -0.122500, -0.188437, -0.274687, -0.360312 702 | #*# -0.257187, -0.164062, -0.118437, -0.101562, -0.162187, -0.231250, -0.285625 703 | #*# -0.235937, -0.168125, -0.107812, -0.093437, -0.153750, -0.206875, -0.247812 704 | #*# -0.233125, -0.143125, -0.084687, -0.077812, -0.125625, -0.194375, -0.232187 705 | #*# -0.234687, -0.145312, -0.092187, -0.074062, -0.127187, -0.189375, -0.233437 706 | #*# -0.256562, -0.142187, -0.083437, -0.065937, -0.118437, -0.195625, -0.235625 707 | #*# -0.222187, -0.107500, -0.047187, -0.044375, -0.103125, -0.172187, -0.243125 708 | #*# x_count = 7 709 | #*# y_count = 7 710 | #*# mesh_x_pps = 2 711 | #*# mesh_y_pps = 2 712 | #*# algo = bicubic 713 | #*# tension = 0.2 714 | #*# min_x = 5.0 715 | #*# max_x = 219.98 716 | #*# min_y = 5.0 717 | #*# max_y = 185.0 718 | -------------------------------------------------------------------------------- /printer_SP3.cfg: -------------------------------------------------------------------------------- 1 | # https://github.com/Travis90x/Klipper-configuration/tree/main 2 | # BIG TEXT ASCII http://patorjk.com/software/taag/#p=display&c=bash&f=ANSI%20Shadow&t=BED%20MESH 3 | ## ############################################### 4 | # This is the backup from my modded Sapphire Plus 5 | 6 | 7 | # Klipper Sapphire PRO SP3 8 | # https://github.com/Klipper3d/klipper/blob/master/config/printer-twotrees-sapphire-pro-sp-3-2020.cfg 9 | 10 | 11 | 12 | # [output_pin relay] 13 | # PIN: PA2 14 | # value: 1 15 | 16 | 17 | # [include START.cfg] 18 | [include adv_macro.cfg] 19 | [include mainsail.cfg] 20 | [include START.cfg] 21 | # [include timelapse.cfg] # Webcam timelapse 22 | 23 | [verify_heater extruder] 24 | max_error: 999 # 120 25 | check_gain_time: 30 26 | hysteresis: 10 27 | heating_gain: 1 28 | 29 | [input_shaper] 30 | shaper_freq_x: 98.8 # 28k 31 | shaper_freq_y: 79.8 # 16k 32 | shaper_type_x: mzv 33 | shaper_type_y: mzv 34 | 35 | 36 | # 37 | # ███╗ ███╗ ██████╗██╗ ██╗ 38 | # ████╗ ████║██╔════╝██║ ██║ 39 | # ██╔████╔██║██║ ██║ ██║ 40 | # ██║╚██╔╝██║██║ ██║ ██║ 41 | # ██║ ╚═╝ ██║╚██████╗╚██████╔╝ 42 | # ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ 43 | # 44 | # mcu 45 | # ###################################### 46 | # This file contains common pin mappings for MKS Robin Nano (v1.2.004) boards. To use this config, the firmware should be compiled for the 47 | # STM32F103. When running "make menuconfig", enable "extra low-level configuration setup", select the 28KiB bootloader, disable "USB for 48 | # communication", and select USART3 for the "Serial Port". 49 | # Note that the "make flash" command does not work with MKS Robin boards. After running "make", run the following command: 50 | # ./scripts/update_mks_robin.py out/klipper.bin out/Robin_nano.bin 51 | # Copy the file out/Robin_nano.bin to an SD card and then restart the printer with that SD card. 52 | # See docs/Config_Reference.md for a description of parameters. 53 | # KLIPPER CONFIG EXAMPLE 54 | # https://github.com/Klipper3d/klipper/blob/master/docs/Config_Reference.md 55 | 56 | 57 | [mcu] 58 | # serial: /dev/ttyUSB0 59 | serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 60 | # to find correct usb, in command type: ls /dev/serial/by-id/* 61 | restart_method: command 62 | 63 | 64 | 65 | # ###################################### 66 | # STEPPERS 67 | # ###################################### 68 | 69 | # ██╗ ██╗ 70 | # ╚██╗██╔╝ 71 | # ╚███╔╝ 72 | # ██╔██╗ 73 | # ██╔╝ ██╗ 74 | # ╚═╝ ╚═╝ 75 | 76 | 77 | [stepper_x] 78 | step_pin: 4_step_pin 79 | dir_pin: !4_dir_pin 80 | enable_pin: !4_enable_pin 81 | microsteps: 64 82 | rotation_distance: 40 83 | # endstop_pin: tmc2209_stepper_x:virtual_endstop # Sensorless homing 84 | endstop_pin: 1_endstop_pin # PA15 Orange - add ! if physic endstop - physical/optical endstop 85 | 86 | homing_speed: 100 87 | homing_retract_dist: 10.0 # retract as optical probe is long from the complete collision 88 | homing_retract_speed: 100 # 89 | second_homing_speed: 5 # useful for optical 90 | # homing_retract_dist: 0 # sensorless homing = 0 91 | 92 | # 310x310 BED 0,0 is your 0,0 93 | # Measure Screw 4 (coordinate 35,35) if nozzle on X is over 94 | # increase position endstop. If under, decrease 95 | ################ 96 | position_endstop: 5 97 | ################ 98 | 99 | position_min: 0 # position_endstop - how many mm you can "press" the endstop 100 | position_max: 224 101 | 102 | # Toolhead phisical limit with Diamond and Optical Endstop 103 | # position_endstop: -1 104 | 105 | # position_min: -1 106 | # position_max: 300 107 | 108 | 109 | [tmc2209 stepper_x] 110 | uart_pin: PA10 111 | # tx_pin: 112 | # uart_address: 0 113 | interpolate: True # Reduce Noise. For best positional accuracy consider using spreadCycle mode and disable interpolation 114 | run_current: 0.9 115 | sense_resistor: 0.110 116 | stealthchop_threshold: 0 # Max 999999 117 | # The velocity (in mm/s) to set the "stealthChop" threshold to. 118 | # When set, "stealthChop" mode will be enabled if the stepper motor 119 | # velocity is below this value. The default is 0, which disables "stealthChop" mode. 120 | 121 | # diag_pin: ^PA15 # sensorless homing 122 | # hold_current: 0.80 # Disable for sensorless Homing - The current for motor in idle: it's not recommended use it. 123 | # If defined, TMC driver can reduce current to the stepper motor when it detects that the stepper is not moving. 124 | # The switch from run_current to hold_current has a negative impact on precision. 125 | 126 | # driver_SGTHRS: 100 # Sensorless homing, 0-255, high has more sensibility 127 | # endstop_pin: tmc2209_stepper_x:virtual_endstop 128 | 129 | 130 | 131 | 132 | # ██╗ ██╗ 133 | # ╚██╗ ██╔╝ 134 | # ╚████╔╝ 135 | # ╚██╔╝ 136 | # ██║ 137 | # ╚═╝ 138 | 139 | 140 | [stepper_y] 141 | step_pin: 2_step_pin 142 | dir_pin: !2_dir_pin 143 | enable_pin: !2_enable_pin 144 | microsteps: 64 145 | rotation_distance: 40 146 | # endstop_pin: tmc2209_stepper_y:virtual_endstop # Sensorless homing 147 | endstop_pin: 2_endstop_pin # PA12 # Blue - add ! if physic endstop, remove if optical - physical/optical endstop 148 | 149 | homing_speed: 100 150 | homing_retract_dist: 10.0 # retract as optical probe is long from the complete collision 151 | homing_retract_speed: 100 # 152 | second_homing_speed: 5 # useful for optical 153 | 154 | # 310x310 BED 0,0 is your 0,0 155 | # Measure Screw 4 (coordinate 35,35) if nozzle on Y is over the screw 156 | # increase position endstop. If under the screw, decrease. 157 | ################ 158 | position_endstop: 220 159 | ################ 160 | 161 | position_min: 0 # optical 162 | position_max: 220 # position_endstop + how many mm you can "press" the endstop 163 | 164 | 165 | [tmc2209 stepper_y] 166 | uart_pin: PA9 167 | # uart_address: 0 168 | interpolate: True 169 | run_current: 0.9 170 | sense_resistor: 0.110 171 | stealthchop_threshold: 0 # Max 999999 172 | # diag_pin: ^PA12 # sensorless homing 173 | # driver_SGTHRS: 100 # Sensorless homing, 0-255, high has more sensibility 174 | 175 | 176 | # ███████╗ 177 | # ╚══███╔╝ 178 | # ███╔╝ 179 | # ███╔╝ 180 | # ███████╗ 181 | # ╚══════╝ 182 | 183 | 184 | [stepper_z] 185 | step_pin: 3_step_pin 186 | dir_pin: !3_dir_pin 187 | enable_pin: !3_enable_pin 188 | microsteps: 16 189 | rotation_distance: 2 190 | endstop_pin: probe:z_virtual_endstop # for Endstop Z with BL Touch 191 | # endstop_pin: 3_endstop_pin # PA11 # 1st Green on Robin Nano 1.2 - disable with BLtouch as endstop - endstop pin PB3 without >!< 192 | ############################################################################################################# 193 | # disable with bltouch as endstop 194 | # position_endstop: 1 195 | 196 | # increase for nozzle far from bed at Z0 197 | #(nozzle touch bed in negative value) 198 | 199 | position_min: -2.5 # your 0-position_endstop 200 | position_max: 230 # 330 with oldham and stepper lowered with thicknesses 201 | # 320 with Pom anti backlash, oldham and stepper lowered with thicknesses 202 | homing_speed: 10 203 | homing_retract_dist: 8.0 # retract as optical/physic probe is long 204 | homing_retract_speed: 5 # 205 | second_homing_speed: 2 # increase precision 206 | 207 | [safe_z_home] 208 | home_xy_position: 112, 138 # Cambiare le coordinate per il centro del tuo piatto 209 | speed: 100 210 | z_hop: 5 # Move up 10mm 211 | z_hop_speed: 5 212 | 213 | [tmc2208 stepper_z] 214 | uart_pin: PC7 # PC7 215 | # uart_address: 0 216 | interpolate: True 217 | run_current: 1 218 | sense_resistor: 0.100 219 | stealthchop_threshold: 0 220 | # don't use 0.1 = stealthchop enabled only when the bed is static 221 | # avoid to switch spreadcycle to stealthchop and viceversa during printing 222 | 223 | 224 | # [tmc2208 stepper_z1] 225 | # uart_pin: PC13 226 | # uart_address: 0 227 | # interpolate: True 228 | # run_current: 0.9 229 | # sense_resistor: 0.100 230 | # stealthchop_threshold: 0 231 | # don't use 0.1 = stealthchop enabled only when the bed is static 232 | # avoid to switch spreadcycle to stealthchop and viceversa during printing 233 | 234 | 235 | ############################################################ 236 | # 237 | # ███████╗██╗ ██╗████████╗██████╗ ██╗ ██╗██████╗ ███████╗██████╗ 238 | # ██╔════╝╚██╗██╔╝╚══██╔══╝██╔══██╗██║ ██║██╔══██╗██╔════╝██╔══██╗ 239 | # █████╗ ╚███╔╝ ██║ ██████╔╝██║ ██║██║ ██║█████╗ ██████╔╝ 240 | # ██╔══╝ ██╔██╗ ██║ ██╔══██╗██║ ██║██║ ██║██╔══╝ ██╔══██╗ 241 | # ███████╗██╔╝ ██╗ ██║ ██║ ██║╚██████╔╝██████╔╝███████╗██║ ██║ 242 | # ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ 243 | # 244 | # EXTRUDER 245 | ############################################################ 246 | 247 | [extruder] 248 | # invert direction !PB4 Nema17 249 | 250 | step_pin: 1_step_pin 251 | dir_pin: !1_dir_pin 252 | enable_pin: !1_enable_pin 253 | microsteps: 32 254 | 255 | 256 | # rotation_distance: 22.65 # diminuisci se sottoestrude - 257 | # 23.3 = Sherpa Mini + Moon 14 8th 258 | # rotation_distance: 22 #diminuisci se sottoestrude 20 25 -- 22.5 = 10cm microsteps: 32 microstep 32 -> 23 # microstep 64 -> 45 259 | rotation_distance: 22.6 # Vz-Hextrudort-Low # 23.23 default 260 | # rotation_distance: 22.65 # Libra mini 261 | 262 | 263 | full_steps_per_rotation: 200 # 200 for 1.8 degree Motor - 400 for 0.9 deg 264 | gear_ratio: 50:8 # 50:17 for BMG clone extruder otherwise 3:1 265 | # 50:8 Moon 8t # 50:10 Moon 10 tooths 266 | # 50:8 8th and Sherpa Mini, Libra Mini, Vz-Hextrudort 267 | nozzle_diameter: 0.6 268 | 269 | filament_diameter: 1.750 270 | # 271 | max_extrude_only_distance: 1400.0 272 | max_extrude_only_accel: 1700 # mm/s^2 273 | max_extrude_only_velocity: 100.0 # G1 EX mm/s 274 | # Maximum velocity (in mm/s) and acceleration (in mm/s^2) of the extruder motor for retractions and extrude-only moves 275 | # max_extrude_only_velocity: 75 # SHERPA MINI 276 | # max_extrude_only_accel: 1500 # SHERPA MINI 277 | # https://github.com/Annex-Engineering/Sherpa_Mini-Extruder/blob/master/Klipper_Config_Block.txt 278 | 279 | max_extrude_cross_section: 100.0 # The default is: 4x nozzle_diameter^2 280 | 281 | heater_pin: PC3 # Default PC3 282 | sensor_pin: PC1 # Black TH2 PC1 - Violet TH1 PC2 283 | sensor_type: PT1000 284 | 285 | pullup_resistor: 4700 286 | # sensor_type: DYZE 287 | # sensor_type: EPCOS 100K B57560G104F 288 | # sensor_type: ATC Semitec 104GT-2 #stock 289 | # sensor_type: ATC Semitec 104NT-4-R025H42G 290 | # sensor_type: Generic 3950 291 | # sensor_type: Honeywell 100K 135-104LAG-J01 292 | # sensor_type: NTC 100K MGB18-104F39050L32 293 | # sensor_type: SliceEngineering 450 294 | # sensor_type: TDK NTCG104LH104JT1 295 | 296 | # pullup_resistor: 4700 297 | min_temp: -3.15 # min is -273.15 # debug 298 | max_temp: 350 # 350 # 299 | min_extrude_temp: 0.15 # 140 # min 5.15 # debug 300 | 301 | #################### 302 | # PID EXTRUDER 303 | #################### 304 | 305 | pwm_cycle_time: 0.02 # default pwm_cycle_time: 0.1 (10Hz,the max for SSR) 306 | max_power: 1.0 307 | smooth_time: 0.5 # default 1.0 308 | 309 | 310 | # NF CRAZY VOL CO HF 70W 2x 4020 60% 311 | # smooth 0.1 cycle_time: 0.02 312 | #control: pid 313 | #pid_kp: 22.609 314 | #pid_ki: 1.311 315 | #pid_kd: 97.503 316 | 317 | 318 | 319 | ######################### 320 | pressure_advance: 0.05 321 | # PLA 0.045 100mm/s 322 | # PLA 0.08 40mm/s 323 | # PETG 324 | ######################### 325 | 326 | 327 | [tmc2208 extruder] 328 | uart_pin: PC13 # NB extruder on 3rd Position to use same Fan of XY 329 | # uart_address: 0 330 | interpolate: False 331 | run_current: 0.85 # 0.9 for stock motor nema 17 - 0.35 nema 14 sth17 or fysetc clone- 0.85 nema 14 STH20 or moons CSE14HRA1L410A-02 332 | #run_current: 0.35 #per motore nema 14 STH17 o clone fysetc 333 | #run_current: 0.85 #per motore nema 14 STH20 o moons 334 | # hold_current: 0.85 # Disable for sensroless Homing - 0.85 for nema 14 STH20 or moons motor #0.35 for nema 14 STH17 or fysetc clone motor 335 | sense_resistor: 0.100 336 | stealthchop_threshold: 0 337 | 338 | 339 | ####################################### 340 | # 341 | # ██████╗ ██╗ ████████╗ ██████╗ ██╗ ██╗ ██████╗██╗ ██╗ 342 | # ██╔══██╗██║ ╚══██╔══╝██╔═══██╗██║ ██║██╔════╝██║ ██║ 343 | # ██████╔╝██║ ██║ ██║ ██║██║ ██║██║ ███████║ 344 | # ██╔══██╗██║ ██║ ██║ ██║██║ ██║██║ ██╔══██║ 345 | # ██████╔╝███████╗██║ ╚██████╔╝╚██████╔╝╚██████╗██║ ██║ 346 | # ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝ 347 | # 348 | # BLTOUCH 349 | ####################################### 350 | 351 | # SCREWS 352 | # 1-----2 353 | # | X | 354 | # 4-----3 355 | 356 | [bltouch] 357 | sensor_pin: ^PC4 # prefix or remove ! to reverse the logic TRIGGERED/OPEN 358 | # Mt_Det2 pin Robin Nano 1.2 - prefix with ^ to pullup if you haven't a pullup resistor on signal 359 | control_pin: PB2 # PA8 -> PB2 ALERT: check correct pin for your Robin Nano 360 | # PA8 stock servo 3pin 361 | # use PB2 as secondary Servo Pin 362 | # set_output_mode: 5V 363 | pin_move_time: 0.680 364 | stow_on_each_sample: True # BL gp UP every point 365 | # probe_with_touch_mode: True # True if BL Touch > v3 - true with filtered capacitor on pin 366 | # pin_up_reports_not_triggered: False # On clone with query issue 367 | # pin_up_touch_mode_reports_triggered: False #On clone with query issue 368 | 369 | ####################################### 370 | x_offset: 0 371 | 372 | y_offset: -38 373 | 374 | #z_offset: 3.800 # >0.0 - increase if Z bed mesh is positive 375 | # PROBE on the center position 376 | # If negative, move the endstops position 377 | 378 | speed: 5 379 | samples: 2 380 | ################### 381 | sample_retract_dist: 5.0 # the distance (in mm) to lift the toolhead between each sample 382 | ################### 383 | samples_result: average 384 | samples_tolerance: 0.050 385 | samples_tolerance_retries: 0 386 | lift_speed: 20 387 | 388 | # [safe_z_home] 389 | # z_hop: 3 # Move up 390 | # z_hop_speed: 10 391 | # home_xy_position: 0, 275 # stepper_y{position_max} # Change coordinates to the center of your print bed 392 | # speed: 100 393 | 394 | 395 | # ███╗ ███╗███████╗███████╗██╗ ██╗ 396 | # ████╗ ████║██╔════╝██╔════╝██║ ██║ 397 | # ██╔████╔██║█████╗ ███████╗███████║ 398 | # ██║╚██╔╝██║██╔══╝ ╚════██║██╔══██║ 399 | # ██║ ╚═╝ ██║███████╗███████║██║ ██║ 400 | # ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ 401 | # 402 | 403 | # SCREWS 404 | # 1-----2 405 | # | X | 406 | # 4-----3 407 | 408 | [bed_mesh] 409 | probe_count: 5,5 410 | speed: 200 411 | 412 | mesh_min: 5, 5 413 | 414 | # X_mesh_min = X coordinate - BL-Touch |y_offset| 415 | # the result must be > Xmin position 416 | # Y_mesh_min = Y coordinate - BL-Touch |y_offset| 417 | # the result must be > Ymin position 418 | 419 | 420 | mesh_max: 210, 180 # 275, 275 if the BED 0,0 is your 0,0 421 | # X= X_Bed - X_mesh_min (Ex: X bed 310, X_mesh_min=5 X_mesh_max= 305 ) 422 | # Y= Y_Bed - Y_mesh_min - Y BLtouch offset (Ex: Y bed 310, Y_mesh_min=35 X_mesh_max= 275 ) 423 | # Y< Ymax Printer limit - Y BLtouch offset 424 | 425 | ################### 426 | horizontal_move_z: 6 # >z_offset probe The Z coordinate the probe rises to prior to traveling between points. 427 | ################### 428 | 429 | fade_start: 1.0 430 | fade_end: 10.0 431 | split_delta_z: .025 432 | move_check_distance: 5.0 433 | mesh_pps: 2,2 434 | algorithm: bicubic 435 | bicubic_tension: .2 436 | 437 | 438 | 439 | 440 | 441 | ####################################### 442 | # ██████╗ ███████╗██████╗ 443 | # ██╔══██╗██╔════╝██╔══██╗ 444 | # ██████╔╝█████╗ ██║ ██║ 445 | # ██╔══██╗██╔══╝ ██║ ██║ 446 | # ██████╔╝███████╗██████╔╝ 447 | # ╚═════╝ ╚══════╝╚═════╝ 448 | # BED 449 | ####################################### 450 | 451 | [heater_bed] 452 | heater_pin: PA0 # Default PA0 453 | pullup_resistor: 4700 # default 4700 454 | smooth_time: 1.0 # default 1.0 455 | max_power: 1.0 #default 1.0 456 | pwm_cycle_time: 0.1 #default 0.1 (10Hz, tha max for SSR relay) 457 | 458 | 459 | sensor_type: EPCOS 100K B57560G104F 460 | # sensor_type: NTC 100K beta 3950 461 | sensor_pin: PC0 # lateral 462 | 463 | 464 | min_temp: -0.15 # min -273.15 465 | max_temp: 130 # 130 466 | 467 | # control: watermark 468 | control: pid 469 | 470 | # [heater_bed] 471 | 472 | pid_kp = 71.215 473 | pid_ki = 2.272 474 | pid_kd = 558.145 475 | 476 | # Stock BED SP3 477 | # pid_Kp: 325.10 478 | # pid_Ki: 63.35 479 | # pid_Kd: 417.10 480 | 481 | # BED SP3 482 | 483 | # pid_kp: 71.215 484 | # pid_ki: 2.272 485 | # pid_kd: 558.145 486 | 487 | 488 | 489 | ####################################### 490 | # 491 | # ████████╗███████╗███╗ ███╗██████╗ 492 | # ╚══██╔══╝██╔════╝████╗ ████║██╔══██╗ 493 | # ██║ █████╗ ██╔████╔██║██████╔╝ 494 | # ██║ ██╔══╝ ██║╚██╔╝██║██╔═══╝ 495 | # ██║ ███████╗██║ ╚═╝ ██║██║ 496 | # ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ 497 | # TEMPERATURES 498 | ####################################### 499 | 500 | 501 | 502 | ####################################### 503 | # 504 | # ███████╗ █████╗ ███╗ ██╗ 505 | # ██╔════╝██╔══██╗████╗ ██║ 506 | # █████╗ ███████║██╔██╗ ██║ 507 | # ██╔══╝ ██╔══██║██║╚██╗██║ 508 | # ██║ ██║ ██║██║ ╚████║ 509 | # ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ 510 | # 511 | # FANS 512 | ####################################### 513 | 514 | #FAN 3030 on Hotend 515 | [heater_fan extruder] 516 | heater: extruder 517 | pin: PB0 # Default PB1 518 | kick_start_time: 0.4 519 | max_power: 1 520 | off_below: 0.0 521 | shutdown_speed: 0 522 | cycle_time: 0.010 523 | heater_temp: 65.0 524 | fan_speed: 1 525 | #tachometer_pin: 526 | #tachometer_ppr: 2 527 | #tachometer_poll_interval: 0.0015 528 | #hardware_pwm: False 529 | #enable_pin: 530 | 531 | 532 | 533 | # FANDUCT 534 | [fan] 535 | pin: PB1 536 | kick_start_time: 0.5 537 | max_power: 1.0 538 | off_below: 0 539 | 540 | 541 | # [multi_pin dual_fan_extruder] 542 | # pins:PB1,PB2 543 | 544 | # Turn ON fan when a stepper is ON 545 | 546 | # [controller_fan driver_fan] 547 | # if not declared, default is 548 | # stepper: stepper_x, stepper_y, stepper_z, stepper_z1, ecc... , extruder 549 | # heater: extruder 550 | # Name of the config section defining the heater/stepper that this fan 551 | # is associated with. If a comma separated list of heater/stepper names 552 | # is provided here, then the fan will be enabled when any of the given 553 | # heaters/steppers are enabled. The default heater is "extruder", the 554 | # default stepper is all of them. 555 | # stepper: stepper_x, stepper_y, stepper_z, stepper_z1 556 | # heater: extruder 557 | # pin: PE5 # pwm fan pin 558 | # max_power: 1 559 | # shutdown_speed: 0 # in soft pwm is allowed 1 or 0 560 | # kick_start_time: 0.1 561 | # off_below: 0.40 562 | # idle_speed: 0.7 # Fan speed when stepper/heater are off 563 | # idle_timeout: 1 # Turn off fan after x secondos from stepper/heater is off 564 | 565 | # to exclude activation fan with extruder 566 | # I find a workaround creating a fake sensor and heater on an free pin, so: 567 | # [duplicate_pin_override] # needed to use only 1 not connected PIN for FAKE_HEATER 568 | # pins: PC2 569 | 570 | # [heater_generic fake_heater] 571 | # sensor_type: PT1000 # Put here whatever sensor you want 572 | # heater_pin: PC2 # use a not connected PIN 573 | # sensor_pin: PC2 # use a not connected PIN 574 | # gcode_id: 1 575 | # min_temp: -273.15 # min -273.15 576 | # max_temp: 9999 577 | # control: watermark 578 | # max_delta: 9999 579 | 580 | # SENSOR TYPE not provided from Klipper 581 | # you have to define 3 value of resistance/temperature, measure your temperature probe with a tester 582 | # [thermistor DYZE] 583 | # https://www.aliexpress.com/item/4000591370691.html 584 | # https://docs.dyzedesign.com/hotends.html#klipper-firmware 585 | # dyze500 clone 586 | # temperature1: 60 587 | # resistance1: 666000 #450000 588 | # temperature2: 162 589 | # resistance2: 22200 590 | # temperature3: 280 591 | # resistance3: 1555 592 | 593 | 594 | 595 | ####################################### 596 | # 597 | # ██████╗ ██████╗ ██╗███╗ ██╗████████╗███████╗██████╗ 598 | # ██╔══██╗██╔══██╗██║████╗ ██║╚══██╔══╝██╔════╝██╔══██╗ 599 | # ██████╔╝██████╔╝██║██╔██╗ ██║ ██║ █████╗ ██████╔╝ 600 | # ██╔═══╝ ██╔══██╗██║██║╚██╗██║ ██║ ██╔══╝ ██╔══██╗ 601 | # ██║ ██║ ██║██║██║ ╚████║ ██║ ███████╗██║ ██║ 602 | # ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ 603 | # 604 | # PRINTER 605 | ####################################### 606 | 607 | 608 | 609 | [firmware_retraction] 610 | retract_length: 0.7 # default 0 mm 611 | # The length of filament (in mm) to retract when G10 is activated, and to unretract when G11 is activated (but see unretract_extra_length below). 612 | retract_speed: 40 # default is 20 mm/s 613 | # The speed of retraction, in mm/s. 614 | #unretract_extra_length: 0 615 | # The length (in mm) of *additional* filament to add when unretracting. 616 | unretract_speed: 40 # default is 10 mm/s. 617 | # The speed of unretraction, in mm/s. The default is 10 mm/s. 618 | 619 | 620 | 621 | 622 | # SCREWS 623 | # 1-----2 624 | # | X | 625 | # 4-----3 626 | 627 | # 310x310 BED 0,0 is your 0,0 628 | [bed_screws] 629 | screw1: 15, 210 630 | screw2: 210, 210 631 | screw3: 210, 15 632 | screw4: 15, 15 633 | 634 | # if your 0,0 is the BED phisical limit of your printer with Diamond and enstop optical 635 | # [bed_screws] 636 | # screw1: 26, 265 637 | # screw2: 266, 265 638 | # screw3: 266, 25 639 | # screw4: 26, 25 640 | 641 | 642 | 643 | ### to enalbe M117 644 | [display_status] 645 | 646 | ### to enable M118 647 | [respond] 648 | # default_type: echo 649 | 650 | [pause_resume] 651 | 652 | 653 | 654 | [printer] 655 | kinematics: corexy 656 | #♥ kinematics: limited_corexy 657 | # https://github.com/Piezoid/klipper/blob/work-peraxis/klippy/kinematics/limited_corexy.py 658 | max_velocity: 200 659 | # max_x_velocity: 250 # only on limited_cartesian.py 660 | # max_y_velocity: 20 661 | max_accel: 6000 662 | max_accel_to_decel: 6000 663 | # max_x_accel: 8000 # limited_corexy 664 | # max_y_accel: 6000 # limited_corexy 665 | max_z_velocity: 10 666 | max_z_accel: 20 667 | square_corner_velocity: 5 668 | 669 | [force_move] 670 | enable_force_move: True 671 | 672 | [save_variables] 673 | filename: /home/pi/printer_data/config/save_variables.cfg # needed for Power Loss Recovery plr.cfg 674 | # filename: ~/variable.cfg # needed for Power Loss Recovery plr.cfg 675 | # filename: /home/pi/printer_data/config/printer_variables.cfg 676 | # filename: /home/pi/klipper_config/.variables.stb 677 | 678 | # ATTENTION: never use '#*#' above 679 | 680 | #*# <---------------------- SAVE_CONFIG ----------------------> 681 | #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. 682 | #*# 683 | #*# [bed_mesh default] 684 | #*# version = 1 685 | #*# points = 686 | #*# -0.127500, -0.064375, -0.021250, -0.060625, -0.121563 687 | #*# -0.127813, -0.073438, -0.037500, -0.071250, -0.128438 688 | #*# -0.118750, -0.075000, -0.041875, -0.070000, -0.129375 689 | #*# -0.125938, -0.071250, -0.040000, -0.074063, -0.130313 690 | #*# -0.112813, -0.057813, -0.016875, -0.045625, -0.113750 691 | #*# x_count = 5 692 | #*# y_count = 5 693 | #*# mesh_x_pps = 2 694 | #*# mesh_y_pps = 2 695 | #*# algo = bicubic 696 | #*# tension = 0.2 697 | #*# min_x = 5.0 698 | #*# max_x = 210.0 699 | #*# min_y = 5.0 700 | #*# max_y = 180.0 701 | #*# 702 | #*# [extruder] 703 | #*# control = pid 704 | #*# pid_kp = 23.967 705 | #*# pid_ki = 1.795 706 | #*# pid_kd = 79.989 707 | #*# 708 | #*# [bltouch] 709 | #*# z_offset = 2.950 710 | -------------------------------------------------------------------------------- /timelapse.cfg: -------------------------------------------------------------------------------- 1 | # Timelapse klipper macro definition 2 | # 3 | # Copyright (C) 2021 Christoph Frei 4 | # Copyright (C) 2021 Alex Zellner 5 | # 6 | # This file may be distributed under the terms of the GNU GPLv3 license 7 | # 8 | # Macro version 1.13 9 | # 10 | 11 | ##### DO NOT CHANGE ANY MACRO!!! ##### 12 | 13 | ########################################################################## 14 | # # 15 | # GET_TIMELAPSE_SETUP: Print the Timelapse setup to console # 16 | # # 17 | ########################################################################## 18 | 19 | [gcode_macro GET_TIMELAPSE_SETUP] 20 | description: Print the Timelapse setup 21 | gcode: 22 | {% set tl = printer['gcode_macro TIMELAPSE_TAKE_FRAME'] %} 23 | {% set output_txt = ["Timelapse Setup:"] %} 24 | {% set _dummy = output_txt.append("enable: %s" % tl.enable) %} 25 | {% set _dummy = output_txt.append("park: %s" % tl.park.enable) %} 26 | {% if tl.park.enable %} 27 | {% set _dummy = output_txt.append("park position: %s time: %s s" % (tl.park.pos, tl.park.time)) %} 28 | {% set _dummy = output_txt.append("park cord x:%s y:%s dz:%s" % (tl.park.coord.x, tl.park.coord.y, tl.park.coord.dz)) %} 29 | {% set _dummy = output_txt.append("travel speed: %s mm/s" % tl.speed.travel) %} 30 | {% endif %} 31 | {% set _dummy = output_txt.append("fw_retract: %s" % tl.extruder.fw_retract) %} 32 | {% if not tl.extruder.fw_retract %} 33 | {% set _dummy = output_txt.append("retract: %s mm speed: %s mm/s" % (tl.extruder.retract, tl.speed.retract)) %} 34 | {% set _dummy = output_txt.append("extrude: %s mm speed: %s mm/s" % (tl.extruder.extrude, tl.speed.extrude)) %} 35 | {% endif %} 36 | {% set _dummy = output_txt.append("verbose: %s" % tl.verbose) %} 37 | {action_respond_info(output_txt|join("\n"))} 38 | 39 | ################################################################################################ 40 | # # 41 | # Use _SET_TIMELAPSE_SETUP [ENABLE=value] [VERBOSE=value] [PARK_ENABLE=value] [PARK_POS=value] # 42 | # [PARK_TIME=value] [CUSTOM_POS_X=value] [CUSTOM_POS_Y=value] # 43 | # [CUSTOM_POS_DZ=value][TRAVEL_SPEED=value] [RETRACT_SPEED=value] # 44 | # [EXTRUDE_SPEED=value] [EXTRUDE_DISTANCE=value] # 45 | # [RETRACT_DISTANCE=value] [FW_RETRACT=value] # 46 | # # 47 | ################################################################################################ 48 | 49 | [gcode_macro _SET_TIMELAPSE_SETUP] 50 | description: Set user parameters for timelapse 51 | gcode: 52 | {% set tl = printer['gcode_macro TIMELAPSE_TAKE_FRAME'] %} 53 | ##### get min and max bed size ##### 54 | {% set min = printer.toolhead.axis_minimum %} 55 | {% set max = printer.toolhead.axis_maximum %} 56 | {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch'] 57 | else False %} 58 | {% set park = {'min' : {'x': (min.x / 1.42)|round(3) if round_bed else min.x|round(3), 59 | 'y': (min.y / 1.42)|round(3) if round_bed else min.y|round(3)}, 60 | 'max' : {'x': (max.x / 1.42)|round(3) if round_bed else max.x|round(3), 61 | 'y': (max.y / 1.42)|round(3) if round_bed else max.y|round(3)}, 62 | 'center': {'x': (max.x-(max.x-min.x)/2)|round(3), 63 | 'y': (max.y-(max.y-min.y)/2)|round(3)}} %} 64 | ##### set new values ##### 65 | {% if params.ENABLE %} 66 | {% if params.ENABLE|lower is in ['true', 'false'] %} 67 | SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=enable VALUE={True if params.ENABLE|lower == 'true' else False} 68 | {% else %} 69 | {action_raise_error("ENABLE=%s not supported. Allowed values are [True, False]" % params.ENABLE|capitalize)} 70 | {% endif %} 71 | {% endif %} 72 | {% if params.VERBOSE %} 73 | {% if params.VERBOSE|lower is in ['true', 'false'] %} 74 | SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=verbose VALUE={True if params.VERBOSE|lower == 'true' else False} 75 | {% else %} 76 | {action_raise_error("VERBOSE=%s not supported. Allowed values are [True, False]" % params.VERBOSE|capitalize)} 77 | {% endif %} 78 | {% endif %} 79 | {% if params.CUSTOM_POS_X %} 80 | {% if params.CUSTOM_POS_X|float >= min.x and params.CUSTOM_POS_X|float <= max.x %} 81 | {% set _dummy = tl.park.custom.update({'x':params.CUSTOM_POS_X|float|round(3)}) %} 82 | {% else %} 83 | {action_raise_error("CUSTOM_POS_X=%s must be within [%s - %s]" % (params.CUSTOM_POS_X, min.x, max.x))} 84 | {% endif %} 85 | {% endif %} 86 | {% if params.CUSTOM_POS_Y %} 87 | {% if params.CUSTOM_POS_Y|float >= min.y and params.CUSTOM_POS_Y|float <= max.y %} 88 | {% set _dummy = tl.park.custom.update({'y':params.CUSTOM_POS_Y|float|round(3)}) %} 89 | {% else %} 90 | {action_raise_error("CUSTOM_POS_Y=%s must be within [%s - %s]" % (params.CUSTOM_POS_Y, min.y, max.y))} 91 | {% endif %} 92 | {% endif %} 93 | {% if params.CUSTOM_POS_DZ %} 94 | {% if params.CUSTOM_POS_DZ|float >= min.z and params.CUSTOM_POS_DZ|float <= max.z %} 95 | {% set _dummy = tl.park.custom.update({'dz':params.CUSTOM_POS_DZ|float|round(3)}) %} 96 | {% else %} 97 | {action_raise_error("CUSTOM_POS_DZ=%s must be within [%s - %s]" % (params.CUSTOM_POS_DZ, min.z, max.z))} 98 | {% endif %} 99 | {% endif %} 100 | {% if params.PARK_ENABLE %} 101 | {% if params.PARK_ENABLE|lower is in ['true', 'false'] %} 102 | {% set _dummy = tl.park.update({'enable':True if params.PARK_ENABLE|lower == 'true' else False}) %} 103 | {% else %} 104 | {action_raise_error("PARK_ENABLE=%s not supported. Allowed values are [True, False]" % params.PARK_ENABLE|capitalize)} 105 | {% endif %} 106 | {% endif %} 107 | {% if params.PARK_POS %} 108 | {% if params.PARK_POS|lower is in ['center','front_left','front_right','back_left','back_right','custom'] %} 109 | {% set dic = {'center' : {'x': park.center.x , 'y': park.center.y , 'dz': 1 }, 110 | 'front_left' : {'x': park.min.x , 'y': park.min.y , 'dz': 0 }, 111 | 'front_right': {'x': park.max.x , 'y': park.min.y , 'dz': 0 }, 112 | 'back_left' : {'x': park.min.x , 'y': park.max.y , 'dz': 0 }, 113 | 'back_right' : {'x': park.max.x , 'y': park.max.y , 'dz': 0 }, 114 | 'custom' : {'x': tl.park.custom.x, 'y': tl.park.custom.y, 'dz': tl.park.custom.dz}} %} 115 | {% set _dummy = tl.park.update({'pos':params.PARK_POS|lower}) %} 116 | {% set _dummy = tl.park.update({'coord':dic[tl.park.pos]}) %} 117 | {% else %} 118 | {action_raise_error("PARK_POS=%s not supported. Allowed values are [CENTER, FRONT_LEFT, FRONT_RIGHT, BACK_LEFT, BACK_RIGHT, CUSTOM]" 119 | % params.PARK_POS|upper)} 120 | {% endif %} 121 | {% endif %} 122 | {% if params.PARK_TIME %} 123 | {% if params.PARK_TIME|float >= 0.0 %} 124 | {% set _dummy = tl.park.update({'time':params.PARK_TIME|float|round(3)}) %} 125 | {% else %} 126 | {action_raise_error("PARK_TIME=%s must be a positive number" % params.PARK_TIME)} 127 | {% endif %} 128 | {% endif %} 129 | SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=park VALUE="{tl.park}" 130 | {% if params.TRAVEL_SPEED %} 131 | {% if params.TRAVEL_SPEED|float > 0.0 %} 132 | {% set _dummy = tl.speed.update({'travel':params.TRAVEL_SPEED|float|round(3)}) %} 133 | {% else %} 134 | {action_raise_error("TRAVEL_SPEED=%s must be larger than 0" % params.TRAVEL_SPEED)} 135 | {% endif %} 136 | {% endif %} 137 | {% if params.RETRACT_SPEED %} 138 | {% if params.RETRACT_SPEED|float > 0.0 %} 139 | {% set _dummy = tl.speed.update({'retract':params.RETRACT_SPEED|float|round(3)}) %} 140 | {% else %} 141 | {action_raise_error("RETRACT_SPEED=%s must be larger than 0" % params.RETRACT_SPEED)} 142 | {% endif %} 143 | {% endif %} 144 | {% if params.EXTRUDE_SPEED %} 145 | {% if params.EXTRUDE_SPEED|float > 0.0 %} 146 | {% set _dummy = tl.speed.update({'extrude':params.EXTRUDE_SPEED|float|round(3)}) %} 147 | {% else %} 148 | {action_raise_error("EXTRUDE_SPEED=%s must be larger than 0" % params.EXTRUDE_SPEED)} 149 | {% endif %} 150 | {% endif %} 151 | SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=speed VALUE="{tl.speed}" 152 | {% if params.EXTRUDE_DISTANCE %} 153 | {% if params.EXTRUDE_DISTANCE|float >= 0.0 %} 154 | {% set _dummy = tl.extruder.update({'extrude':params.EXTRUDE_DISTANCE|float|round(3)}) %} 155 | {% else %} 156 | {action_raise_error("EXTRUDE_DISTANCE=%s must be specified as positiv number" % params.EXTRUDE_DISTANCE)} 157 | {% endif %} 158 | {% endif %} 159 | {% if params.RETRACT_DISTANCE %} 160 | {% if params.RETRACT_DISTANCE|float >= 0.0 %} 161 | {% set _dummy = tl.extruder.update({'retract':params.RETRACT_DISTANCE|float|round(3)}) %} 162 | {% else %} 163 | {action_raise_error("RETRACT_DISTANCE=%s must be specified as positiv number" % params.RETRACT_DISTANCE)} 164 | {% endif %} 165 | {% endif %} 166 | {% if params.FW_RETRACT %} 167 | {% if params.FW_RETRACT|lower is in ['true', 'false'] %} 168 | {% if 'firmware_retraction' in printer.configfile.settings %} 169 | {% set _dummy = tl.extruder.update({'fw_retract': True if params.FW_RETRACT|lower == 'true' else False}) %} 170 | {% else %} 171 | {% set _dummy = tl.extruder.update({'fw_retract':False}) %} 172 | {% if params.FW_RETRACT|capitalize == 'True' %} 173 | {action_raise_error("[firmware_retraction] not defined in printer.cfg. Can not enable fw_retract")} 174 | {% endif %} 175 | {% endif %} 176 | {% else %} 177 | {action_raise_error("FW_RETRACT=%s not supported. Allowed values are [True, False]" % params.FW_RETRACT|capitalize)} 178 | {% endif %} 179 | {% endif %} 180 | SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=extruder VALUE="{tl.extruder}" 181 | {% if printer.configfile.settings['gcode_macro pause'] is defined %} 182 | {% set _dummy = tl.macro.update({'pause': printer.configfile.settings['gcode_macro pause'].rename_existing}) %} 183 | {% endif %} 184 | {% if printer.configfile.settings['gcode_macro resume'] is defined %} 185 | {% set _dummy = tl.macro.update({'resume': printer.configfile.settings['gcode_macro resume'].rename_existing}) %} 186 | {% endif %} 187 | SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=macro VALUE="{tl.macro}" 188 | 189 | ########################################################################## 190 | # # 191 | # TIMELAPSE_TAKE_FRAME: take the next picture # 192 | # # 193 | ########################################################################## 194 | 195 | ######################### definition ######################### 196 | ## enable: enable or disable the next frame. Valid inputs: [True, False] 197 | ## takingframe: internal use. Valid inputs: [True, False] 198 | ## 199 | ## park.enable: enable or disable to park the head while taking a picture. Valid inputs: [True, False] 200 | ## park.pos : used position for parking. Valid inputs: [center, front_left, front_right, back_left, back_right, custom] 201 | ## park.time : used for the debug macro. Time in s 202 | ## park.custom.x, park.custom.y: coordinates of the custom parkposition. Unit [mm] 203 | ## park.custom.dz : custom z hop for the picture. Unit [mm] 204 | ## park.coord : internal use 205 | ## 206 | ## extruder.fw_retract: enable disable fw retraction [True,False] 207 | ## extruder.extrude : filament extruded at the end of park. Unit [mm] 208 | ## extruder.retract : filament retract at the start of park. Unit [mm] 209 | ## 210 | ## speed.travel : used speed for travel from and to the park positon. Unit: [mm/min] 211 | ## speed.retract: used speed for retract [mm/min] 212 | ## speed.extrude: used speed for extrude [mm/min] 213 | ## 214 | ## verbose: Enable mesage output of TIMELAPSE_TAKE_FRAME 215 | ## 216 | ## restore.absolute.coordinates: internal use 217 | ## restore.absolute.extrude : internal use 218 | ## restore.speed : internal use 219 | ## restore.e : internal use 220 | ## restore.factor.speed : internal use 221 | ## restore.factor.extrude : internal use 222 | ## 223 | ## macro.pause : internal use 224 | ## macro.resume : internal use 225 | ## 226 | ## is_paused: internal use 227 | ############################################################### 228 | [gcode_macro TIMELAPSE_TAKE_FRAME] 229 | description: Take Timelapse shoot 230 | variable_enable: False 231 | variable_takingframe: False 232 | variable_park: {'enable': False, 233 | 'pos' : 'center', 234 | 'time' : 0.1, 235 | 'custom': {'x': 0, 'y': 0, 'dz': 0}, 236 | 'coord' : {'x': 0, 'y': 0, 'dz': 0}} 237 | variable_extruder: {'fw_retract': False, 238 | 'retract': 1.0, 239 | 'extrude': 1.0} 240 | variable_speed: {'travel': 100, 241 | 'retract': 15, 242 | 'extrude': 15} 243 | variable_verbose: True 244 | variable_restore: {'absolute': {'coordinates': True, 'extrude': True}, 'speed': 1500, 'e':0, 'factor': {'speed': 1.0, 'extrude': 1.0}} 245 | variable_macro: {'pause': 'PAUSE', 'resume': 'RESUME'} 246 | variable_is_paused: False 247 | gcode: 248 | {% set hyperlapse = True if params.HYPERLAPSE and params.HYPERLAPSE|lower =='true' else False %} 249 | {% if enable %} 250 | {% if (hyperlapse and printer['gcode_macro HYPERLAPSE'].run) or 251 | (not hyperlapse and not printer['gcode_macro HYPERLAPSE'].run) %} 252 | {% if park.enable %} 253 | {% set pos = {'x': park.coord.x, 'y': park.coord.y, 254 | 'z': [printer.gcode_move.gcode_position.z + park.coord.dz, printer.toolhead.axis_maximum.z]|min} %} 255 | {% set restore = {'absolute': {'coordinates': printer.gcode_move.absolute_coordinates, 256 | 'extrude' : printer.gcode_move.absolute_extrude}, 257 | 'speed' : printer.gcode_move.speed, 258 | 'e' : printer.gcode_move.gcode_position.e, 259 | 'factor' : {'speed' : printer.gcode_move.speed_factor, 260 | 'extrude': printer.gcode_move.extrude_factor}} %} 261 | SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=restore VALUE="{restore}" 262 | {% if not printer[printer.toolhead.extruder].can_extrude %} 263 | {% if verbose %}{action_respond_info("Timelapse: Warning, minimum extruder temperature not reached!")}{% endif %} 264 | {% else %} 265 | {% if extruder.fw_retract %} 266 | G10 267 | {% else %} 268 | M83 ; insure relative extrusion 269 | G0 E-{extruder.retract} F{speed.retract * 60} 270 | {% endif %} 271 | {% endif %} 272 | SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=is_paused VALUE=True 273 | {macro.pause} ; execute the klipper PAUSE command 274 | SET_GCODE_OFFSET X=0 Y=0 ; this will insure that the head parks always at the same position in a multi setup 275 | G90 ; insure absolute move 276 | {% if "xyz" not in printer.toolhead.homed_axes %} 277 | {% if verbose %}{action_respond_info("Timelapse: Warning, axis not homed yet!")}{% endif %} 278 | {% else %} 279 | G0 X{pos.x} Y{pos.y} Z{pos.z} F{speed.travel * 60} 280 | {% endif %} 281 | SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=takingframe VALUE=True 282 | UPDATE_DELAYED_GCODE ID=_WAIT_TIMELAPSE_TAKE_FRAME DURATION=0.5 283 | M400 284 | {% endif %} 285 | _TIMELAPSE_NEW_FRAME HYPERLAPSE={hyperlapse} 286 | {% endif %} 287 | {% else %} 288 | {% if verbose %}{action_respond_info("Timelapse: disabled, take frame ignored")}{% endif %} 289 | {% endif %} 290 | 291 | [gcode_macro _TIMELAPSE_NEW_FRAME] 292 | description: action call for timelapse shoot. must be a seperate macro 293 | gcode: 294 | {action_call_remote_method("timelapse_newframe", 295 | macropark=printer['gcode_macro TIMELAPSE_TAKE_FRAME'].park, 296 | hyperlapse=params.HYPERLAPSE)} 297 | 298 | [delayed_gcode _WAIT_TIMELAPSE_TAKE_FRAME] 299 | gcode: 300 | {% set tl = printer['gcode_macro TIMELAPSE_TAKE_FRAME'] %} 301 | {% set factor = {'speed': printer.gcode_move.speed_factor, 'extrude': printer.gcode_move.extrude_factor} %} 302 | {% if tl.takingframe %} 303 | UPDATE_DELAYED_GCODE ID=_WAIT_TIMELAPSE_TAKE_FRAME DURATION=0.5 304 | {% else %} 305 | {tl.macro.resume} VELOCITY={tl.speed.travel} ; execute the klipper RESUME command 306 | SET_GCODE_VARIABLE MACRO=TIMELAPSE_TAKE_FRAME VARIABLE=is_paused VALUE=False 307 | {% if not printer[printer.toolhead.extruder].can_extrude %} 308 | {action_respond_info("Timelapse: Warning minimum extruder temperature not reached!")} 309 | {% else %} 310 | {% if tl.extruder.fw_retract %} 311 | G11 312 | {% else %} 313 | G0 E{tl.extruder.extrude} F{tl.speed.extrude * 60} 314 | G0 F{tl.restore.speed} 315 | {% if tl.restore.absolute.extrude %} 316 | M82 317 | G92 E{tl.restore.e} 318 | {% endif %} 319 | {% endif %} 320 | {% endif %} 321 | {% if tl.restore.factor.speed != factor.speed %} M220 S{(factor.speed*100)|round(0)} {% endif %} 322 | {% if tl.restore.factor.extrude != factor.extrude %} M221 S{(factor.extrude*100)|round(0)} {% endif %} 323 | {% if not tl.restore.absolute.coordinates %} G91 {% endif %} 324 | {% endif %} 325 | 326 | #################################################################################################### 327 | # # 328 | # HYPERLAPSE: Starts or stops a Hyperlapse video # 329 | # Usage: HYPERLAPSE ACTION=START [CYCLE=time] starts a hyperlapse with cycle time (default 30 sec) # 330 | # HYPERLAPSE ACTION=STOP stops the hyperlapse recording # 331 | # # 332 | #################################################################################################### 333 | 334 | ######################### definition ######################### 335 | ## cycle: cycle time in seconds 336 | ## run: internal use [True/False] 337 | ############################################################### 338 | [gcode_macro HYPERLAPSE] 339 | description: Start/Stop a hyperlapse recording 340 | variable_cycle: 0 341 | variable_run: False 342 | gcode: 343 | {% set cycle = params.CYCLE|default(30)|int %} 344 | {% if params.ACTION and params.ACTION|lower == 'start' %} 345 | {action_respond_info("Hyperlapse: frames started (Cycle %d sec)" % cycle)} 346 | SET_GCODE_VARIABLE MACRO=HYPERLAPSE VARIABLE=run VALUE=True 347 | SET_GCODE_VARIABLE MACRO=HYPERLAPSE VARIABLE=cycle VALUE={cycle} 348 | UPDATE_DELAYED_GCODE ID=_HYPERLAPSE_LOOP DURATION={cycle} 349 | TIMELAPSE_TAKE_FRAME HYPERLAPSE=True 350 | {% elif params.ACTION and params.ACTION|lower == 'stop' %} 351 | {% if run %}{action_respond_info("Hyperlapse: frames stopped")}{% endif %} 352 | SET_GCODE_VARIABLE MACRO=HYPERLAPSE VARIABLE=run VALUE=False 353 | UPDATE_DELAYED_GCODE ID=_HYPERLAPSE_LOOP DURATION=0 354 | {% else %} 355 | {action_raise_error("Hyperlapse: No valid input parameter 356 | Use: 357 | - HYPERLAPSE ACTION=START [CYCLE=time] 358 | - HYPERLAPSE ACTION=STOP")} 359 | {% endif %} 360 | 361 | [delayed_gcode _HYPERLAPSE_LOOP] 362 | gcode: 363 | UPDATE_DELAYED_GCODE ID=_HYPERLAPSE_LOOP DURATION={printer["gcode_macro HYPERLAPSE"].cycle} 364 | TIMELAPSE_TAKE_FRAME HYPERLAPSE=True 365 | 366 | ########################################################################## 367 | # # 368 | # TIMELAPSE_RENDER: Render the video at print end # 369 | # # 370 | ########################################################################## 371 | 372 | ######################### definition ######################### 373 | ## render: internal use. Valid inputs: [True, False] 374 | ## run_identifier: internal use. Valid input [0 .. 3] 375 | ############################################################### 376 | [gcode_macro TIMELAPSE_RENDER] 377 | description: Render Timelapse video and wait for the result 378 | variable_render: False 379 | variable_run_identifier: 0 380 | gcode: 381 | {action_respond_info("Timelapse: Rendering started")} 382 | {action_call_remote_method("timelapse_render", byrendermacro="True")} 383 | SET_GCODE_VARIABLE MACRO=TIMELAPSE_RENDER VARIABLE=render VALUE=True 384 | {printer.configfile.settings['gcode_macro pause'].rename_existing} ; execute the klipper PAUSE command 385 | UPDATE_DELAYED_GCODE ID=_WAIT_TIMELAPSE_RENDER DURATION=0.5 386 | 387 | [delayed_gcode _WAIT_TIMELAPSE_RENDER] 388 | gcode: 389 | {% set ri = printer['gcode_macro TIMELAPSE_RENDER'].run_identifier % 4 %} 390 | SET_GCODE_VARIABLE MACRO=TIMELAPSE_RENDER VARIABLE=run_identifier VALUE={ri + 1} 391 | {% if printer['gcode_macro TIMELAPSE_RENDER'].render %} 392 | M117 Rendering {['-','\\','|','/'][ri]} 393 | UPDATE_DELAYED_GCODE ID=_WAIT_TIMELAPSE_RENDER DURATION=0.5 394 | {% else %} 395 | {action_respond_info("Timelapse: Rendering finished")} 396 | M117 397 | {printer.configfile.settings['gcode_macro resume'].rename_existing} ; execute the klipper RESUME command 398 | {% endif %} 399 | 400 | ########################################################################## 401 | # # 402 | # TEST_STREAM_DELAY: Helper macro to find stream and park delay # 403 | # # 404 | ########################################################################## 405 | 406 | [gcode_macro TEST_STREAM_DELAY] 407 | description: Helper macro to find stream and park delay 408 | gcode: 409 | {% set min = printer.toolhead.axis_minimum %} 410 | {% set max = printer.toolhead.axis_maximum %} 411 | {% set act = printer.toolhead.position %} 412 | {% set tl = printer['gcode_macro TIMELAPSE_TAKE_FRAME'] %} 413 | {% if act.z > 5.0 %} 414 | G0 X{min.x + 5.0} F{tl.speed.travel|int * 60} 415 | G0 X{(max.x-min.x)/2} 416 | G4 P{tl.park.time|float * 1000} 417 | _TIMELAPSE_NEW_FRAME HYPERLAPSE=FALSE 418 | G0 X{max.x - 5.0} 419 | {% else %} 420 | {action_raise_error("Toolhead z %.3f to low. Please place head above z = 5.0" % act.z)} 421 | {% endif %} 422 | -------------------------------------------------------------------------------- /printer_Troodon_2.0.cfg: -------------------------------------------------------------------------------- 1 | # This file contains common pin mappings for the BigTreeTech Octopus X7 2 | # To use this config, the firmware should be compiled for the STM32F407 with a "32KiB bootloader" 3 | # after running "make", copy the generated "klipper/out/klipper.bin" file to a 4 | # file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. 5 | 6 | # See docs/Config_Reference.md for a description of parameters. 7 | 8 | ## Formbot / Vivedino Troodon 2.0 - BigTreeTech BTT Octopus X7 # https://teamgloomy.github.io/troodon_v2_pins.html 9 | ## Compiled By: YGK3D # https://github.com/YGK3D/Troodon-2-Klipper/blob/main/Troodon2-Klipper-YGK3D-v1_2-printer.cfg 10 | ## Modded By: Travis90x 11 | 12 | ## *** THINGS TO CHANGE/CHECK: *** 13 | ## MCU paths [mcu] section 14 | ## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types 15 | ## Z Endstop Switch location [safe_z_home] section 16 | ## Homing end position [gcode_macro G32] section 17 | ## Z Endstop Switch offset for Z0 [stepper_z] section 18 | ## Probe points [quad_gantry_level] section 19 | ## Min & Max gantry corner postions [quad_gantry_level] section 20 | ## PID tune [extruder] and [heater_bed] sections 21 | ## Probe pin [probe] section 22 | ## Fine tune E steps [extruder] section 23 | 24 | 25 | [include adv_macro.cfg] 26 | [include START.cfg] 27 | [include klicky-probe.cfg] 28 | [include KAMP_Settings.cfg] 29 | 30 | 31 | #[input_shaper] 32 | #shaper_freq_x: 50 #Replace with the frequency you find using TEST_RESONANCES AXIS=X 33 | #shaper_type_x: mzv #Replace with the shaper you find using TEST_RESONANCES AXIS=X 34 | #shaper_freq_y: 50 #Replace with the frequency you find using TEST_RESONANCES AXIS=Y 35 | #shaper_type_y: 2hump_ei #Replace with the shaper you find using TEST_RESONANCES AXIS=X 36 | 37 | # ###################################### 38 | # 39 | # ███╗ ███╗ ██████╗██╗ ██╗ 40 | # ████╗ ████║██╔════╝██║ ██║ 41 | # ██╔████╔██║██║ ██║ ██║ 42 | # ██║╚██╔╝██║██║ ██║ ██║ 43 | # ██║ ╚═╝ ██║╚██████╗╚██████╔╝ 44 | # ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ 45 | # 46 | # mcu 47 | # ###################################### 48 | 49 | 50 | [mcu] 51 | ## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify 52 | ##-------------------------------------------------------------------- 53 | serial: /dev/serial/by-id/usb-Klipper_stm32f407xx_3A002C001047323137363638-if00 54 | restart_method: command 55 | ##-------------------------------------------------------------------- 56 | 57 | 58 | ####################################### 59 | # 60 | # ██████╗ ██████╗ ██╗███╗ ██╗████████╗███████╗██████╗ 61 | # ██╔══██╗██╔══██╗██║████╗ ██║╚══██╔══╝██╔════╝██╔══██╗ 62 | # ██████╔╝██████╔╝██║██╔██╗ ██║ ██║ █████╗ ██████╔╝ 63 | # ██╔═══╝ ██╔══██╗██║██║╚██╗██║ ██║ ██╔══╝ ██╔══██╗ 64 | # ██║ ██║ ██║██║██║ ╚████║ ██║ ███████╗██║ ██║ 65 | # ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ 66 | # 67 | # PRINTER 68 | ####################################### 69 | [printer] 70 | kinematics: corexy 71 | max_velocity: 400 72 | max_accel: 8000 #Max 4000 73 | max_z_velocity: 60 # 40 = 2400 - Max 15 for 12V TMC Drivers, can increase for 24V 74 | max_z_accel: 350 75 | square_corner_velocity: 5.0 76 | 77 | [idle_timeout] 78 | timeout: 1800 79 | 80 | [exclude_object] 81 | 82 | 83 | [firmware_retraction] 84 | retract_length: 0.5 # default 0 mm 85 | # The length of filament (in mm) to retract when G10 is activated, and to unretract when G11 is activated (but see unretract_extra_length below). 86 | retract_speed: 35 # default is 20 mm/s 87 | # The speed of retraction, in mm/s. 88 | #unretract_extra_length: 0 89 | # The length (in mm) of *additional* filament to add when unretracting. 90 | unretract_speed: 35 # default is 10 mm/s. 91 | # The speed of unretraction, in mm/s. The default is 10 mm/s. 92 | 93 | # ###################################### 94 | # STEPPERS 95 | # ###################################### 96 | 97 | # ██╗ ██╗ 98 | # ╚██╗██╔╝ 99 | # ╚███╔╝ 100 | # ██╔██╗ 101 | # ██╔╝ ██╗ 102 | # ╚═╝ ╚═╝ 103 | 104 | ## B Stepper - Left 105 | ## Connected to MOTOR_0 106 | ## Endstop connected to DIAG_0 107 | [stepper_x] 108 | step_pin: PA3 109 | dir_pin: PA4 110 | enable_pin: !PA1 111 | rotation_distance: 40 112 | microsteps: 32 113 | full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper 114 | endstop_pin: PF2 115 | position_min: 0 116 | ##-------------------------------------------------------------------- 117 | 118 | ## Uncomment below for 250mm build 119 | #position_endstop: 250 120 | #position_max: 250 121 | 122 | ## Uncomment for 300mm build 123 | #position_endstop: 300 124 | #position_max: 300 125 | 126 | ## Uncomment for 350mm build 127 | position_endstop: 350 128 | position_max: 350 129 | 130 | ##-------------------------------------------------------------------- 131 | homing_speed: 100 #Max 100 132 | second_homing_speed: 5 # useful for optical 133 | homing_retract_dist: 5 134 | homing_positive_dir: true 135 | 136 | ## Make sure to update below for your relevant driver (2208 or 2209) 137 | [tmc2209 stepper_x] 138 | uart_pin: PA2 139 | interpolate: True # Reduce Noise. For best positional accuracy consider using spreadCycle mode and disable interpolation 140 | run_current: 1.2 141 | sense_resistor: 0.110 142 | stealthchop_threshold: 0 # Max 999999 143 | # The velocity (in mm/s) to set the "stealthChop" threshold to. 144 | # When set, "stealthChop" mode will be enabled if the stepper motor 145 | # velocity is below this value. The default is 0, which disables "stealthChop" mode. 146 | 147 | 148 | 149 | # ██╗ ██╗ 150 | # ╚██╗ ██╔╝ 151 | # ╚████╔╝ 152 | # ╚██╔╝ 153 | # ██║ 154 | # ╚═╝ 155 | 156 | ## A Stepper - Right 157 | ## Connected to MOTOR_1 158 | ## Endstop connected to DIAG_1 159 | [stepper_y] 160 | step_pin: PC2 161 | dir_pin: PC3 162 | enable_pin: !PC1 163 | rotation_distance: 40 164 | microsteps: 32 165 | full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper 166 | endstop_pin: PC15 167 | position_min: 0 168 | ##-------------------------------------------------------------------- 169 | 170 | ## Uncomment for 250mm build 171 | #: 250 172 | #position_max: 250 173 | 174 | ## Uncomment for 300mm build 175 | #: 300 176 | #position_max: 300 177 | 178 | ## Uncomment for 350mm build 179 | position_endstop: 350 180 | position_max: 350 181 | 182 | ##-------------------------------------------------------------------- 183 | homing_speed: 100 #Max 100 184 | second_homing_speed: 5 # useful for optical 185 | homing_retract_dist: 5 186 | homing_positive_dir: true 187 | 188 | ## Make sure to update below for your relevant driver (2208 or 2209) 189 | [tmc2209 stepper_y] 190 | uart_pin: PC0 191 | interpolate: True # Reduce Noise. For best positional accuracy consider using spreadCycle mode and disable interpolation 192 | run_current: 1.2 193 | sense_resistor: 0.110 194 | stealthchop_threshold: 0 195 | 196 | 197 | # ███████╗ 198 | # ╚══███╔╝ 199 | # ███╔╝ 200 | # ███╔╝ 201 | # ███████╗ 202 | # ╚══════╝ 203 | 204 | 205 | 206 | 207 | ## Z0 Stepper - Front Left 208 | ## Connected to MOTOR_4 209 | ## Endstop connected to DIAG_4 210 | 211 | [stepper_z] 212 | step_pin: PB10 213 | dir_pin: PB11 214 | enable_pin: !PE15 215 | rotation_distance: 40 216 | gear_ratio: 80:16 217 | microsteps: 16 218 | 219 | # position_endstop: 0.1 # DISABLE if probe:z_virtual_endstop 220 | 221 | endstop_pin: probe:z_virtual_endstop # for Endstop Z with BL Touch # DISABLE position_endstop 222 | # endstop_pin: !PC13 # Cella di carico 223 | # endstop_pin: PF4 # Klicky or BL-Touch 224 | 225 | 226 | ## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) 227 | ## (+) value = endstop above Z0, (-) value = endstop below 228 | ## Increasing position_endstop brings nozzle closer to the bed 229 | ## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config 230 | #position_endstop: 0 231 | ##-------------------------------------------------------------------- 232 | 233 | ## Uncomment below for 250mm build 234 | #position_max: 210 235 | 236 | ## Uncomment below for 300mm build 237 | #position_max: 260 238 | 239 | ## Uncomment below for 350mm build 240 | position_max: 310.9 241 | 242 | ##-------------------------------------------------------------------- 243 | position_min: -5 244 | homing_speed: 10 245 | second_homing_speed: 3 246 | homing_retract_dist: 5 247 | 248 | ## Make sure to update below for your relevant driver (2208 or 2209) 249 | [tmc2209 stepper_z] 250 | uart_pin: PE14 251 | interpolate: true 252 | run_current: 1.2 253 | sense_resistor: 0.110 254 | stealthchop_threshold: 9999 255 | 256 | ## Z1 Stepper - Rear Left 257 | ## Connected to MOTOR_3 258 | [stepper_z1] 259 | step_pin: PE11 260 | dir_pin: !PE12 261 | enable_pin: !PE10 262 | rotation_distance: 40 263 | gear_ratio: 80:16 264 | microsteps: 16 265 | 266 | ## Make sure to update below for your relevant driver (2208 or 2209) 267 | [tmc2209 stepper_z1] 268 | uart_pin: PE9 269 | interpolate: true 270 | run_current: 1.2 271 | sense_resistor: 0.110 272 | stealthchop_threshold: 9999 273 | 274 | ## Z2 Stepper - Rear Right 275 | ## Connected to MOTOR_6 276 | [stepper_z2] 277 | step_pin: PE7 278 | dir_pin: PE8 279 | enable_pin: !PG1 280 | rotation_distance: 40 281 | gear_ratio: 80:16 282 | microsteps: 16 283 | 284 | ## Make sure to update below for your relevant driver (2208 or 2209) 285 | [tmc2209 stepper_z2] 286 | uart_pin: PG0 287 | interpolate: true 288 | run_current: 1.2 289 | sense_resistor: 0.110 290 | stealthchop_threshold: 9999 291 | 292 | ## Z3 Stepper - Front Right 293 | ## Connected to MOTOR_5 294 | [stepper_z3] 295 | step_pin: PF13 296 | dir_pin: !PF14 297 | enable_pin: !PF12 298 | rotation_distance: 40 299 | gear_ratio: 80:16 300 | microsteps: 16 301 | 302 | ## Make sure to update below for your relevant driver (2208 or 2209) 303 | [tmc2209 stepper_z3] 304 | uart_pin: PF11 305 | interpolate: true 306 | run_current: 1.2 307 | sense_resistor: 0.110 308 | stealthchop_threshold: 9999 309 | 310 | 311 | 312 | 313 | 314 | ############################################################ 315 | # 316 | # ███████╗██╗ ██╗████████╗██████╗ ██╗ ██╗██████╗ ███████╗██████╗ 317 | # ██╔════╝╚██╗██╔╝╚══██╔══╝██╔══██╗██║ ██║██╔══██╗██╔════╝██╔══██╗ 318 | # █████╗ ╚███╔╝ ██║ ██████╔╝██║ ██║██║ ██║█████╗ ██████╔╝ 319 | # ██╔══╝ ██╔██╗ ██║ ██╔══██╗██║ ██║██║ ██║██╔══╝ ██╔══██╗ 320 | # ███████╗██╔╝ ██╗ ██║ ██║ ██║╚██████╔╝██████╔╝███████╗██║ ██║ 321 | # ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ 322 | # 323 | # EXTRUDER 324 | ############################################################ 325 | 326 | ## Connected to MOTOR_2 327 | ## Heater - HE0 328 | ## Thermistor - T0 329 | [extruder] 330 | step_pin: PB0 331 | dir_pin: PB1 332 | enable_pin: !PC5 333 | 334 | microsteps:16 335 | 336 | ## Update value below when you perform extruder calibration 337 | ## If you ask for 100mm of filament, but in reality it is 98mm: 338 | ## rotation_distance = * / 100 339 | ## 22.6789511 is a good starting point 340 | rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears 341 | ## Update Gear Ratio depending on your Extruder Type 342 | ## Use 50:10 for Stealthburner/Clockwork 2 343 | ## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) 344 | ## Use 80:20 for M4, M3.1 345 | gear_ratio: 50:10 #BMG Gear Ratio 346 | full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree 347 | 348 | 349 | 350 | nozzle_diameter: 0.400 351 | filament_diameter: 1.75 352 | 353 | heater_pin: PB9 354 | ## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. 355 | ## Use "Generic 3950" for NTC 100k 3950 thermistors 356 | sensor_type: PT1000 357 | sensor_pin: PF3 358 | min_temp: -270 # 10 359 | max_temp: 99999999 # 300 360 | max_power: 1.0 361 | min_extrude_temp: 170 362 | max_extrude_only_distance: 1400 363 | 364 | control: pid 365 | pid_kp: 26.213 366 | pid_ki: 1.304 367 | pid_kd: 131.721 368 | 369 | 370 | ################################################## 371 | ## Try to keep pressure_advance below 1.0 372 | pressure_advance: 0.0 373 | pressure_advance_smooth_time: 0.040 374 | ## Default is 0.040, leave stock 375 | ################################################## 376 | 377 | ## E0 on MOTOR_2 378 | ## Make sure to update below for your relevant driver (2208 or 2209) 379 | [tmc2209 extruder] 380 | uart_pin: PC4 381 | interpolate: false 382 | run_current: 0.5 383 | sense_resistor: 0.110 384 | stealthchop_threshold: 0 385 | 386 | 387 | 388 | # ██╗ ██╗██╗ ██╗ ██████╗██╗ ██╗██╗ ██╗ 389 | # ██║ ██╔╝██║ ██║██╔════╝██║ ██╔╝╚██╗ ██╔╝ 390 | # █████╔╝ ██║ ██║██║ █████╔╝ ╚████╔╝ 391 | # ██╔═██╗ ██║ ██║██║ ██╔═██╗ ╚██╔╝ 392 | # ██║ ██╗███████╗██║╚██████╗██║ ██╗ ██║ 393 | # ╚═╝ ╚═╝╚══════╝╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ 394 | # 395 | # ██████╗ ██████╗ ██████╗ ██████╗ ███████╗ 396 | # ██╔══██╗██╔══██╗██╔═══██╗██╔══██╗██╔════╝ 397 | # ██████╔╝██████╔╝██║ ██║██████╔╝█████╗ 398 | # ██╔═══╝ ██╔══██╗██║ ██║██╔══██╗██╔══╝ 399 | # ██║ ██║ ██║╚██████╔╝██████╔╝███████╗ 400 | # ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ 401 | # 402 | # Probe 403 | ##################################################################### 404 | 405 | [duplicate_pin_override] #needed for debug 406 | pins: PF4 407 | 408 | 409 | ## Select the probe port by type: 410 | ## For the PROBE port. Will not work with Diode. May need pull-up resistor from signal to 24V. 411 | #pin: ~!PB7 412 | ## For the DIAG_7 port. NEEDS BAT85 DIODE! Change to !PG15 if probe is NO. 413 | #pin: PG15 414 | ## For Octopus Pro PROBE port; NPN and PNP proximity switch types can be set by jumper 415 | #pin: ~!PC5 416 | 417 | [probe] 418 | pin: PF4 419 | 420 | x_offset: 0 421 | y_offset: 25.0 422 | z_offset: 0 423 | speed: 10.0 424 | samples: 3 425 | samples_result: median # average 426 | sample_retract_dist: 3.0 427 | samples_tolerance: 0.01 # 0.0075 428 | samples_tolerance_retries: 3 429 | lift_speed: 20 430 | 431 | 432 | 433 | # DISABLE FOR KLICKY DETACHABLE 434 | # [safe_z_home] 435 | ## XY Location of the Z Endstop Switch 436 | ## Update -10,-10 to the XY coordinates of your endstop pin 437 | ## (such as 157,305) after going through Z Endstop Pin 438 | ## Location Definition step. 439 | # home_xy_position: 175,175 440 | # home_xy_position: 232,347 # Cella di carico 441 | # speed:100 442 | # z_hop:10 443 | 444 | 445 | ##################################################################### 446 | # Gantry Adjustment Routines 447 | ##################################################################### 448 | 449 | 450 | ## Use QUAD_GANTRY_LEVEL to level a gantry. 451 | ## Min & Max gantry corners - measure from nozzle at MIN (0,0) and 452 | ## MAX (250, 250), (300,300), or (350,350) depending on your printer size 453 | ## to respective belt positions 454 | [quad_gantry_level] 455 | 456 | #-------------------------------------------------------------------- 457 | ## Gantry Corners for 250mm Build 458 | ## Uncomment for 250mm build 459 | #gantry_corners: 460 | # -60,-10 461 | # 310, 320 462 | ## Probe points 463 | #points: 464 | # 50,25 465 | # 50,175 466 | # 200,175 467 | # 200,25 468 | 469 | ## Gantry Corners for 300mm Build 470 | ## Uncomment for 300mm build 471 | #gantry_corners: 472 | # -60,-10 473 | # 360,370 474 | ## Probe points 475 | #points: 476 | # 50,25 477 | # 50,225 478 | # 250,225 479 | # 250,25 480 | 481 | ## Gantry Corners for 350mm Build 482 | ## Uncomment for 350mm build 483 | gantry_corners: 484 | -60,-10 485 | 410,420 486 | # Probe points 487 | points: 488 | 50,25 489 | 50,275 490 | 300,275 491 | 300,25 492 | 493 | #-------------------------------------------------------------------- 494 | speed: 300 495 | horizontal_move_z: 15 496 | retries: 5 497 | retry_tolerance: 0.0075 498 | max_adjust: 30 499 | 500 | 501 | 502 | # ███╗ ███╗███████╗███████╗██╗ ██╗ 503 | # ████╗ ████║██╔════╝██╔════╝██║ ██║ 504 | # ██╔████╔██║█████╗ ███████╗███████║ 505 | # ██║╚██╔╝██║██╔══╝ ╚════██║██╔══██║ 506 | # ██║ ╚═╝ ██║███████╗███████║██║ ██║ 507 | # ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═╝ 508 | # 509 | 510 | # SCREWS 511 | # 1-----2 512 | # | X | 513 | # 4-----3 514 | 515 | [bed_mesh] 516 | probe_count: 5,5 517 | speed: 300 518 | 519 | mesh_min: 50,25 520 | 521 | # X_mesh_min = X coordinate - BL-Touch |y_offset| 522 | # the result must be > Xmin position 523 | # Y_mesh_min = Y coordinate - BL-Touch |y_offset| 524 | # the result must be > Ymin position 525 | 526 | 527 | mesh_max: 300,275 # 275, 275 if the BED 0,0 is your 0,0 528 | # X= X_Bed - X_mesh_min (Ex: X bed 310, X_mesh_min=5 X_mesh_max= 305 ) 529 | # Y= Y_Bed - Y_mesh_min - Y BLtouch offset (Ex: Y bed 310, Y_mesh_min=35 X_mesh_max= 275 ) 530 | # Y< Ymax Printer limit - Y BLtouch offset 531 | 532 | ################### 533 | horizontal_move_z: 15 # >z_offset probe The Z coordinate the probe rises to prior to traveling between points. 534 | ################### 535 | 536 | # relative_reference_index: 12 # DEPRECATED, use the "zero_reference_position" - The default is no relative reference index 537 | fade_start: 1.0 # Default is 1.0. 538 | fade_end: 0.0 # Default is 0.0 539 | split_delta_z: .025 # Default is .025. 540 | move_check_distance: 5.0 # Default is 5.0 541 | mesh_pps: 2,2 # Default is 2, 2 542 | algorithm: lagrange # or bicubic # Default is lagrange. 543 | # bicubic_tension: .2 # Default is .2. 544 | 545 | 546 | ####################################### 547 | # ██████╗ ███████╗██████╗ 548 | # ██╔══██╗██╔════╝██╔══██╗ 549 | # ██████╔╝█████╗ ██║ ██║ 550 | # ██╔══██╗██╔══╝ ██║ ██║ 551 | # ██████╔╝███████╗██████╔╝ 552 | # ╚═════╝ ╚══════╝╚═════╝ 553 | # BED 554 | ####################################### 555 | 556 | ## SSR Pin - HE1 557 | ## Thermistor - TB 558 | [heater_bed] 559 | ## Uncomment the following line if using the default SSR wiring from the docs site 560 | #heater_pin: PA3 561 | ## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases 562 | heater_pin: PD12 563 | ## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. 564 | ## Use "Generic 3950" for Keenovo heaters 565 | sensor_type: Generic 3950 566 | sensor_pin: PA0 567 | ## Adjust Max Power so your heater doesn't warp your bed. Rule of thumb is 0.4 watts / cm^2 . 568 | max_power: 1 569 | min_temp: 0 570 | max_temp: 130 571 | control: pid 572 | pid_kp: 58.437 573 | pid_ki: 2.347 574 | pid_kd: 363.769 575 | 576 | 577 | 578 | ####################################### 579 | # 580 | # ███████╗ █████╗ ███╗ ██╗ 581 | # ██╔════╝██╔══██╗████╗ ██║ 582 | # █████╗ ███████║██╔██╗ ██║ 583 | # ██╔══╝ ██╔══██║██║╚██╗██║ 584 | # ██║ ██║ ██║██║ ╚████║ 585 | # ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ 586 | # 587 | # FANS 588 | ####################################### 589 | 590 | ## Print Cooling Fan - FAN0 591 | [fan_generic fan0] 592 | pin: PB7 593 | kick_start_time: 0.5 594 | ## Depending on your fan, you may need to increase this value 595 | ## if your fan will not start. Can change cycle_time (increase) 596 | ## if your fan is not able to slow down effectively 597 | off_below: 0.01 598 | 599 | 600 | ## Hotend Fan - FAN1 601 | [heater_fan hotend_fan] 602 | pin: PB8 603 | max_power: 1.0 604 | kick_start_time: 0.5 605 | heater: extruder 606 | heater_temp: 50.0 607 | ## If you are experiencing back flow, you can reduce fan_speed 608 | #fan_speed: 1.0 609 | 610 | ## Controller fan - FAN2 611 | [controller_fan controller_fan] 612 | pin: PC6 613 | kick_start_time: 0.5 614 | heater: heater_bed 615 | 616 | ## Exhaust fan - FAN3 617 | [fan_generic Exhaust_fan]# 618 | pin: PE5 619 | max_power: 1.0 620 | shutdown_speed: 0.0 621 | kick_start_time: 1 622 | # fan_speed: 1.0 623 | off_below: 0.1 624 | 625 | 626 | ######################################## 627 | # EXP1 / EXP2 (display) pins 628 | ######################################## 629 | 630 | [board_pins] 631 | aliases: 632 | # EXP1 header 633 | EXP1_1=PG5, EXP1_2=PG4, 634 | EXP1_3=PG3, EXP1_4=PG2, 635 | EXP1_5=PD15, EXP1_6=PD14, # Slot in the socket on this side 636 | EXP1_7=PD13, EXP1_8=PD11, 637 | EXP1_9=, EXP1_10=<5V>, 638 | 639 | # EXP2 header 640 | EXP2_1=PB14, EXP2_2=PB13, 641 | EXP2_3=PD10, EXP2_4=PB12, 642 | EXP2_5=PD9, EXP2_6=PB15, # Slot in the socket on this side 643 | EXP2_7=PD8, EXP2_8=, 644 | EXP2_9=, EXP2_10=<5V> 645 | 646 | ##################################################################### 647 | # Displays 648 | ##################################################################### 649 | 650 | ## Uncomment the display that you have 651 | #-------------------------------------------------------------------- 652 | 653 | 654 | ## RepRapDiscount 128x64 Full Graphic Smart Controller 655 | #[display] 656 | #lcd_type: st7920 657 | #cs_pin: EXP1_4 658 | #sclk_pin: EXP1_5 659 | #sid_pin: EXP1_3 660 | #menu_timeout: 40 661 | #encoder_pins: ^EXP2_5, ^EXP2_3 662 | #click_pin: ^!EXP1_2 663 | 664 | # [output_pin beeper] 665 | # pin: EXP1_1 666 | 667 | #-------------------------------------------------------------------- 668 | 669 | 670 | ## mini12864 LCD Display 671 | [display] 672 | lcd_type: uc1701 673 | cs_pin: EXP1_3 674 | a0_pin: EXP1_4 675 | rst_pin: EXP1_5 676 | encoder_pins: ^EXP2_5, ^EXP2_3 677 | click_pin: ^!EXP1_2 678 | contrast: 63 # max = 63 679 | spi_software_miso_pin: EXP2_1 680 | spi_software_mosi_pin: EXP2_6 681 | spi_software_sclk_pin: EXP2_2 682 | 683 | 684 | 685 | 686 | #-------------------------------------------------------------------- 687 | 688 | ## INPUT SHAPING 689 | # Comment all of the lines in the Displays section before uncommenting the [adxl45] and [resonance_tester] sections below. 690 | # After finding the optimal shaping functions and frequencies, re-comment the [adxl345] and [resonance_tester] sections 691 | # Finally, uncomment the [input_shaper] section and update it with the values you found 692 | 693 | 694 | 695 | [gcode_macro RESONANCES_TEST] 696 | description: Run input shaper test 697 | gcode: 698 | {% set user = printer['gcode_macro _USER_VARIABLE'] %} 699 | _CG28 ; home if needed 700 | TURN_OFF_HEATERS ; turn off heaters 701 | M107 ; turn off fan 702 | {% if user.hw.chamber.fan %} M141 {% endif %} ; exhaust fan off 703 | {% if user.hw.filter.ena %} _SET_FILTER {% endif %} ; filter off 704 | _PRINT_AR T="INPUT SHAPER: Noise values, check if sensor is installed" 705 | MEASURE_AXES_NOISE ; get noise value in log 706 | _PRINT_AR T="INPUT SHAPER: Resonance Tests starting" 707 | _PRINT_AR T="INPUT SHAPER: Mesasure X axis" 708 | TEST_RESONANCES AXIS=X ; measure X 709 | _PRINT_AR T="INPUT SHAPER: Mesasure Y axis" 710 | TEST_RESONANCES AXIS=Y ; measure Y 711 | _PRINT_AR T="INPUT SHAPER: Resonance Tests done" 712 | _PRINT_AR T="INPUT SHAPER: Generate graph in backround" 713 | RUN_SHELL_COMMAND CMD=plot_graph PARAMS=SHAPER 714 | 715 | #*# <---------------------- SAVE_CONFIG ----------------------> 716 | #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. 717 | #*# 718 | #*# [bed_mesh default] 719 | #*# version = 1 720 | #*# points = 721 | #*# 0.041316, 0.038816, 0.016316, 0.012982, 0.041316 722 | #*# 0.027982, 0.019649, 0.008816, 0.010482, 0.013816 723 | #*# -0.006184, -0.009518, -0.010351, -0.013684, 0.006316 724 | #*# 0.047149, 0.137982, -0.042018, -0.017018, 0.016316 725 | #*# 0.041316, 0.026316, -0.002018, -0.002018, 0.040482 726 | #*# x_count = 5 727 | #*# y_count = 5 728 | #*# mesh_x_pps = 2 729 | #*# mesh_y_pps = 2 730 | #*# algo = bicubic 731 | #*# tension = 0.2 732 | #*# min_x = 50.0 733 | #*# max_x = 300.0 734 | #*# min_y = 50.0 735 | #*# max_y = 300.0 736 | --------------------------------------------------------------------------------