commit 73be850f6696e91426713438d8df46eb6b011f2b Author: pi Date: Wed Apr 16 14:15:36 2025 +0100 New Backup on boot - 16/04/25 - 14:15:33 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e55ca4e --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +.env +secrets.conf +*.swp +*.tmp +printer-[0-9]*_[0-9]*.cfg +*.bak +*.bkp +*.csv +*.zip diff --git a/README.md b/README.md new file mode 100644 index 0000000..c975ae8 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Klipper-Backup 💾 +Klipper backup script for manual or automated GitHub backups + +This backup is provided by [Klipper-Backup](https://github.com/Staubgeborener/klipper-backup). diff --git a/printer_data/config/BTT/btt_ebb2209usb.cfg b/printer_data/config/BTT/btt_ebb2209usb.cfg new file mode 100644 index 0000000..fd80a15 --- /dev/null +++ b/printer_data/config/BTT/btt_ebb2209usb.cfg @@ -0,0 +1,77 @@ +# This file contains common pin mappings for the BIGTREETECH EBB USB board. +# To use this config, the firmware should be compiled for the RP2040 with "USB". +# The "EBB Can" micro-controller will be used to control the components on the nozzle. + +# See docs/Config_Reference.md for a description of parameters. + +[mcu EBB] +serial: /dev/serial/by-id/usb-Klipper_rp2040_5044340310A5581C-if00 + +[temperature_sensor EBB_NTC] +sensor_type: Generic 3950 +sensor_pin: EBB:gpio27 + +[lis2dw] +cs_pin: EBB:gpio1 +spi_bus: spi0a +axes_map: z,x,y + +[resonance_tester] +probe_points: 175, 175, 20 +accel_chip: lis2dw + +[extruder] +step_pin: EBB:gpio18 +dir_pin: !EBB:gpio19 +enable_pin: !EBB:gpio17 +gear_ratio: 50:10 +microsteps: 16 +rotation_distance: 22.6789511 +full_steps_per_rotation: 200 +nozzle_diameter: 0.600 +filament_diameter: 1.750 +heater_pin: EBB:gpio7 +pullup_resistor: 2200 # 2.2K +sensor_type: PT1000 +sensor_pin: EBB:gpio26 +max_extrude_cross_section: 5 +min_temp: 0 +max_temp: 350 + +#sensor_type: MAX31865 +#sensor_pin: EBB:gpio9 +#spi_bus: spi1a +#rtd_nominal_r: 1000 +#rtd_reference_r: 4300 +#rtd_num_of_wires: 2 +#rtd_use_50Hz_filter: True + +[tmc2209 extruder] +uart_pin: EBB:gpio20 +run_current: 0.650 +stealthchop_threshold: 999999 + +#[fan] # fan1 +#pin: EBB:gpio14 + +[heater_fan hotend_fan] # fan2 +pin: EBB:gpio14 +heater: extruder +heater_temp: 50.0 + +#[fan_generic fan3] +#pin: EBB:gpio5 + +#[fan_generic 4W_FAN] +#pin: EBB:gpio16 +#tachometer_pin: EBB:gpio12 +#tachometer_ppr: 1 + +[filament_switch_sensor toolhead_switch_sensor] +switch_pin: EBB:gpio13 +pause_on_runout: True +runout_gcode: + PAUSE # [pause_resume] is required in printer.cfg + M117 Toolhead Filament switch runout +insert_gcode: + M117 Toolhead Filament switch inserted diff --git a/printer_data/config/BTT/btt_eddy.cfg b/printer_data/config/BTT/btt_eddy.cfg new file mode 100644 index 0000000..707f39d --- /dev/null +++ b/printer_data/config/BTT/btt_eddy.cfg @@ -0,0 +1,31 @@ + +[mcu eddy] +serial: /dev/serial/by-id/usb-Klipper_rp2040_504450612086291C-if00 # This is the serial address of your eddy probe. This can be found by using the terminal of your klipper instance (typically through SSH) and using the command ```ls /dev/serial/by-id``` +restart_method: command + +[probe_eddy_ng btt_eddy] +sensor_type: btt_eddy +i2c_mcu: eddy +i2c_bus: i2c0f +x_offset: 0 # INSERT VALUE FOR YOUR PROBE POSITION +y_offset: 36 # INSERT VALUE FOR YOUR PROBE POSITION +reg_drive_current: 15 +tap_target_z: -0.6 +tap_start_z: 3 +tap_mode: butter +tap_threshold: 135 +tap_samples: 5 +tap_max_samples: 10 +tap_samples_stddev: 0.025 +tap_speed: 2 +tap_adjust_z: -0.225 + +[temperature_sensor btt_eddy_mcu] +sensor_type: temperature_mcu +sensor_mcu: eddy +min_temp: 10 +max_temp: 100 + +[temperature_sensor btt_eddy] +sensor_type: Generic 3950 +sensor_pin: eddy:gpio26 \ No newline at end of file diff --git a/printer_data/config/BTT/btt_runoutv2.cfg b/printer_data/config/BTT/btt_runoutv2.cfg new file mode 100644 index 0000000..b0c0fef --- /dev/null +++ b/printer_data/config/BTT/btt_runoutv2.cfg @@ -0,0 +1,19 @@ +[filament_switch_sensor switch_sensor] +switch_pin: ^PG10 +pause_on_runout: True +runout_gcode: + PAUSE # [pause_resume] is required in printer.cfg + M117 Filament switch runout +insert_gcode: + M117 Filament switch inserted + +[filament_motion_sensor encoder_sensor] +switch_pin: ^PG11 +detection_length: 5.0 #2.88 minimum +extruder: extruder +pause_on_runout: True +runout_gcode: + PAUSE # [pause_resume] is required in printer.cfg + M117 Filament encoder runout +insert_gcode: + M117 Filament encoder inserted \ No newline at end of file diff --git a/printer_data/config/CUSTOM/bed_mesh.cfg b/printer_data/config/CUSTOM/bed_mesh.cfg new file mode 100644 index 0000000..d2d728f --- /dev/null +++ b/printer_data/config/CUSTOM/bed_mesh.cfg @@ -0,0 +1,110 @@ +[bed_mesh] +mesh_min = 10, 40 +mesh_max = 340, 335 +speed = 200 +horizontal_move_z = 2 +probe_count = 10,10 +algorithm = bicubic +##[(7x7)-1] / 2 = 24 +##[(5x5)-1] / 2 = 12 +##[(9x9)-1] / 2 = 40 +#relative_reference_index: 40 +#zero_reference_position: 175, 175 +#relative_reference_index: 15 +split_delta_z = 0.0125 + +[gcode_macro QUAD_GANTRY_LEVEL] +rename_existing: _QUAD_GANTRY_LEVEL +gcode: + STATUS_LEVELING + SAVE_GCODE_STATE NAME=STATE_QGL + BED_MESH_CLEAR + # If QGL has not been done yet, correct for any major skew first + # at 8mm height + {% if not printer.quad_gantry_level.applied %} + _QUAD_GANTRY_LEVEL horizontal_move_z=8 retry_tolerance=1 + {% endif %} + # Compelte with a full QGL at the configured height + _QUAD_GANTRY_LEVEL + RESTORE_GCODE_STATE NAME=STATE_QGL + +##################################################################### +# Macros +##################################################################### +## customize BED MESH CALIBRATE gcode + +## use BED_MESH_STORE -> generate MESH and save immediately and park in the middle +## use BED_MESH_STORE PARK=false -> generate MESH and save immediately +## use BED_MESH_STORE SAVE=false -> generate MESH and save it later +## use BED_MESH_STORE SAVE=false PARK=false -> would be most likely be used in your macros +[gcode_macro BED_MESH_STORE] +description: Generate a mesh, name it and run save_config if requested +variable_save_at_end: 'false' +gcode: + ##### set default parameter value ##### + {% set save = params.SAVE|default('true') %} + {% set park = params.PARK|default('true') %} + ############# Get user defines ############# + {% set center = printer["gcode_macro _USER_VARIABLE"].center %} + {% set z_hop = printer["gcode_macro _USER_VARIABLE"].z_hop %} + {% set bed_temp = printer.heater_bed.target|int %} + ##### define plate name: Voron (default) or flexplate name ##### + {% set plate_name = 'Voron' %} + {% if 'save_variables' in printer.configfile.config %} + {% if printer.save_variables.variables.plate_array is defined %} + {% set plate_index = printer.save_variables.variables.plate_index|int %} + {% set plate_name = printer.save_variables.variables.plate_array[plate_index][0] %} + {% endif %} + {% endif %} + ##### join everything to a single mesh name ##### + {% set mesh_name = "Voron-Bed_Temp-" + bed_temp|string + "C" %} + ##### end of definitions ##### + BED_MESH_CALIBRATE + BED_MESH_PROFILE SAVE={mesh_name} + BED_MESH_PROFILE REMOVE=default + {% if park|lower == 'true' %} + G90 ; set absolute + G0 Z{z_hop} F1800 ; move nozzle to z high first + G0 X{center[0]} Y{center[1]} F18000 ; home to get toolhead in the middle + {% endif %} + {% if save|lower == 'true' %} + _PRINT_AR T="BED_MESH: Save Config!" + SAVE_CONFIG + {% else %} + _PRINT_AR T="BED_MESH: Save Config after print done" + SET_GCODE_VARIABLE MACRO=BED_MESH_STORE VARIABLE=save_at_end VALUE='"true"' + {% endif %} + + +## use BED_MESH_LOAD -> load an existing MESH +## use BED_MESH_LOAD AUTO=true -> load an existing MESH or generate a new one and prepare it to be saved after print end +[gcode_macro BED_MESH_LOAD] +description: Load an existing mesh or generate a new one +gcode: + ##### set default parameter value ##### + {% set auto = params.AUTO|default('false') %} + {% set bed_temp = printer.heater_bed.target|int %} + ##### join everything to a single mesh name ##### + {% set mesh_name = "Voron-Bed_Temp-" + bed_temp|string + "C" %} + ##### end of definitions ##### + {% if printer.configfile.config["bed_mesh " + mesh_name] is defined %} + BED_MESH_CLEAR + BED_MESH_PROFILE LOAD={mesh_name} + _PRINT_AR T="{"BED_MESH: " + mesh_name + " loaded"}" + {% else %} + {% if auto|lower == 'true' %} + _PRINT_AR T="{"BED_MESH: " + mesh_name + " needs to be generated"}" + BED_MESH_STORE SAVE=false PARK=false + {% else %} + _PRINT_AR T="{"BED_MESH ERROR: " + mesh_name + " not defined"}" + {% endif %} + {% endif %} + +## add this to your PRINT_END to save a mesh if needed 10 seconds after print ended +## UPDATE_DELAYED_GCODE ID=_BED_MESH_SAVE DURATION=10 +[delayed_gcode _BED_MESH_SAVE] +gcode: + {% if printer["gcode_macro BED_MESH_STORE"].save_at_end == 'true' %} + _PRINT_AR T="BED_MESH: Save Config!" + SAVE_CONFIG + {% endif %} \ No newline at end of file diff --git a/printer_data/config/CUSTOM/homing.cfg b/printer_data/config/CUSTOM/homing.cfg new file mode 100644 index 0000000..275db99 --- /dev/null +++ b/printer_data/config/CUSTOM/homing.cfg @@ -0,0 +1,95 @@ +# Note you may need to add the following to your printer.cfg somewhere (without the comments of course) for the Kinematic position stuff below to work. +#[force_move] +#enable_force_move: True + +#[safe_z_home] +#home_xy_position: 175, 175 +#speed: 150.0 +#z_hop: 2 +#z_hop_speed: 15.0 +#move_to_previous: False + +[gcode_macro _HOME_X] +gcode: + # Home + {% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %} + {% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %} + {% set HOME_CURRENT = 0.49 %} + SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT} + SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT} + + SET_KINEMATIC_POSITION X=5 + G91 + G1 X-5 F1200 + + #G4 P2000 + #M400 to finish all pending moves/process the buffer + M400 + G28 X + + # Move away + G91 + G1 X-5 F1200 + + SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X} + SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y} + +[gcode_macro _HOME_Y] +gcode: + {% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %} + {% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %} + {% set HOME_CURRENT = 0.49 %} + SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT} + SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT} + + SET_KINEMATIC_POSITION Y=5 + G91 + G1 Y-5 F1200 + + #G4 P2000 + #M400 to finish all pending moves/process the buffer + M400 + + # Home + G28 Y + # Move away + G91 + G1 Y-5 F1200 + + # Wait just a second… (give StallGuard registers time to clear) + SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X} + SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y} + +[homing_override] +axes: xyz +gcode: + {% set home_all = 'X' not in params and 'Y' not in params and 'Z' not in params %} + + SET_KINEMATIC_POSITION Z=0 + G1 Z5 F1200 + + {% if home_all or 'X' in params %} + _HOME_X + {% endif %} + + {% if home_all or 'Y' in params %} + _HOME_Y + {% endif %} + + {% if home_all or 'Z' in params %} + + G90 + G1 X{ printer.toolhead.axis_maximum.x/2 } Y{ printer.toolhead.axis_maximum.y/2 } F4500 + + G28 Z + + G1 Z10 F1500 + {% endif %} + + +[gcode_macro _CG28] +description: Homing only if necessary +gcode: + {% if "xyz" not in printer.toolhead.homed_axes %} + G28 + {% endif %} \ No newline at end of file diff --git a/printer_data/config/CUSTOM/nozzle_scrub.cfg b/printer_data/config/CUSTOM/nozzle_scrub.cfg new file mode 100644 index 0000000..8996dd7 --- /dev/null +++ b/printer_data/config/CUSTOM/nozzle_scrub.cfg @@ -0,0 +1,225 @@ +####################################################################################################################################### + +# Sample macro config to be used in conjunction with the Decontaminator Purge Bucket & Nozzle Scrubber mod. Created by Hernsl +# (hernsl#8860 on Discord) and edited by Edwardyeeks (edwardyeeks#6042 on Discord). Several ideas that made it as features by +# Deutherius (deutherius#3295 on Discord). + +# The goal of this macro is to provide a nozzle scrubbing and purging routine that is easily copied/referenced into your printer.cfg. +# Users can simply change parameters and enable/disable options in the first half. Descriptions are plentiful, making this macro +# look huge but informative and are laid out in sequence to be read first describing the line below; PLEASE READ CAREFULLY. + +# This sample config assumes the following: The user has implemented the default decontaminator purge bucket & nozzle scrubber mod +# for the VORON 1/2. It can be tweaked to customised purge bucket geometries and brushes. + +# Features in this macro: option of putting the bucket at the rear or front of the bed. Purge routine that can be enabled/disabled. +# By default, bucket is located at rear left of bed and purge routine is enabled. The purge and scrubbing routine is randomized +# in either left or right bucket to ensure as even as possible distribution of filament gunk. + +# Default parameters are set for safe speeds and movements. Where necessary, tweak the parameters for the nozzle scrub procedure +# to fit your printer. + +# To avoid adding length of lines to your main printer.cfg config file, one can upload a config file separately into klipper and +# include it into the main printer config. Upload nozzle_scrub.cfg to the same directory as printer.cfg. Usually, it is in /home/pi/. +# Users of Fluidd, Mainsail and other klipper front ends would find it under /home/pi/klipper_config/. + +# Once uploaded, add the following to your printer.cfg in the Macros section: [include /home/pi/nozzle_scrub.cfg] +# Those running Fluidd, Mainsail and other front ends will need to use the following location instead: +# [include /home/pi/klipper_config/nozzle_scrub.cfg] + +####################################################################################################################################### + +# Name of the macro is clean_nozzle. + +[gcode_macro clean_nozzle] + +# If you are putting your purge bucket at the rear left of the bed as per default installation, enable True on your location_bucket_rear +# variable. If you want to put your purge bucket elsewhere (perhaps the front), then set it to False. See diagrams and description +# further below on how to set your XY position. +variable_location_bucket_rear: True + +# If you want the purging routine in your bucket enabled, set to True (and vice versa). +variable_enable_purge: True + +# These parameters define your filament purging. The retract variable is used to retract right after purging to prevent unnecessary +# oozing. Some filament are particularly oozy and may continue to ooze out of the nozzle for a second or two after retracting. The +# ooze dwell variable makes allowance for this. Update as necessary. If you decided to not enable purge, you can ignore this section. +variable_purge_len: 10 ; Amount of filament, in mm, to purge. +variable_purge_spd: 150 ; Speed, in mm/min, of the purge. +variable_purge_temp_min: 240 ; Minimum nozzle temperature to permit a purge. Otherwise, purge will not occur. +variable_purge_ret: 2 ; Retract length, in mm, after purging to prevent slight oozing. Adjust as necessary. +variable_ooze_dwell: 2 ; Dwell/wait time, in seconds, after purging and retracting. + +# Adjust this so that your nozzle scrubs within the brush. Currently defaulted to be a lot higher for safety. Be careful not to go too low! +variable_brush_top: .3 + +# These parameters define your scrubbing, travel speeds, safe z clearance and how many times you want to wipe. Update as necessary. Wipe +# direction is randomized based off whether the left or right bucket is randomly selected in the purge & scrubbing routine. +variable_clearance_z: 5 ; When traveling, but not cleaning, the clearance along the z-axis between nozzle and brush. +variable_wipe_qty: 7 ; Number of complete (A complete wipe: left, right, left OR right, left, right) wipes. +variable_prep_spd_xy: 3000 ; Travel (not cleaning) speed along x and y-axis in mm/min. +variable_prep_spd_z: 1500 ; Travel (not cleaning) speed along z axis in mm/min. +variable_wipe_spd_xy: 5000 ; Nozzle wipe speed in mm/min. + + +# These parameters define the size of the brush. Update as necessary. A visual reference is provided below. Note that orientation of +# parameters remain the same whether bucket is at rear or front. +# +# ← brush_width → +# _________________ ↑ +# | | ↑ If you chose location_bucket_rear = True, Y position is acquired +# brush_start (x) | | brush_depth from your stepper_y position_max. Adjust your brush physically in +# |_________________| ↓ Y so that the nozzle scrubs within the brush. +# (y) ↓ +# brush_front +# __________________________________________________________ +# PRINTER FRONT +# +# +## For V1.8, you may need to measure where your brush is on the x axis and input manually into any of the variable_brush_start uncommented. +## For V2.4 250mm build, uncomment this below: +#variable_brush_start: 25 + +## For V2.4 300mm build, uncomment this below: +#variable_brush_start: 50 + +## For V2.4 350mm build, uncomment this below: +variable_brush_start: 230 + +# This value is defaulted from brush location in CAD (rear left). Change if your brush width is different. +variable_brush_width: 52 + +## These are only used if location_bucket_rear is False. You specify a custom location in y axis for your brush - see diagram above. ## +variable_brush_front: 0 +variable_brush_depth: 0 + + +# These parameters define the size of your purge bucket. Update as necessary. If you decided to not enable purge, you can ignore +# this section. A visual reference is provided below. Note that orientation of parameters remain the same whether bucket is at rear +# or front. +# +# bucket_gap +# ← ---- → +# __________________________________________ +# | | | | +# | | | | +# bucket_start (x) | |______| | +# | | | | +# | | | | +# |_________________|. . . |_________________| +# ← ------------- → ← ------------- → +# bucket_left_width bucket_right_width +# _______________________________________________________________________________________ +# PRINTER FRONT +# +## For V2.4 250mm build, uncomment below +#variable_bucket_left_width: 42 + +## For V2.4 300mm build, uncomment below +#variable_bucket_left_width: 67 + +## For V2.4 350mm build, uncomment below +#variable_bucket_left_width: 92 +variable_bucket_left_width: 40 + +# These values are defaulted from bucket geometry in CAD (rear left location). Change only if you're using a custom bucket. +#variable_bucket_right_width: 40 +variable_bucket_right_width: 92 +variable_bucket_gap: 22 + +# For V1.8, you may need to measure where your bucket start is and input into bucket_start. Otherwise, a value of 0 is for a default +# installation of purge bucket at rear left. +variable_bucket_start: 200 + + +############################################################################################################################################### +############################################################################################################################################### + +### From here on, unless you know what you're doing, it's recommended not to change anything. Feel free to peruse the code and reach out to me +### (edwardyeeks#6042) on Discord if you spot any problems! + +############################################################################################################################################### +############################################################################################################################################### + +# Placeholder. The variable will later be set to contain, at random, a number representing the left or right bucket. +variable_bucket_pos: 1 + +gcode: + # First, check if the axes are homed. + {% if "xyz" in printer.toolhead.homed_axes %} + + ## Save the gcode state in this macro instance. + SAVE_GCODE_STATE NAME=clean_nozzle + STATUS_CLEANING + ## Set to absolute positioning. + G90 + + ## Grab max position of Y-axis from config to use in setting a fixed y position for location_bucket_rear = True. + {% set Ry = printer.configfile.config["stepper_y"]["position_max"]|float %} + + ## Check if user enabled purge option or not. + {% if enable_purge %} + + ### Randomly select left or right bin for purge. 0 = left, 1 = right + SET_GCODE_VARIABLE MACRO=clean_nozzle VARIABLE=bucket_pos VALUE={(range(2) | random)} + + ### Raise Z for travel. + G1 Z{brush_top + clearance_z} F{prep_spd_z} + + ### Check if user chose to use rear location. + {% if location_bucket_rear %} + G1 Y{Ry} F{prep_spd_xy} + {% else %} + G1 Y{brush_front + (brush_depth / 2)} F{prep_spd_xy} + {% endif %} + + ### Position for purge. Randomly selects middle of left or right bucket. It references from the middle of the left bucket. + G1 X{bucket_start + (bucket_left_width / (2 - bucket_pos)) + (bucket_pos * bucket_gap) + (bucket_pos * (bucket_right_width / 2))} + + ### Perform purge if the temp is up to min temp. If not, it will skip and continue executing rest of macro. Small retract after + ### purging to minimize any persistent oozing at 5x purge_spd. G4 dwell is in milliseconds, hence * 1000 in formula. + {% if printer.extruder.temperature >= purge_temp_min %} + M83 ; relative mode + G1 E{purge_len} F{purge_spd} + G1 E-{purge_ret} F{purge_spd * 5} + G4 P{ooze_dwell * 1000} + G92 E0 ; reset extruder + {% endif %} + + {% endif %} + + ## Position for wipe. Either left or right of brush based off bucket_pos to avoid unnecessary travel. + G1 Z{brush_top + clearance_z} F{prep_spd_z} + G1 X{brush_start + (brush_width * bucket_pos)} F{prep_spd_xy} + + ## Check if user chose to use rear location. + {% if location_bucket_rear %} + G1 Y{Ry} + {% else %} + G1 Y{brush_front + (brush_depth / 2)} + {% endif %} + + ## Move nozzle down into brush. + G1 Z{brush_top} F{prep_spd_z} + + ## Perform wipe. Wipe direction based off bucket_pos for cool random scrubby routine. + {% for wipes in range(1, (wipe_qty + 1)) %} + G1 X{brush_start + (brush_width * (1 - bucket_pos))} F{wipe_spd_xy} + G1 X{brush_start + (brush_width * bucket_pos)} F{wipe_spd_xy} + {% endfor %} + + ## Clear from area. + M117 Cleaned! + G1 Z{brush_top + clearance_z} F{prep_spd_z} + ##G1 X{bucket_left_width / 4} F{prep_spd_xy} + G1 X{bucket_left_width * 3} F{prep_spd_xy} + + ## Restore the gcode state to how it was before the macro. + RESTORE_GCODE_STATE NAME=clean_nozzle + + {% else %} + + ## raise error will stop any macros that clean_nozzle is referenced in from proceeding for safety. + { action_raise_error("Please home your axes!") } + M117 Please home first! + + {% endif %} \ No newline at end of file diff --git a/printer_data/config/CUSTOM/set_material.cfg b/printer_data/config/CUSTOM/set_material.cfg new file mode 100644 index 0000000..822119f --- /dev/null +++ b/printer_data/config/CUSTOM/set_material.cfg @@ -0,0 +1,669 @@ +[gcode_macro SET_MATERIAL] +description: Dynamically adjust chamber temps, fans, and behavior based on material + +# === OVERVIEW === +# This macro sets print parameters based on the selected filament type. +# It includes logic for fan control, pressure advance tuning, and chamber temperature management. +# Each material is uniquely handled with comments, proper defaults, and warnings where applicable. +# +# === WHY USE THIS === +# - Ensures consistent print settings per material +# - Automatically adjusts temperature and environment conditions +# - Reduces manual tuning between material changes +# - Helps enforce safety (drying warnings, chamber heat warnings, etc.) +# +# === HOW TO USE === +# Call the macro with: +# SET_MATERIAL MATERIAL= +# +# Example: +# SET_MATERIAL MATERIAL=ABS +# +# === SETUP REQUIREMENTS === +# You MUST configure: +# - A chamber temperature sensor (e.g., temperature_sensor chamber_combined_mean) +# - A bed heater (e.g., heater_bed) +# - Optionally, a chamber heater (e.g., heater_generic chamber_heater) +# - A chamber circulation fan (e.g., nevermore_fan) +# +# === PARAMETERS === +# MATERIAL: Name of the filament material preset to apply +# Supported: PLA, ABS, PETG, ASA, PC, PA, PEEK, PEK, TPU, etc. +# Extended support for exotic blends like ESD-ABS, PVDF, MetalFill, Foam PLA +# +# === NOTES === +# - Each material includes chamber temp, fan speed, PA, and smoothing settings +# - Some materials apply Z offset compensation or recommend special nozzle/hardware +# - Certain blocks include warnings (e.g., "dry before use" or "use hardened nozzle") +# - If you do not have a chamber heater, set `ACTIVE_CHAMBER_HEATING = False` +# - You can expand this macro to include more materials as needed +# - Unknown materials fall back to a safe PLA-like default +# +# === ADVANCED === +# This macro can be tied into slicer startup G-code or multi-material toolchanging macros. +# You can also use it in combination with filament sensors or manual menu macros. + +gcode: + {% set CHAMBER_SENSOR = "temperature_sensor chamber_combined_mean" %} + {% set BED_HEATER = "heater_bed" %} + {% set BED_FAN = "nevermore_fan" %} + {% set ACTIVE_CHAMBER_HEATING = False %} # Set to True if you have a dedicated chamber heater configured + {% set CHAMBER_HEATER = "chamber_heater" if ACTIVE_CHAMBER_HEATING else "" %} + {% set MATERIAL = params.MATERIAL|default("PLA")|string %} + + # --- Chamber-less Materials --- + + {% if MATERIAL in ['PLA', 'PLA-CF', 'PE', 'PE-CF'] %} + # PLA: Easy to print, low warping, no chamber needed. CF = carbon fiber, stiffer and more abrasive. + {% set message = "Material: " ~ MATERIAL ~ " | PA: 0.035 | Chamber: 25°C" %} + RESPOND MSG="{message}" + M141 S25 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.5 + SET_PA PA=0.035 SMOOTH=0.04 + + {% elif MATERIAL in ['PLA+', 'SILK-PLA'] %} + # PLA+: Stronger, tougher PLA. Silk PLA has glossy finish but may string more. + {% set message = "Material: " ~ MATERIAL ~ " | PA: 0.038 | Chamber: 25°C" %} + RESPOND MSG="{message}" + M141 S25 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.5 + SET_PA PA=0.038 SMOOTH=0.04 + + {% elif MATERIAL in ['PVDF', 'PVDF-CF', 'PVDF-GF'] %} + # PVDF: Chemical-resistant and strong. Requires high chamber temps and dry storage. + {% set message = "Material: " ~ MATERIAL ~ " | PA: 0.055 | Chamber: 90°C | ⚠️ Moisture-sensitive. Dry before use." %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET=90 SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.055 SMOOTH=0.045 + + {% elif MATERIAL in ['ESD-PLA', 'ESD-ABS', 'ESD-PC', 'ESD-PEEK'] %} + # ESD-safe filaments for sensitive electronics. Can be brittle, dry before use. + {% set chamber_temp = 60 if 'PLA' in MATERIAL else 80 %} + {% set pa_val = 0.04 if 'PLA' in MATERIAL else 0.05 %} + {% set message = "Material: " ~ MATERIAL ~ " | PA: " ~ pa_val|string ~ " | Chamber: " ~ chamber_temp|string ~ "°C | ⚠️ Dry before use for best performance." %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={chamber_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA={pa_val} SMOOTH=0.045 + + {% elif MATERIAL == 'LW-PLA' %} + # LW-PLA: Lightweight PLA expands with heat. MUST reduce flow to ~65% manually. + {% set message = "Material: LW-PLA | PA: 0.03 | Chamber: 25°C | Reminder: Set flow to ~65%" %} + RESPOND MSG="{message}" + M141 S25 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.2 + SET_PA PA=0.03 SMOOTH=0.04 + + {% elif MATERIAL == 'PLA-FOAM' %} + # PLA-FOAM: Similar to LW-PLA, foams up at extrusion temps. Lower flow ~60%. + {% set message = "Material: PLA-FOAM | PA: 0.03 | Chamber: 25°C | Reminder: Set flow to ~60%" %} + RESPOND MSG="{message}" + M141 S25 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.3 + SET_PA PA=0.03 SMOOTH=0.04 + + {% elif MATERIAL in ['PETG', 'PETG-GF', 'PETG-CF', 'PET-CF'] %} + # PETG: Good strength/flexibility, more durable than PLA. May string. CF/GF are abrasive. + {% set message = "Material: " ~ MATERIAL ~ " | PA: 0.03 | Chamber: 40°C" %} + RESPOND MSG="{message}" + M141 S40 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.5 + SET_PA PA=0.03 SMOOTH=0.05 + SET_GCODE_OFFSET Z=0.02 # PETG can be sticky; lift Z slightly to prevent nozzle drag + + {% elif MATERIAL in ['ABS', 'ABS+', 'ABS-GF', 'ABS-CF'] %} + # ABS: Tough and heat-resistant, good for functional parts. Warps easily—requires enclosed chamber. + # CF (Carbon Fiber) / GF (Glass Fiber) versions are more rigid and very abrasive. + {% set target_temp = 60 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: " ~ MATERIAL ~ " | PA: 0.05 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.05 SMOOTH=0.045 + + {% elif MATERIAL in ['ASA', 'ASA+', 'ASA-GF', 'ASA-CF', 'ASA-Aero'] %} + # ASA: UV-resistant alternative to ABS. Great for outdoor parts. Needs similar chamber temps to ABS. + # ASA-GF and ASA-CF are even more rigid and more abrasive. + {% set target_temp = 60 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: " ~ MATERIAL ~ " | PA: 0.05 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.05 SMOOTH=0.045 + + {% elif MATERIAL == 'HIPS' %} + # HIPS: Used primarily as a dissolvable support for ABS. Requires similar chamber temps. + # ⚠️ Requires limonene bath for dissolution. Keep dry. May warp without chamber. + {% set target_temp = 60 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: HIPS | PA: 0.045 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL ~ " | ⚠️ Dissolves in limonene. Keep dry." %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.045 SMOOTH=0.045 + + {% elif MATERIAL == 'BVOH' %} + # BVOH: Superior water-soluble support material. Less stringy than PVA but still moisture sensitive. + # ⚠️ Store in drybox. Dissolves faster in warm water. Do not overcool during print. + {% set message = "Material: BVOH | PA: 0.035 | Chamber: 25°C | ⚠️ Store dry. Dissolves in water." %} + RESPOND MSG="{message}" + M141 S25 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.2 + SET_PA PA=0.035 SMOOTH=0.04 + + {% elif MATERIAL == 'PP' %} + # PP: Light and chemical-resistant. Warps easily and has poor adhesion. Needs chamber and special bed surface. + # ⚠️ Use PP-specific bed surface. Avoid cooling drafts. May require brim or raft. + {% set target_temp = 55 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: PP | PA: 0.04 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL ~ " | ⚠️ Warps easily. PP bed surface recommended." %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.04 SMOOTH=0.045 + + {% elif MATERIAL == 'PPSU' %} + # PPSU: High-performance thermoplastic. Chemical and heat-resistant. Needs very hot chamber and drying. + # ⚠️ Print with hardened nozzle. Needs chamber and high temps. Store dry. + {% set target_temp = 100 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: PPSU | PA: 0.055 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL ~ " | ⚠️ Needs high temp & dry storage" %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.055 SMOOTH=0.045 + + {% elif MATERIAL == 'ULTEM' or MATERIAL == 'PEI' %} + # ULTEM / PEI: Extremely strong. High temp aerospace/engineering plastic. Needs chamber + hardened nozzle. + # ⚠️ Only for high-end printers. Dry thoroughly. Print hot. + {% set target_temp = 120 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: ULTEM/PEI | PA: 0.06 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL ~ " | ⚠️ Industrial use only. Dry & hot." %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.06 SMOOTH=0.05 + + {% elif MATERIAL == 'POLYMAX-PC' %} + # Polymaker PolyMax PC: Easier-to-print Polycarbonate blend. Good strength and clarity. Less prone to warping. + # ⚠️ Still requires chamber and hardened nozzle for long-term use. + {% set target_temp = 60 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: PolyMax PC | PA: 0.05 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL ~ " | ⚠️ Tough and clear. Handle like PC." %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.05 SMOOTH=0.045 + + {% elif MATERIAL == 'ULTRAFUSE-PAHT-CF15' %} + # BASF Ultrafuse PAHT CF15: High-temp nylon, 15% carbon fiber. Stiff, light, durable. + # ⚠️ Dry thoroughly. Use hardened nozzle. Requires chamber. + {% set target_temp = 70 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: Ultrafuse PAHT CF15 | PA: 0.06 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL ~ " | ⚠️ High strength & very abrasive." %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.06 SMOOTH=0.045 + + {% elif MATERIAL == 'PRUSAMENT-PETG-CF' %} + # Prusament PETG CF: Stiffer than normal PETG, reduced warping, excellent layer adhesion. + # ⚠️ Abrasive. Use hardened nozzle. Watch for brittle breakages if overcooled. + {% set message = "Material: Prusament PETG-CF | PA: 0.04 | Chamber: 45°C | ⚠️ Abrasive. Great dimensional stability." %} + RESPOND MSG="{message}" + M141 S45 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.4 + SET_PA PA=0.04 SMOOTH=0.045 + + {% elif MATERIAL == 'PRUSAMENT-PLA-TOUGH' %} + # Prusament PLA Tough: Improved impact resistance vs. standard PLA. Still easy to print. + {% set message = "Material: Prusament PLA Tough | PA: 0.038 | Chamber: 25°C | Tougher than normal PLA." %} + RESPOND MSG="{message}" + M141 S25 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.5 + SET_PA PA=0.038 SMOOTH=0.04 + + {% elif MATERIAL in ['TPU-SOFT', 'TPU-85A'] %} + # TPU-Soft: Ultra-flexible variant. Requires extremely slow printing and short retractions. + # ⚠️ Direct drive required. Reduce speed to <20mm/s. Keep dry to avoid stringing. + {% set message = "Material: TPU-SOFT | PA: 0.055 | Chamber: 30°C | ⚠️ Print very slowly. Direct drive only." %} + RESPOND MSG="{message}" + M141 S30 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.3 + SET_PA PA=0.055 SMOOTH=0.035 + SET_GCODE_OFFSET Z=0.02 + + {% elif MATERIAL == 'PA12-GF' %} + # PA12-GF: Glass-fiber filled Nylon 12. High strength, dimensional stability, very abrasive. + # ⚠️ Requires dry storage. Use hardened nozzle. Enclosure strongly recommended. + {% set target_temp = 70 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: PA12-GF | PA: 0.06 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL ~ " | ⚠️ Dry thoroughly, very abrasive." %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.06 SMOOTH=0.045 + + {% elif MATERIAL == 'BREAKAWAY' %} + # Breakaway: Rigid support material that peels away instead of dissolving. Great with ABS, ASA, PETG. + # ⚠️ Store dry. Avoid excessive cooling. Easy to print, good layer adhesion. + {% set message = "Material: Breakaway | PA: 0.035 | Chamber: 35°C | ⚠️ Peel-away support. Store dry." %} + RESPOND MSG="{message}" + M141 S35 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.3 + SET_PA PA=0.035 SMOOTH=0.045 + + {% elif MATERIAL == 'NGEN' %} + # ColorFabb nGen: Easy-to-print PETG-like with smoother finish and less stringing. Based on Amphora AM3300. + {% set message = "Material: nGen | PA: 0.035 | Chamber: 30°C | Smoother than PETG, low stringing." %} + RESPOND MSG="{message}" + M141 S30 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.5 + SET_PA PA=0.035 SMOOTH=0.045 + + {% elif MATERIAL == 'COLORFABB-HT' %} + # ColorFabb HT: High-temp, semi-crystalline Amphora-based copolyester. Tough and heat-resistant. + {% set target_temp = 60 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: ColorFabb HT | PA: 0.045 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL ~ " | Tough and heat-tolerant. Dry before use." %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.045 SMOOTH=0.045 + + {% elif MATERIAL == 'PPS' %} + # PPS: Exceptional chemical resistance, dimensional stability, and flame retardance. Used in automotive/aerospace. + {% set target_temp = 95 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: PPS | PA: 0.06 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL ~ " | ⚠️ Industrial. Dry thoroughly. Print hot." %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.06 SMOOTH=0.05 + + {% elif MATERIAL in ['PVDF-BLEND', 'KYNAR', 'SOLEF'] %} + # PVDF Blend: Enhanced versions of PVDF for strength/flexibility. Used in semiconductors, chemical labs. + {% set target_temp = 85 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: PVDF Blend | PA: 0.055 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL ~ " | ⚠️ Chemical resistant. Dry required." %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.055 SMOOTH=0.045 + + {% elif MATERIAL == 'CARBONX-PC' %} + # CarbonX CFR-PC+: Carbon fiber-reinforced PC with excellent stiffness and heat performance. + # ⚠️ Use hardened nozzle. Dry before use. Requires enclosure. + {% set target_temp = 65 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: CarbonX PC+ | PA: 0.055 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL ~ " | ⚠️ High stiffness, abrasive." %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.055 SMOOTH=0.045 + + {% elif MATERIAL == 'ESUN-ABS+' %} + # eSun ABS+: Modified ABS with lower warping and easier layer adhesion. Still benefits from chamber heat. + {% set target_temp = 55 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: eSun ABS+ | PA: 0.045 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL ~ " | Easier than regular ABS." %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.045 SMOOTH=0.045 + + {% elif MATERIAL == 'RAISE3D-PLA+' %} + # Raise3D PLA+: Tougher PLA variant optimized for layer adhesion and strength. + {% set message = "Material: Raise3D PLA+ | PA: 0.038 | Chamber: 25°C | Tougher PLA with good printability." %} + RESPOND MSG="{message}" + M141 S25 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.5 + SET_PA PA=0.038 SMOOTH=0.04 + + {% elif MATERIAL in ['PA', 'PA-GF', 'PA-CF', 'PAHT-CF', 'PA12-CF'] %} + # Nylon (PA): Strong, flexible, and wear-resistant. Extremely moisture-sensitive — dry before printing! + # CF = Carbon Fiber, GF = Glass Fiber, PAHT = high-temp nylon. Abrasive: use a hardened nozzle. + {% set target_temp = 65 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: " ~ MATERIAL ~ " | PA: 0.06 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL ~ " | ⚠️ Dry thoroughly before use" %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.06 SMOOTH=0.045 + + {% elif MATERIAL in ['PC', 'PC-CF', 'PCTG'] %} + # PC (Polycarbonate): Very strong and heat resistant. Needs hot chamber. Tends to warp and absorb moisture. + # PC-CF is stiffer and more rigid. PCTG is a more forgiving blend. + {% set target_temp = 60 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: " ~ MATERIAL ~ " | PA: 0.055 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.055 SMOOTH=0.045 + + {% elif MATERIAL in ['PC-ABS', 'PCABS'] %} + # PC-ABS: Blend of PC and ABS. Easier to print than pure PC. Still wants a hot chamber and enclosure. + {% set target_temp = 70 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: " ~ MATERIAL ~ " | PA: 0.055 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.055 SMOOTH=0.045 + + {% elif MATERIAL == 'PEEK' %} + # PEEK: Ultra high-performance. Requires extremely hot chamber (110°C+). Dry thoroughly before use. + # Used in aerospace, medical, and industrial applications. Hardened nozzle & all-metal hotend required. + {% set target_temp = 110 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: PEEK | PA: 0.06 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.06 SMOOTH=0.05 + + {% elif MATERIAL == 'PEK' %} + # PEK: Slightly lower-temp cousin of PEEK. Still high performance and needs special hardware. + {% set target_temp = 90 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: PEK | PA: 0.055 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.055 SMOOTH=0.05 + + {% elif MATERIAL == 'TPU' %} + # TPU: Flexible filament. Needs slow print speed. Watch for oozing. Can stretch during retraction. + # ⚠️ Tips: Print very slowly (15-30mm/s). Use direct drive. Avoid long Bowden tubes. Dry before use if soft or stringy. + {% set message = "Material: TPU | PA: 0.055 | Chamber: 35°C | ⚠️ Go slow, direct drive recommended" %} + RESPOND MSG="{message}" + M141 S35 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.5 + SET_PA PA=0.055 SMOOTH=0.04 + SET_GCODE_OFFSET Z=0.02 + + {% elif MATERIAL == 'TPE' %} + # TPE: Very soft rubber-like filament. Print slowly. Use direct drive extruder. + # ⚠️ Tips: Reduce retraction. Very flexible – print <25mm/s. May require increased nozzle temp. Dry before use. + {% set message = "Material: TPE | PA: 0.05 | Chamber: 30°C | ⚠️ Slow speed, direct drive only" %} + RESPOND MSG="{message}" + M141 S30 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.5 + SET_PA PA=0.05 SMOOTH=0.04 + SET_GCODE_OFFSET Z=0.02 + + {% elif MATERIAL in ['NINJAFLEX', 'NINJA-FLEX'] %} + # NinjaFlex: Ultra-flexible. Print extremely slow. Hard to control extrusion. Direct drive required. + # ⚠️ Tips: Dry well. No retraction if possible. Tight filament path. Print 10–20mm/s. + {% set message = "Material: Ninjaflex | PA: 0.045 | Chamber: 30°C | ⚠️ Print <20mm/s. No Bowden setups." %} + RESPOND MSG="{message}" + M141 S30 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.3 + SET_PA PA=0.045 SMOOTH=0.035 + SET_GCODE_OFFSET Z=0.02 + + {% elif MATERIAL in ['METALFILL', 'BRONZEFILL', 'COPPERFILL'] %} + # MetalFill: PLA blended with metal powder. Heavy, beautiful finish. Extremely abrasive—use hardened nozzle. + # ⚠️ Tips: Slower speed, hardened nozzle, check for settling in filament spool. + {% set message = "Material: " ~ MATERIAL ~ " | PA: 0.04 | Chamber: 35°C | ⚠️ Abrasive – use hardened nozzle" %} + RESPOND MSG="{message}" + M141 S35 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.5 + SET_PA PA=0.04 SMOOTH=0.045 + + {% elif MATERIAL in ['IRONFILL', 'MAGNETICFILL'] %} + # Magnetic/iron PLA: Similar to MetalFill but can rust. Very abrasive. Hardened steel nozzle recommended. + # ⚠️ Store dry to avoid rust. May interfere with inductive sensors. + {% set message = "Material: " ~ MATERIAL ~ " | PA: 0.04 | Chamber: 35°C | ⚠️ Abrasive. Keep dry." %} + RESPOND MSG="{message}" + M141 S35 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.5 + SET_PA PA=0.04 SMOOTH=0.045 + + {% elif MATERIAL in ['WOODFILL', 'CARBONFILL', 'KEVLARFILL'] %} + # Filled composites: Can clog if retracted too much. Lower print speeds. Use wider nozzle (0.6mm+) and hardened tip. + # ⚠️ Avoid retraction-heavy prints. Watch for clogs. WoodFill can scorch – keep nozzle temp moderate. + {% set message = "Material: " ~ MATERIAL ~ " | PA: 0.045 | Chamber: 40°C | ⚠️ Composite: Use 0.6mm+ hardened nozzle" %} + RESPOND MSG="{message}" + M141 S40 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.5 + SET_PA PA=0.045 SMOOTH=0.045 + + {% elif MATERIAL in ['MOLDLAY', 'CASTFIL', 'CASTING'] %} + # MoldLay: Used for casting. Can be melted out like wax. Brittle and needs low chamber temps. + # ⚠️ Avoid excessive cooling. Brittle at room temp. Supports should be minimal. + {% set message = "Material: " ~ MATERIAL ~ " | PA: 0.035 | Chamber: 25°C | ⚠️ Brittle – handle gently post-print" %} + RESPOND MSG="{message}" + M141 S25 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.5 + SET_PA PA=0.035 SMOOTH=0.04 + + {% elif MATERIAL in ['PVA', 'SUPPORT-PVA'] %} + # PVA: Water-soluble support material. Store in airtight container. Extremely moisture-sensitive. + {% set message = "Material: PVA | PA: 0.035 | Chamber: 25°C | ⚠️ Water Soluble & Moisture Sensitive" %} + RESPOND MSG="{message}" + M141 S25 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.0 # No fan to avoid drafts/drying out + SET_PA PA=0.035 SMOOTH=0.04 + + {% elif MATERIAL in ['PMMA', 'ACRYLIC'] %} + # PMMA: Transparent, acrylic-like. Shrinks a lot—needs chamber. Often cracks if too cold. Store dry. + {% set target_temp = 60 %} + {% set passive_wait = target_temp - 25 %} + {% set CHAMBER_LABEL = "(active heater)" if ACTIVE_CHAMBER_HEATING else "(passive via bed, will start at ≥" ~ passive_wait|string ~ "°C)" %} + {% set message = "Material: PMMA | PA: 0.04 | Chamber: " ~ target_temp|string ~ "°C " ~ CHAMBER_LABEL ~ " | ⚠️ Brittle when moist, dry thoroughly" %} + RESPOND MSG="{message}" + SET_CHAMBER_HEAT TARGET={target_temp} SENSOR="{CHAMBER_SENSOR}" HEATER={CHAMBER_HEATER} BED_HEATER={BED_HEATER} FAN={BED_FAN} ACTIVE={ACTIVE_CHAMBER_HEATING} + SET_PA PA=0.04 SMOOTH=0.045 + + {% else %} + # Default fallback for unknown materials + RESPOND MSG="Material: Unknown | Default PA: 0.04 | Chamber: 25°C" + M141 S25 + SET_FAN_SPEED FAN={BED_FAN} SPEED=0.5 + SET_PA PA=0.04 SMOOTH=0.045 + {% endif %} + +[gcode_macro SET_PA] +description: Set Pressure Advance for the printer +variable_pa: 0.04 + +# === OVERVIEW === +# This macro sets the Pressure Advance (PA) and smoothing values for your printer. +# Pressure Advance compensates for pressure build-up in the nozzle, improving corners and extrusion consistency. +# The smoothing value reduces sudden changes by blending movement transitions. +# +# This macro is useful when tuning PA per-material or per-print, and can be used dynamically during a print or via your slicer. +# +# === HOW TO USE === +# Call the macro with: +# SET_PA PA= [SMOOTH=] +# +# Example: +# SET_PA PA=0.045 +# SET_PA PA=0.050 SMOOTH=0.04 +# +# === PARAMETERS === +# PA: The desired pressure advance value (required) +# SMOOTH: Optional smoothing value (default: 0.045) +# +# === NOTES === +# - Pressure Advance tuning is material- and setup-dependent. +# - You can call this from your slicer as a custom G-code before the print starts. +# - The value is stored in a macro variable (variable_pa) so it can be referenced or reset easily. + +gcode: + {% set pa = params.PA|float %} + {% set smooth = params.SMOOTH|default(0.045)|float %} + + # Apply Pressure Advance and smoothing time + SET_PRESSURE_ADVANCE ADVANCE={pa} SMOOTH_TIME={smooth} + + # Store the value for reference + SET_GCODE_VARIABLE MACRO=SET_PA VARIABLE=pa VALUE={pa} + + # Optional: echo back confirmation (uncomment if desired) + # {% set message = "Pressure Advance set to " ~ pa|string ~ " | Smoothing: " ~ smooth|string %} + # RESPOND MSG="{message}" + + + +[gcode_macro SET_CHAMBER_HEAT] +description: Modular chamber heating logic with active/passive support, includes safety checks and debug output + +# === OVERVIEW === +# This macro heats the chamber to a target temperature using either: +# 1. An active heater (like a dedicated chamber heater), or +# 2. Passive heating (using the bed heater). +# It controls the bed heater, an optional chamber heater, and a circulation fan. +# It will block until the target temperature is reached. + +# === SAFETY WARNINGS === +# - Ensure your chamber temperature sensor is correctly installed and reporting. +# - Watch your printer during the first few uses of this macro. +# - Passive mode may take a long time to reach temperature. +# - Don't overheat your enclosure — check max safe temps for your printer! + +# === PARAMETERS === +# TARGET : (required) Target chamber temperature in °C. +# SENSOR : (optional) Temperature sensor name (default: temperature_sensor chamber_combined_mean). +# HEATER : (optional) Chamber heater name (used only if ACTIVE=True). +# BED_HEATER : (optional) Bed heater name (default: heater_bed). +# FAN : (optional) Circulation fan name (default: nevermore_fan). +# ACTIVE : (optional) If True, uses a dedicated heater; otherwise uses passive heating. + +# === USAGE === +# SET_CHAMBER_HEAT TARGET=60 ACTIVE=True HEATER="heater_generic chamber_heater" +# SET_CHAMBER_HEAT TARGET=60 ACTIVE=False + +gcode: + # === Parse Parameters === + {% set target = params.TARGET|int %} # Desired chamber temperature + {% set sensor = params.SENSOR|default('temperature_sensor chamber_combined_mean') %} # Sensor to read chamber temp + {% set heater = params.HEATER|default('') %} # Optional active chamber heater + {% set bed_heater = params.BED_HEATER|default('heater_bed') %} # Bed heater + {% set bed_fan = params.FAN|default('nevermore_fan') %} # Circulation fan + + # Normalize ACTIVE to a proper boolean + {% set active = params.ACTIVE|default("false")|lower == 'true' %} # True = use chamber heater, False = use bed only + + # Calculate the temperature to wait for — passive mode waits for less (25°C below target) + {% set wait_temp = target if active else target - 25 %} + + # === Initial Message === + {% set message = "[CHAMBER HEAT] Starting chamber heat routine (Target: " ~ target|string ~ "°C, Wait: " ~ wait_temp|string ~ "°C, Mode: " ~ ("Active" if active else "Passive") ~ ")" %} + RESPOND MSG="{message}" + + # Set M141 for visual tools (slicer/monitor) to track chamber temperature + M141 S{target} + + # === ACTIVE MODE === + {% if active %} + {% set message = "[CHAMBER HEAT] Activating chamber heater and bed heater to " ~ target|string ~ "°C" %} + RESPOND MSG="{message}" + + # Set chamber heater temp (if provided) + {% if heater|length > 0 %} + SET_HEATER_TEMPERATURE HEATER={heater} TARGET={target} + {% endif %} + + # Set bed heater to the same target (helps speed up heating) + SET_HEATER_TEMPERATURE HEATER={bed_heater} TARGET={target} + + # Turn circulation fan on full to spread heat + SET_FAN_SPEED FAN={bed_fan} SPEED=1 + + # === PASSIVE MODE === + {% else %} + # If the chamber is below the passive-mode target threshold + {% if printer[sensor].temperature < wait_temp %} + {% set message = "[CHAMBER HEAT] Chamber below " ~ wait_temp|string ~ "°C — passively heating via bed" %} + RESPOND MSG="{message}" + + # Turn on fan at half speed (gentle circulation) + SET_FAN_SPEED FAN={bed_fan} SPEED=0.5 + + # Set bed heater to a high temp (120°C) to warm chamber indirectly + SET_HEATER_TEMPERATURE HEATER={bed_heater} TARGET=120 + + # Wait until bed reaches temperature + TEMPERATURE_WAIT SENSOR="{bed_heater}" MINIMUM=120 + + {% else %} + # Chamber is already close enough to the desired temperature + {% set message = "[CHAMBER HEAT] Chamber already warm enough for passive mode (" ~ printer[sensor].temperature|round(1)|string ~ "°C)" %} + RESPOND MSG="{message}" + {% endif %} + + # Once warmed, run the circulation fan at full speed + SET_FAN_SPEED FAN={bed_fan} SPEED=1 + {% endif %} + + # === FINAL BLOCKING WAIT === + {% set message = "[CHAMBER HEAT] Waiting for chamber to reach " ~ wait_temp|string ~ "°C..." %} + RESPOND MSG="{message}" + + # Block until the chamber temp sensor reads the required temp + TEMPERATURE_WAIT SENSOR="{sensor}" MINIMUM={wait_temp} + + # Confirm chamber is ready + {% set message = "[CHAMBER HEAT] Chamber ready at " ~ printer[sensor].temperature|round(1)|string ~ "°C" %} + RESPOND MSG="{message}" + + + +[gcode_macro M106] +rename_existing: G106 +description: Compresses fan speeds into 10–30% range if bed temp ≥ 70°C + +# === OVERVIEW === +# This macro overrides the default M106 behavior to apply a thermal-aware fan speed limiter. +# When the bed temperature is at or above 70°C, it compresses the part cooling fan speed range +# into a safer 10–30% range (i.e., 26–76 PWM) to reduce warping or delamination in high-temp materials. +# +# === WHY USE THIS === +# - Prevents excessive part cooling when printing materials like ABS, ASA, or PC. +# - Helps maintain stable chamber temperatures and reduce thermal shock. +# - Minimizes curling or layer splitting due to sudden cooling on hot beds. +# +# === HOW TO USE === +# Simply use M106 S as usual in your G-code or slicer. +# The macro will automatically adjust the fan speed if needed based on bed temperature. +# +# === NOTES === +# - This logic only applies when the bed temperature is 70°C or higher. +# - Below 70°C, full-range fan control is allowed. +# - You can customize the input/output compression range if needed. + +# === PARAMETERS === +# S: Standard fan speed in 0–255 (required by M106) + +# Internal constants: +# min_input = 26 (10% of 255) +# max_input = 255 (100%) +# min_output = 26 (10%) +# max_output = 76 (30%) + +gcode: + {% set fan_speed = params.S|default(0)|int %} + {% set bed_temp = printer["heater_bed"].temperature %} + {% set min_input = 26 %} + {% set max_input = 255 %} + {% set min_output = 26 %} + {% set max_output = 76 %} + + {% if bed_temp >= 70 %} + # If below threshold, limit fan to the lower compressed range (10–30%) + {% if fan_speed < min_input %} + {% set compressed_speed = min_output %} + {% else %} + {% set compressed_speed = (min_output + ((fan_speed - min_input) * (max_output - min_output) / (max_input - min_input)))|int %} + {% endif %} + G106 S{compressed_speed} + {% else %} + # Below threshold, allow full fan speed as requested + G106 S{fan_speed} + {% endif %} + diff --git a/printer_data/config/CUSTOM/stealthburner_leds.cfg b/printer_data/config/CUSTOM/stealthburner_leds.cfg new file mode 100644 index 0000000..e3f187c --- /dev/null +++ b/printer_data/config/CUSTOM/stealthburner_leds.cfg @@ -0,0 +1,254 @@ +# Macros for setting the status leds on the Voron StealthBurner toolhead (or for any neopixel-type leds). +# +# You will need to configure a neopixel (or other addressable led, such as dotstar). See +# https://www.klipper3d.org/Config_Reference.html#neopixel for configuration details. + + +##################################### +# INSTRUCTIONS # +##################################### +# How to use all this stuff: +# +# 1. Copy this .cfg file into your Klipper config directory and then add [include stealthburner_leds.cfg] +# to the top of your printer.cfg in order to register the LEDs and macros with Klipper. +# 2. Define your LEDs by editing [neopixel sb_leds] below and entering the data pin from your control board +# as well as the color order. +# +# Note: RGB and RGBW are different and must be defined explicitly. RGB and RGBW are also not able to +# be mix-and-matched in the same chain. A separate data line would be needed for proper functioning. +# +# RGBW LEDs will have a visible yellow-ish phosphor section to the chip. If your LEDs do not have +# this yellow portion, you have RGB LEDs. +# +# 3. Save your config and restart Klipper. +# +# Note: We set RED and BLUE to 1.0 to make it easier for users and supporters to detect +# misconfigurations or miswiring. The default color format is for Neopixels with a dedicated +# white LED. On startup, all three SB LEDs should light up. +# +# If you get random colors across your LEDs, change the color_order to GRB and restart. Then +# omit the W for each suggested color_order in the next paragraph. +# +# If you get MAGENTA, your color order is correct. If you get CYAN, you need to use RGBW. If +# you get YELLOW, you need to use BRGW (note that BRG is only supported in the latest Klipper +# version). +# +# 4. Once you have confirmed that the LEDs are set up correctly, you must now decide where you want +# these macros called up...which means adding them to your existing gcode macros. NOTHING will happen +# unless you add the STATUS_????? macros to your existing gcode macros. +# +# Example: add STATUS_LEVELING to the beginning of your QGL gcode macro, and then add STATUS_READY +# to the end of it to set the logo LED and nozzle LEDs back to the `ready` state. +# +# Example: add STATUS_CLEANING to the beginning of your nozzle-cleaning macro, and then STATUS_READY +# to the end of it to return the LEDs back to `ready` state. +# +# 5. Feel free to change colors of each macro, create new ones if you have a need to. The macros provided below +# are just an example of what is possible. If you want to try some more complex animations, you will most +# likely have to use WLED with Moonraker and a small micro-controller +# +##################################### +# END INSTRUCTRUCTIONS # +##################################### + + + +[neopixel sb_leds] +pin: EBB:gpio15 +# The pin connected to the neopixel. This parameter must be provided. +chain_count: 3 +# The number of Neopixel chips that are "daisy chained" to the +# provided pin. The default is 1 (which indicates only a single +# Neopixel is connected to the pin). +color_order: GRBW +# Set the pixel order required by the LED hardware. Options are GRB, +# RGB, GRBW, or RGBW. The default is GRB. +initial_RED: 1.0 +initial_GREEN: 0.0 +initial_BLUE: 1.0 +initial_WHITE: 0.0 +# Sets the initial LED color of the Neopixel. Each value should be +# between 0.0 and 1.0. The WHITE option is only available on RGBW +# LEDs. The default for each color is 0.# + +# Most configuration for the macros can be done by modifying the variables in the _sb_vars macro +# at the start of this file. + +########## +# MACROS # +########## + +# The following status macros are available (these go inside of your macros): +# +# STATUS_READY +# STATUS_OFF +# STATUS_BUSY +# STATUS_HEATING +# STATUS_LEVELING +# STATUS_HOMING +# STATUS_CLEANING +# STATUS_MESHING +# STATUS_CALIBRATING_Z +# +# With additional macros for basic control: +# +# SET_NOZZLE_LEDS_ON +# SET_LOGO_LEDS_OFF +# SET_NOZZLE_LEDS_OFF +# +# Contributed by Voron discord users wile.e, Tetsunosuke, and etherwalker + + +[gcode_macro _sb_vars] +# User settings for the StealthBurner status leds. You can change the status colors and led +# configurations for the logo and nozzle here. +variable_colors: { + 'logo': { # Colors for logo states + 'busy': {'r': 0.4, 'g': 0.0, 'b': 0.0, 'w': 0.0}, + 'cleaning': {'r': 0.0, 'g': 0.02, 'b': 0.5, 'w': 0.0}, + 'calibrating_z': {'r': 0.8, 'g': 0., 'b': 0.35, 'w': 0.0}, + 'heating': {'r': 0.3, 'g': 0.18, 'b': 0.0, 'w': 0.0}, + 'homing': {'r': 0.0, 'g': 0.6, 'b': 0.2, 'w': 0.0}, + 'leveling': {'r': 0.5, 'g': 0.1, 'b': 0.4, 'w': 0.0}, + 'meshing': {'r': 0.2, 'g': 1.0, 'b': 0.0, 'w': 0.0}, + 'off': {'r': 0.0, 'g': 0.0, 'b': 0.0, 'w': 0.0}, + 'printing': {'r': 1.0, 'g': 0.0, 'b': 0.0, 'w': 0.0}, + 'standby': {'r': 0.01, 'g': 0.01, 'b': 0.01, 'w': 0.1}, + }, + 'nozzle': { # Colors for nozzle states + 'heating': {'r': 0.8, 'g': 0.35, 'b': 0.0, 'w':0.0}, + 'off': {'r': 0.0, 'g': 0.0, 'b': 0.0, 'w': 0.0}, + 'on': {'r': 0.8, 'g': 0.8, 'b': 0.8, 'w':1.0}, + 'standby': {'r': 0.6, 'g': 0.0, 'b': 0.0, 'w':0.0}, + }, + 'thermal': { + 'hot': {'r': 1.0, 'g': 0.0, 'b': 0.0, 'w': 0.0}, + 'cold': {'r': 0.3, 'g': 0.0, 'b': 0.3, 'w': 0.0} + } + } +variable_logo_led_name: "sb_leds" +# The name of the addressable LED chain that contains the logo LED(s) +variable_logo_idx: "1" +# A comma-separated list of indexes LEDs in the logo +variable_nozzle_led_name: "sb_leds" +# The name of the addressable LED chain that contains the nozzle LED(s). This will +# typically be the same LED chain as the logo. +variable_nozzle_idx: "2,3" +# A comma-separated list of indexes of LEDs in the nozzle +gcode: + # This section is required. Do Not Delete. + +[gcode_macro _set_sb_leds] +gcode: + {% set red = params.RED|default(0)|float %} + {% set green = params.GREEN|default(0)|float %} + {% set blue = params.BLUE|default(0)|float %} + {% set white = params.WHITE|default(0)|float %} + {% set led = params.LED|string %} + {% set idx = (params.IDX|string).split(',') %} + {% set transmit_last = params.TRANSMIT|default(1) %} + + {% for led_index in idx %} + {% set transmit=transmit_last if loop.last else 0 %} + set_led led={led} red={red} green={green} blue={blue} white={white} index={led_index} transmit={transmit} + {% endfor %} + +[gcode_macro _set_sb_leds_by_name] +gcode: + {% set leds_name = params.LEDS %} + {% set color_name = params.COLOR %} + {% set color = printer["gcode_macro _sb_vars"].colors[leds_name][color_name] %} + {% set led = printer["gcode_macro _sb_vars"][leds_name + "_led_name"] %} + {% set idx = printer["gcode_macro _sb_vars"][leds_name + "_idx"] %} + {% set transmit = params.TRANSMIT|default(1) %} + + _set_sb_leds led={led} red={color.r} green={color.g} blue={color.b} white={color.w} idx="{idx}" transmit={transmit} + +[gcode_macro _set_logo_leds] +gcode: + {% set red = params.RED|default(0)|float %} + {% set green = params.GREEN|default(0)|float %} + {% set blue = params.BLUE|default(0)|float %} + {% set white = params.WHITE|default(0)|float %} + {% set led = printer["gcode_macro _sb_vars"].logo_led_name %} + {% set idx = printer["gcode_macro _sb_vars"].logo_idx %} + {% set transmit=params.TRANSMIT|default(1) %} + + _set_sb_leds led={led} red={red} green={green} blue={blue} white={white} idx="{idx}" transmit={transmit} + +[gcode_macro _set_nozzle_leds] +gcode: + {% set red = params.RED|default(0)|float %} + {% set green = params.GREEN|default(0)|float %} + {% set blue = params.BLUE|default(0)|float %} + {% set white = params.WHITE|default(0)|float %} + {% set led = printer["gcode_macro _sb_vars"].nozzle_led_name %} + {% set idx = printer["gcode_macro _sb_vars"].nozzle_idx %} + {% set transmit=params.TRANSMIT|default(1) %} + + _set_sb_leds led={led} red={red} green={green} blue={blue} white={white} idx="{idx}" transmit={transmit} + +[gcode_macro set_logo_leds_off] +gcode: + {% set transmit=params.TRANSMIT|default(1) %} + _set_logo_leds red=0 blue=0 green=0 white=0 transmit={transmit} + +[gcode_macro set_nozzle_leds_on] +gcode: + {% set transmit=params.TRANSMIT|default(1) %} + _set_sb_leds_by_name leds="nozzle" color="on" transmit={transmit} + +[gcode_macro set_nozzle_leds_off] +gcode: + {% set transmit=params.TRANSMIT|default(1) %} + _set_sb_leds_by_name leds="nozzle" color="off" transmit={transmit} + +[gcode_macro status_off] +gcode: + set_logo_leds_off transmit=0 + set_nozzle_leds_off + +[gcode_macro status_ready] +gcode: + _set_sb_leds_by_name leds="logo" color="standby" transmit=0 + _set_sb_leds_by_name leds="nozzle" color="standby" transmit=1 + +[gcode_macro status_busy] +gcode: + _set_sb_leds_by_name leds="logo" color="busy" transmit=0 + set_nozzle_leds_on + +[gcode_macro status_heating] +gcode: + _set_sb_leds_by_name leds="logo" color="heating" transmit=0 + _set_sb_leds_by_name leds="nozzle" color="heating" transmit=1 + +[gcode_macro status_leveling] +gcode: + _set_sb_leds_by_name leds="logo" color="leveling" transmit=0 + set_nozzle_leds_on + +[gcode_macro status_homing] +gcode: + _set_sb_leds_by_name leds="logo" color="homing" transmit=0 + set_nozzle_leds_on + +[gcode_macro status_cleaning] +gcode: + _set_sb_leds_by_name leds="logo" color="cleaning" transmit=0 + set_nozzle_leds_on + +[gcode_macro status_meshing] +gcode: + _set_sb_leds_by_name leds="logo" color="meshing" transmit=0 + set_nozzle_leds_on + +[gcode_macro status_calibrating_z] +gcode: + _set_sb_leds_by_name leds="logo" color="calibrating_z" transmit=0 + set_nozzle_leds_on + +[gcode_macro status_printing] +gcode: + _set_sb_leds_by_name leds="logo" color="printing" transmit=0 + set_nozzle_leds_on \ No newline at end of file diff --git a/printer_data/config/CUSTOM/thermistors.cfg b/printer_data/config/CUSTOM/thermistors.cfg new file mode 100644 index 0000000..69745e4 --- /dev/null +++ b/printer_data/config/CUSTOM/thermistors.cfg @@ -0,0 +1,54 @@ + +[thermistor Trianglelab-NTC100K-B3950] +temperature1: 25 +resistance1: 103180 +temperature2: 150 +resistance2: 1366.2 +temperature3: 250 +resistance3: 168.6 + +[temperature_sensor _chamber_1] +sensor_type: Trianglelab-NTC100K-B3950 +sensor_pin: PF4 +min_temp: 0 +max_temp: 80 +gcode_id: CH1 + +[temperature_sensor _chamber_2] +sensor_type: Trianglelab-NTC100K-B3950 +sensor_pin: PF5 +min_temp: 0 +max_temp: 80 +gcode_id: CH2 + +[temperature_sensor _chamber_3] +sensor_type: Trianglelab-NTC100K-B3950 +sensor_pin: PF6 +min_temp: 0 +max_temp: 80 +gcode_id: CH3 + +[temperature_sensor _chamber_4] +sensor_type: Trianglelab-NTC100K-B3950 +sensor_pin: PF7 +min_temp: 0 +max_temp: 80 +gcode_id: CH4 + +#[temperature_sensor chamber_combined_floor] +#sensor_type: temperature_combined +#sensor_list: temperature_sensor _chamber_1,temperature_sensor _chamber_2,temperature_sensor _chamber_3,temperature_sensor _chamber_4 +#combination_method: min +#maximum_deviation: 999 + +[temperature_sensor chamber_combined_mean] +sensor_type: temperature_combined +sensor_list: temperature_sensor _chamber_1,temperature_sensor _chamber_2,temperature_sensor _chamber_3,temperature_sensor _chamber_4 +combination_method: mean +maximum_deviation: 999 + +#[temperature_sensor chamber_combined_ceiling] +#sensor_type: temperature_combined +#sensor_list: temperature_sensor _chamber_1,temperature_sensor _chamber_2,temperature_sensor _chamber_3,temperature_sensor _chamber_4 +#combination_method: max +#maximum_deviation: 999 \ No newline at end of file diff --git a/printer_data/config/SYSTEM/KAMP_Settings.cfg b/printer_data/config/SYSTEM/KAMP_Settings.cfg new file mode 100644 index 0000000..17a6e7c --- /dev/null +++ b/printer_data/config/SYSTEM/KAMP_Settings.cfg @@ -0,0 +1,36 @@ +# Below you can include specific configuration files depending on what you want KAMP to do: + +#[include ./KAMP/Adaptive_Meshing.cfg] # Include to enable adaptive meshing configuration. +[include ../KAMP/Line_Purge.cfg] # Include to enable adaptive line purging configuration. +#[include ./KAMP/Voron_Purge.cfg] # Include to enable adaptive Voron logo purging configuration. +[include ../KAMP/Smart_Park.cfg] # Include to enable the Smart Park function, which parks the printhead near the print area for final heating. + +[gcode_macro _KAMP_Settings] +description: This macro contains all adjustable settings for KAMP + +# The following variables are settings for KAMP as a whole. +variable_verbose_enable: True # Set to True to enable KAMP information output when running. This is useful for debugging. + +# The following variables are for adjusting adaptive mesh settings for KAMP. +variable_mesh_margin: 0 # Expands the mesh size in millimeters if desired. Leave at 0 to disable. +variable_fuzz_amount: 0 # Slightly randomizes mesh points to spread out wear from nozzle-based probes. Leave at 0 to disable. + +# The following variables are for those with a dockable probe like Klicky, Euclid, etc. # ---------------- Attach Macro | Detach Macro +variable_probe_dock_enable: False # Set to True to enable the usage of a dockable probe. # --------------------------------------------- +variable_attach_macro: 'Attach_Probe' # The macro that is used to attach the probe. # Klicky Probe: 'Attach_Probe' | 'Dock_Probe' +variable_detach_macro: 'Dock_Probe' # The macro that is used to store the probe. # Euclid Probe: 'Deploy_Probe' | 'Stow_Probe' + # Legacy Gcode: 'M401' | 'M402' + +# The following variables are for adjusting adaptive purge settings for KAMP. +variable_purge_height: 0.8 # Z position of nozzle during purge, default is 0.8. +variable_tip_distance: 0 # Distance between tip of filament and nozzle before purge. Should be similar to PRINT_END final retract amount. +variable_purge_margin: 10 # Distance the purge will be in front of the print area, default is 10. +variable_purge_amount: 30 # Amount of filament to be purged prior to printing. +variable_flow_rate: 12 # Flow rate of purge in mm3/s. Default is 12. + +# The following variables are for adjusting the Smart Park feature for KAMP, which will park the printhead near the print area at a specified height. +variable_smart_park_height: 10 # Z position for Smart Park, default is 10. + +gcode: # Gcode section left intentionally blank. Do not disturb. + + {action_respond_info(" Running the KAMP_Settings macro does nothing, it is only used for storing KAMP settings. ")} diff --git a/printer_data/config/crowsnest.conf b/printer_data/config/crowsnest.conf new file mode 100644 index 0000000..78cadd0 --- /dev/null +++ b/printer_data/config/crowsnest.conf @@ -0,0 +1,47 @@ +#### crowsnest.conf +#### This is a typical default config. +#### Also used as default in mainsail / MainsailOS +#### See: +#### https://github.com/mainsail-crew/crowsnest/blob/master/README.md +#### for details to configure to your needs. + + +##################################################################### +#### ##### +#### Information about ports and according URL's ##### +#### ##### +##################################################################### +#### ##### +#### Port 8080 equals /webcam/?action=[stream/snapshot] ##### +#### Port 8081 equals /webcam2/?action=[stream/snapshot] ##### +#### Port 8082 equals /webcam3/?action=[stream/snapshot] ##### +#### Port 8083 equals /webcam4/?action=[stream/snapshot] ##### +#### ##### +#### Note: These ports are default for most Mainsail ##### +#### installations. To use any other port would involve ##### +#### changing the proxy configuration or using directly ##### +#### http://:/?action=[stream/snapshot] ##### +#### ##### +##################################################################### +#### RTSP Stream URL: ( if enabled and supported ) ##### +#### rtsp://:/stream.h264 ##### +##################################################################### + + +[crowsnest] +log_path: /home/pi/printer_data/logs/crowsnest.log +log_level: verbose # Valid Options are quiet/verbose/debug +delete_log: false # Deletes log on every restart, if set to true +no_proxy: false + +[cam 1] +mode: ustreamer # ustreamer - Provides mjpg and snapshots. (All devices) + # camera-streamer - Provides webrtc, mjpg and snapshots. (rpi + Raspi OS based only) +enable_rtsp: false # If camera-streamer is used, this enables also usage of an rtsp server +rtsp_port: 8554 # Set different ports for each device! +port: 8080 # HTTP/MJPG Stream/Snapshot Port +device: /dev/video0 # See Log for available ... +resolution: 1920x1080 # widthxheight format +max_fps: 30 # If Hardware Supports this it will be forced, otherwise ignored/coerced. +#custom_flags: # You can run the Stream Services with custom flags. +#v4l2ctl: # Add v4l2-ctl parameters to setup your camera, see Log what your cam is capable of. \ No newline at end of file diff --git a/printer_data/config/moonraker.conf b/printer_data/config/moonraker.conf new file mode 100644 index 0000000..f8b819e --- /dev/null +++ b/printer_data/config/moonraker.conf @@ -0,0 +1,118 @@ +[server] +host: 0.0.0.0 +port: 7125 +# The maximum size allowed for a file upload (in MiB). Default 1024 MiB +max_upload_size: 1024 +# Path to klippy Unix Domain Socket +klippy_uds_address: ~/printer_data/comms/klippy.sock + +[file_manager] +# post processing for object cancel. Not recommended for low resource SBCs such as a Pi Zero. Default False +enable_object_processing: False + +[authorization] +force_logins: False + +cors_domains: + https://*.backup.equipment + http://*.backup.equipment + http://*.local + http://*.lan +trusted_clients: + 10.0.0.0/8 + 127.0.0.0/8 + 169.254.0.0/16 + 172.16.0.0/12 + 192.168.2.101 + 192.168.2.102 + 192.168.2.103 + 192.168.2.0/24 + FE80::/10 + ::1/128 + +# enables partial support of Octoprint API +[octoprint_compat] + +# enables moonraker to track and store print history. +[history] + +# this enables moonraker announcements for mainsail +[announcements] +subscriptions: + mainsail + +# this enables moonraker's update manager +[update_manager] +refresh_interval: 168 +enable_auto_refresh: True + +[update_manager mainsail] +type: web +channel: stable +repo: mainsail-crew/mainsail +path: ~/mainsail + +[update_manager mainsail-config] +type: git_repo +primary_branch: master +path: ~/mainsail-config +origin: https://github.com/mainsail-crew/mainsail-config.git +managed_services: klipper + +### moonraker-timelapse +### Don't forget to include timelapse.cfg to your printer.cfg +### Uncomment to enable moonraker-timelapse + + +[update_manager timelapse] +type: git_repo +primary_branch: main +path: ~/moonraker-timelapse +origin: https://github.com/mainsail-crew/moonraker-timelapse.git +managed_services: klipper moonraker + +[timelapse] +## Directory where the generated video will be saved +output_path: ~/timelapse/ +## Directory where ffmpeg is installed +ffmpeg_binary_path: /usr/bin/ffmpeg + +# Crowsnest update_manager entry +[update_manager crowsnest] +type: git_repo +path: ~/crowsnest +origin: https://github.com/mainsail-crew/crowsnest.git +managed_services: crowsnest +install_script: tools/pkglist.sh + +# Sonar update_manager entry +[update_manager sonar] +type: git_repo +path: ~/sonar +origin: https://github.com/mainsail-crew/sonar.git +primary_branch: main +managed_services: sonar +install_script: tools/install.sh + +# Sonar update_manager entry +[update_manager eddy-ng] +type: git_repo +path: ~/eddy-ng +origin: https://github.com/vvuk/eddy-ng.git +primary_branch: main +managed_services: eddy-ng +install_script: ./install.sh + +[update_manager Klipper-Adaptive-Meshing-Purging] +type: git_repo +channel: dev +path: ~/Klipper-Adaptive-Meshing-Purging +origin: https://github.com/kyleisah/Klipper-Adaptive-Meshing-Purging.git +managed_services: klipper +primary_branch: main +[update_manager klipper-backup] +type: git_repo +path: ~/klipper-backup +origin: https://github.com/Staubgeborener/klipper-backup.git +managed_services: moonraker +primary_branch: main \ No newline at end of file diff --git a/printer_data/config/printer.cfg b/printer_data/config/printer.cfg new file mode 100644 index 0000000..62a0e6b --- /dev/null +++ b/printer_data/config/printer.cfg @@ -0,0 +1,529 @@ +# This file contains common pin mappings for the BigTreeTech OctoPus V1. +# To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" +# Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference + +# after running "make", copy the generated "klipper/out/klipper.bin" file to a +# file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. + +# See docs/Config_Reference.md for a description of parameters. + +## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 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 [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 + +[include ./SYSTEM/*.cfg] +[include ./BTT/*.cfg] +[include ./CUSTOM/*.cfg] + +[mcu] +## [X in MOTOR0] - B Motor +## [Y in MOTOR1] - A Motor +## [E in MOTOR6] - Extruder +## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify +##-------------------------------------------------------------------- +serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_360026001950534146373920-if00 +restart_method: command +##-------------------------------------------------------------------- + +[printer] +kinematics: corexy +max_velocity: 500 +max_accel: 4200 #Max 4000 +#max_y_accel: 4200 +#max_x_accel: 8000 +#max_accel: 10000 #Testing - revert back to above line after! +#max_accel_to_decel: 10000 #Testing - revert back to above line after! +max_z_velocity: 30 #Max 15 for 12V TMC Drivers, can increase for 24V +max_z_accel: 500 +square_corner_velocity: 5.0 + +[force_move] +enable_force_move: True + +[skew_correction] +[exclude_object] +[firmware_retraction] +[gcode_arcs] +resolution: 0.1 + + +##################################################################### +# X/Y Stepper Settings +##################################################################### + +## X Stepper on MOTOR0(B Motor) +[stepper_x] +step_pin: PF13 +dir_pin: PF12 +enable_pin: !PF14 +rotation_distance: 40 +microsteps: 16 +full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper +endstop_pin: tmc2209_stepper_x:virtual_endstop +position_min: 0 +position_endstop: 352 +position_max: 352 + +##-------------------------------------------------------------------- +homing_speed: 50 #Max 100 +homing_retract_dist: 0 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_x] +uart_pin: PC4 +interpolate: False +run_current: 0.9 +hold_current: 0.7 +sense_resistor: 0.110 +#stealthchop_threshold: 400 +diag_pin: ^PG6 +driver_SGTHRS: 60 #255 Most Sensitive 0 Least Sensitive + +## Y Stepper on MOTOR1 (A Motor) +[stepper_y] +step_pin: PG0 +dir_pin: PG1 +enable_pin: !PF15 +rotation_distance: 40 +microsteps: 16 +full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper +endstop_pin: tmc2209_stepper_y:virtual_endstop +position_min: 0 +position_endstop: 359 +position_max: 359 + +##-------------------------------------------------------------------- +homing_speed: 50 #Max 100 +homing_retract_dist: 0 +homing_positive_dir: true + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_y] +uart_pin: PD11 +interpolate: False +run_current: 0.9 +hold_current: 0.7 +sense_resistor: 0.110 +#stealthchop_threshold: 400 +diag_pin: ^PG9 +driver_SGTHRS: 63 #255 Most Sensitive 0 Least Sensitive + +##################################################################### +# Z Stepper Settings +##################################################################### + +## Z0 Stepper - Front Left on MOTOR2_1 +[stepper_z] +step_pin: PF9 +dir_pin: PF10 +enable_pin: !PG2 +rotation_distance: 40 +gear_ratio: 80:16 +microsteps: 16 +endstop_pin: EBB:gpio6 +## 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: 300 + +##-------------------------------------------------------------------- +position_min: -2 +homing_speed: 15 +second_homing_speed: 1 +homing_retract_dist: 3 + +## Make sure to update below for your relevant driver (2208 or 2209) +[tmc2209 stepper_z] +uart_pin: PF2 +interpolate: true +run_current: 0.8 +hold_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z1 Stepper - Rear Left on MOTOR3 +[stepper_z1] +step_pin: PC13 +dir_pin: !PF0 +enable_pin: !PF1 +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: PE4 +interpolate: true +run_current: 0.8 +hold_current: 0.8 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z2 Stepper - Rear Right on MOTOR4 +[stepper_z2] +step_pin: PE2 +dir_pin: PE3 +enable_pin: !PD4 +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: PE1 +interpolate: true +run_current: 0.8 +hold_current: 0.80 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +## Z3 Stepper - Front Right on MOTOR5 +[stepper_z3] +step_pin: PE6 +dir_pin: !PA14 +enable_pin: !PE0 +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: PD3 +interpolate: true +run_current: 0.8 +hold_current: 0.80 +sense_resistor: 0.110 +stealthchop_threshold: 0 + +##################################################################### +# Bed Heater +##################################################################### + +[heater_bed] +## SSR Pin - BED_OUT +heater_pin: PA1 +sensor_type: Generic 3950 +sensor_pin: PF3 +## Adjust Max Power so your heater doesn't warp your bed +max_power: 1.0 +min_temp: 0 +max_temp: 125 +#control: pid +#pid_kp: 58.437 +#pid_ki: 2.347 +#pid_kd: 363.769 + +##################################################################### +# Fan Control +##################################################################### + +[fan] +## Part Cooling Fan - CPAP 7040 +pin: PG15 +max_power: 1.0 +kick_start_time: 0.05 +hardware_pwm: False +cycle_time: 0.005 +off_below: 0.1 + + +[controller_fan stepper_fan] +## Controller fan - CNC_FAN2 +pin: PD12 +max_power: 0.9 +kick_start_time: 0.5 +fan_speed: 0.7 + +[controller_fan electronic_chamber_fans] +## Controller fan - CNC_FAN2 +pin: PD13 +max_power: 0.8 +kick_start_time: 0.5 +fan_speed: 0.4 + + +[temperature_fan exhaust_fan] +pin: PE5 +shutdown_speed: 0.0 +kick_start_time: 5.0 +cycle_time: 0.05 +hardware_pwm: True +off_below: 0.15 + +sensor_type: temperature_combined +sensor_list: temperature_sensor _chamber_1, temperature_sensor _chamber_2, temperature_sensor _chamber_3, temperature_sensor _chamber_4 +combination_method: mean +maximum_deviation: 999 + +control: pid +pid_Kp: 35.0 +pid_Ki: 12 +pid_Kd: 4.0 +pid_deriv_time: 2.0 + +target_temp: 50.0 +min_temp: 0 +max_temp: 110 +min_speed: 0.149 +max_speed: 1.0 + +gcode_id: C + +#[temperature_fan exhaust_fan] +## Exhaust fan - CNC_FAN3 +#pin: PE5 +#max_power: 1.0 +#shutdown_speed: 0.0 +#kick_start_time: 5.0 +#cycle_time:0.05 +#off_below:0.1 +#sensor_type: temperature_combined +#sensor_list: temperature_sensor _chamber_1,temperature_sensor _chamber_2,temperature_sensor _chamber_3,temperature_sensor _chamber_4 +#combination_method: mean +#maximum_deviation: 999 +#min_temp: 0 +#max_temp: 80 +#target_temp: 35.0 +#max_delta: 0.5 +#max_speed: 1.0 +#min_speed: 0.3 +#control: watermark +#gcode_id: C + +[gcode_macro M141] +gcode: + {% set s = params.S|default(0)|float %} + SET_TEMPERATURE_FAN_TARGET temperature_fan="exhaust_fan" target={s} + +[fan_generic nevermore_fan] +pin: PD15 +max_power: 1.0 +kick_start_time: 1.0 +cycle_time: 0.05 +off_below: 0.13 + +##################################################################### +# LED Control +##################################################################### + +#[output_pin caselight] +# Chamber Lighting - HE1 Connector (Optional) +#pin: PB11 +#pwm:true +#shutdown_value: 0 +#value:1 +#cycle_time: 0.01 + +[output_pin daylight] +pin: PB11 +pwm: True +cycle_time: 0.01 + +##################################################################### +# Homing and Gantry Adjustment Routines +##################################################################### + +[idle_timeout] +timeout: 1800 + +#[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:100 +#z_hop:10 + +[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 + +#-------------------------------------------------------------------- +speed: 200 +horizontal_move_z: 2 +retries: 15 +retry_tolerance: 0.015 +max_adjust: 5 + + +#-------------------------------------------------------------------- + +[neopixel front_logo] + +pin: PB0 +# The pin connected to the neopixel. This parameter must be +# provided. +chain_count: 7 +# The number of Neopixel chips that are "daisy chained" to the +# provided pin. The default is 1 (which indicates only a single +# Neopixel is connected to the pin). +color_order: GRB +# Set the pixel order required by the LED hardware (using a string +# containing the letters R, G, B, W with W optional). Alternatively, +# this may be a comma separated list of pixel orders - one for each +# LED in the chain. The default is GRB. +initial_RED: 1.0 +initial_GREEN: 0.0 +initial_BLUE: 0.0 +initial_WHITE: 0.0 +# See the "led" section for information on these parameters. +#-------------------------------------------------------------------- + + +##################################################################### +# Macros +##################################################################### + + +[gcode_macro G32] +description: Home XYZ mesh calibrate +gcode: + STATUS_HOMING + BED_MESH_CLEAR + G28 + QUAD_GANTRY_LEVEL + G1 X{ printer.toolhead.axis_maximum.x/2 } Y{ printer.toolhead.axis_maximum.y/2 } F4500 + PROBE_EDDY_NG_TAP + STATUS_MESHING + BED_MESH_CALIBRATE METHOD=rapid_scan + G1 X{ printer.toolhead.axis_maximum.x/2 } Y{ printer.toolhead.axis_maximum.y/2 } Z30 F4500 + STATUS_READY + #-------------------------------------------------------------------- + +[gcode_macro FAST_CALIBRATE] +description: Quickly home axis and mesh area to be printed. QGL if needed +gcode: + BED_MESH_CLEAR + _CG28 + {% if printer.quad_gantry_level.applied|lower == 'false' %} + STATUS_LEVELING + QUAD_GANTRY_LEVEL + {% endif %} + G1 X{ printer.toolhead.axis_maximum.x/2 } Y{ printer.toolhead.axis_maximum.y/2 } F4500 + PROBE_EDDY_NG_TAP + STATUS_MESHING + BED_MESH_CALIBRATE ADAPTIVE=1 METHOD=rapid_scan + + +[gcode_macro PRINT_START] +# Use PRINT_START for the slicer starting script - please customise for your slicer of choice +gcode: + CLEAN_NOZZLE + STATUS_PRINTING + LINE_PURGE + +[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 + M106 S0 + G1 Z5 F3000 ; move nozzle up 5mm + G90 ; absolute positioning + BED_MESH_CLEAR + SET_PIN PIN=daylight VALUE=0.0 + +## 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" + +#*# <---------------------- SAVE_CONFIG ----------------------> +#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. +#*# +#*# [extruder] +#*# control = pid +#*# pid_kp = 15.921 +#*# pid_ki = 3.553 +#*# pid_kd = 12.717 +#*# +#*# [heater_bed] +#*# control = pid +#*# pid_kp = 38.431 +#*# pid_ki = 1.601 +#*# pid_kd = 230.586 +#*# +#*# [stepper_z] +#*# position_endstop = -0.65 +#*# +#*# [input_shaper] +#*# shaper_type_x = mzv +#*# shaper_freq_x = 52.2 +#*# shaper_type_y = mzv +#*# shaper_freq_y = 37.8 +#*# +#*# [probe_eddy_ng btt_eddy] +#*# calibrated_drive_currents = 15 +#*# calibration_version = 5 +#*# tap_drive_current = 15 +#*# calibration_15 = gASVoQMAAAAAAAB9lCiMAXaUSwWMBGZ0b2iUjBtudW1weS5wb2x5bm9taWFsLnBvbHlub21pYWyUjApQb2x5bm9taWFslJOUKYGUfZQojARjb2VmlIwVbnVtcHkuY29yZS5tdWx0aWFycmF5lIwMX3JlY29uc3RydWN0lJOUjAVudW1weZSMB25kYXJyYXmUk5RLAIWUQwFilIeUUpQoSwFLCoWUaAyMBWR0eXBllJOUjAJmOJSJiIeUUpQoSwOMATyUTk5OSv////9K/////0sAdJRiiUNQn+aN39hb9z8/OHa46Cf/P8xmbpDGSuY/TArwgQh11z8GZ2TeE7zfP1HKo4hgKtY/9ScY9mKv27/4TtMKrB7ev2RXmVPR79E/rDGV/2Jl0z+UdJRijAZkb21haW6UaAtoDksAhZRoEIeUUpQoSwFLAoWUaBiJQxAu1cudmhGVPlhL1toQO5U+lHSUYowGd2luZG93lGgLaA5LAIWUaBCHlFKUKEsBSwKFlGgYiUMQAAAAAAAA8L8AAAAAAADwP5R0lGJ1YowJZnRvaF9oaWdolGgFKYGUfZQoaAhoC2gOSwCFlGgQh5RSlChLAUsKhZRoGIlDUD5GKGz/rxtADFUy9G1IDEDMtyppwlL6P0TfqqcJq/Y/jcNK+uTT8z9niReUDlH3v3ZSneV5Bui/Ss2awfq8CEDbrCavOHHqPzKSjHWPivO/lHSUYmgdaAtoDksAhZRoEIeUUpQoSwFLAoWUaBiJQxCLCsJSfDmVPsrh2xZLRZU+lHSUYmgkaAtoDksAhZRoEIeUUpQoSwFLAoWUaBiJQxAAAAAAAADwvwAAAAAAAPA/lHSUYnVijARodG9mlGgFKYGUfZQoaAhoC2gOSwCFlGgQh5RSlChLAUsKhZRoGIlDUKU4ImxpL5U+sAOXuiuRET5V9UJTo+IBvgrDO7v20vA9SXCYSQkJ3T2vIUizKLbsvaT2crlGm+694rFcWLkC8z0dessvYkbdPeqYiMqbauG9lHSUYmgdaAtoDksAhZRoEIeUUpQoSwFLAoWUaBiJQxC4M1cmk+BpP2ZATiKo9BNAlHSUYmgkaAtoDksAhZRoEIeUUpQoSwFLAoWUaBiJQxAAAAAAAADwvwAAAAAAAPA/lHSUYnVijAdoX3JhbmdllF2UKEc/aeCTJlczuEdALgAAAAAAAWWMB2ZfcmFuZ2WUXZQoR0FIEhkh0sgAR0FITScAOzgAZYwCZGOUSw91Lg== diff --git a/printer_data/config/sonar.conf b/printer_data/config/sonar.conf new file mode 100644 index 0000000..7ca59c0 --- /dev/null +++ b/printer_data/config/sonar.conf @@ -0,0 +1,17 @@ +#### Sonar - A WiFi Keepalive daemon +#### +#### Written by Stephan Wendel aka KwadFan +#### Copyright 2022 +#### https://github.com/mainsail-crew/sonar +#### +#### This File is distributed under GPLv3 +#### + +[sonar] +enable: false # false to disable till next reboot (will stop again if not set to true) +debug_log: false # if set to true, sonar will log ever ping with triptime and date/time +persistent_log: false # If true logs in /var/log/sonar.log, false logs to systemd +target: auto # IP Address, URL or auto as ping target +count: 3 # How often should be pinged? +interval: 60 # Ping again after X seconds +restart_threshold: 10 # If failed, restart WiFi after X seconds