commit 33030a9ee88f6ba2da7700306c3853f9d89a3948 Author: Sebastien Plante Date: Sun Nov 30 13:37:30 2025 -0500 Autocommit from 2025-11-30 13:37:30 Klipper version: v0.13.0-411-g938300f3 Moonraker version: v0.9.3-128-g960e933 Mainsail version: v2.15.0 diff --git a/.moonraker.conf.bkp b/.moonraker.conf.bkp new file mode 100644 index 0000000..22d148a --- /dev/null +++ b/.moonraker.conf.bkp @@ -0,0 +1,61 @@ +[server] +host = 0.0.0.0 +port = 7125 + +[file_manager] +enable_object_processing = True + +[authorization] +trusted_clients = + 10.0.0.0/8 + 127.0.0.0/8 + 169.254.0.0/16 + 172.16.0.0/12 + 192.168.0.0/16 + FE80::/10 + ::1/128 + +[update_manager] + +[update_manager client mainsail] +type = web +repo = mainsail-crew/mainsail +path = ~/mainsail + +[update_manager client KlipperScreen] +type = git_repo +path = ~/KlipperScreen +origin = https://github.com/jordanruthe/KlipperScreen.git +env = ~/.KlipperScreen-env/bin/python +requirements = scripts/KlipperScreen-requirements.txt +install_script = scripts/KlipperScreen-install.sh + +[update_manager client moonraker-telegram-bot] +type = git_repo +path = ~/moonraker-telegram-bot +origin = https://github.com/nlef/moonraker-telegram-bot.git +env = ~/moonraker-telegram-bot-env/bin/python +requirements = scripts/requirements.txt +install_script = scripts/install.sh + +[update_manager beacon] +type = git_repo +channel = dev +path = ~/beacon_klipper +origin = https://github.com/beacon3d/beacon_klipper.git +env = ~/klippy-env/bin/python +requirements = requirements.txt +install_script = install.sh +is_system_service = False +managed_services = klipper +info_tags = + desc=Beacon Surface Scanner + +[octoprint_compat] + +[power printer_psu] +type = tasmota +restart_klipper_when_powered = True +restart_delay = 2 +address = 10.99.0.112 + diff --git a/A4T-Upgrade/KlipperScreen.conf b/A4T-Upgrade/KlipperScreen.conf new file mode 100644 index 0000000..cbb5da2 --- /dev/null +++ b/A4T-Upgrade/KlipperScreen.conf @@ -0,0 +1,223 @@ +[main] + +[printer Voron2 1102] +moonraker_host: 127.0.0.1 +moonraker_port: 7125 + +[preheat PLA] +bed = 50 +extruder = 200 + +[preheat ABS] +bed = 105 +extruder = 260 + +[menu __main] +name: {{ gettext('Main Menu') }} + +[menu __main homing] +name: {{ gettext('Homing') }} +icon: home + +[menu __main preheat] +name: {{ gettext('Preheat') }} +icon: heat-up +panel: preheat + +[menu __main actions] +name: {{ gettext('Actions') }} +icon: move + +[menu __main config] +name: {{ gettext('Configuration') }} +icon: settings + +[menu __main print] +name: {{ gettext('Print') }} +icon: print +panel: print + +[menu __main homing homeall] +name: {{ gettext('Home All') }} +icon: home +method: printer.gcode.script +params: {"script":"G28"} + +[menu __main homing homez] +name: {{ gettext('Home Z') }} +icon: home-z +method: printer.gcode.script +params: {"script":"Home_Z"} + +[menu __main homing quad_gantry_level] +name: {{ gettext('Quad Gantry Level') }} +icon: bed-level +method: printer.gcode.script +params: {"script":"QUAD_GANTRY_LEVEL"} +enable: {{ printer.quad_gantry_level is defined }} + +[menu __main homing calibratez] +name: {{ gettext('Calibrate Z') }} +icon: home-z +method: printer.gcode.script +params: {"script":"CALIBRATE_Z"} + +[menu __main actions move] +name: {{ gettext('Move') }} +icon: move +panel: move + +[menu __main actions extrude] +name: {{ gettext('Extrude') }} +icon: filament +panel: extrude + +[menu __main actions fan] +name: {{ gettext('Fan') }} +icon: fan +panel: fan + +[menu __main actions temperature] +name: {{ gettext('Temperature') }} +icon: heat-up +panel: temperature + +[menu __main actions macros] +name: {{ gettext('Macros') }} +icon: custom-script +panel: gcode_macros +enable: {{ printer.gcode_macros.count > 0 }} + +[menu __main actions power] +name: {{ gettext('Power') }} +icon: shutdown +panel: power +enable: {{ printer.power_devices.count > 0 }} + +[menu __main actions disablemotors] +name: {{ gettext('Disable Motors') }} +icon: motor-off +method: printer.gcode.script +params: {"script":"M18"} + +[menu __main actions console] +name: {{ gettext('Console') }} +icon: console +panel: console + +[menu __main config bedlevel] +name: {{ gettext('Bed Level') }} +icon: bed-level +panel: bed_level + +[menu __main config bedmesh] +name: {{ gettext('Bed Mesh') }} +icon: bed-level +panel: bed_mesh +enable: {{ printer.bed_mesh is defined }} + +[menu __main config network] +name: {{ gettext('Network') }} +icon: network +panel: network + +[menu __main config system] +name: {{ gettext('System') }} +icon: info +panel: system + +[menu __main config save] +name: {{ gettext('Save Config') }} +icon: complete +method: printer.gcode.script +params: {"script":"SAVE_CONFIG"} +confirm: + {{ gettext('Save configuration.') }} + + {{ gettext('Klipper will reboot') }} + +[menu __main config settings] +name: {{ gettext('Settings') }} +icon: settings +panel: settings + +[menu __print] +name: {{ gettext('Print Control') }} + +[menu __print temperature] +name: {{ gettext('Temperature') }} +icon: heat-up +panel: temperature + +[menu __print fan] +name: {{ gettext('Fan') }} +icon: fan +panel: fan + +[menu __print extrude] +name: {{ gettext('Extrude') }} +icon: filament +panel: extrude +enable: {{ printer.pause_resume.is_paused == True }} + +[menu __print power] +name: {{ gettext('Power') }} +icon: shutdown +panel: power +enable: {{ printer.power_devices.count > 0 }} + +[menu __print macros] +name: {{ gettext('Macros') }} +icon: custom-script +panel: gcode_macros +enable: {{ printer.gcode_macros.count > 0 }} + +[menu __print console] +name: {{ gettext('Console') }} +icon: console +panel: console + +[menu __print network] +name: {{ gettext('Network') }} +icon: network +panel: network + +[menu __print system] +name: {{ gettext('System') }} +icon: info +panel: system + +[menu __print settings] +name: {{ gettext('Settings') }} +icon: settings +panel: settings + + +[menu __splashscreen] +name: {{ gettext('Menu') }} + +[menu __splashscreen power] +name: {{ gettext('Power') }} +icon: shutdown +panel: power +enable: {{ printer.power_devices.count > 0 }} + +[menu __splashscreen network] +name: {{ gettext('Network') }} +icon: network +panel: network + +[menu __splashscreen system] +name: {{ gettext('System') }} +icon: info +panel: system + +[menu __splashscreen settings] +name: {{ gettext('Settings') }} +icon: settings +panel: settings +#~# --- Do not edit below this line. This section is auto generated --- #~# +#~# +#~# [main] +#~# 24htime = False +#~# diff --git a/A4T-Upgrade/klicky-probe.cfg b/A4T-Upgrade/klicky-probe.cfg new file mode 100644 index 0000000..cdf3fe1 --- /dev/null +++ b/A4T-Upgrade/klicky-probe.cfg @@ -0,0 +1,621 @@ +# This macro was provided by discord user Garrettwp to whom i give my thanks for sharing it with me. +# I have tweaked it a lot. +# +# this macro is based on the great Annex magprobe dockable probe macros "#Originally developed by Mental, modified for better use on K-series printers by RyanG and Trails" +# that macro can be found here https://github.com/Annex-Engineering/Annex-Engineering_Other_Printer_Mods/blob/master/All_Printers/Microswitch_Probe/Klipper_Macros/dockable_probe_macros.cfg +# +# by standing on the shoulders of giants, lets see if we can see further + +[gcode_macro User_Variables] +variable_verbose: True # Enable verbose output +variable_travel_speed: 200 # how fast all other travel moves will be performed when running these macros +variable_dock_speed: 50 # how fast should the toolhead move when docking the probe for the final movement +variable_release_speed: 100 # how fast should the toolhead move to release the hold of the magnets after docking +variable_z_drop_speed: 20 # how fast the z will lower when moving to the z location to clear the probe +variable_home_z_height: 15 # Z when homing + +# if a separate Z endstop switch is in +# use, specify the coordinates of the switch here (Voron). +# Set to 0 to have the probe move to center of bed +variable_z_endstop_x: 231 +variable_z_endstop_y: 350 +#variable_z_endstop_x: 0 +#variable_z_endstop_y: 0 + +# location to park the toolhead +variable_park_toolhead: True # Enable toolhead parking +variable_parkposition_x: 175 +variable_parkposition_y: 175 +variable_parkposition_z: 10 + +#dock location +variable_docklocation_x: 12 # X Dock position +variable_docklocation_y: 350 # Y Dock position +variable_docklocation_z: 15 # Z dock position +variable_dockarmslenght: 30 # Dock arms lenght, toolhead movement necessary to clear the dock arms + +#Umbilical to help untangle the umbilical in difficult situations +variable_umbilical_x: 15 #X umbilical position +variable_umbilical_y: 15 #Y umbilical position +variable_umbilical: False #should we untabgle the umbilical + +# Do not modify below +gcode: + {% set Mx = printer['configfile'].config["stepper_x"]["position_max"]|float %} + {% set My = printer['configfile'].config["stepper_y"]["position_max"]|float %} + {% set Ox = printer['configfile'].config["probe"]["x_offset"]|float %} + {% set Oy = printer['configfile'].config["probe"]["y_offset"]|float %} + {% set Oz = printer['configfile'].config["probe"]["z_offset"]|float %} + + # if docklocation_z is zero, use Home Z height for safety + {% if docklocation_z == 0 %} + SET_GCODE_VARIABLE MACRO=Probe_Variables VARIABLE=docklocation_z VALUE={ home_z_height } + {% endif %} + + # If x, y coordinates are set for z endstop, assign them + {% if z_endstop_x != 0 or z_endstop_y != 0 %} + SET_GCODE_VARIABLE MACRO=Probe_Variables VARIABLE=z_endstop_x VALUE={ z_endstop_x } + SET_GCODE_VARIABLE MACRO=Probe_Variables VARIABLE=z_endstop_y VALUE={ z_endstop_y } + + # if no x, y coordinates for z endstop, assume probe is endstop and move toolhead to center of bed + {% else %} + SET_GCODE_VARIABLE MACRO=Probe_Variables VARIABLE=z_endstop_x VALUE={ (Mx * 0.5) - Ox } + SET_GCODE_VARIABLE MACRO=Probe_Variables VARIABLE=z_endstop_y VALUE={ (My * 0.5) - Oy } + {% endif %} + + +[gcode_macro Probe_Variables] +variable_probe_attached: False +variable_probe_state: False +variable_probe_lock: False +variable_z_endstop_x: 0 +variable_z_endstop_y: 0 +gcode: + + +[gcode_macro Homing_Variables] +#default_parameter_reset: 0 +gcode: + {% set R = params.RESET|default(0)|float %} + + {% if R %} + SET_GCODE_VARIABLE MACRO=Probe_Variables VARIABLE=probe_lock VALUE={ False } + {% endif %} + +# Attach probe and lock it +[gcode_macro Attach_Probe_Lock] +gcode: + Attach_Probe + SET_GCODE_VARIABLE MACRO=Probe_Variables VARIABLE=probe_lock VALUE={ True } + + +# Dock probe and lock it +[gcode_macro Dock_Probe_Unlock] +gcode: + SET_GCODE_VARIABLE MACRO=Probe_Variables VARIABLE=probe_lock VALUE={ False } + Dock_Probe + +# Unlock Probe +[gcode_macro Probe_Unlock] +gcode: + SET_GCODE_VARIABLE MACRO=Probe_Variables VARIABLE=probe_lock VALUE={ False } + +# Lock Probe +[gcode_macro Probe_Lock] +gcode: + SET_GCODE_VARIABLE MACRO=Probe_Variables VARIABLE=probe_lock VALUE={ True } +# Attach Probe Routine +[gcode_macro Attach_Probe] +gcode: + # Get probe attach status + {% set P = printer["gcode_macro Probe_Variables"].probe_attached %} + {% set L = printer["gcode_macro Probe_Variables"].probe_lock %} + {% set V = printer["gcode_macro User_Variables"].verbose %} + # Get Docking location + {% set Dx = printer["gcode_macro User_Variables"].docklocation_x %} + {% set Dy = printer["gcode_macro User_Variables"].docklocation_y %} + {% set Dz = printer["gcode_macro User_Variables"].docklocation_z %} + {% set Da = printer["gcode_macro User_Variables"].dockarmslenght %} + # Safe Z for travel + {% set Hzh = printer["gcode_macro User_Variables"].home_z_height|float %} + #Set speed + {% set St = printer["gcode_macro User_Variables"].travel_speed * 60 %} + + #prior to saving actual position, check if its necessary to move to a safe Z + #that has enought overhead for the attached probe + {% if (printer.toolhead.position.z < Hzh) %} + G1 Z{Hzh} F1200 + {% endif %} + M400 # mandatory to save the new safe position + #allows the docking position to be independent of the Z offset, necessary for bed mounted probes + SAVE_GCODE_STATE name=_attachProbe + SET_GCODE_OFFSET Z=0 + + # if x and y are not homed + {% if not 'xy' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home X and Y Axis First!") } + + # If probe not attached and locked + {% elif not P and not L %} + {% if V %} + { action_respond_info("Attaching Probe") } + {% endif %} + G90 + + {% if (not 'z' in printer.toolhead.homed_axes) %} + {% if V %} + { action_respond_info("Resetting Z position to zero") } + {% endif %} + SET_KINEMATIC_POSITION Z=0 + {% endif %} + + {% if (printer.toolhead.position.z < Hzh) %} + G1 Z{Hzh} F1200 + {% endif %} + + Umbilical_Path + + # Probe entry location + G1 X{Dx} Y{Dy|int - Da|int} Z{Hzh} F{St} + #lower to Z dock + G1 Z{Dz} F600 + # pickup from Probe location + G1 X{Dx} Y{Dy} F1800 + # Probe entry location + G1 X{Dx} Y{Dy|int - Da|int} F6000 + #Go to Z safe distance + G1 Z{Hzh} F600 + Park_Toolhead + + CheckProbe action=attach + + {% elif L %} + {% if V %} + { action_respond_info("Probe locked!") } + {% endif %} + + # Probe attached, do nothing + CheckProbe action=query + + {% else %} + {% if V %} + { action_respond_info("Probe already attached!") } + {% endif %} + + # Probe attached, do nothing + CheckProbe action=query + + {% endif %} + #reverts to the original Z offset + RESTORE_GCODE_STATE name=_attachProbe + + +# Dock Probe Routine +[gcode_macro Dock_Probe] +gcode: + # Get probe attach status + {% set P = printer["gcode_macro Probe_Variables"].probe_attached %} + {% set L = printer["gcode_macro Probe_Variables"].probe_lock %} + {% set V = printer["gcode_macro User_Variables"].verbose %} + # Get Docking location + {% set Dx = printer["gcode_macro User_Variables"].docklocation_x %} + {% set Dy = printer["gcode_macro User_Variables"].docklocation_y %} + {% set Dz = printer["gcode_macro User_Variables"].docklocation_z %} + {% set Da = printer["gcode_macro User_Variables"].dockarmslenght %} + # Safe Z for travel + {% set Hzh = printer["gcode_macro User_Variables"].home_z_height|float %} + # Set speed + {% set St = printer["gcode_macro User_Variables"].travel_speed * 60 %} + {% set Sd = printer["gcode_macro User_Variables"].dock_speed * 60 %} + {% set Sr = printer["gcode_macro User_Variables"].release_speed * 60 %} + {% set Sz = printer["gcode_macro User_Variables"].z_drop_speed * 60 %} + + M400 # mandatory to save the new safe position + #allows the docking position to be independent of the Z offset, necessary for bed mounted probes + SAVE_GCODE_STATE name=_dockProbe + SET_GCODE_OFFSET Z=0 + + {% if not 'xyz' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home X, Y and Z Axis First!") } + + # If probe not attached and not locked + {% elif P and not L %} + {% if V %} + { action_respond_info("Docking Probe") } + {% endif %} + G90 + + {% if (printer.toolhead.position.z < Hzh) %} + G1 Z{Hzh} F{Sz} + {% endif %} + + Umbilical_Path + + # Probe entry location + G1 X{Dx} Y{Dy|int - Da|int} Z{Hzh} F{St} + #lower to Z dock + G1 Z{Dz} F{Sz} + # Drop Probe to Probe location + G1 X{Dx} Y{Dy} F{Sd} + # Probe decoupling + G1 X{Dx|int + 40} Y{Dy} F{Sr} + #Go to Z safe distance + G1 X{Dx|int + 40} Y{Dy|int - 5} Z{Hzh} F{St} + + Park_Toolhead + + CheckProbe action=dock + + {% elif L %} + {% if V %} + { action_respond_info("Probe locked!") } + {% endif %} + + # Probe docked, do nothing + CheckProbe action=query + + {% else %} + {% if V %} + { action_respond_info("Probe already docked!") } + {% endif %} + + # Probe docked, do nothing + CheckProbe action=query + + {% endif %} + #reverts to the original Z offset + RESTORE_GCODE_STATE name=_dockProbe + + + +# Quad Gantry Level +[gcode_macro QUAD_GANTRY_LEVEL] +rename_existing: _QUAD_GANTRY_LEVEL +gcode: + BED_MESH_CLEAR + {% set V = printer["gcode_macro User_Variables"].verbose %} + {% if V %} + { action_respond_info("QG Level") } + {% endif %} + + CheckProbe action=query + Attach_Probe + + _QUAD_GANTRY_LEVEL {% for p in params + %}{'%s=%s ' % (p, params[p])}{% + endfor %} + Dock_Probe + + +# Z Tilt Adjust +#[gcode_macro Z_TILT_ADJUST] +#rename_existing: _Z_TILT_ADJUST +#gcode: +# {% set V = printer["gcode_macro User_Variables"].verbose %} +# {% if V %} +# { action_respond_info("Z Tilt Adjust") } +# {% endif %} +# +# CheckProbe action=query +# Attach_Probe +# +# _Z_TILT_ADJUST {% for p in params +# %}{'%s=%s ' % (p, params[p])}{% +# endfor %} +# G28 Z0 +# Dock_Probe + + +# Screws Tilt Adjust +#gcode_macro SCREWS_TILT_CALCULATE] +#rename_existing: _SCREWS_TILT_CALCULATE +#gcode: +# {% set V = printer["gcode_macro User_Variables"].verbose %} +# {% if V %} +# { action_respond_info("Screws Tilt Adjust") } +# {% endif %} +# +# CheckProbe action=query +# Attach_Probe +# +# _SCREWS_TILT_CALCULATE {% for p in params +# %}{'%s=%s ' % (p, params[p])}{% +# endfor %} +# +# Dock_Probe + +# Bed Mesh Calibrate +[gcode_macro BED_MESH_CALIBRATE] +rename_existing: _BED_MESH_CALIBRATE +gcode: + {% set V = printer["gcode_macro User_Variables"].verbose %} + {% if V %} + { action_respond_info("Bed Mesh Calibrate") } + {% endif %} + + CheckProbe action=query + Attach_Probe + + _BED_MESH_CALIBRATE {% for p in params + %}{'%s=%s ' % (p, params[p])}{% + endfor %} + + Dock_Probe + + +# Probe Calibrate +[gcode_macro PROBE_CALIBRATE] +rename_existing: _PROBE_CALIBRATE +gcode: + {% set Hzh = printer["gcode_macro User_Variables"].home_z_height|float %} + {% set Sz = printer["gcode_macro User_Variables"].z_drop_speed * 60 %} + {% set St = printer["gcode_macro User_Variables"].travel_speed %} + + # Go to Z safe distance before saving location in order to + # avoid crashing the probe on the bed when coming back + G1 Z{Hzh} F{Sz} + M400 # mandatory to save the new safe position + SAVE_GCODE_STATE NAME=_original_nozzle_location + + CheckProbe action=query + Attach_Probe + + # Restore nozzle location to probe the right place + RESTORE_GCODE_STATE NAME=_original_nozzle_location MOVE=1 MOVE_SPEED={St} + + _PROBE_CALIBRATE {% for p in params + %}{'%s=%s ' % (p, params[p])}{% + endfor %} + + #store current nozzle location + SAVE_GCODE_STATE NAME=_original_nozzle_location + Dock_Probe + + # Restore nozzle location again at the end + RESTORE_GCODE_STATE NAME=_original_nozzle_location MOVE=1 MOVE_SPEED={St} + + +# Probe Accuracy +[gcode_macro PROBE_ACCURACY] +rename_existing: _PROBE_ACCURACY +gcode: + {% set Hzh = printer["gcode_macro User_Variables"].home_z_height|float %} + {% set Sz = printer["gcode_macro User_Variables"].z_drop_speed * 60 %} + {% set St = printer["gcode_macro User_Variables"].travel_speed %} + + # Go to Z safe distance before saving location in order to + # avoid crashing the probe on the bed when coming back + G1 Z{Hzh} F{Sz} + M400 # mandatory to save the new safe position + SAVE_GCODE_STATE NAME=_original_nozzle_location + + CheckProbe action=query + Attach_Probe + + # Restore nozzle location to probe the right place + RESTORE_GCODE_STATE NAME=_original_nozzle_location MOVE=1 MOVE_SPEED={St} + + _PROBE_ACCURACY {% for p in params + %}{'%s=%s ' % (p, params[p])}{% + endfor %} + + #store current nozzle location + SAVE_GCODE_STATE NAME=_original_nozzle_location + + Dock_Probe + + # Restore nozzle location again at the end + RESTORE_GCODE_STATE NAME=_original_nozzle_location MOVE=1 MOVE_SPEED={St} + + +# enable to SET_KINEMATIC_POSITION for Z hop +[force_move] +enable_force_move: True + +# Homeing Override +[homing_override] +axes: xyz +gcode: + BED_MESH_CLEAR + # collect user state variables + User_Variables + {% set V = printer["gcode_macro User_Variables"].verbose %} + {% set Hzh = printer["gcode_macro User_Variables"].home_z_height|float %} + + {% if (not 'z' in printer.toolhead.homed_axes) %} + SET_KINEMATIC_POSITION Z=0 + G90 + G0 Z{Hzh} F600 + {% endif %} + + CheckProbe action=query + + # reset parameters + {% set X, Y, Z = False, False, False %} + + # which axes have been requested for homing + {% if not 'X' in params + and not 'Y' in params + and not 'Z' in params %} + + {% set X, Y, Z = True, True, True %} + + {% else %} + {% if 'X' in params %} + {% set X = True %} + {% endif %} + + {% if 'Y' in params %} + {% set Y = True %} + {% endif %} + + {% if 'Z' in params %} + {% set Z = True %} + {% endif %} + + {% if 'X' in params + and 'Y' in params + and 'Z' in params %} + # reset homing state variables + # if homing all axes + Homing_Variables reset=1 + {% endif %} + + {% endif %} + + # Home x + {% if X %} + {% if V %} + { action_respond_info("Homing X") } + {% endif %} + G28 X0 + {% endif %} + + # Home y + {% if Y %} + {% if V %} + { action_respond_info("Homing Y") } + {% endif %} + G28 Y0 + {% endif %} + + # Home z + {% if Z %} + {% if V %} + { action_respond_info("Homing Z") } + {% endif %} + + # if probe is configured as endstop, attach it + {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} + Attach_Probe + {% endif %} + + Home_Z + + #Wipe the nozzle and Home Again + #G1 Y350 X85 Z4 F7000 + #G1 Y348 X115 Z4 F7000 + #G1 Y350 X85 Z4 F7000 + #G1 Y348 X115 Z4 F7000 + #G1 Y350 X85 Z4 F7000 + #G1 Y348 X115 Z4 F7000 + #G1 Y350 X85 Z4 F7000 + #G1 Y348 X115 Z4 F7000 + CLEAN_NOZZLE + Home_Z + + # if probe is configured as endstop, dock it + {% if printer['configfile'].config["stepper_z"]["endstop_pin"] == 'probe:z_virtual_endstop' %} + Dock_Probe + {% endif %} + {% endif %} + CheckProbe action=query + + # park the toolhead + Park_Toolhead + +# umbilical path setup +[gcode_macro Umbilical_Path] +gcode: + {% set Ux = printer["gcode_macro User_Variables"].umbilical_x %} + {% set Uy = printer["gcode_macro User_Variables"].umbilical_y %} + {% set U = printer["gcode_macro User_Variables"].umbilical %} + {% set Hzh = printer["gcode_macro User_Variables"].home_z_height|float %} + {% set St = printer["gcode_macro User_Variables"].travel_speed * 60 %} + + {% if U %} + # Used to give the umbilical a better path to follow and coil properly if dock is tight in space + G1 X{Ux} Y{Uy} Z{Hzh} F{St} + {% endif %} + + +# Home Z Routine +[gcode_macro Home_Z] +gcode: + {% set Zx = printer["gcode_macro Probe_Variables"].z_endstop_x %} + {% set Zy = printer["gcode_macro Probe_Variables"].z_endstop_y %} + {% set Hzh = printer["gcode_macro User_Variables"].home_z_height|float %} + {% set St = printer["gcode_macro User_Variables"].travel_speed * 60 %} + {% set Sz = printer["gcode_macro User_Variables"].z_drop_speed * 60 %} + + # if x and y are not homed yet, raise error + {% if not 'xy' in printer.toolhead.homed_axes %} + { action_raise_error("Must Home X and Y Axis First!") } + + {% else %} + {% if (not 'z' in printer.toolhead.homed_axes) %} + {% if V %} + { action_respond_info("Resetting Z position to zero") } + {% endif %} + SET_KINEMATIC_POSITION Z=0 + {% endif %} + + # move tool to safe homing position and home Z axis + # location of z endstop + G1 X{Zx} Y{Zy} Z{Hzh} F{St} + G28 Z0 + G1 Z{Hzh} F{Sz} + + {% endif %} + + +# check to see if probe is where it is supposed to be after +# attaching/docking maneuver and set homing error or shutdown +[gcode_macro CheckProbe] +variable_probe_state: 0 +#default_parameter_action: +gcode: + Query_Probe + SetProbeState action={ ACTION } + + +# due to how templates are evaluated, we have query endstops in one +# macro and call another macro to make decisions based on the result +[gcode_macro SetProbeState] +#default_parameter_action: +gcode: + {% set P = printer.probe.last_query %} + {% set V = printer["gcode_macro User_Variables"].verbose %} + + # If triggered (true), probe not attached + {% if P %} + SET_GCODE_VARIABLE MACRO=Probe_Variables VARIABLE=probe_attached VALUE={ False } + + # If not triggered (false), probe attached + {% else %} + SET_GCODE_VARIABLE MACRO=Probe_Variables VARIABLE=probe_attached VALUE={ True } + {% endif %} + + {% if params.ACTION == 'query' %} + SET_GCODE_VARIABLE MACRO=Probe_Variables VARIABLE=probe_state VALUE={ P } + {% endif %} + + # if probe fails to attach/detach + # if not docked + {% if (not P and params.ACTION == 'dock') %} + { action_raise_error("Probe dock failed!") } + {% endif %} + + # if not attached + {% if P and params.ACTION == 'attach' %} + { action_raise_error("Probe attach failed!") } + {% endif %} + +# Park Toolhead Routine +[gcode_macro Park_Toolhead] +gcode: + {% set P = printer["gcode_macro User_Variables"].park_toolhead %} + {% set Px = printer["gcode_macro User_Variables"].parkposition_x %} + {% set Py = printer["gcode_macro User_Variables"].parkposition_y %} + {% set Pz = printer["gcode_macro User_Variables"].parkposition_z %} + {% set St = printer["gcode_macro User_Variables"].travel_speed * 60 %} + {% set V = printer["gcode_macro User_Variables"].verbose %} + + {% if (P and 'xyz' in printer.toolhead.homed_axes) %} + {% if V %} + { action_respond_info("Parking Toolhead") } + {% endif %} + G90 + G1 X{Px} Y{Py} Z{Pz} F{St} + {% endif %} + diff --git a/A4T-Upgrade/mainsail.cfg b/A4T-Upgrade/mainsail.cfg new file mode 100644 index 0000000..a210135 --- /dev/null +++ b/A4T-Upgrade/mainsail.cfg @@ -0,0 +1,66 @@ +[virtual_sdcard] +path: /home/pi/gcode_files + +[display_status] + +[pause_resume] + +[gcode_macro PAUSE] +rename_existing: BASE_PAUSE +gcode: + {% set X = params.X|default(230)|int %} + {% set Y = params.Y|default(230)|int %} + {% set Z = params.Z|default(10)|int %} + {% set E = params.E|default(1)|int %} + SAVE_GCODE_STATE NAME=PAUSE_state + BASE_PAUSE + G91 + G1 E-{E} F2100 + G1 Z{Z} + G90 + G1 X{X} Y{Y} F6000 + +[gcode_macro RESUME] +rename_existing: BASE_RESUME +gcode: + {% set E = params.E|default(1)|int %} + G91 + G1 E{E} F2100 + G90 + RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1 + BASE_RESUME + + +[gcode_macro CANCEL_PRINT] +rename_existing: BASE_CANCEL_PRINT +gcode: + TURN_OFF_HEATERS + CLEAR_PAUSE + SDCARD_RESET_FILE + BASE_CANCEL_PRINT + +#[gcode_macro BED_MESH_CALIBRATE] +#rename_existing: BASE_BED_MESH_CALIBRATE +#gcode: +# #before the original gcode +# BED_MESH_CLEAR +# QUAD_GANTRY_LEVEL +# G1 X125 Y125 Z5 F6000 +# #the original gcode +# BASE_BED_MESH_CALIBRATE +# #after the original gcode + +## Use: +## - DUMP_WARNINGS +[gcode_macro DUMP_WARNINGS] +description: Debug: Print all warning messages from klipper +gcode: + {% if not printer.configfile.warnings %} + {action_respond_info("klipper too old! Please update klipper first and run again")} + {% else %} + {% set parameters = ["printer.configfile.warnings:"] %} + {% for warning in printer.configfile.warnings %} + {% set parameters = parameters.append("%s -> %s -> %s\n%s" % (warning.type, warning.section, warning.option, warning.message)) %} + {% endfor %} + {action_respond_info(parameters|join("\n"))} + {% endif %} \ No newline at end of file diff --git a/A4T-Upgrade/moonraker.conf b/A4T-Upgrade/moonraker.conf new file mode 100644 index 0000000..4439dbf --- /dev/null +++ b/A4T-Upgrade/moonraker.conf @@ -0,0 +1,57 @@ +[server] +host: 0.0.0.0 +port: 7125 + +[file_manager] +enable_object_processing: True + +[authorization] +#enabled: True +trusted_clients: + 10.0.0.0/8 + 127.0.0.0/8 + 169.254.0.0/16 + 172.16.0.0/12 + 192.168.0.0/16 + FE80::/10 + ::1/128 + +[update_manager] + +[update_manager client mainsail] +type: web +repo: mainsail-crew/mainsail +path: ~/mainsail + +[update_manager client moonraker-telegram-bot] +type: git_repo +path: ~/moonraker-telegram-bot +origin: https://github.com/nlef/moonraker-telegram-bot.git +env: ~/moonraker-telegram-bot-env/bin/python +requirements: scripts/requirements.txt +install_script: scripts/install.sh + +[update_manager client z_calibration] +type: git_repo +path: /home/pi/klipper_z_calibration +origin: https://github.com/protoloft/klipper_z_calibration.git +install_script: install.sh + +[update_manager client KlipperScreen] +type: git_repo +path: ~/KlipperScreen +origin: https://github.com/jordanruthe/KlipperScreen.git +env: ~/.KlipperScreen-env/bin/python +requirements: scripts/KlipperScreen-requirements.txt +install_script: scripts/KlipperScreen-install.sh + +[octoprint_compat] + +[power printer_psu] +type: tasmota +#locked_while_printing: False +restart_klipper_when_powered: True +restart_delay: 2 +address: 10.99.0.112 +#password: password1 +#output_id: 1 diff --git a/A4T-Upgrade/printer-20250218_161244.cfg b/A4T-Upgrade/printer-20250218_161244.cfg new file mode 100644 index 0000000..a5b88d2 --- /dev/null +++ b/A4T-Upgrade/printer-20250218_161244.cfg @@ -0,0 +1,808 @@ +## Voron Design VORON2 250/300/350mm SKR 1.4 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See 'sensor types' list at end of file +## Z Endstop Switch location [homing_override] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Fine tune E steps [extruder] section + +##========================== Pin Definitions ======================== +## X_STEP_PIN 2.2 +## X_DIR_PIN 2.6 +## X_ENABLE_PIN 2.1 +## X_STOP_PIN 1.29 +## E0_DET_PIN 1.26 +## X_UART_PIN 1.10 + + +## Y_STEP_PIN 0.19 +## Y_DIR_PIN 0.20 +## Y_ENABLE_PIN 2.8 +## Y_STOP_PIN 1.28 +## E1_DET_PIN 1.26 +## Y_UART_RX 1.9 + + +## Z_STEP_PIN 0.22 +## Z_DIR_PIN 2.11 +## Z_ENABLE_PIN 0.21 +## Z_STOP_PIN 1.27 +## PWR_DET_PIN 1.0 +## Z_UART 1.8 + + +## E0_STEP_PIN 2.13 +## E0_DIR_PIN 0.11 +## E0_ENABLE_PIN 2.12 +## E0_UART 1.4 + + +## E1_STEP_PIN 1.15 +## E1_DIR_PIN 1.14 +## E1_ENABLE_PIN 1.16 +## E1_UART_RX 1.1 + + +## HE1 2.4 +## HE0 2.7 +## BED 2.5 +## TH1 (H1 Temp) 0.23 +## TH0 (H0 Temp) 0.24 +## TB (Bed Temp) 0.25 +## FAN 2.3 +## SERVO 2.0 +## PROBE 0.10 +##=================================================================== + +[mcu] +## MCU for X/Y/E steppers main MCU +## [X in X] - B Motor +## [Y in Y] - A Motor +## [E in E0] - Extruder +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +serial: /dev/serial/by-id/usb-Klipper_lpc1769_0D70FF0F871C4AAF53417C5DC42000F5-if00 +##-------------------------------------------------------------------- + +[mcu z] +## MCU for Z steppers +## [Z in X] - Front Left +## [Z1 in Y] - Rear Left +## [Z2 in Z] - Rear Right +## [Z3 in E0]- Front Right +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +serial: /dev/serial/by-id/usb-Klipper_lpc1769_00A00004A49869AFEAD93E5EC02000F5-if00 +##-------------------------------------------------------------------- + +[printer] +kinematics: corexy +max_velocity: 300 +max_accel: 6000 #Original : 3000, put 6000 after input shaper +#max_accel_to_decel: 5000 #Original : 3000, put 5000 after input shaper +minimum_cruise_ratio: 0.5 +#max_accel: 10000 #Only there for input shaper +#max_accel_to_decel: 10000 #Only there for input shaper +max_z_velocity: 30 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +[stepper_x] +## Connected to X on mcu_xye (B Motor) +step_pin: P2.2 +dir_pin: !P2.6 +enable_pin: !P2.1 +rotation_distance: 40 +microsteps: 16 +full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper +endstop_pin: P1.29 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +#position_endstop: 300 +#position_max: 300 + +## Uncomment for 350mm build +position_endstop: 350 +position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 100 #Max 100 +second_homing_speed: 25 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: P1.10 +interpolate: True +run_current: 0.8 +hold_current: 0.7 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +[stepper_y] +## Connected to Y on mcu_xye (A Motor) +step_pin: P0.19 +dir_pin: !P0.20 +enable_pin: !P2.8 +rotation_distance: 40 +microsteps: 16 +full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper +endstop_pin: P1.28 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +#position_endstop: 300 +#position_max: 300 + +## Uncomment for 350mm build +position_endstop: 350 +position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 100 #Max 100 +second_homing_speed: 25 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: P1.9 +interpolate: True +run_current: 0.8 +hold_current: 0.7 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z MCU - In X Position +## Z0 Stepper - Front Left +[stepper_z] +step_pin: z:P2.2 +dir_pin: !z:P2.6 +enable_pin: !z:P2.1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 16 +endstop_pin: z:P1.27 +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: -0.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 240 + +## Uncomment below for 300mm build +#position_max: 290 + +## Uncomment below for 350mm build +position_max: 340 + +##-------------------------------------------------------------------- +position_min: -35 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: z:P1.10 +interpolate: true +run_current: 0.8 +hold_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z MCU - In Y Position +## Z1 Stepper - Rear Left +[stepper_z1] +step_pin: z:P0.19 +dir_pin: z:P0.20 +enable_pin: !z:P2.8 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 16 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: z:P1.9 +interpolate: true +run_current: 0.8 +hold_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z MCU - In Z Position +## Z2 Stepper - Rear Right +[stepper_z2] +step_pin: z:P0.22 +dir_pin: !z:P2.11 +enable_pin: !z:P0.21 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 16 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: z:P1.8 +interpolate: true +run_current: 0.8 +hold_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z MCU - In E0 Position +## Z3 Stepper - Front Right +[stepper_z3] +step_pin: z:P2.13 +dir_pin: z:P0.11 +enable_pin: !z:P2.12 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 16 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: z:P1.4 +interpolate: true +run_current: 0.8 +hold_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +# E0 on MCU X/Y +[extruder] +step_pin: P2.13 +dir_pin: !P0.11 +enable_pin: !P2.12 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +#rotation_distance: 22.225372078 #Bondtech 5mm Drive Gears +rotation_distance: 12.849 #CW2 Stealthburner +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 16 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: P2.7 +## Validate the following thermistor type to make sure it is correct +sensor_type: ATC Semitec 104GT-2 +sensor_pin: P0.24 +min_temp: 10 +max_temp: 270 +max_power: 1.0 +min_extrude_temp: 170 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.025 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MCU X/Y +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: P1.4 +interpolate: false +run_current: 0.5 +hold_current: 0.4 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Bed Heater +##################################################################### + +[heater_bed] +## SSR Pin - Z board, Fan Pin +heater_pin: z:P2.3 +#sensor_type: NTC 100K beta 3950 +sensor_type : Generic 3950 +sensor_pin: z:P0.25 +## Adjust Max Power so your heater doesn't warp your bed +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +[probe] +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +## Z_MAX on mcu_z +## If your probe is NO instead of NC, add change pin to !z:P0.10 + +#Panasonic Probe +#pin: ^z:P0.10 +#x_offset: 0 +##y_offset: 25.0 +#y_offset: 30.0 +#z_offset: 0 + +#Klicky-Probe +pin: ^z:P0.10 +#z_offset = 6.42 +x_offset: 0 +y_offset: 19.75 + +speed: 10.0 +samples: 3 +samples_result: median +sample_retract_dist: 3.0 +samples_tolerance: 0.006 +samples_tolerance_retries: 5 + +##################################################################### +# Fan Control +##################################################################### + +[heater_fan hotend_fan] +## Hotend Fan - XYE board, HE1 Connector +pin: P2.4 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 60.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +[fan] +## Print Cooling Fan - XYE board, Fan Pin +pin: P2.3 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +[heater_fan controller_fan] +## Controller fan - Z board, HE1 Connector +pin: z:P2.4 +kick_start_time: 0.5 +heater: heater_bed +heater_temp: 10.0 + +[heater_fan exhaust_fan] +## Exhaust fan - Z board, HE0 Connector +pin: z:P2.7 +max_power: 1.0 +shutdown_speed: 0.0 +kick_start_time: 5.0 +heater: heater_bed +heater_temp: 60 +fan_speed: 1.0 + +##################################################################### +# LED Control +##################################################################### + +#[output_pin caselight] +# Chamber Lighting - Bed Connector (Optional) +#pin: P2.5 +#pwm:true +#shutdown_value: 0 +#value:100 +#cycle_time: 0.01 + +##################################################################### +# safe z home +##################################################################### + +#[safe_z_home] +#home_xy_position: 175, 175 +# A X, Y coordinate (e.g. 100, 100) where the Z homing should be +# performed. This parameter must be provided. +#speed: 50.0 +# Speed at which the toolhead is moved to the safe Z home +# coordinate. The default is 50 mm/s +#z_hop: +# Distance (in mm) to lift the Z axis prior to homing. This is +# applied to any homing command, even if it doesn't home the Z axis. +# If the Z axis is already homed and the current Z position is less +# than z_hop, then this will lift the head to a height of z_hop. If +# the Z axis is not already homed the head is lifted by z_hop. +# The default is to not implement Z hop. +#z_hop_speed: 15.0 +# Speed (in mm/s) at which the Z axis is lifted prior to homing. The +# default is 15 mm/s. +#move_to_previous: False +# When set to True, the X and Y axes are reset to their previous +# positions after Z axis homing. The default is False. + + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[homing_override] +axes: z +set_position_z: 0 +gcode: + G90 + G0 Z5 F600 + G28 X Y + ## XY Location of the Z Endstop Switch + ## Update X0 and Y0 to your values (such as X157, Y305) after going through + ## Z Endstop Pin Location Definition step. + G0 X231 Y350 F3600 + + G28 Z + G0 Z10 F1800 + + ## Uncomment for for your size printer: +#-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + #G0 X150 Y150 Z30 F3600 + + ## Uncomment for 350mm build + G0 X175 Y175 Z10 F3600 +#-------------------------------------------------------------------- + + +[quad_gantry_level] +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +#gantry_corners: +# -60,-10 +# 360,370 +## Probe points +#points: +# 50,25 +# 50,225 +# 250,225 +# 250,25 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +gantry_corners: + -60,-10 + 410,420 +## Probe points +points: + 50,25 + 50,275 + 300,275 + 300,25 + +# by me cause the other one wasnt working +#points: +# 100,100 +# 100,250 +# 250,250 +# 250,100 + +#-------------------------------------------------------------------- +speed: 150 +horizontal_move_z: 15 +retries: 10 +retry_tolerance: 0.0075 +max_adjust: 10 + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have. Display connects to Z MCU +#-------------------------------------------------------------------- + +#[display] +## RepRapDiscount 128x64 Full Graphic Smart Controller +#lcd_type: st7920 +#cs_pin: z:P1.19 +#sclk_pin: z:P1.20 +#sid_pin: z:P1.18 +#menu_timeout: 40 +#encoder_pins: ^z:P3.26, ^z:P3.25 +#click_pin: ^!z:P0.28 + +#[output_pin beeper] +#pin: z:P1.30 + +#-------------------------------------------------------------------- + +#[display] +## mini12864 LCD Display +#lcd_type: uc1701 +#cs_pin: z:P1.18 +#a0_pin: z:P1.19 +#encoder_pins: ^z:P3.26,^z:P3.25 +#click_pin: ^!z:P0.28 +#contrast: 63 + + +#[neopixel fysetc_mini12864] +## To control Neopixel RGB in mini12864 display +#pin: z:P1.21 +#chain_count: 3 +#initial_RED: 0.5 +#initial_GREEN: 0.0 +#initial_BLUE: 0.0 +#color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +#[delayed_gcode setdisplayneopixel] +#initial_duration: 1 +#gcode: + #SET_LED LED=fysetc_mini12864 RED=0.25490 GREEN=0.71372 BLUE=0.901962 INDEX=1 TRANSMIT=0 + #SET_LED LED=fysetc_mini12864 RED=0.25490 GREEN=0.71372 BLUE=0.901962 TRANSMIT=0 + #SET_LED LED=fysetc_mini12864 RED=0.25490 GREEN=0.71372 BLUE=0.901962 INDEX=3 + + +[neopixel stealthburner] +# To control Neopixel RGB in stealthburner +pin: z:P1.24 +chain_count: 3 +initial_RED: 1 +initial_GREEN: 0 +initial_BLUE: 0 +initial_WHITE: 0.0 +color_order: GRBW + +# Set RGB values on boot up for each Neopixel. +# Index 1 = logo, Index 2 and 3 = print bed light +[delayed_gcode setstealthburnerneopixel] +initial_duration: 1 +gcode: + SET_LED LED=stealthburner RED=0.25490 GREEN=0.71372 BLUE=0.901962 INDEX=1 TRANSMIT=0 + SET_LED LED=stealthburner RED=0 GREEN=0 BLUE=0 WHITE=1 INDEX=2 TRANSMIT=0 + SET_LED LED=stealthburner RED=0 GREEN=0 BLUE=0 WHITE=1 INDEX=3 TRANSMIT=1 + +#-------------------------------------------------------------------- + +[include klicky-probe.cfg] +[include z_calibration.cfg] + +##################################################################### +# Macros +##################################################################### + +[gcode_macro G32] +gcode: + BED_MESH_CLEAR + G28 + QUAD_GANTRY_LEVEL + G28 + G0 X175 Y175 Z20 F6000 + +[gcode_macro PRINT_START] +# Superslicer "Start G-code" is: +# print_start EXTRUDER=[first_layer_temperature] BED=[first_layer_bed_temperature] +gcode: + + {% set EXTRUDER = params.EXTRUDER|int %} + {% set BED = params.BED|int %} + + #M117 First Homing + #G28 ; home all axes + G1 Y175 X175 Z20 F3000 ; move nozzle away from bed + + M117 Setting Bed... + M190 S{ BED } + M117 Setting Extruder... + M109 S{ EXTRUDER } + + # Releive pressure to prevent oozing + G92 E0 ;Reset Extruder + G1 E-1.0 F2400 ;Releive pressure + G92 E0 ;Reset Extruder + + M117 Last Homing... + G28 ; home all axes + + M117 Loading Mesh... + BED_MESH_PROFILE LOAD=HOT100 + + CALIBRATE_Z + # Run CALIBRATE_Z a couple of time and then adjust the offset here + #SET_GCODE_OFFSET Z=0.045 #0.045 + + M117 Voron V2.1102 + +[gcode_macro PRINT_END] +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +gcode: + M400 ; wait for buffer to clear + G92 E0 ; zero the extruder + G1 E-10.0 F3600 ; retract filament + G91 ; relative positioning + G0 Z1.00 X20.0 Y20.0 F20000 ; move nozzle to remove stringing + TURN_OFF_HEATERS + M107 ; turn off fan + G1 Z2 F3000 ; move nozzle up 2mm + G90 ; absolute positioning + G0 X125 Y250 F3600 ; park nozzle at rear + BED_MESH_CLEAR + M117 Done Printing. + +[gcode_macro PRINTER_OFF] +gcode: + {action_call_remote_method("set_device_power", + device="printer_psu", + state="off")} + +[gcode_macro PREHEAT] +gcode: + M117 Home and Cold QGL + G32 #Home, do a cold QGL, Home again (to place the nozzle in the center of the bed) + M117 Wait Bed at { BED } + M190 S{ BED } + M117 Heat Soaking 10m + G4 P600000 # Wait 10 minutes (600000 ms) + M117 Hot QGL + QUAD_GANTRY_LEVEL #Hot QGL + M117 Moving Center + G1 Y175 X175 Z20 F3000 # Placing nozzle to the middle of the bed. + M117 Ready to print. + + +[idle_timeout] +timeout: 1800 +gcode: + TURN_OFF_MOTORS + TURN_OFF_HEATERS + UPDATE_DELAYED_GCODE ID=delayed_printer_off DURATION=60 + +[delayed_gcode delayed_printer_off] +initial_duration: 0. +gcode: + {% if printer.idle_timeout.state == "Idle" %} + PRINTER_OFF + {% endif %} + +## Thermistor Types +## "EPCOS 100K B57560G104F" +## "ATC Semitec 104GT-2" +## "NTC 100K beta 3950" +## "Honeywell 100K 135-104LAG-J01" +## "NTC 100K MGB18-104F39050L32" (Keenovo Heater Pad) +## "AD595" +## "PT100 INA826" + +[include mainsail.cfg] + +[exclude_object] + +#input shaper +[mcu rpi] +serial: /tmp/klipper_host_mcu + +[adxl345] +cs_pin: rpi:None + +[resonance_tester] +accel_chip: adxl345 +probe_points: + 175,175,20 # Voron 350 Middle + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +#mesh_min: 40, 40 +#mesh_max: 260,260 + +## Uncomment for 350mm build +mesh_min: 40, 40 +mesh_max: 310,310 +##-------------------------------------------------------------------- +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#relative_reference_index: 12 + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.166 +#*# pid_ki = 1.586 +#*# pid_kd = 267.069 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 32.939 +#*# pid_ki = 2.553 +#*# pid_kd = 106.227 +#*# +#*# [stepper_z] +#*# position_endstop = -0.940 +#*# +#*# [bed_mesh HOT100] +#*# version = 1 +#*# points = +#*# 0.130000, 0.090000, 0.067500, 0.060000, 0.132500 +#*# 0.092500, 0.047500, 0.022500, 0.020000, 0.100000 +#*# 0.077500, 0.030000, 0.000000, -0.002500, 0.077500 +#*# 0.097500, 0.052500, 0.017500, 0.020000, 0.097500 +#*# 0.137500, 0.097500, 0.072500, 0.072500, 0.137500 +#*# tension = 0.2 +#*# min_x = 40.0 +#*# algo = bicubic +#*# y_count = 5 +#*# mesh_y_pps = 2 +#*# min_y = 40.0 +#*# x_count = 5 +#*# max_y = 310.0 +#*# mesh_x_pps = 2 +#*# max_x = 310.0 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 52.2 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 34.6 +#*# +#*# [probe] +#*# z_offset = 6.220 diff --git a/A4T-Upgrade/printer.cfg b/A4T-Upgrade/printer.cfg new file mode 100644 index 0000000..f6bece4 --- /dev/null +++ b/A4T-Upgrade/printer.cfg @@ -0,0 +1,866 @@ +## Voron Design VORON2 250/300/350mm SKR 1.4 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See 'sensor types' list at end of file +## Z Endstop Switch location [homing_override] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Fine tune E steps [extruder] section + +##========================== Pin Definitions ======================== +## X_STEP_PIN 2.2 +## X_DIR_PIN 2.6 +## X_ENABLE_PIN 2.1 +## X_STOP_PIN 1.29 +## E0_DET_PIN 1.26 +## X_UART_PIN 1.10 + + +## Y_STEP_PIN 0.19 +## Y_DIR_PIN 0.20 +## Y_ENABLE_PIN 2.8 +## Y_STOP_PIN 1.28 +## E1_DET_PIN 1.26 +## Y_UART_RX 1.9 + + +## Z_STEP_PIN 0.22 +## Z_DIR_PIN 2.11 +## Z_ENABLE_PIN 0.21 +## Z_STOP_PIN 1.27 +## PWR_DET_PIN 1.0 +## Z_UART 1.8 + + +## E0_STEP_PIN 2.13 +## E0_DIR_PIN 0.11 +## E0_ENABLE_PIN 2.12 +## E0_UART 1.4 + + +## E1_STEP_PIN 1.15 +## E1_DIR_PIN 1.14 +## E1_ENABLE_PIN 1.16 +## E1_UART_RX 1.1 + + +## HE1 2.4 +## HE0 2.7 +## BED 2.5 +## TH1 (H1 Temp) 0.23 +## TH0 (H0 Temp) 0.24 +## TB (Bed Temp) 0.25 +## FAN 2.3 +## SERVO 2.0 +## PROBE 0.10 +##=================================================================== + +[mcu] +## MCU for X/Y/E steppers main MCU +## [X in X] - B Motor +## [Y in Y] - A Motor +## [E in E0] - Extruder +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +serial: /dev/serial/by-id/usb-Klipper_lpc1769_0D70FF0F871C4AAF53417C5DC42000F5-if00 +##-------------------------------------------------------------------- + +[mcu z] +## MCU for Z steppers +## [Z in X] - Front Left +## [Z1 in Y] - Rear Left +## [Z2 in Z] - Rear Right +## [Z3 in E0]- Front Right +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +serial: /dev/serial/by-id/usb-Klipper_lpc1769_00A00004A49869AFEAD93E5EC02000F5-if00 +##-------------------------------------------------------------------- + +[printer] +kinematics: corexy +max_velocity: 300 +max_accel: 6000 #Original : 3000, put 6000 after input shaper +#max_accel_to_decel: 5000 #Original : 3000, put 5000 after input shaper +minimum_cruise_ratio: 0.5 +#max_accel: 10000 #Only there for input shaper +#max_accel_to_decel: 10000 #Only there for input shaper +max_z_velocity: 30 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +[stepper_x] +## Connected to X on mcu_xye (B Motor) +step_pin: P2.2 +dir_pin: !P2.6 +enable_pin: !P2.1 +rotation_distance: 40 +microsteps: 16 +full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper +endstop_pin: P1.29 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +#position_endstop: 300 +#position_max: 300 + +## Uncomment for 350mm build +position_endstop: 350 +position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 100 #Max 100 +second_homing_speed: 25 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: P1.10 +interpolate: True +run_current: 0.8 +hold_current: 0.7 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +[stepper_y] +## Connected to Y on mcu_xye (A Motor) +step_pin: P0.19 +dir_pin: !P0.20 +enable_pin: !P2.8 +rotation_distance: 40 +microsteps: 16 +full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper +endstop_pin: P1.28 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +#position_endstop: 300 +#position_max: 300 + +## Uncomment for 350mm build +position_endstop: 350 +position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 100 #Max 100 +second_homing_speed: 25 +homing_retract_dist: 5 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: P1.9 +interpolate: True +run_current: 0.8 +hold_current: 0.7 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z MCU - In X Position +## Z0 Stepper - Front Left +[stepper_z] +step_pin: z:P2.2 +dir_pin: !z:P2.6 +enable_pin: !z:P2.1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 16 +endstop_pin: z:P1.27 +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: -0.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 240 + +## Uncomment below for 300mm build +#position_max: 290 + +## Uncomment below for 350mm build +position_max: 340 + +##-------------------------------------------------------------------- +position_min: -35 +homing_speed: 8 +second_homing_speed: 3 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: z:P1.10 +interpolate: true +run_current: 0.8 +hold_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z MCU - In Y Position +## Z1 Stepper - Rear Left +[stepper_z1] +step_pin: z:P0.19 +dir_pin: z:P0.20 +enable_pin: !z:P2.8 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 16 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: z:P1.9 +interpolate: true +run_current: 0.8 +hold_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z MCU - In Z Position +## Z2 Stepper - Rear Right +[stepper_z2] +step_pin: z:P0.22 +dir_pin: !z:P2.11 +enable_pin: !z:P0.21 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 16 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: z:P1.8 +interpolate: true +run_current: 0.8 +hold_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z MCU - In E0 Position +## Z3 Stepper - Front Right +[stepper_z3] +step_pin: z:P2.13 +dir_pin: z:P0.11 +enable_pin: !z:P2.12 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 16 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: z:P1.4 +interpolate: true +run_current: 0.8 +hold_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +# E0 on MCU X/Y +[extruder] +step_pin: P2.13 +dir_pin: !P0.11 +enable_pin: !P2.12 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +#rotation_distance: 22.225372078 #Bondtech 5mm Drive Gears +rotation_distance: 12.849 #CW2 Stealthburner +## Update Gear Ratio depending on your Extruder Type +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +gear_ratio: 50:17 #BMG Gear Ratio +microsteps: 16 +full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +nozzle_diameter: 0.400 +filament_diameter: 1.75 +heater_pin: P2.7 +## Validate the following thermistor type to make sure it is correct +sensor_type: ATC Semitec 104GT-2 +sensor_pin: P0.24 +min_temp: 10 +max_temp: 270 +max_power: 1.0 +min_extrude_temp: 170 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +pressure_advance: 0.025 +## Default is 0.040, leave stock +pressure_advance_smooth_time: 0.040 + +## E0 on MCU X/Y +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 extruder] +uart_pin: P1.4 +interpolate: false +run_current: 0.5 +hold_current: 0.4 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Bed Heater +##################################################################### + +[heater_bed] +## SSR Pin - Z board, Fan Pin +heater_pin: z:P2.3 +#sensor_type: NTC 100K beta 3950 +sensor_type : Generic 3950 +sensor_pin: z:P0.25 +## Adjust Max Power so your heater doesn't warp your bed +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +[probe] +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +## Z_MAX on mcu_z +## If your probe is NO instead of NC, add change pin to !z:P0.10 + +#Panasonic Probe +#pin: ^z:P0.10 +#x_offset: 0 +##y_offset: 25.0 +#y_offset: 30.0 +#z_offset: 0 + +#Klicky-Probe +pin: ^z:P0.10 +#z_offset = 6.42 +x_offset: 0 +y_offset: 19.75 + +speed: 10.0 +samples: 3 +samples_result: median +sample_retract_dist: 3.0 +samples_tolerance: 0.006 +samples_tolerance_retries: 5 + +##################################################################### +# Fan Control +##################################################################### + +[heater_fan hotend_fan] +## Hotend Fan - XYE board, HE1 Connector +pin: P2.4 +max_power: 1.0 +kick_start_time: 0.5 +heater: extruder +heater_temp: 60.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +[fan] +## Print Cooling Fan - XYE board, Fan Pin +pin: P2.3 +kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +off_below: 0.10 + +[heater_fan controller_fan] +## Controller fan - Z board, HE1 Connector +pin: z:P2.4 +kick_start_time: 0.5 +heater: heater_bed +heater_temp: 10.0 + +[heater_fan exhaust_fan] +## Exhaust fan - Z board, HE0 Connector +pin: z:P2.7 +max_power: 1.0 +shutdown_speed: 0.0 +kick_start_time: 5.0 +heater: heater_bed +heater_temp: 60 +fan_speed: 1.0 + +##################################################################### +# LED Control +##################################################################### + +#[output_pin caselight] +# Chamber Lighting - Bed Connector (Optional) +#pin: P2.5 +#pwm:true +#shutdown_value: 0 +#value:100 +#cycle_time: 0.01 + +##################################################################### +# safe z home +##################################################################### + +#[safe_z_home] +#home_xy_position: 175, 175 +# A X, Y coordinate (e.g. 100, 100) where the Z homing should be +# performed. This parameter must be provided. +#speed: 50.0 +# Speed at which the toolhead is moved to the safe Z home +# coordinate. The default is 50 mm/s +#z_hop: +# Distance (in mm) to lift the Z axis prior to homing. This is +# applied to any homing command, even if it doesn't home the Z axis. +# If the Z axis is already homed and the current Z position is less +# than z_hop, then this will lift the head to a height of z_hop. If +# the Z axis is not already homed the head is lifted by z_hop. +# The default is to not implement Z hop. +#z_hop_speed: 15.0 +# Speed (in mm/s) at which the Z axis is lifted prior to homing. The +# default is 15 mm/s. +#move_to_previous: False +# When set to True, the X and Y axes are reset to their previous +# positions after Z axis homing. The default is False. + + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[homing_override] +axes: z +set_position_z: 0 +gcode: + G90 + G0 Z5 F600 + G28 X Y + ## XY Location of the Z Endstop Switch + ## Update X0 and Y0 to your values (such as X157, Y305) after going through + ## Z Endstop Pin Location Definition step. + G0 X231 Y350 F3600 + + G28 Z + G0 Z10 F1800 + + ## Uncomment for for your size printer: +#-------------------------------------------------------------------- + ## Uncomment for 250mm build + #G0 X125 Y125 Z30 F3600 + + ## Uncomment for 300 build + #G0 X150 Y150 Z30 F3600 + + ## Uncomment for 350mm build + G0 X175 Y175 Z10 F3600 +#-------------------------------------------------------------------- + + +[quad_gantry_level] +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions + +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +#gantry_corners: +# -60,-10 +# 360,370 +## Probe points +#points: +# 50,25 +# 50,225 +# 250,225 +# 250,25 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +gantry_corners: + -60,-10 + 410,420 +## Probe points +points: + 50,25 + 50,275 + 300,275 + 300,25 + +# by me cause the other one wasnt working +#points: +# 100,100 +# 100,250 +# 250,250 +# 250,100 + +#-------------------------------------------------------------------- +speed: 150 +horizontal_move_z: 15 +retries: 10 +retry_tolerance: 0.0075 +max_adjust: 10 + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have. Display connects to Z MCU +#-------------------------------------------------------------------- + +#[display] +## RepRapDiscount 128x64 Full Graphic Smart Controller +#lcd_type: st7920 +#cs_pin: z:P1.19 +#sclk_pin: z:P1.20 +#sid_pin: z:P1.18 +#menu_timeout: 40 +#encoder_pins: ^z:P3.26, ^z:P3.25 +#click_pin: ^!z:P0.28 + +#[output_pin beeper] +#pin: z:P1.30 + +#-------------------------------------------------------------------- + +#[display] +## mini12864 LCD Display +#lcd_type: uc1701 +#cs_pin: z:P1.18 +#a0_pin: z:P1.19 +#encoder_pins: ^z:P3.26,^z:P3.25 +#click_pin: ^!z:P0.28 +#contrast: 63 + + +#[neopixel fysetc_mini12864] +## To control Neopixel RGB in mini12864 display +#pin: z:P1.21 +#chain_count: 3 +#initial_RED: 0.5 +#initial_GREEN: 0.0 +#initial_BLUE: 0.0 +#color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +#[delayed_gcode setdisplayneopixel] +#initial_duration: 1 +#gcode: + #SET_LED LED=fysetc_mini12864 RED=0.25490 GREEN=0.71372 BLUE=0.901962 INDEX=1 TRANSMIT=0 + #SET_LED LED=fysetc_mini12864 RED=0.25490 GREEN=0.71372 BLUE=0.901962 TRANSMIT=0 + #SET_LED LED=fysetc_mini12864 RED=0.25490 GREEN=0.71372 BLUE=0.901962 INDEX=3 + + +[neopixel stealthburner] +# To control Neopixel RGB in stealthburner +pin: z:P1.24 +chain_count: 3 +initial_RED: 1 +initial_GREEN: 0 +initial_BLUE: 0 +initial_WHITE: 0.0 +color_order: GRBW + +# Set RGB values on boot up for each Neopixel. +# Index 1 = logo, Index 2 and 3 = print bed light +[delayed_gcode setstealthburnerneopixel] +initial_duration: 1 +gcode: + SET_LED LED=stealthburner RED=0.25490 GREEN=0.71372 BLUE=0.901962 INDEX=1 TRANSMIT=0 + SET_LED LED=stealthburner RED=0 GREEN=0 BLUE=0 WHITE=1 INDEX=2 TRANSMIT=0 + SET_LED LED=stealthburner RED=0 GREEN=0 BLUE=0 WHITE=1 INDEX=3 TRANSMIT=1 + +#-------------------------------------------------------------------- + +[include klicky-probe.cfg] +[include z_calibration.cfg] + +##################################################################### +# Macros +##################################################################### + +[gcode_macro G32] +gcode: + BED_MESH_CLEAR + G28 + QUAD_GANTRY_LEVEL + G28 + G0 X175 Y175 Z20 F6000 + +[gcode_macro PRINT_START] +# Superslicer "Start G-code" is: +# PRINT_START EXTRUDER=[first_layer_temperature] BED=[first_layer_bed_temperature] +gcode: + + {% set EXTRUDER = params.EXTRUDER|int %} + {% set BED = params.BED|int %} + + #M117 First Homing + #G28 ; home all axes + G1 Y175 X175 Z20 F3000 ; move nozzle away from bed + + M117 Setting Bed... + M190 S{ BED } + M117 Setting Extruder... + M109 S{ EXTRUDER } + + # Releive pressure to prevent oozing + G92 E0 ;Reset Extruder + G1 E-1.0 F2400 ;Releive pressure + G92 E0 ;Reset Extruder + + M117 Last Homing... + G28 ; home all axes + + M117 Loading Mesh... + BED_MESH_PROFILE LOAD=HOT100 + + CALIBRATE_Z + # Run CALIBRATE_Z a couple of time and then adjust the offset here + #SET_GCODE_OFFSET Z=0.045 #0.045 + + M117 Voron V2.1102 + + PRIME_NOZZLE + +[gcode_macro PRINT_END] +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +gcode: + M400 ; wait for buffer to clear + G92 E0 ; zero the extruder + G1 E-10.0 F3600 ; retract filament + G91 ; relative positioning + G0 Z1.00 X20.0 Y20.0 F20000 ; move nozzle to remove stringing + TURN_OFF_HEATERS + M107 ; turn off fan + G1 Z2 F3000 ; move nozzle up 2mm + G90 ; absolute positioning + G0 X125 Y250 F3600 ; park nozzle at rear + BED_MESH_CLEAR + M117 Done Printing. + +[gcode_macro PRINTER_OFF] +gcode: + {action_call_remote_method("set_device_power", + device="printer_psu", + state="off")} + +[gcode_macro PREHEAT] +gcode: + M117 Home and Cold QGL + G32 #Home, do a cold QGL, Home again (to place the nozzle in the center of the bed) + M117 Wait Bed at { BED } + M190 S{ BED } + M117 Heat Soaking 10m + G4 P600000 # Wait 10 minutes (600000 ms) + M117 Hot QGL + QUAD_GANTRY_LEVEL #Hot QGL + M117 Moving Center + G1 Y175 X175 Z20 F3000 # Placing nozzle to the middle of the bed. + M117 Ready to print. + +[gcode_macro CLEAN_NOZZLE] +variable_x_wipe_min: 85 +variable_x_wipe_max: 120 +variable_y_wipe: 349 +gcode: + {% set x_min = params.X|default(printer["gcode_macro CLEAN_NOZZLE"].x_wipe_min)|float %} + {% set x_max = params.X2|default(printer["gcode_macro CLEAN_NOZZLE"].x_wipe_max)|float %} + {% set y_wipe = params.Y|default(printer["gcode_macro CLEAN_NOZZLE"].y_wipe)|float %} + + SAVE_GCODE_STATE NAME=clean_nozzle_gantry + G90 + G1 X{x_max} F12000 + G1 Y{y_wipe} F12000 + G1 X{x_min} F12000 + G1 X{x_max} F12000 + G1 X{x_min} F12000 + G1 X{x_max} F12000 + RESTORE_GCODE_STATE NAME=clean_nozzle_gantry + +[gcode_macro PRIME_NOZZLE] +variable_x_blob: 10 +variable_y_blob: 20 +variable_z_height: 0.3 +variable_blob_extrude: 15 +variable_line_length: 50 +variable_line_extrusion: 10 +gcode: + {% set x_blob = printer["gcode_macro PRIME_NOZZLE"].x_blob %} + {% set y_blob = printer["gcode_macro PRIME_NOZZLE"].y_blob %} + {% set z_height = printer["gcode_macro PRIME_NOZZLE"].z_height %} + {% set blob_extrude = printer["gcode_macro PRIME_NOZZLE"].blob_extrude %} + {% set line_length = printer["gcode_macro PRIME_NOZZLE"].line_length %} + {% set line_extrusion = printer["gcode_macro PRIME_NOZZLE"].line_extrusion %} + + SAVE_GCODE_STATE NAME=prime_state + + G90 + G92 E0 + + ; Purge blob + G1 X{x_blob} Y{y_blob} F12000 + G1 Z{z_height} F3000 + G92 E0 + G1 E{blob_extrude} F300 + + ; Long purge line + G92 E0 + G1 X{ x_blob + line_length } E{line_extrusion} F600 + + G92 E0 + + RESTORE_GCODE_STATE NAME=prime_state + + + + +[idle_timeout] +timeout: 1800 +gcode: + TURN_OFF_MOTORS + TURN_OFF_HEATERS + UPDATE_DELAYED_GCODE ID=delayed_printer_off DURATION=60 + +[delayed_gcode delayed_printer_off] +initial_duration: 0. +gcode: + {% if printer.idle_timeout.state == "Idle" %} + PRINTER_OFF + {% endif %} + +## Thermistor Types +## "EPCOS 100K B57560G104F" +## "ATC Semitec 104GT-2" +## "NTC 100K beta 3950" +## "Honeywell 100K 135-104LAG-J01" +## "NTC 100K MGB18-104F39050L32" (Keenovo Heater Pad) +## "AD595" +## "PT100 INA826" + + +[include mainsail.cfg] + +[exclude_object] + +#input shaper +[mcu rpi] +serial: /tmp/klipper_host_mcu + +#[adxl345] +#cs_pin: rpi:None + +#[resonance_tester] +#accel_chip: adxl345 +#probe_points: +# 175,175,20 # Voron 350 Middle + +#[bed_mesh] +#speed: 300 +#horizontal_move_z: 10 +##-------------------------------------------------------------------- +## Uncomment below for 250mm build +#mesh_min: 40, 40 +#mesh_max: 210,210 + +## Uncomment for 300mm build +#mesh_min: 40, 40 +#mesh_max: 260,260 + +## Uncomment for 350mm build +#mesh_min: 40, 40 +#mesh_max: 310,310 +##-------------------------------------------------------------------- +#fade_start: 0.6 +#fade_end: 10.0 +#probe_count: 5,5 +#algorithm: bicubic +#relative_reference_index: 12 + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 41.166 +#*# pid_ki = 1.586 +#*# pid_kd = 267.069 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 32.939 +#*# pid_ki = 2.553 +#*# pid_kd = 106.227 +#*# +#*# [stepper_z] +#*# position_endstop = -0.940 +#*# +#*# [bed_mesh HOT100] +#*# version = 1 +#*# points = +#*# 0.130000, 0.090000, 0.067500, 0.060000, 0.132500 +#*# 0.092500, 0.047500, 0.022500, 0.020000, 0.100000 +#*# 0.077500, 0.030000, 0.000000, -0.002500, 0.077500 +#*# 0.097500, 0.052500, 0.017500, 0.020000, 0.097500 +#*# 0.137500, 0.097500, 0.072500, 0.072500, 0.137500 +#*# tension = 0.2 +#*# min_x = 40.0 +#*# algo = bicubic +#*# y_count = 5 +#*# mesh_y_pps = 2 +#*# min_y = 40.0 +#*# x_count = 5 +#*# max_y = 310.0 +#*# mesh_x_pps = 2 +#*# max_x = 310.0 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 52.2 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 34.6 +#*# +#*# [probe] +#*# z_offset = 6.295 diff --git a/A4T-Upgrade/telegram.conf b/A4T-Upgrade/telegram.conf new file mode 100644 index 0000000..82ea5a2 --- /dev/null +++ b/A4T-Upgrade/telegram.conf @@ -0,0 +1,20 @@ +# Please refer to the wiki(https://github.com/nlef/moonraker-telegram-bot/wiki) for detailed information on how to configure the bot + +[bot] +server: localhost +bot_token: 1490130666:AAH4Vtk3fenhiyBbrS4nNTcZGRn79XpEO5s +chat_id: 1656115798 + +[camera] +host: http://localhost:8080/?action=stream + +[progress_notification] +percent: 5 +height: 5 +time: 5 + +[timelapse] +cleanup: true +height: 0.2 +time: 5 +target_fps: 30 diff --git a/A4T-Upgrade/z_calibration.cfg b/A4T-Upgrade/z_calibration.cfg new file mode 100644 index 0000000..0fd9a5b --- /dev/null +++ b/A4T-Upgrade/z_calibration.cfg @@ -0,0 +1,93 @@ +[z_calibration] +nozzle_xy_position: 231,349 +# A X, Y coordinate (e.g. 100,100) of the nozzle, clicking on the z endstop. +switch_xy_position: 225,327 +# A X, Y coordinate (e.g. 100,100) of the probe's switch body, clicking on +# the z endstop. +#switch_xy_offsets: optional when switch_xy_position is used +# Instead of an absolute position (switch_xy_position), this configuration +# adds an X, Y offset (e.g. -6,-18) to the nozzle position. +bed_xy_position: 175,175 +# A X, Y coordinate (e.g. 100,100) where the print surface (e.g. the center +# point) is probed. These coordinates are adjusted by the +# probe's X and Y offsets. The default is the zero_reference_position which +# replaces the deprecated relative_reference_index +# of the configured bed_mesh, if configured. It's possible to change the zero +# reference position at runtime or use the GCode argument BED_POSITION of CALIBRATE_Z. +wiggle_xy_offsets: 0,0 +# After probing the nozzle and retracting, move x some distance away and +# back. Useful to prevent the z endstop pin sticking to the nozzle and +# being pulled out of the assembly. Can be negative. Defaults to zero to +# disable it. Can be combined in x and y to move diagonally. Be careful +# to not move your nozzle out of range! +switch_offset: 0.51 +# The trigger point offset of the used mag-probe switch. +# A larger value will position the nozzle closer to the bed. +# This must be determined manually. More on this later +# in this section.. +offset_margins: -1.0,1.0 +# The minimum and maximum margins allowed for the calculated offset. +# If the offset is outside these values, it will stop! +# The margin can be defined as "min,max" e.g. "-0.5,1.5" or by just one +# value e.g. "1.0" which translates to "-1.0,1.0" (which is also the default). +#max_deviation: DEPRECATED - please use offset_margins instead! +# The maximum allowed deviation of the calculated offset. +# If the offset exceeds this value, it will stop! +# The default is 1.0 mm. +#samples: default from "probe:samples" section +# The number of times to probe each point. The probed z-values +# will be averaged. The default is from the probe's configuration. +#samples_tolerance: default from "probe:samples_tolerance" section +# The maximum Z distance (in mm) that a sample may differ from other +# samples. The default is from the probe's configuration. +#samples_tolerance_retries: default from "probe:samples_tolerance_retries" section +# The number of times to retry if a sample is found that exceeds +# samples_tolerance. The default is from the probe's configuration. +#samples_result: default from "probe:samples_result" section +# The calculation method when sampling more than once - either +# "median" or "average". The default is from the probe's configuration. +#safe_z_height: default is 2 * z_offset from the "probe:z_offset" section +# The absolute z position in mm to move to before moving to the next +# position. The default is two times the z_offset from the probe's +# configuration. The minimum safe z height is 3mm. +#clearance: DEPRECATED - please use safe_z_height instead! +# The distance in mm to move up before moving to the next +# position. The default is two times the z_offset from the probe's +# configuration. +#position_min: default from "stepper_z:position_min" section. +# Minimum valid distance (in mm) used for probing move. The +# default is from the Z rail configuration. +speed: 100 +# The moving speed in X and Y. The default is 50 mm/s. +#lift_speed: default from "probe:lift_speed" section +# Speed (in mm/s) of the Z axis when lifting the probe between +# samples and clearance moves. The default is from the probe's +# configuration. +#probing_speed: default from "stepper_z:homing_speed" section. +# The fast probing speed (in mm/s) used, when probing_first_fast +# is enabled. The default is from the Z rail configuration. +#probing_second_speed: default from "stepper_z:second_homing_speed" section. +# The slower speed (in mm/s) for probing the recorded samples. +# The default is second_homing_speed of the Z rail configuration. +#probing_retract_dist: default from "stepper_z:homing_retract_dist" section. +# Distance to retract (in mm) before probing the next sample. +# The default is homing_retract_dist from the Z rail configuration. +# Caution: if sensorless homing is used on the Z axis with +# homing_retract_dist set to zero, this must be set to a value greater zero. +probing_first_fast: false +# If true, the first probing will be faster by the probing speed. +# This is to get down faster and not record the result as a +# probing sample. The default is false. +start_gcode: Attach_Probe +# A list of G-Code commands to run before each calibration command. +# See docs/Command_Templates.md for the G-Code format. This can be used to +# attach the probe. +before_switch_gcode: +# A list of G-Code commands to run before to each probing on the +# mag-probe. See docs/Command_Templates.md for the G-Code format. This can +# be used to attach the probe after probing on the nozzle and before probing +# on the mag-probe. +end_gcode: Dock_Probe +# A list of G-Code commands to run after each calibration command. +# See docs/Command_Templates.md for the G-Code format. This can be used to +# detach the probe afterwards. \ No newline at end of file diff --git a/KlipperScreen.conf b/KlipperScreen.conf new file mode 100644 index 0000000..b344b2e --- /dev/null +++ b/KlipperScreen.conf @@ -0,0 +1,5 @@ + +#~# --- Do not edit below this line. This section is auto generated --- #~# +#~# +#~# +#~# diff --git a/Orbiter2_SmartSensor.cfg b/Orbiter2_SmartSensor.cfg new file mode 100644 index 0000000..3fb1aaa --- /dev/null +++ b/Orbiter2_SmartSensor.cfg @@ -0,0 +1,332 @@ +################################################################################################################# +################################# Orbiter Sensor CONFIGURATION ################################################## +################################################################################################################# + +#config file version v3.2.0 +#release date: 17.07.2025 + +# PAUSE, RESUME and CANCEL macros are defined at the end of this config file. +# If you prefer using your own, please delete them, otherwise define parking position below. +# when using PAUSE, RESUME and CANCEL macros of this file, please comment out the #[include mainsail.cfg] from your printer.cfg file. + +################################################################################################################# +################################# CHANGE HERE MACRO CONFIGURABLES################################################ +################################################################################################################# + +[gcode_macro _SENSOR_VARIABLES] # change here macro configurables, enable/disablee functions! +variable_filament_load_temp :230 # temperature to heat up hotend for filament loading, default is 235 +variable_filament_unload_temp :185 # temperature to heat up hotend for filament unloading, default is 185 +variable_filament_load_min_temp :190 # minimum hotend set temperature allowed in filament load macro, default is 190 +variable_nozzle_purge_length :100 # filament extrude amount during load sequence, hotend purge from old filament, default is 200 +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 +variable_unload_distance :65 # filament retract distance for unload procedure. this length shall be long enough to extract the filament above the drive gears +variable_disable_autoload :False # disable filament autoload feature by setting this variable True +variable_disable_autounload :False # disable filamen unload by unload button +variable_disable_runout :False # disable runout by setting this variable True +variable_disable_autochange :True # disable filament auto change after runout detection +variable_disable_tangle :False # disable tangle by setting this variable True +variable_pause_timeout :3600 # printer timeout setting in seconds, avoids disabling of steppers and heaters after klipper default timeout of 600s +variable_enable_beep :True # uses M300 sound feature, set it True to enable +variable_park_position_x :20 # edit your X parking position here for pause macro triggered by runout +variable_park_position_y :0 # edit your Y parking position here for pause macro triggered by runout +variable_park_lift_z :20 # edit your Z-Lift amount for parking position here, default is 10 +Variable_park_retraction :1 # edit your retraction amount for parking, default is 1 +gcode: + +[filament_switch_sensor O2_sensor] +#switch_pin: orbitoolO2:PA13 # edit sensor connection pin if not used with otbiter toolboards - config for otbitool O2 +switch_pin: orbitoolO2S:PA8 # pin config for Orbitool O2S +pause_on_runout: False +runout_gcode: runout_init +insert_gcode: filament_load_init +event_delay: 0.1 # may be changed to 0 for user with mmu +pause_delay: 0.1 + +#******************************************************************************************************** + +#////////////////////////////////////////Filament Unload macros///////////////////////////////////////////////// +[gcode_button filament_unload] +#pin: orbitoolO2:PA14 # edit sensor connection pin, if not used with otbiter toolboards +pin: orbitoolO2S:PA9 # pin config for Orbitool O2S +press_gcode: # filament unload procedure + # M118 Debug Unload press + unload_tangle_init +release_gcode: # do not add any macro call here + #M118 Debug Unload release + + + +################################################################################################################################# +####################################### DO NOT CHANGE ANYTHING BELOW THIS LINE!!! ############################################### +################################################################################################################################# +####################################### UNLESS YOU KNOW WHAT YOU ARE DOING OR YOU ARE BORED AND NEED TO DO SOMETHING OR YOU ARE ALONE AND NEED SOMETHING TO MESS UP YOUR LIFE OR YOU CAN DO IT BETTER THAN ME OR YOU ARE A REAL SMARTASS OR JUST BECAUSE YOU CAN OR YOU RUN OUT OF BEAR OR HAS NOTHING BETTER TO DO OR ANY UNREASONABLE REASON +################################################################################################################################# + +[respond] +default_type: echo + +[force_move] +enable_force_move: True + +[gcode_macro runout_init] +gcode: + {% set sensor = printer['gcode_macro _SENSOR_VARIABLES'] %} + {% if(sensor.disable_runout|lower == 'false') %} + filament_change_state1 + {% else %} + M118 O2S: Filament runout is disabled in the sensor config file! + {% endif %} + +[gcode_macro filament_change_state1] +variable_changebusy: 0 +variable_temp_target: 0 +gcode: + {% set sensor = printer['gcode_macro _SENSOR_VARIABLES'] %} + {% if changebusy == 0 %} + M118 O2S: Printer paused due to filament runout! + PAUSE # call printer pause macro + {% if (sensor.disable_autochange|lower == 'false') %} + SET_GCODE_VARIABLE MACRO=filament_change_state1 VARIABLE=changebusy VALUE=1 + filament_change_state2 + {% endif %} + {% endif %} + +[gcode_macro filament_change_state2] +gcode: + {% set sensor = printer['gcode_macro _SENSOR_VARIABLES'] %} + SET_GCODE_VARIABLE MACRO=unload_tangle_init VARIABLE=loadbusy VALUE=1 + {% if (sensor.enable_beep|lower == 'true') %} + M300 # beep sound + {% endif %} + M118 O2S: Unloading filament... + M83 + G92 E0 + # {% if printer[printer.toolhead.extruder].temperature < 185 %} # hardcoded threshold + {% if (printer.extruder.can_extrude|lower != 'true')%} # Checking for minimum extrusion temperature + # Check if temperature is over the minimum extrusion temperature. min_extrude_temp must be defined in the extruder config (to about 185) + M118 O2S: Heating hotend! + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={sensor.filament_unload_temp} # restore user temp if it was set before loading + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={sensor.filament_unload_temp-1} #wait for reaching filament unload temperature + {% endif %} + {% if(printer.extruder.target == 0) %} # Checking for set temperature if is zero, than heat hotend + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={sensor.filament_unload_temp} # restore user temp if it was set before loading + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={sensor.filament_unload_temp-1} #wait for reaching filament unload temperature + {% endif %} + G0 E-5 F3600 #extract filament to cold end + G4 P2000 # wait for two seconds + G0 E5 F3600 # push the filament back + G0 E-5 F3600 #extract filament to cold end + G0 E-{sensor.unload_distance} F300 # continue extraction slow allow filament to be cooled enough before reaches the gears + M400 + M118 O2S: Load new filament! Wait until it is loaded, then resume printing. + #SET_HEATER_TEMPERATURE HEATER=extruder TARGET=0 # switch off heater + UPDATE_DELAYED_GCODE ID=clear_loadbusy DURATION=0.5 + UPDATE_DELAYED_GCODE ID=clear_changebusy DURATION=0.5 + +[gcode_macro filament_load_init] +gcode: + {% set sensor = printer['gcode_macro _SENSOR_VARIABLES'] %} + {% if (printer.print_stats.state != "printing") %} + {% if(sensor.disable_autoload|lower == 'false') %} + SET_GCODE_VARIABLE MACRO=unload_tangle_init VARIABLE=loadbusy VALUE=1 + filament_load + {% else %} + M118 O2S: Filament auto-load is disabled in the sensor config file! + {% endif %} + {% else %} + M118 O2S: Printing! Can't load filament right now! + {% endif %} + + +[gcode_macro filament_load] +variable_USER_TEMP: 0 +variable_LOAD_TEMP: 0 +gcode: + {% set sensor = printer['gcode_macro _SENSOR_VARIABLES'] %} + {% set USER_TEMP = printer.extruder.target %} # save user set temperature before loading + {% set LOAD_TEMP = 0 %} + M118 O2S: Loading filament... + {% if (printer.extruder.can_extrude|lower != 'true') or (printer.extruder.target < sensor.filament_load_min_temp) %} # checking for minimum extrusion temperature + # check if temperature is over the minimum extrusion temp. min_extrude_temp must be defined in the extruder config (to about 185) + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={sensor.filament_load_temp} + {% set LOAD_TEMP = sensor.filament_load_temp %} # save user set temperature before loading + M118 O2S: Heating hotend! + {% endif %} + {% if (sensor.enable_beep|lower == 'true') %} + M300 # beep sound + {% endif %} + M82 #set extruder to absolute mode + G92 E0 + G4 P1500 # wait for 1.5 seconds + FORCE_MOVE STEPPER=extruder DISTANCE=15 VELOCITY=10 ACCEL=1000 # load filament inside the gears force move needs to be enabled + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={LOAD_TEMP-1} # wait for reaching set temperature + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={USER_TEMP-1} # wait for reaching set temperature + G1 E{sensor.nozzle_purge_length} F{sensor.nozzle_purge_speed} # extrude preconfigured purge length + M400 # wait to complete nozzle purge + {% if ((printer.print_stats.state == "printing") or (printer.print_stats.state == "paused"))%} #if the printer is not printing or paused the nozzle temp will not be restored but set to 0. + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={USER_TEMP} # restore user temp if it was set before loading + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={USER_TEMP-1} + {% else %} + SET_HEATER_TEMPERATURE HEATER=extruder TARGET=0 + {% endif %} + {% if printer["filament_switch_sensor O2_sensor"].filament_detected==true %} + M118 O2S: Filament load complete! + {% if (sensor.enable_beep|lower == 'true') %} + M300 # beep sound + {% endif %} + {% else %} + M118 O2S: Filament load failed! + {% endif %} + UPDATE_DELAYED_GCODE ID=clear_loadbusy DURATION=2 + + +#############################################END filament auto load macro section END*********************************************************** +#############################################filament auto unload and Tangle macro section ***************************************************************** +[gcode_macro unload_tangle_init] +variable_loadbusy: 0 +gcode: + {% set sensor = printer['gcode_macro _SENSOR_VARIABLES'] %} + {% if (printer.print_stats.state == "printing") %} # filament tangle detection during printing + {% if(sensor.disable_tangle|lower == 'false') %} # run tangle detection macro if enabled + filament_tangle + {% else %} #filament tangle disabled send message to console + M118 O2S: Filament tangle detected, action disabled! + {% endif %} + {% else %} #filament unload button pressed + #{% if (printer.print_stats.state == "paused" and loadbusy == 0) %} #enable unload if not printing and not paused + {% if (loadbusy == 0) %} #enable unload if not already loading + {% if(sensor.disable_autounload|lower == 'false') %} # run unload macro if enabled + filament_unload + M118 filament unload called + {% endif %} + {% endif %} + {% endif %} + +[gcode_macro filament_unload] +gcode: + {% set sensor = printer['gcode_macro _SENSOR_VARIABLES'] %} + {% if (sensor.enable_beep|lower == 'true') %} + M300 # beep sound + {% endif %} + M118 O2S: Unloading filament... + M83 + G92 E0 + {% if (printer.extruder.can_extrude|lower != 'true')%} # Checking for minimum extrusion temperature + # check if temperature is over the minimum extrusion temperature. min_extrude_temp must be defined in the extruder config (to about 185) + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={sensor.filament_unload_temp} # restore user temp if it was set before loading + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={sensor.filament_unload_temp-1} + {% endif %} + {% if(printer.extruder.target == 0) %} # Checking for set temperature if is zero than set to 185 / hotend hot but cooling due to set target temp 0 + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={sensor.filament_unload_temp} # restore user temp if it was set before loading + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={sensor.filament_unload_temp-1} + {% endif %} + G0 E10 F500 # extruder 20mm of filament before extracting + G0 E-5 F3600 #extract filament to cold end + G4 P2000 # wait for two seconds + G0 E6 F3600 # push the filament back + G0 E-10 F3600 #extract filament to cold end + G0 E-{sensor.unload_distance} F300 # continue extraction slowly and allow filament to be cooled enough before reaches the gears + M400 # wait to complete unload + M118 O2S: Filament unload complete! + {% if (sensor.enable_beep|lower == 'true') %} + M300 # beep sound + {% endif %} + +[gcode_macro filament_tangle] +gcode: + {% set sensor = printer['gcode_macro _SENSOR_VARIABLES'] %} + M118 O2S: Filament tangle detected, print paused! + {% if (sensor.enable_beep|lower == 'true') %} + M300 # beep sound + {% endif %} + PAUSE + + +#############################################END filament auto-unload macro section END*********************************************************** + +[delayed_gcode clear_unloadbusy] +gcode: + SET_GCODE_VARIABLE MACRO=filament_unload VARIABLE=unloadbusy VALUE=0 + #M118 O2S: Clear Unload busy! + +[delayed_gcode clear_changebusy] +gcode: + SET_GCODE_VARIABLE MACRO=filament_change_state1 VARIABLE=changebusy VALUE=0 + #M118 O2S: Clear Load busy! + +[delayed_gcode clear_loadbusy] +gcode: + SET_GCODE_VARIABLE MACRO=unload_tangle_init VARIABLE=loadbusy VALUE=0 + #M118 O2S: Clear Load busy! + + +################################################################################################################################# +##################### DELETE PAUSE AND RESUME MACROS IF YOU WANT TO USE YOUR OWN ONES!########################################### +################################################################################################################################# + +[gcode_macro PAUSE] +rename_existing: BASE_PAUSE +gcode: + {% set sensor = printer['gcode_macro _SENSOR_VARIABLES'] %} + {% set x = params.X|default(sensor.park_position_x) %} + {% set y = params.Y|default(sensor.park_position_y) %} + {% set z = params.Z|default(sensor.park_lift_z)|float %} + {% set e = params.E|default(sensor.park_retraction) %} + ##### calculate save lift position ##### + {% set max_z = printer.toolhead.axis_maximum.z|float %} + {% set act_z = printer.toolhead.position.z|float %} + {% set lift_z = z|abs %} + {% if act_z < (max_z - lift_z) %} + {% set z_safe = lift_z %} + {% else %} + {% set z_safe = max_z - act_z %} + {% endif %} + SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=bed_restore_temp VALUE={printer.heater_bed.target} + SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=extruder_restore_temp VALUE={printer.extruder.target} + ##### end of definitions ##### + SAVE_GCODE_STATE NAME=PAUSE_state + SET_IDLE_TIMEOUT TIMEOUT={(sensor.pause_timeout)|float} # increase printer timeout + BASE_PAUSE + G91 + G1 E-{e} F2100 + G1 Z{z_safe} + G90 + G1 X{x} Y{y} F6000 + #SET_LED LED=OrbiLED RED=1.0 GREEN=1.0 BLUE=0.0 + +[gcode_macro RESUME] +rename_existing: BASE_RESUME +variable_bed_restore_temp:0 +variable_extruder_restore_temp:0 +gcode: + ##### set defaults ##### + {% set sensor = printer['gcode_macro _SENSOR_VARIABLES'] %} + M118 O2S: Restoring heaters temperature, it might take a while! + M118 O2S: Restoring bed temperature... + M140 S{bed_restore_temp} + TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={bed_restore_temp-1} + M104 S{extruder_restore_temp} + M118 O2S: Restoring extruder temperature... + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={extruder_restore_temp-1} + M118 O2S: Extruder temperature restored! + {% set e = params.E|default(sensor.park_retraction) %} + G91 + G1 E{e} F2100 + G90 + M118 O2S: Temperatures restored, resmume printing! + SET_IDLE_TIMEOUT TIMEOUT=600 # restor klipper default printer timeout to 10 min + RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1 + BASE_RESUME + # SET_LED LED=OrbiLED RED=1.0 GREEN=1.0 BLUE=1.0 + +[gcode_macro CANCEL_PRINT] +rename_existing: BASE_CANCEL_PRINT +gcode: + CLEAR_PAUSE + #SDCARD_RESET_FILE + BASE_CANCEL_PRINT + SET_IDLE_TIMEOUT TIMEOUT=600 # restor klipper default printer timeout to 10 min + +[gcode_macro T0] +gcode: + ACTIVATE_EXTRUDER EXTRUDER=extruder diff --git a/Orbitool_O2S.cfg b/Orbitool_O2S.cfg new file mode 100644 index 0000000..63e53e4 --- /dev/null +++ b/Orbitool_O2S.cfg @@ -0,0 +1,188 @@ +################################################################################################################# +################################## Orbittool O2S CONFIGURATION ################################################## +################################################################################################################# + +#config file version v1.0.0 +#release date: 17.07.2025 + + +# End Stop pin PB0 +# 24V ADC feedback pin PB1 - feature will be removed probably +# Z senzor Probe PB3 +# Z Sensor servo PA15 +# Orbiter filament sensor PA8 +# Orbiter filament unload PA9 + + +[mcu orbitoolO2S] +serial:/dev/serial/by-id/usb-Klipper_stm32f072xb_41003A000C57475534393420-if00 +restart_method: command + +# moved to printer.cfg to save PID +#[extruder] +#step_pin = orbitoolO2S:PB3 +#dir_pin = !orbitoolO2S:PB4 +#enable_pin = !orbitoolO2S:PC14 +#microsteps = 32 +#rotation_distance = 4.69 # Orbiter v2.5 +#full_steps_per_rotation = 200 +#nozzle_diameter = 0.400 +#filament_diameter = 1.750 +#heater_pin = orbitoolO2S:PB9 +#sensor_pin = orbitoolO2S:PA1 +#pullup_resistor = 2200 +#sensor_type = ATC Semitec 104GT-2 # update with correct sensor type PT1000 sensor are also suported +##sensor_type: PT1000 +#min_temp = 0 +#max_temp = 300 # increase in case your hottend suports higher operating temperature +#pressure_advance = 0.015 # user calibration needed +#pressure_advance_smooth_time = 0.03 # user calibration needed +#max_extrude_only_distance = 500.0 +#max_extrude_cross_section = 20 +#min_extrude_temp = 170 +#smooth_time = 0.5 +#max_power: 0.995 # limit heater power to 99.5% to enable autorecovery from short detection +#control = pid # user calibration needed +#pid_Kp=30.477 +#pid_Ki=1.600 +#pid_Kd=145.141 + + +[tmc2240 extruder] +uart_pin: orbitoolO2S:PC13 +interpolate: false +run_current: 0.85 # Orbiter v2.5 +rref: 12000 +stealthchop_threshold: 0 +#driver_TBL: 0 +#driver_TOFF: 3 +#driver_HEND: 8 +#driver_HSTRT: 7 + +#[stepper_x] +#endstop_pin: orbitoolO2S:PA2 + +[heater_fan hotend_Fan] +pin: !orbitoolO2S:PB15 +tachometer_pin: orbitoolO2S:PB12 +tachometer_ppr: 2 +tachometer_poll_interval: 0.0005 +heater: extruder +cycle_time: 0.0001 #10KHz PWM frecvency +heater_temp: 75 +fan_speed: 0.5 # can be lowered to reduce fan noise +hardware_pwm: false +shutdown_speed: 0.0 +max_power: 0.5 # can be lowered to reduce fan noise + +[adc_temperature HOT_P] +temperature1:120 # value in Watts +#voltage1:1.32 +voltage1:1.91 +temperature2:240 # value in Watts +voltage2:3.82 +#voltage2:2.64 + +[temperature_sensor Hotend_power] +sensor_pin: orbitoolO2S:PA0 +sensor_type: HOT_P + + +[firmware_retraction] +retract_length: 1.2 # user calibration needed +# 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). The default is 0 mm. +retract_speed: 20 # was 120? +# The speed of retraction, in mm/s. The default is 20 mm/s. +unretract_extra_length: 0.0 +# The length (in mm) of *additional* filament to add when +# unretracting. +unretract_speed: 10 # was 120? +# The speed of unretraction, in mm/s. The default is 10 mm/s. + +[neopixel OrbiLED] +pin: orbitoolO2S:PC15 +chain_count: 3 +color_order: GRBW +initial_RED: 1 +initial_GREEN: 0 +initial_BLUE: 0 + +# Set RGB values on boot up for each Neopixel. +# Index 1 = logo, Index 2 and 3 = print bed light +[delayed_gcode OrbiLED] +initial_duration: 1 +gcode: + SET_LED LED="OrbiLED" RED=0.25490 GREEN=0.71372 BLUE=0.901962 WHITE=0 SYNC=0 INDEX=1 TRANSMIT=0 + SET_LED LED="OrbiLED" RED=0 GREEN=0 BLUE=0 WHITE=1 SYNC=0 INDEX=2 TRANSMIT=0 + SET_LED LED="OrbiLED" RED=0 GREEN=0 BLUE=0 WHITE=1 SYNC=0 INDEX=3 TRANSMIT=1 + +############################################################## +########### 2 and 3 wire part fan configuration ############## +############################################################## +# comment out this section when using the toolboard with 4 wire fan +# Warning make sure the FAN supply voltage selection jumper is in the right position - jumper must be closed for 12V fan type - open for 24V fan + +[fan] +pin: !orbitoolO2S:PA10 +enable_pin: orbitoolO2S:PB14 +off_below: 0.2 +tachometer_pin: orbitoolO2S:PA14 +tachometer_ppr: 2 +tachometer_poll_interval: 0.0005 +shutdown_speed: 0.0 +cycle_time: 0.0001 # 10KHz control signal frequency +kick_start_time: 0.2 +hardware_pwm: False + +############################################################## +########### 4 wire part fan configuration #################### +############################################################## +# comment out this section when using the toolboard with 2 or 3 wire fan +# Warning make sure the FAN supply voltage selection jumper is in the right position - jumper must be closed for 12V fan type - open for 24V fan + +#[fan] +#pin: orbitoolO2S:PB0 +#enable_pin: orbitoolO2S:PB14 +#tachometer_pin: orbitoolO2S:PA14 +#tachometer_ppr: 2 +#tachometer_poll_interval: 0.0005 +#shutdown_speed: 0.0 +#cycle_time: 0.00004 # 25KHz control PWM frequency +#hardware_pwm: False + + + +## STM32 MCU temp +[temperature_sensor toolboard] +sensor_type: temperature_mcu +sensor_mcu: orbitoolO2S + +[output_pin T0_RUN_LED] +pin: orbitoolO2S:PB13 +value: 1 +shutdown_value: 0 + +############################################################## +################## Accelerometer Sensor ###################### +############################################################## + +[adxl345 Tool0] +cs_pin: orbitoolO2S:PA4 +spi_bus: spi1 +axes_map: y, z, x # Assumes back-faceing vertical toolboard mounting +spi_speed: 5000000 + +############################################################## +###################### Bed scanner ########################### +############################################################## +#configuration for I2C bed scanner based on LDC1612 + +#[probe_eddy_current orbiscan] +#sensor_type: ldc1612 +#i2c_mcu: orbitoolO2S +#i2c_bus: i2c2_PB10_PB11 +#i2c_speed:100000 + + diff --git a/autocommit.sh b/autocommit.sh new file mode 100755 index 0000000..7ff82c7 --- /dev/null +++ b/autocommit.sh @@ -0,0 +1,101 @@ +#!/bin/bash + +####################################################################### +## NOTE: This script originates from here but I tweaked the pull ## +## command, changed default location for backup, and added a comment ## +## for reference later. ## +####################################################################### + +##################################################################### +### Please set the paths accordingly. In case you don't have all ### +### the listed folders, just keep that line commented out. ### +##################################################################### +### Path to your config folder you want to backup +config_folder=~/printer_data/config + +# NOTE: The above should work for just about everyone, but a somewhat +# recent update to moonraker changed paths, etc. You can run the +# provided moonraker script 'data-path-fix.sh' to fix/update +# older installs + +### Path to your Klipper folder, by default that is '~/klipper' +klipper_folder=~/klipper + +### Path to your Moonraker folder, by default that is '~/moonraker' +moonraker_folder=~/moonraker + +### Path to your Mainsail folder, by default that is '~/mainsail' +mainsail_folder=~/mainsail + +### Path to your Fluidd folder, by default that is '~/fluidd' +#fluidd_folder=~/fluidd + +### The branch of the repository that you want to save your config +### By default that is 'main' +branch=main + +db_file=~/printer_data/database/moonraker-sql.db + +##################################################################### +##################################################################### + + + +##################################################################### +################ !!! DO NOT EDIT BELOW THIS LINE !!! ################ +##################################################################### +grab_version(){ + if [ ! -z "$klipper_folder" ]; then + klipper_commit=$(git -C $klipper_folder describe --always --tags --long | awk '{gsub(/^ +| +$/,"")} {print $0}') + m1="Klipper version: $klipper_commit" + fi + if [ ! -z "$moonraker_folder" ]; then + moonraker_commit=$(git -C $moonraker_folder describe --always --tags --long | awk '{gsub(/^ +| +$/,"")} {print $0}') + m2="Moonraker version: $moonraker_commit" + fi + if [ ! -z "$mainsail_folder" ]; then + mainsail_ver=$(head -n 1 $mainsail_folder/.version) + m3="Mainsail version: $mainsail_ver" + fi + if [ ! -z "$fluidd_folder" ]; then + fluidd_ver=$(head -n 1 $fluidd_folder/.version) + m4="Fluidd version: $fluidd_ver" + fi +} + +# Here we copy the sqlite database for backup +# To RESTORE the database, stop moonraker, then use the following command: +# cp ~/printer_data/config/moonraker-sql.db ~/printer_data/database/ +# Finally, restart moonraker + +if [ -f $db_file ]; then + echo "sqlite based history database found! Copying..." + cp ~/printer_data/database/moonraker-sql.db ~/printer_data/config/ +else + echo "sqlite based history database not found" +fi + +# To fully automate this and not have to deal with auth issues, generate a legacy token on Github +# then update the command below to use the token. Run the command in your base directory and it will +# handle auth. This should just be executed in your shell and not committed to any files or +# Github will revoke the token. =) +# git remote set-url origin https://XXXXXXXXXXX@github.com/EricZimmerman/Voron24Configs.git/ +# Note that that format is for changing things after the repository is in use, vs initially + +push_config(){ + cd $config_folder + git pull origin $branch --no-rebase + git add . + current_date=$(date +"%Y-%m-%d %T") + git commit -m "Autocommit from $current_date" -m "$m1" -m "$m2" -m "$m3" -m "$m4" + git push origin $branch +} + +cleanup_database(){ + cd $config_folder + rm moonraker-sql.db +} + +grab_version +push_config +cleanup_database diff --git a/beacon3d.cfg b/beacon3d.cfg new file mode 100644 index 0000000..3bf1203 --- /dev/null +++ b/beacon3d.cfg @@ -0,0 +1,40 @@ +[beacon] +serial: /dev/serial/by-id/usb-Beacon_Beacon_RevH_1060224F5157383837202020FF0A200F-if00 +x_offset: 0 +y_offset: 23 +mesh_main_direction: x +mesh_runs: 2 + +# Contact +contact_max_hotend_temperature: 180 # increase to probe at print temps +home_xy_position: 175, 175 # update with your safe position +home_z_hop: 5 +home_z_hop_speed: 30 +home_xy_move_speed: 300 +home_method: contact # use proximity for induction homing +home_method_when_homed: proximity # after initial calibration use induction +home_autocalibrate: unhomed # contact will calibrate beacon on first home + +##################################################################### +# resonance tester +##################################################################### + +[resonance_tester] +accel_chip: beacon +probe_points: + 175,175,20 # Voron 350 Middle + +##################################################################### +# bed mesh +##################################################################### + +[bed_mesh] +speed: 300 +horizontal_move_z: 10 +mesh_min: 40, 40 +mesh_max: 310,310 +fade_start: 0.6 +fade_end: 10.0 +probe_count: 5,5 +algorithm: bicubic +#-------------------------------------------------------------------- \ No newline at end of file diff --git a/mainsail.cfg b/mainsail.cfg new file mode 100644 index 0000000..83eaf8d --- /dev/null +++ b/mainsail.cfg @@ -0,0 +1,313 @@ +## Client klipper macro definitions +## +## Copyright (C) 2022 Alex Zellner +## +## This file may be distributed under the terms of the GNU GPLv3 license +## +## !!! This file is read-only. Maybe the used editor indicates that. !!! +## +## Customization: +## 1) copy the gcode_macro _CLIENT_VARIABLE (see below) to your printer.cfg +## 2) remove the comment mark (#) from all lines +## 3) change any value in there to your needs +## +## Use the PAUSE macro direct in your M600: +## e.g. with a different park position front left and a minimal height of 50 +## [gcode_macro M600] +## description: Filament change +## gcode: PAUSE X=10 Y=10 Z_MIN=50 +## Z_MIN will park the toolhead at a minimum of 50 mm above to bed to make it easier for you to swap filament. +## +## Client variable macro for your printer.cfg +#[gcode_macro _CLIENT_VARIABLE] +#variable_use_custom_pos : False ; use custom park coordinates for x,y [True/False] +#variable_custom_park_x : 0.0 ; custom x position; value must be within your defined min and max of X +#variable_custom_park_y : 0.0 ; custom y position; value must be within your defined min and max of Y +#variable_custom_park_dz : 2.0 ; custom dz value; the value in mm to lift the nozzle when move to park position +#variable_retract : 1.0 ; the value to retract while PAUSE +#variable_cancel_retract : 5.0 ; the value to retract while CANCEL_PRINT +#variable_speed_retract : 35.0 ; retract speed in mm/s +#variable_unretract : 1.0 ; the value to unretract while RESUME +#variable_speed_unretract : 35.0 ; unretract speed in mm/s +#variable_speed_hop : 15.0 ; z move speed in mm/s +#variable_speed_move : 100.0 ; move speed in mm/s +#variable_park_at_cancel : False ; allow to move the toolhead to park while execute CANCEL_PRINT [True/False] +#variable_park_at_cancel_x : None ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True +#variable_park_at_cancel_y : None ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True +## !!! Caution [firmware_retraction] must be defined in the printer.cfg if you set use_fw_retract: True !!! +#variable_use_fw_retract : False ; use fw_retraction instead of the manual version [True/False] +#variable_idle_timeout : 0 ; time in sec until idle_timeout kicks in. Value 0 means that no value will be set or restored +#variable_runout_sensor : "" ; If a sensor is defined, it will be used to cancel the execution of RESUME in case no filament is detected. +## Specify the config name of the runout sensor e.g "filament_switch_sensor runout". Hint use the same as in your printer.cfg +## !!! Custom macros, please use with care and review the section of the corresponding macro. +## These macros are for simple operations like setting a status LED. Please make sure your macro does not interfere with the basic macro functions. +## Only single line commands are supported, please create a macro if you need more than one command. +#variable_user_pause_macro : "" ; Everything inside the "" will be executed after the klipper base pause (PAUSE_BASE) function +#variable_user_resume_macro: "" ; Everything inside the "" will be executed before the klipper base resume (RESUME_BASE) function +#variable_user_cancel_macro: "" ; Everything inside the "" will be executed before the klipper base cancel (CANCEL_PRINT_BASE) function +#gcode: + +[virtual_sdcard] +path: ~/printer_data/gcodes +on_error_gcode: CANCEL_PRINT + +[pause_resume] +#recover_velocity: 50. +# When capture/restore is enabled, the speed at which to return to +# the captured position (in mm/s). Default is 50.0 mm/s. + +[display_status] + +[respond] + +[gcode_macro CANCEL_PRINT] +description: Cancel the actual running print +rename_existing: CANCEL_PRINT_BASE +gcode: + ##### get user parameters or use default ##### + {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %} + {% set allow_park = client.park_at_cancel|default(false)|lower == 'true' %} + {% set retract = client.cancel_retract|default(5.0)|abs %} + ##### define park position ##### + {% set park_x = "" if (client.park_at_cancel_x|default(none) is none) + else "X=" ~ client.park_at_cancel_x %} + {% set park_y = "" if (client.park_at_cancel_y|default(none) is none) + else "Y=" ~ client.park_at_cancel_y %} + {% set custom_park = park_x|length > 0 or park_y|length > 0 %} + ##### end of definitions ##### + # restore idle_timeout time if needed + {% if printer['gcode_macro RESUME'].restore_idle_timeout > 0 %} + SET_IDLE_TIMEOUT TIMEOUT={printer['gcode_macro RESUME'].restore_idle_timeout} + {% endif %} + {% if (custom_park or not printer.pause_resume.is_paused) and allow_park %} _TOOLHEAD_PARK_PAUSE_CANCEL {park_x} {park_y} {% endif %} + _CLIENT_RETRACT LENGTH={retract} + TURN_OFF_HEATERS + M106 S0 + {client.user_cancel_macro|default("")} + SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False + # clear pause_next_layer and pause_at_layer as preparation for next print + SET_PAUSE_NEXT_LAYER ENABLE=0 + SET_PAUSE_AT_LAYER ENABLE=0 LAYER=0 + CANCEL_PRINT_BASE + +[gcode_macro PAUSE] +description: Pause the actual running print +rename_existing: PAUSE_BASE +gcode: + ##### get user parameters or use default ##### + {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %} + {% set idle_timeout = client.idle_timeout|default(0) %} + {% set temp = printer[printer.toolhead.extruder].target if printer.toolhead.extruder != '' else 0 %} + {% set restore = False if printer.toolhead.extruder == '' + else True if params.RESTORE|default(1)|int == 1 else False %} + ##### end of definitions ##### + SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=last_extruder_temp VALUE="{{'restore': restore, 'temp': temp}}" + # set a new idle_timeout value + {% if idle_timeout > 0 %} + SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=restore_idle_timeout VALUE={printer.configfile.settings.idle_timeout.timeout} + SET_IDLE_TIMEOUT TIMEOUT={idle_timeout} + {% endif %} + PAUSE_BASE + {client.user_pause_macro|default("")} + _TOOLHEAD_PARK_PAUSE_CANCEL {rawparams} + +[gcode_macro RESUME] +description: Resume the actual running print +rename_existing: RESUME_BASE +variable_last_extruder_temp: {'restore': False, 'temp': 0} +variable_restore_idle_timeout: 0 +variable_idle_state: False +gcode: + ##### get user parameters or use default ##### + {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %} + {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} + {% set sp_move = client.speed_move|default(velocity) %} + {% set runout_resume = True if client.runout_sensor|default("") == "" # no runout + else True if not printer[client.runout_sensor].enabled # sensor is disabled + else printer[client.runout_sensor].filament_detected %} # sensor status + {% set can_extrude = True if printer.toolhead.extruder == '' # no extruder defined in config + else printer[printer.toolhead.extruder].can_extrude %} # status of active extruder + {% set do_resume = False %} + {% set prompt_txt = [] %} + ##### end of definitions ##### + #### Printer comming from timeout idle state #### + {% if printer.idle_timeout.state|upper == "IDLE" or idle_state %} + SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=idle_state VALUE=False + {% if last_extruder_temp.restore %} + # we need to use the unicode (\u00B0) for the ° as py2 env's would throw an error otherwise + RESPOND TYPE=echo MSG='{"Restoring \"%s\" temperature to %3.1f\u00B0C, this may take some time" % (printer.toolhead.extruder, last_extruder_temp.temp) }' + M109 S{last_extruder_temp.temp} + {% set do_resume = True %} + {% elif can_extrude %} + {% set do_resume = True %} + {% else %} + RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}' + {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %} + {% endif %} + #### Printer comming out of regular PAUSE state #### + {% elif can_extrude %} + {% set do_resume = True %} + {% else %} + RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder}' + {% set _d = prompt_txt.append("\"%s\" not hot enough, please heat up again and press RESUME" % printer.toolhead.extruder) %} + {% endif %} + {% if runout_resume %} + {% if do_resume %} + {% if restore_idle_timeout > 0 %} SET_IDLE_TIMEOUT TIMEOUT={restore_idle_timeout} {% endif %} # restore idle_timeout time + {client.user_resume_macro|default("")} + _CLIENT_EXTRUDE + RESUME_BASE VELOCITY={params.VELOCITY|default(sp_move)} + {% endif %} + {% else %} + RESPOND TYPE=error MSG='{"Resume aborted !!! \"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]}' + {% set _d = prompt_txt.append("\"%s\" detects no filament, please load filament and press RESUME" % (client.runout_sensor.split(" "))[1]) %} + {% endif %} + ##### Generate User Information box in case of abort ##### + {% if not (runout_resume and do_resume) %} + RESPOND TYPE=command MSG="action:prompt_begin RESUME aborted !!!" + {% for element in prompt_txt %} + RESPOND TYPE=command MSG='{"action:prompt_text %s" % element}' + {% endfor %} + RESPOND TYPE=command MSG="action:prompt_footer_button Ok|RESPOND TYPE=command MSG=action:prompt_end|info" + RESPOND TYPE=command MSG="action:prompt_show" + {% endif %} + +# Usage: SET_PAUSE_NEXT_LAYER [ENABLE=[0|1]] [MACRO=] +[gcode_macro SET_PAUSE_NEXT_LAYER] +description: Enable a pause if the next layer is reached +gcode: + {% set pause_next_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_next_layer %} + {% set ENABLE = params.ENABLE|default(1)|int != 0 %} + {% set MACRO = params.MACRO|default(pause_next_layer.call, True) %} + SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_next_layer VALUE="{{ 'enable': ENABLE, 'call': MACRO }}" + +# Usage: SET_PAUSE_AT_LAYER [ENABLE=[0|1]] [LAYER=] [MACRO=] +[gcode_macro SET_PAUSE_AT_LAYER] +description: Enable/disable a pause if a given layer number is reached +gcode: + {% set pause_at_layer = printer['gcode_macro SET_PRINT_STATS_INFO'].pause_at_layer %} + {% set ENABLE = params.ENABLE|int != 0 if params.ENABLE is defined + else params.LAYER is defined %} + {% set LAYER = params.LAYER|default(pause_at_layer.layer)|int %} + {% set MACRO = params.MACRO|default(pause_at_layer.call, True) %} + SET_GCODE_VARIABLE MACRO=SET_PRINT_STATS_INFO VARIABLE=pause_at_layer VALUE="{{ 'enable': ENABLE, 'layer': LAYER, 'call': MACRO }}" + +# Usage: SET_PRINT_STATS_INFO [TOTAL_LAYER=] [CURRENT_LAYER= ] +[gcode_macro SET_PRINT_STATS_INFO] +rename_existing: SET_PRINT_STATS_INFO_BASE +description: Overwrite, to get pause_next_layer and pause_at_layer feature +variable_pause_next_layer: { 'enable': False, 'call': "PAUSE" } +variable_pause_at_layer : { 'enable': False, 'layer': 0, 'call': "PAUSE" } +gcode: + {% if pause_next_layer.enable %} + RESPOND TYPE=echo MSG='{"%s, forced by pause_next_layer" % pause_next_layer.call}' + {pause_next_layer.call} ; execute the given gcode to pause, should be either M600 or PAUSE + SET_PAUSE_NEXT_LAYER ENABLE=0 + {% elif pause_at_layer.enable and params.CURRENT_LAYER is defined and params.CURRENT_LAYER|int == pause_at_layer.layer %} + RESPOND TYPE=echo MSG='{"%s, forced by pause_at_layer [%d]" % (pause_at_layer.call, pause_at_layer.layer)}' + {pause_at_layer.call} ; execute the given gcode to pause, should be either M600 or PAUSE + SET_PAUSE_AT_LAYER ENABLE=0 + {% endif %} + SET_PRINT_STATS_INFO_BASE {rawparams} + +##### internal use ##### +[gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL] +description: Helper: park toolhead used in PAUSE and CANCEL_PRINT +gcode: + ##### get user parameters or use default ##### + {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %} + {% set velocity = printer.configfile.settings.pause_resume.recover_velocity %} + {% set use_custom = client.use_custom_pos|default(false)|lower == 'true' %} + {% set custom_park_x = client.custom_park_x|default(0.0) %} + {% set custom_park_y = client.custom_park_y|default(0.0) %} + {% set park_dz = client.custom_park_dz|default(2.0)|abs %} + {% set sp_hop = client.speed_hop|default(15) * 60 %} + {% set sp_move = client.speed_move|default(velocity) * 60 %} + ##### get config and toolhead values ##### + {% set origin = printer.gcode_move.homing_origin %} + {% set act = printer.gcode_move.gcode_position %} + {% set max = printer.toolhead.axis_maximum %} + {% set cone = printer.toolhead.cone_start_z|default(max.z) %} ; height as long the toolhead can reach max and min of an delta + {% set round_bed = True if printer.configfile.settings.printer.kinematics is in ['delta','polar','rotary_delta','winch'] + else False %} + ##### define park position ##### + {% set z_min = params.Z_MIN|default(0)|float %} + {% set z_park = [[(act.z + park_dz), z_min]|max, (max.z - origin.z)]|min %} + {% set x_park = params.X if params.X is defined + else custom_park_x if use_custom + else 0.0 if round_bed + else (max.x - 5.0) %} + {% set y_park = params.Y if params.Y is defined + else custom_park_y if use_custom + else (max.y - 5.0) if round_bed and z_park < cone + else 0.0 if round_bed + else (max.y - 5.0) %} + ##### end of definitions ##### + _CLIENT_RETRACT + {% if "xyz" in printer.toolhead.homed_axes %} + G90 + G1 Z{z_park} F{sp_hop} + G1 X{x_park} Y{y_park} F{sp_move} + {% if not printer.gcode_move.absolute_coordinates %} G91 {% endif %} + {% else %} + RESPOND TYPE=echo MSG='Printer not homed' + {% endif %} + +[gcode_macro _CLIENT_EXTRUDE] +description: Extrudes, if the extruder is hot enough +gcode: + ##### get user parameters or use default ##### + {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %} + {% set use_fw_retract = (client.use_fw_retract|default(false)|lower == 'true') and (printer.firmware_retraction is defined) %} + {% set length = params.LENGTH|default(client.unretract)|default(1.0)|float %} + {% set speed = params.SPEED|default(client.speed_unretract)|default(35) %} + {% set absolute_extrude = printer.gcode_move.absolute_extrude %} + ##### end of definitions ##### + {% if printer.toolhead.extruder != '' %} + {% if printer[printer.toolhead.extruder].can_extrude %} + {% if use_fw_retract %} + {% if length < 0 %} + G10 + {% else %} + G11 + {% endif %} + {% else %} + M83 + G1 E{length} F{(speed|float|abs) * 60} + {% if absolute_extrude %} + M82 + {% endif %} + {% endif %} + {% else %} + RESPOND TYPE=echo MSG='{"\"%s\" not hot enough" % printer.toolhead.extruder}' + {% endif %} + {% endif %} + +[gcode_macro _CLIENT_RETRACT] +description: Retracts, if the extruder is hot enough +gcode: + {% set client = printer['gcode_macro _CLIENT_VARIABLE']|default({}) %} + {% set length = params.LENGTH|default(client.retract)|default(1.0)|float %} + {% set speed = params.SPEED|default(client.speed_retract)|default(35) %} + + _CLIENT_EXTRUDE LENGTH=-{length|float|abs} SPEED={speed|float|abs} + +[gcode_macro _CLIENT_LINEAR_MOVE] +description: Linear move with save and restore of the gcode state +gcode: + {% set x_move = "X" ~ params.X if params.X is defined else "" %} + {% set y_move = "Y" ~ params.Y if params.Y is defined else "" %} + {% set z_move = "Z" ~ params.Z if params.Z is defined else "" %} + {% set e_move = "E" ~ params.E if params.E is defined else "" %} + {% set rate = "F" ~ params.F if params.F is defined else "" %} + {% set ABSOLUTE = params.ABSOLUTE | default(0) | int != 0 %} + {% set ABSOLUTE_E = params.ABSOLUTE_E | default(0) | int != 0 %} + SAVE_GCODE_STATE NAME=_client_movement + {% if x_move or y_move or z_move %} + G9{ 0 if ABSOLUTE else 1 } + {% endif %} + {% if e_move %} + M8{ 2 if ABSOLUTE_E else 3 } + {% endif %} + G1 { x_move } { y_move } { z_move } { e_move } { rate } + RESTORE_GCODE_STATE NAME=_client_movement diff --git a/moonraker-sql.db b/moonraker-sql.db new file mode 100644 index 0000000..3171517 Binary files /dev/null and b/moonraker-sql.db differ diff --git a/moonraker.conf b/moonraker.conf new file mode 100644 index 0000000..f064a90 --- /dev/null +++ b/moonraker.conf @@ -0,0 +1,64 @@ +[server] +host: 0.0.0.0 +port: 7125 + +[file_manager] +enable_object_processing: True + +[authorization] +#enabled: True +trusted_clients: + 10.0.0.0/8 + 127.0.0.0/8 + 169.254.0.0/16 + 172.16.0.0/12 + 192.168.0.0/16 + FE80::/10 + ::1/128 + +[update_manager] + +[update_manager client mainsail] +type: web +repo: mainsail-crew/mainsail +path: ~/mainsail + +[update_manager client KlipperScreen] +type: git_repo +path: ~/KlipperScreen +origin: https://github.com/jordanruthe/KlipperScreen.git +env: ~/.KlipperScreen-env/bin/python +requirements: scripts/KlipperScreen-requirements.txt +install_script: scripts/KlipperScreen-install.sh + +[update_manager client moonraker-telegram-bot] +type: git_repo +path: ~/moonraker-telegram-bot +origin: https://github.com/nlef/moonraker-telegram-bot.git +env: ~/moonraker-telegram-bot-env/bin/python +requirements: scripts/requirements.txt +install_script: scripts/install.sh + +[update_manager beacon] +type: git_repo +channel: dev +path: ~/beacon_klipper +origin: https://github.com/beacon3d/beacon_klipper.git +env: ~/klippy-env/bin/python +requirements: requirements.txt +install_script: install.sh +is_system_service: False +managed_services: klipper +info_tags: + desc=Beacon Surface Scanner + +[octoprint_compat] + +[power printer_psu] +type: tasmota +#locked_while_printing: False +restart_klipper_when_powered: True +restart_delay: 2 +address: 10.99.0.112 +#password: password1 +#output_id: 1 diff --git a/printer.cfg b/printer.cfg new file mode 100644 index 0000000..83df9d4 --- /dev/null +++ b/printer.cfg @@ -0,0 +1,855 @@ +## Voron Design VORON2 250/300/350mm SKR 1.4 TMC2209 UART config + +## *** THINGS TO CHANGE/CHECK: *** +## MCU paths [mcu] section +## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types +## Z Endstop Switch location [safe_z_home] section +## Homing end position [gcode_macro G32] section +## Z Endstop Switch offset for Z0 [stepper_z] section +## Probe points [quad_gantry_level] section +## Min & Max gantry corner postions [quad_gantry_level] section +## PID tune [extruder] and [heater_bed] sections +## Fine tune E steps [extruder] section + +##========================== Pin Definitions ======================== +## X_STEP_PIN 2.2 +## X_DIR_PIN 2.6 +## X_ENABLE_PIN 2.1 +## X_STOP_PIN 1.29 +## E0_DET_PIN 1.26 +## X_UART_PIN 1.10 + + +## Y_STEP_PIN 0.19 +## Y_DIR_PIN 0.20 +## Y_ENABLE_PIN 2.8 +## Y_STOP_PIN 1.28 +## E1_DET_PIN 1.26 +## Y_UART_RX 1.9 + + +## Z_STEP_PIN 0.22 +## Z_DIR_PIN 2.11 +## Z_ENABLE_PIN 0.21 +## Z_STOP_PIN 1.27 +## PWR_DET_PIN 1.0 +## Z_UART 1.8 + + +## E0_STEP_PIN 2.13 +## E0_DIR_PIN 0.11 +## E0_ENABLE_PIN 2.12 +## E0_UART 1.4 + + +## E1_STEP_PIN 1.15 +## E1_DIR_PIN 1.14 +## E1_ENABLE_PIN 1.16 +## E1_UART_RX 1.1 + + +## HE1 2.4 +## HE0 2.7 +## BED 2.5 +## TH1 (H1 Temp) 0.23 +## TH0 (H0 Temp) 0.24 +## TB (Bed Temp) 0.25 +## FAN 2.3 +## SERVO 2.0 +## PROBE 0.10 +##=================================================================== + +## MCU for X/Y/E steppers main MCU +## [X in X] - B Motor +## [Y in Y] - A Motor +## [E in E0] - Extruder +[mcu] +## Obtain definition by "ls /dev/serial/by-id/*" then unplug to verify +##-------------------------------------------------------------------- +serial: /dev/serial/by-id/usb-Klipper_lpc1769_0D70FF0F871C4AAF53417C5DC42000F5-if00 +##-------------------------------------------------------------------- + +## MCU for Z steppers +## [Z in X] - Front Left +## [Z1 in Y] - Rear Left +## [Z2 in Z] - Rear Right +## [Z3 in E0]- Front Right +[mcu z] +## Obtain definition by "ls /dev/serial/by-id/*" then unplug to verify +##-------------------------------------------------------------------- +serial: /dev/serial/by-id/usb-Klipper_lpc1769_00A00004A49869AFEAD93E5EC02000F5-if00 +##-------------------------------------------------------------------- + +[printer] +kinematics: corexy +max_velocity: 300 +max_accel: 6000 #Max 4000 +#max_accel: 10000 #Only there for input shaper +#minimum_cruise_ratio: 0.5 #[OLD] not enabled. +max_z_velocity: 30 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 350 +square_corner_velocity: 5.0 + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## Connected to X on mcu_xye (B Motor) +[stepper_x] +step_pin: P2.2 +dir_pin: !P2.6 +enable_pin: !P2.1 +rotation_distance: 40 +microsteps: 32 # [OLD] was 16 +full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper +endstop_pin: P1.29 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +#position_endstop: 300 +#position_max: 300 + +## Uncomment for 350mm build +position_endstop: 350 +position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 100 #Max 100 +homing_retract_dist: 10 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: P1.10 +interpolate: False #[OLD] True +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Connected to Y on mcu_xye (A Motor) +[stepper_y] +step_pin: P0.19 +dir_pin: !P0.20 +enable_pin: !P2.8 +rotation_distance: 40 +microsteps: 32 #[OLD] 16 +full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper +endstop_pin: P1.28 +position_min: 0 +##-------------------------------------------------------------------- + +## Uncomment for 250mm build +#position_endstop: 250 +#position_max: 250 + +## Uncomment for 300mm build +#position_endstop: 300 +#position_max: 300 + +## Uncomment for 350mm build +position_endstop: 350 +position_max: 350 + +##-------------------------------------------------------------------- +homing_speed: 100 #Max 100 +homing_retract_dist: 10 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: P1.9 +interpolate: False #[OLD] True +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z MCU - In X Position +## Z0 Stepper - Front Left +[stepper_z] +step_pin: z:P2.2 +dir_pin: !z:P2.6 +enable_pin: !z:P2.1 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 #[OLD] 16 +#endstop_pin: z:P1.27 +endstop_pin: probe:z_virtual_endstop #Beacon3D +## Z-position of nozzle (in mm) to z-endstop trigger point relative to print surface (Z0) +## (+) value = endstop above Z0, (-) value = endstop below +## Increasing position_endstop brings nozzle closer to the bed +## After you run Z_ENDSTOP_CALIBRATE, position_endstop will be stored at the very end of your config +#position_endstop: -0.5 +##-------------------------------------------------------------------- + +## Uncomment below for 250mm build +#position_max: 210 + +## Uncomment below for 300mm build +#position_max: 260 + +## Uncomment below for 350mm build +position_max: 310 #[OLD] 340 + +##-------------------------------------------------------------------- +position_min: -5 #[OLD] -35 +homing_speed: 3 +homing_retract_dist: 0 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: z:P1.10 +interpolate: False #[OLD] True +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z MCU - In Y Position +## Z1 Stepper - Rear Left +[stepper_z1] +step_pin: z:P0.19 +dir_pin: z:P0.20 +enable_pin: !z:P2.8 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 #[OLD] 16 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z1] +uart_pin: z:P1.9 +interpolate: False #[OLD] True +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z MCU - In Z Position +## Z2 Stepper - Rear Right +[stepper_z2] +step_pin: z:P0.22 +dir_pin: !z:P2.11 +enable_pin: !z:P0.21 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 #[OLD] 16 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z2] +uart_pin: z:P1.8 +interpolate: False #[OLD] True +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z MCU - In E0 Position +## Z3 Stepper - Front Right +[stepper_z3] +step_pin: z:P2.13 +dir_pin: z:P0.11 +enable_pin: !z:P2.12 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 32 #[OLD] 16 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z3] +uart_pin: z:P1.4 +interpolate: False #[OLD] True +run_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + + +##################################################################### +# Extruder +##################################################################### + +# E0 on MCU X/Y +#[extruder] +#step_pin: P2.13 +#dir_pin: P0.11 +#enable_pin: !P2.12 +## Update value below when you perform extruder calibration +## If you ask for 100mm of filament, but in reality it is 98mm: +## rotation_distance = * / 100 +## 22.6789511 is a good starting point +#rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears +#rotation_distance: 12.849 #CW2 Stealthburner +## Update Gear Ratio depending on your Extruder Type +## Use 50:10 for Stealthburner/Clockwork 2 +## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) +## Use 80:20 for M4, M3.1 +#gear_ratio: 50:17 #BMG Gear Ratio +#microsteps: 32 #[OLD] 16 +#full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree +#nozzle_diameter: 0.400 +#filament_diameter: 1.75 +#heater_pin: P2.7 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for NTC 100k 3950 thermistors +#sensor_type: ATC Semitec 104GT-2 +#sensor_pin: P0.24 +#min_temp: 10 +#max_temp: 270 +#max_power: 1.0 +#min_extrude_temp: 170 +#control = pid +#pid_kp = 26.213 +#pid_ki = 1.304 +#pid_kd = 131.721 +## Try to keep pressure_advance below 1.0 +#pressure_advance: 0.05 +## Default is 0.040, leave stock +#pressure_advance_smooth_time: 0.040 + +## E0 on MCU X/Y +## Make sure to update below for your relevant driver (2208 or 2209) +#[tmc2209 extruder] +#uart_pin: P1.4 +#interpolate: false +#run_current: 0.5 +#sense_resistor: 0.110 +#stealthchop_threshold: 0 + +[extruder] +step_pin = orbitoolO2S:PB3 +dir_pin = !orbitoolO2S:PB4 +enable_pin = !orbitoolO2S:PC14 +microsteps = 32 +rotation_distance = 4.50 # Orbiter v2.5 4.69 +full_steps_per_rotation = 200 +nozzle_diameter = 0.400 +filament_diameter = 1.750 +heater_pin = orbitoolO2S:PB9 +sensor_pin = orbitoolO2S:PA1 +pullup_resistor = 2200 +sensor_type = ATC Semitec 104GT-2 # update with correct sensor type PT1000 sensor are also suported +#sensor_type: PT1000 +min_temp = 0 +max_temp = 300 # increase in case your hottend suports higher operating temperature +pressure_advance = 0.015 # user calibration needed +pressure_advance_smooth_time = 0.03 # user calibration needed +max_extrude_only_distance = 500.0 +max_extrude_cross_section = 20 +min_extrude_temp = 170 +smooth_time = 0.5 +max_power: 0.995 # limit heater power to 99.5% to enable autorecovery from short detection +#control = pid # user calibration needed +#pid_Kp=30.477 +#pid_Ki=1.600 +#pid_Kd=145.141 + +##################################################################### +# Bed Heater +##################################################################### + +## SSR Pin - Z board, Fan Pin +[heater_bed] +heater_pin: z:P2.3 +## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. +## Use "Generic 3950" for Keenovo heaters +sensor_type: Generic 3950 +sensor_pin: z:P0.25 +## Adjust max_power so it doesn't exceed the SSR rating. The Omron G3NA-210B-DC5 SSR is rated at 4 amps without a heatsink. +## The formula is "4 / (Wattage_of_bed_heater / Mains_voltage) = max_power" +## If max_power is greater than 1.0, use 1.0 +max_power: 0.6 +min_temp: 0 +max_temp: 120 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Probe +##################################################################### + +## Inductive Probe +## This probe is not used for Z height, only Quad Gantry Leveling +## Z_MAX on mcu_z +#[probe] +## If your probe is NO instead of NC, change pin to ^!z:P0.10 +#Klicky-Probe +#pin: ^z:P0.10 +#x_offset: 0 +#y_offset: 19.75 +#z_offset: 0 +#speed: 10.0 +#samples: 3 +#samples_result: median +#sample_retract_dist: 3.0 +#samples_tolerance: 0.006 +#samples_tolerance_retries: 3 + +##################################################################### +# Fan Control +##################################################################### + +## Hotend Fan - XYE board, HE1 Connector +#[heater_fan hotend_fan] +#pin: P2.4 +#max_power: 1.0 +#kick_start_time: 0.5 +#heater: extruder +#heater_temp: 50.0 +## If you are experiencing back flow, you can reduce fan_speed +#fan_speed: 1.0 + +## Print Cooling Fan - XYE board, Fan Pin +# Used for hour_counter_signal +#[fan] +#pin: P2.3 +#kick_start_time: 0.5 +## Depending on your fan, you may need to increase this value +## if your fan will not start. Can change cycle_time (increase) +## if your fan is not able to slow down effectively +#off_below: 0.10 + +[output_pin hour_counter_signal] +pin: P2.3 +value: 0 + + +## Controller fan - Z board, HE1 Connector +[heater_fan controller_fan] +pin: z:P2.4 +kick_start_time: 0.5 +heater: heater_bed +heater_temp: 45.0 + +## Exhaust fan - Z board, HE0 Connector +[heater_fan exhaust_fan] +pin: z:P2.7 +max_power: 1.0 +shutdown_speed: 0.0 +kick_start_time: 5.0 +heater: heater_bed +heater_temp: 60 +fan_speed: 1.0 + +##################################################################### +# LED Control +##################################################################### + +# Chamber Lighting - Bed Connector (Optional) +#[output_pin caselight] +#pin: P2.5 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +#[safe_z_home] +## XY Location of the Z Endstop Switch +## Update -10,-10 to the XY coordinates of your endstop pin +## (such as 157,305) after going through Z Endstop Pin +## Location Definition step. +#home_xy_position:175,175 +#speed:30 +#z_hop:3 #[OLD] 10 + + +## Use QUAD_GANTRY_LEVEL to level a gantry. +## Min & Max gantry corners - measure from nozzle at MIN (0,0) and +## MAX (250, 250), (300,300), or (350,350) depending on your printer size +## to respective belt positions +[quad_gantry_level] +#-------------------------------------------------------------------- +## Gantry Corners for 250mm Build +## Uncomment for 250mm build +#gantry_corners: +# -60,-10 +# 310, 320 +## Probe points +#points: +# 50,25 +# 50,175 +# 200,175 +# 200,25 + +## Gantry Corners for 300mm Build +## Uncomment for 300mm build +#gantry_corners: +# -60,-10 +# 360,370 +## Probe points +#points: +# 50,25 +# 50,225 +# 250,225 +# 250,25 + +## Gantry Corners for 350mm Build +## Uncomment for 350mm build +gantry_corners: + -60,-10 + 410,420 +## Probe points +points: + 50,25 + 50,275 + 300,275 + 300,25 + +#-------------------------------------------------------------------- +speed: 150 #[OLD] 150 +horizontal_move_z: 15 +retries: 5 +retry_tolerance: 0.0075 +max_adjust: 10 + +##################################################################### +# Displays +##################################################################### + +## Uncomment the display that you have. Display connects to Z MCU +#-------------------------------------------------------------------- + +## RepRapDiscount 128x64 Full Graphic Smart Controller +#[display] +#lcd_type: st7920 +#cs_pin: z:P1.19 +#sclk_pin: z:P1.20 +#sid_pin: z:P1.18 +#menu_timeout: 40 +#encoder_pins: ^z:P3.26, ^z:P3.25 +#click_pin: ^!z:P0.28 + +#[output_pin beeper] +#pin: z:P1.30 + +#-------------------------------------------------------------------- + +## mini12864 LCD Display +#[display] +#lcd_type: uc1701 +#cs_pin: z:P1.18 +#a0_pin: z:P1.19 +#encoder_pins: ^z:P3.25,^z:P3.26 +#click_pin: ^!z:P0.28 +#contrast: 63 + +## To control Neopixel RGB in mini12864 display +#[neopixel fysetc_mini12864] +#pin: z:P1.21 +#chain_count: 3 +#initial_RED: 0.1 +#initial_GREEN: 0.5 +#initial_BLUE: 0.0 +#color_order: RGB + +## Set RGB values on boot up for each Neopixel. +## Index 1 = display, Index 2 and 3 = Knob +#[delayed_gcode setdisplayneopixel] +#initial_duration: 1 +#gcode: +# SET_LED LED=fysetc_mini12864 RED=1 GREEN=1 BLUE=1 INDEX=1 TRANSMIT=0 +# SET_LED LED=fysetc_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=2 TRANSMIT=0 +# SET_LED LED=fysetc_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=3 + +#-------------------------------------------------------------------- + +#[neopixel stealthburner] +# To control Neopixel RGB in stealthburner +#pin: z:P1.24 +#chain_count: 3 +#initial_RED: 1 +#initial_GREEN: 0 +#initial_BLUE: 0 +#initial_WHITE: 0.0 +#color_order: GRBW + +# Set RGB values on boot up for each Neopixel. +# Index 1 = logo, Index 2 and 3 = print bed light +#[delayed_gcode setstealthburnerneopixel] +#initial_duration: 1 +#gcode: +# SET_LED LED=stealthburner RED=0.25490 GREEN=0.71372 BLUE=0.901962 INDEX=1 TRANSMIT=0 +# SET_LED LED=stealthburner RED=0 GREEN=0 BLUE=0 WHITE=1 INDEX=2 TRANSMIT=0 +# SET_LED LED=stealthburner RED=0 GREEN=0 BLUE=0 WHITE=1 INDEX=3 TRANSMIT=1 + +#-------------------------------------------------------------------- + +##################################################################### +# Macros +##################################################################### +[gcode_macro PARK] +gcode: + #{% set th = printer.toolhead %} + #G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y//2} Z30 + + # Park on wipe pad. + G0 X12 + G0 Y349 + G0 X17 + +[gcode_macro G32] +gcode: + {% set th = printer.toolhead %} + SAVE_GCODE_STATE NAME=STATE_G32 + G90 + G28 + QUAD_GANTRY_LEVEL + G28 + #PARK on the middle of the bed + G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y//2} Z30 + RESTORE_GCODE_STATE NAME=STATE_G32 + +[gcode_macro PRINT_START] +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +gcode: + #G32 ; home all axes + #G90 ; absolute positioning + #G1 Z20 F3000 ; move nozzle away from bed + + {% set EXTRUDER = params.EXTRUDER|int %} + {% set BED = params.BED|int %} + + SET_LED LED="OrbiLED" RED=1 GREEN=1 BLUE=0 WHITE=0 SYNC=0 INDEX=1 TRANSMIT=1; Yellow + + M117 Starting hour counter + SET_PIN PIN=hour_counter_signal VALUE=1 + + M117 Clearing BED Mesh + BED_MESH_CLEAR + SET_GCODE_OFFSET Z=0 + + M117 Make sure nozzle is a probing temp + M109 S150 + + M117 Homing axes (cold) + G28 + M117 Position beacon at 2mm for heat soak + G0 Z2 + + M117 Start heating bed + M140 S{BED} + + M117 Preheat nozzle to probing temp + M109 S150 + + M117 Wait on bed temperature + M190 S{BED} + + M117 Wait 1 minute to let temp settle + G4 P60000 ; optional, let temps settle for 1 min + + M117 Clean Nozzle + CLEAN_NOZZLE + + M117 Calibrate Beacon Z offset (Contact-HOT) + G28 Z METHOD=CONTACT CALIBRATE=1 + M117 Quad Grantry Leveling + QUAD_GANTRY_LEVEL + M117 Bed Mesh in Scan Mode + BED_MESH_CALIBRATE RUNS=2 + + M117 Clean Nozzle + CLEAN_NOZZLE + + M117 Calibrate Beacon Z offset after Mesh + G28 Z METHOD=CONTACT CALIBRATE=0 ; calibrate z offset only after tilt/mesh + + M117 Wait on nozzle printing temperature + M109 S{EXTRUDER} ; wait for extruder temp + + M117 Add a little offset for hotend thermal expansion + SET_GCODE_OFFSET Z=0.06 ; add a little offset for hotend thermal expansion + ; needs fine tuning, long meltzones require more + #SET_GCODE_OFFSET Z_ADJUST={OFFSET} ; apply optional material squish via slicer + + M117 Prime Nozzle + PRIME_NOZZLE ; call another macro to purge or prime nozzle + + SET_LED LED="OrbiLED" RED=0 GREEN=1 BLUE=0 WHITE=0 SYNC=0 INDEX=1 TRANSMIT=1; Yellow + M117 Printing... + ; start printing + + +[gcode_macro PRINT_END] +# Use PRINT_END for the slicer ending script - please customise for your slicer of choice +gcode: + # safe anti-stringing move coords + {% set th = printer.toolhead %} + {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} + {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} + {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} + + SAVE_GCODE_STATE NAME=STATE_PRINT_END + + M117 Print has ended + M400 ; wait for buffer to clear + G92 E0 ; zero the extruder + G1 E-5.0 F1800 ; retract filament + + M117 Turn Off Heaters + TURN_OFF_HEATERS + + G90 ; absolute positioning + G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing + #G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear + PARK ; PARK on the wipe pad + M107 ; turn off fan + + M117 Bed Mesh Clear + BED_MESH_CLEAR + + # The purpose of the SAVE_GCODE_STATE/RESTORE_GCODE_STATE + # command pair is to restore the printer's coordinate system + # and speed settings since the commands above change them. + # However, to prevent any accidental, unintentional toolhead + # moves when restoring the state, explicitly set MOVE=0. + RESTORE_GCODE_STATE NAME=STATE_PRINT_END MOVE=0 + + M117 Turn hours counter off + SET_PIN PIN=hour_counter_signal VALUE=0 + + SET_LED LED="OrbiLED" RED=0.25490 GREEN=0.71372 BLUE=0.901962 WHITE=0 SYNC=0 INDEX=1 TRANSMIT=1 ; Turquoise + M117 Print done. Idle... + +[gcode_macro CLEAN_NOZZLE] +variable_x_wipe_min: 25 +variable_x_wipe_max: 57 +variable_y_wipe: 349 +gcode: + {% set x_min = params.X|default(printer["gcode_macro CLEAN_NOZZLE"].x_wipe_min)|float %} + {% set x_max = params.X2|default(printer["gcode_macro CLEAN_NOZZLE"].x_wipe_max)|float %} + {% set y_wipe = params.Y|default(printer["gcode_macro CLEAN_NOZZLE"].y_wipe)|float %} + + SAVE_GCODE_STATE NAME=clean_nozzle_gantry + G90 + G1 X{x_max} F12000 + G1 Y{y_wipe} F12000 + G1 X{x_min} F12000 + G1 X{x_max} F12000 + G1 X{x_min} F12000 + G1 X{x_max} F12000 + RESTORE_GCODE_STATE NAME=clean_nozzle_gantry + + +[gcode_macro PRIME_NOZZLE] +variable_x_blob: 10 +variable_y_blob: 10 +variable_z_height: 0.3 +variable_blob_extrude: 15 +variable_line_length: 50 +variable_line_extrusion: 10 +gcode: + {% set x_blob = printer["gcode_macro PRIME_NOZZLE"].x_blob %} + {% set y_blob = printer["gcode_macro PRIME_NOZZLE"].y_blob %} + {% set z_height = printer["gcode_macro PRIME_NOZZLE"].z_height %} + {% set blob_extrude = printer["gcode_macro PRIME_NOZZLE"].blob_extrude %} + {% set line_length = printer["gcode_macro PRIME_NOZZLE"].line_length %} + {% set line_extrusion = printer["gcode_macro PRIME_NOZZLE"].line_extrusion %} + + SAVE_GCODE_STATE NAME=prime_state + + G90 + + ; Purge blob + G1 X{x_blob} Y{y_blob} F12000 + G1 Z{z_height} F3000 + G92 E0 + G1 E{blob_extrude} F300 + + ; Long purge line + G92 E0 + G1 X{ x_blob + line_length } E{line_extrusion} F600 + + G92 E0 + + RESTORE_GCODE_STATE NAME=prime_state + +[gcode_macro PRINTER_OFF] +gcode: + {action_call_remote_method("set_device_power", + device="printer_psu", + state="off")} +[idle_timeout] +timeout: 1800 +gcode: + M84; TURN_OFF_MOTORS + TURN_OFF_HEATERS + UPDATE_DELAYED_GCODE ID=delayed_printer_off DURATION=60 + +[delayed_gcode delayed_printer_off] +initial_duration: 0. +gcode: + {% if printer.idle_timeout.state == "Idle" %} + PRINTER_OFF + {% endif %} + +[exclude_object] + +[include mainsail.cfg] +[include Orbitool_O2S.cfg] +[include Orbiter2_SmartSensor.cfg] +[include beacon3d.cfg] + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [beacon model default] +#*# model_coef = 1.4952403602340907, +#*# 1.8656605487245284, +#*# 0.7758837444105147, +#*# 0.2338499148883277, +#*# 0.2538302898654481, +#*# 0.359354056245091, +#*# -0.16099562977240284, +#*# -0.19513617935485192, +#*# 0.23115190966388482, +#*# 0.1423188524375016 +#*# model_domain = 1.825441207876964e-07,1.928381480708496e-07 +#*# model_range = 0.200000,5.000000 +#*# model_temp = 32.414554 +#*# model_offset = 0.00000 +#*# +#*# [bed_mesh default] +#*# version = 1 +#*# points = +#*# 0.040603, 0.060812, 0.077484, 0.063208, 0.035083 +#*# 0.010789, 0.002650, 0.023569, 0.030275, 0.008437 +#*# -0.005587, -0.017298, 0.006790, 0.008916, -0.006198 +#*# 0.003364, -0.011489, 0.011971, 0.019618, 0.009951 +#*# 0.032870, 0.026835, 0.051747, 0.059173, 0.034837 +#*# x_count = 5 +#*# y_count = 5 +#*# mesh_x_pps = 2 +#*# mesh_y_pps = 2 +#*# algo = bicubic +#*# tension = 0.2 +#*# min_x = 40.0 +#*# max_x = 310.0 +#*# min_y = 40.0 +#*# max_y = 310.0 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 40.680 +#*# pid_ki = 1.349 +#*# pid_kd = 306.625 +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 30.317 +#*# pid_ki = 1.357 +#*# pid_kd = 169.395 +#*# +#*# [input_shaper] +#*# shaper_type_x = 3hump_ei +#*# shaper_freq_x = 80.8 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 37.0 diff --git a/telegram.conf b/telegram.conf new file mode 100644 index 0000000..82ea5a2 --- /dev/null +++ b/telegram.conf @@ -0,0 +1,20 @@ +# Please refer to the wiki(https://github.com/nlef/moonraker-telegram-bot/wiki) for detailed information on how to configure the bot + +[bot] +server: localhost +bot_token: 1490130666:AAH4Vtk3fenhiyBbrS4nNTcZGRn79XpEO5s +chat_id: 1656115798 + +[camera] +host: http://localhost:8080/?action=stream + +[progress_notification] +percent: 5 +height: 5 +time: 5 + +[timelapse] +cleanup: true +height: 0.2 +time: 5 +target_fps: 30 diff --git a/update_firmware.txt b/update_firmware.txt new file mode 100644 index 0000000..3cec873 --- /dev/null +++ b/update_firmware.txt @@ -0,0 +1,14 @@ +sudo service klipper stop +cd ~/klipper + +# SKR 1.4 +make clean +make menuconfig +==> LCP176x, LCP1769, USB Smoothies Checked, USB Communication +make +./scripts/flash-sdcard.sh /dev/serial/by-id/usb-Klipper_lpc1769_0D70FF0F871C4AAF53417C5DC42000F5-if00 btt-skr-turbo-v1.4 +./scripts/flash-sdcard.sh /dev/serial/by-id/usb-Klipper_lpc1769_00A00004A49869AFEAD93E5EC02000F5-if00 btt-skr-turbo-v1.4 + +# Beacon3D? + +sudo service klipper start \ No newline at end of file