├── README.md ├── Config ├── Print_end │ └── Print_end.md ├── Print_start │ ├── Print_start.md │ └── bacon_print_start.cfg └── Printer_config │ └── Voron2_Octopus_Beacon.cfg └── Tools └── Thermal_Expansion_Compensation ├── Thermal_expansion_compensation.md └── macro_thermal_expansion_compensation.cfg /README.md: -------------------------------------------------------------------------------- 1 | # BeaconPrinterTools 2 | Repository of useful config setups and tools for Beacon probe users. 3 | 4 | 5 | # Config Setups 6 | 7 | ### Voron Printer Configurations using Beacon 8 | 9 | Voron V2 with BigTreeTech Octopus mainboard: [Printer Config Ref](Config/Printer_config/Voron2_Octopus_Beacon.cfg) 10 | 11 | ### Print Start 12 | A beacon specific Print_start macro : [Print_start](Config/Print_start/Print_start.md) 13 | 14 | ### Print End 15 | A beacon specific Print_end Macro for Beacon : [Print_end](Config/Print_end/Print_end.md) 16 | 17 | # Tools 18 | 19 | ### Thermal Expansion Compensation 20 | A macro to calibrate and automatically compensate for thermal expansion of the hotend : [Thermal Expansion Compensation Macro](Tools/Thermal_Expansion_Compensation/Thermal_expansion_compensation.md) 21 | -------------------------------------------------------------------------------- /Config/Print_end/Print_end.md: -------------------------------------------------------------------------------- 1 | The following generic `print_end` macro is the reccomended starting point. Please review and ensure it is compatible with your configuration. 2 | 3 | ``` 4 | [gcode_macro PRINT_END] 5 | # Use PRINT_END for the slicer ending script - please customise for your slicer of choice 6 | gcode: 7 | # safe anti-stringing move coords 8 | {% set th = printer.toolhead %} 9 | {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} 10 | {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} 11 | {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} 12 | 13 | SAVE_GCODE_STATE NAME=STATE_PRINT_END 14 | 15 | M400 ; wait for buffer to clear 16 | G92 E0 ; zero the extruder 17 | G1 E-5.0 F1800 ; retract filament 18 | 19 | TURN_OFF_HEATERS 20 | 21 | G90 ; absolute positioning 22 | G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing 23 | G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear 24 | M107 ; turn off fan 25 | 26 | BED_MESH_CLEAR 27 | 28 | # The purpose of the SAVE_GCODE_STATE/RESTORE_GCODE_STATE 29 | # command pair is to restore the printer's coordinate system 30 | # and speed settings since the commands above change them. 31 | # However, to prevent any accidental, unintentional toolhead 32 | # moves when restoring the state, explicitly set MOVE=0. 33 | RESTORE_GCODE_STATE NAME=STATE_PRINT_END MOVE=0 34 | ``` 35 | -------------------------------------------------------------------------------- /Config/Print_start/Print_start.md: -------------------------------------------------------------------------------- 1 | # Print Start Macro 2 | This is a full featured print start macro from Beacon 3d probe users. 3 | 4 | # Steps 5 | 1. Copy file or contents into your printer config [Print Start Macro](bacon_print_start.cfg) 6 | 2. Review macro contents and enable any features required 7 | 3. Add in the "Start g-code" for your slicer of choice. 8 | 9 | ## :warning: Required change in your slicer :warning: 10 | You need to update your "Start g-code" in your slicer by adding a few lines of code. This will send data about your print temps and chamber temp to klipper for each print. 11 | 12 | ### SuperSlicer 13 | In Superslicer go to "Printer settings" -> "Custom g-code" -> "Start G-code" and update it to: 14 | 15 | ``` 16 | M104 S0 ; Stops SuperSlicer from sending temp waits separately 17 | M140 S0 18 | print_start EXTRUDER=[first_layer_temperature] BED=[first_layer_bed_temperature] CHAMBER=[chamber_temperature] 19 | ``` 20 | 21 | ### PrusaSlicer 22 | 23 | :warning: PrusaSlicer doesn't give you the option to set a specific chambertemp. Therefor you it will fallback to the standard chambertemp of 40c. 24 | 25 | In PrusaSlicer go to "Printer settings" -> "Custom g-code" -> "Start G-code" and update it to: 26 | 27 | ``` 28 | M104 S0 ; Stops PrusaSlicer from sending temp waits separately 29 | M140 S0 30 | print_start EXTRUDER=[first_layer_temperature[initial_extruder]] BED=[first_layer_bed_temperature] 31 | ``` 32 | 33 | ### Cura 34 | 35 | In Cura go to "Settings" -> "Printer" -> "Manage printers" -> "Machine settings" -> "Start G-code" and update it to: 36 | 37 | ``` 38 | print_start EXTRUDER={material_print_temperature_layer_0} BED={material_bed_temperature_layer_0} CHAMBER={build_volume_temperature} 39 | ``` 40 | 41 | ### OrcaSlicer 42 | In OrcaSlicer go to "Printer settings" -> "Machine start g-code" and update it to: 43 | 44 | ``` 45 | M104 S0 ; Stops OrcaSlicer from sending temp waits separately 46 | M140 S0 47 | print_start EXTRUDER=[first_layer_temperature] BED=[first_layer_bed_temperature] CHAMBER=[chamber_temperature] 48 | ``` 49 | 50 | # Macro Outline 51 | - Conditional G28 home 52 | - Move to bed center 53 | - Clear bed mesh and z offsets (if any) 54 | - Turns on part cooling fans and nevermore if present 55 | - Positions bed for heat soak 56 | - Waits for chamber temperature sensor if configured 57 | - Wipes nozzle 58 | - G28 Z contact + calibrate 59 | - Heat nozzle to contact temp 60 | - Tilt or QGL 61 | - Bed mesh (adaptive or not) 62 | - Wipe Nozzle 63 | - Center of bed move 64 | - Part Cool fan off and heat to print temp 65 | - Set temp expansion compensation 66 | - Apply z_adjust if required 67 | - Purge line if configured 68 | 69 | Shoutouts: 70 | Brazuka on discord for the fast_QGL macro! 71 | Jontek2 for the better print_start macro started with. https://github.com/jontek2/A-better-print_start-macro 72 | -------------------------------------------------------------------------------- /Tools/Thermal_Expansion_Compensation/Thermal_expansion_compensation.md: -------------------------------------------------------------------------------- 1 | # Beacon Thermal Expansion Compensation 2 | This is a macro set that will calibrate and apply a GCODE Z offset to compensate for thermal expansion of the hotend. This is the thermal expansion that occurs as the system heats from standard probe temperatures (~150-180C) to printing temperatures (~220-350C). The macro calibrates an expansion coefficent and then at print time a specific z-offset is calculated using the desired print temperature. 3 | 4 | # Thermal Expansion Calibration Macro Description 5 | 1. Conditionally homes all axis and perform a QGL/Tilt. 6 | 2. 10 poke operations to settle down the printer mechanics. 7 | 3. Heat to 150C, wait for the temperature to stabilize for 60s, and perform a probe operation. 8 | 4. Heat to 250C, wait for the temperature to stabilize for 60s, and perform a probe operation. 9 | 5. Repeat steps 3 and 4 again to ensure the results are repeatable. 10 | 6. The hotend is moved back to a central position and the nozzle expansion data saved to the variables file. 11 | 12 | Depending on how fast the hotend heats and cools down this could take 5-10min to complete both probe cycles. 13 | 14 | A seperate macro called in print start will use the nozzle expansion coefficent and extruder print temperature to calculate and apply the appropriate z_offset automatically at print time. 15 | 16 | # Pre-Reqs 17 | - Beacon sensor updated to latest firmware version and contact features enabled and validated. See [https://docs.beacon3d.com/contact/] 18 | - [save_variables] is configured to allow macros to save variables over power cycles. 19 | ``` 20 | [save_variables] 21 | filename: ~/printer_data/config/variables.txt 22 | ``` 23 | - [respond] is present in the printer config to enable status messages. 24 | - Ooze mitigation if 250C nozzle temp will lead to filament ooze. Best practice would be to perform this without filament to ensure no ooze is present. 25 | - Max nozzle contact temperature set to >250C. The default maximum probe temperature is set to 180C and will cause an error during 250C probing. 26 | ``` 27 | [beacon] 28 | contact_max_hotend_temperature: 275 29 | ``` 30 | 31 | > [!CAUTION] 32 | > Probing at higher temperatures, 250C, can cause damage to some build plates. Ensure that your setup can handle 250C contact probing without damage. Refer to the beacon contant documentation for additional details. 33 | 34 | # Setup Steps 35 | 1. Copy macro block into your config as appropriate for your setup: [macro_thermal_expansion_compensation.cfg](macro_thermal_expansion_compensation.cfg) 36 | 2. Review/adjust the default variables in BEACON section (defaults reccomended) 37 | 3. Add lines to PRINT_START and PRINT_END macros to enable compensation 38 | 4. Restart klipper 39 | 5. Pre-heat chamber for best accuracy 40 | 6. Run BEACON_CALIBRATE_NOZZLE_TEMP_OFFSET to perform the thermal expansion calibration. 41 | 7. Review the variables file to ensure there is a nozzle_expansion_coefficient entry. 42 | ``` 43 | [Variables] 44 | nozzle_expansion_coefficient = 0.04749999999994525 45 | ``` 46 | 8. Run a print and monitor the first layer. 47 | 48 | # Fine Tuning 49 | 50 | If additional tuning is required for the first layer squish the following two methods are avaliable, in order of preference: 51 | 52 | ## Adjust Expansion Multiplier 53 | The macro has a variable beacon_contact_expansion_multiplier that can be adjusted to fine tune squish. A value of 1.1 produces 10% less first layer squish and 0.9 produces 10% more first layer squish. This multiplier has emperically been found to be the best method to fine tune expansion compensation for print quality as it adjusts along with different print temperatures. 54 | ``` 55 | variable_beacon_contact_expansion_multiplier: 1.0 56 | ``` 57 | 58 | ## Gcode Offset 59 | A gcode offset could be added to the PRINT_START macro directly or passed via the slicer. Note that this type of offset is not temperature dependent like the expansion multiplier and may not work well for a variety of print temperatures. 60 | ``` 61 | SET_GCODE_OFFSET Z_ADJUST={OFFSET} 62 | ``` 63 | 64 | # Print Start 65 | Apply this code to the print start macro. It calculates and applies a GCODE offset Z_adjust to the print. Note that this replaces the "SET_GCODE_OFFSET" gcode lines as reccomended in the Beacon Contact Docs. 66 | 67 | > [!Note] 68 | > Nozzle expansion calibration should be stable and only run if a mechanical change is made. BEACON_CALIBRATE_NOZZLE_TEMP_OFFSET should not be called in the PRINT_START macro. 69 | 70 | ``` 71 | # set nozzle thermal expansion offset 72 | {% if printer.configfile.settings.beacon is defined %} 73 | _BEACON_SET_NOZZLE_TEMP_OFFSET 74 | {% endif %} 75 | ``` 76 | 77 | # Print End 78 | This removes the applied offset at the end of the print. 79 | 80 | ``` 81 | # reset nozzle thermal expansion offset 82 | {% if printer.configfile.settings.beacon is defined %} 83 | _BEACON_REMOVE_NOZZLE_TEMP_OFFSET 84 | _BEACON_SET_NOZZLE_TEMP_OFFSET RESET=True 85 | {% endif %} 86 | ``` 87 | 88 | # Additional Configurations 89 | Some printers may require specific settings to ensure that the probing operations are completed with best accuracy. Specifically the probe speed up/down and the probe retract distance. If these parameters are not specified in [beacon] then the probe operation uses the defaults. 90 | 91 | The following list gives the equivalent probe parameter and beacon config names. 92 | 93 | ``` 94 | [PROBE PARAMETER NAME] -> [BEACON CONFIG NAME] 95 | PROBE_SPEED -> autocal_speed 96 | LIFT_SPEED -> autocal_retract_speed 97 | SAMPLE_RETRACT_DIST -> autocal_retract_dist 98 | ``` 99 | 100 | # Credits 101 | 102 | Credit to RatOS team {Helge Keck and Mikkel Schmidt} for developing this macro. You can see their work in Beacon.cfg: https://github.com/Rat-OS/RatOS-configuration/blob/v2.1.x/z-probe/beacon.cfg 103 | Also thanks to Burgo for the porting this macro for generic Klipper machine use and to Michele Fattoruso and Rolf Schäuble for PR's on the previous repo. 104 | 105 | -------------------------------------------------------------------------------- /Tools/Thermal_Expansion_Compensation/macro_thermal_expansion_compensation.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro BEACON_VARS] 2 | variable_beacon_contact_calibration_temp: 150 # nozzle temperature for auto calibration 3 | variable_beacon_contact_expansion_compensation: True # enables the nozzle thermal expansion compensation 4 | variable_beacon_contact_expansion_multiplier: 1.0 # multiplier for the nozzle thermal expansion compensation 5 | # Do not modify below 6 | gcode: 7 | 8 | [delayed_gcode _BEACON_INIT] 9 | initial_duration: 0.1 10 | gcode: 11 | # reset nozzle thermal expansion offset 12 | _BEACON_SET_NOZZLE_TEMP_OFFSET RESET=True 13 | 14 | 15 | [gcode_macro BEACON_CALIBRATE_NOZZLE_TEMP_OFFSET] 16 | variable_reference_z: 0.0 17 | gcode: 18 | {% set z_speed = (printer.configfile.settings['stepper_z'].homing_speed)|float * 60 %} 19 | {% set z_hop = (printer.configfile.settings['beacon'].home_z_hop)|float %} 20 | {% set safe_home_x = (printer.configfile.settings.stepper_x.position_max) /2 %} 21 | {% set safe_home_y = (printer.configfile.settings.stepper_y.position_max) /2 %} 22 | 23 | {% if printer.toolhead.homed_axes != "xyz" %} 24 | G28 25 | {% endif %} 26 | 27 | #QGL if setup 28 | {% if printer.quad_gantry_level is defined and not printer.quad_gantry_level.applied %} 29 | SET_DISPLAY_TEXT MSG="QGL" 30 | {% if printer.configfile.settings["gcode_macro FAST_QGL"] is defined %} 31 | {% if printer.configfile.settings['beacon'].default_probe_method != contact %} 32 | FAST_QGL 33 | {% endif %} 34 | {% else %} 35 | quad_gantry_level 36 | {% endif %} 37 | G28 Z 38 | {% endif %} 39 | 40 | #Z_TILT if setup 41 | {% if printer.z_tilt is defined and not printer.z_tilt.applied %} 42 | SET_DISPLAY_TEXT MSG="Z-Tilt adjust" 43 | {% if printer.configfile.settings["gcode_macro FAST_Z_TILT"] is defined %} 44 | {% if printer.configfile.settings['beacon'].default_probe_method != contact %} 45 | FAST_Z_TILT 46 | {% endif %} 47 | {% else %} 48 | Z_TILT_ADJUST 49 | {% endif %} 50 | G28 Z 51 | {% endif %} 52 | 53 | # settle the mechanics down 54 | {% for i in range(10) %} 55 | beacon_poke speed=3 top=5 bottom=-0.6 56 | {% endfor %} 57 | 58 | # get and set start temperature offset 59 | _BEACON_PROBE_NOZZLE_TEMP_OFFSET TEMP=150 60 | _BEACON_STORE_NOZZLE_TEMP_OFFSET TEMP=150 61 | 62 | # get and set end temperature offset 63 | _BEACON_PROBE_NOZZLE_TEMP_OFFSET TEMP=250 64 | _BEACON_STORE_NOZZLE_TEMP_OFFSET TEMP=250 65 | 66 | # get and set start temperature offset 67 | _BEACON_PROBE_NOZZLE_TEMP_OFFSET TEMP=150 68 | _BEACON_STORE_NOZZLE_TEMP_OFFSET TEMP=150 69 | 70 | # get and set end temperature offset 71 | _BEACON_PROBE_NOZZLE_TEMP_OFFSET TEMP=250 72 | _BEACON_STORE_NOZZLE_TEMP_OFFSET TEMP=250 73 | 74 | # move back to home position 75 | G0 Z{z_hop} F{z_speed} 76 | G0 X{safe_home_x} Y{safe_home_y} 77 | 78 | # turn heater off 79 | SET_HEATER_TEMPERATURE HEATER=extruder TARGET=0 80 | 81 | 82 | # echo results 83 | _BEACON_NOZZLE_TEMP_OFFSET 84 | 85 | [gcode_macro _BEACON_PROBE_NOZZLE_TEMP_OFFSET] 86 | gcode: 87 | # parameters 88 | {% set temp = params.TEMP|int %} 89 | 90 | # config 91 | {% set z_speed = (printer.configfile.settings['stepper_z'].homing_speed)|float * 60 %} 92 | 93 | # ratos variables file 94 | {% set svv = printer.save_variables.variables %} 95 | 96 | 97 | # wait for noozle to reach the probing temperature 98 | RESPOND MSG="Waiting for nozzle to reach {temp}°C..." 99 | SET_HEATER_TEMPERATURE HEATER=extruder TARGET={temp} 100 | TEMPERATURE_WAIT SENSOR=extruder MINIMUM={temp} MAXIMUM={temp + 2} 101 | 102 | # wait for temperature to settle down 103 | RESPOND MSG="Waiting 60s for thermal expansion..." 104 | G4 P60000 105 | 106 | # probe 107 | RESPOND MSG="Probing with nozzle temperature {temp}°C..." 108 | PROBE PROBE_METHOD=contact SAMPLES=5 SAMPLES_TOLERANCE=0.005 SAMPLES_TOLERANCE_RETRIES=10 SAMPLES_RESULT=median 109 | G4 P2000 #wait 2 sec so beacon_query returns non inf value 110 | BEACON_QUERY 111 | 112 | # raise z 113 | G0 Z5 F{z_speed} 114 | 115 | [gcode_macro _BEACON_SET_NOZZLE_TEMP_OFFSET] 116 | gcode: 117 | {% set reset = true if params.RESET|default(false)|lower == 'true' else false %} 118 | 119 | # config 120 | {% set z_speed = (printer.configfile.settings['stepper_z'].homing_speed)|float * 60 %} 121 | 122 | # beacon config 123 | {% set beacon_contact_calibration_temp = params.probing_temp|default(150)|int %} 124 | {% set beacon_contact_expansion_multiplier = printer["gcode_macro BEACON_VARS"].beacon_contact_expansion_multiplier|default(1.0)|float %} 125 | {% set beacon_contact_expansion_compensation = true if printer["gcode_macro BEACON_VARS"].beacon_contact_expansion_compensation|default(false)|lower == 'true' else false %} 126 | 127 | # ratos variables file 128 | {% set svv = printer.save_variables.variables %} 129 | 130 | {% if reset %} 131 | # reset applied offset 132 | SAVE_VARIABLE VARIABLE=nozzle_expansion_applied_offset VALUE=0 133 | 134 | {% else %} 135 | {% if beacon_contact_expansion_compensation %} 136 | 137 | # get coefficient value 138 | {% set nozzle_expansion_coefficient = svv.nozzle_expansion_coefficient|default(0)|float %} 139 | 140 | # get applied offset 141 | {% set applied_offset = svv.nozzle_expansion_applied_offset|default(0)|float %} 142 | 143 | # get extruder target temperature 144 | {% set temp = printer['extruder'].target|float %} 145 | 146 | # calculate new offset 147 | {% set temp_offset = temp - beacon_contact_calibration_temp %} 148 | {% set expansion_coefficient = nozzle_expansion_coefficient %} 149 | {% set expansion_offset = beacon_contact_expansion_multiplier * (temp_offset * (expansion_coefficient / 100)) %} 150 | 151 | # set new offset 152 | {% set new_offset = ((-applied_offset) + expansion_offset) %} 153 | SET_GCODE_OFFSET Z_ADJUST={new_offset} MOVE=1 SPEED={z_speed} 154 | SAVE_VARIABLE VARIABLE=nozzle_expansion_applied_offset VALUE={expansion_offset} 155 | 156 | # echo 157 | RESPOND MSG={'"Nozzle expansion offset of %.6fmm applied"' % (expansion_offset)} 158 | 159 | {% endif %} 160 | {% endif %} 161 | 162 | [gcode_macro _BEACON_REMOVE_NOZZLE_TEMP_OFFSET] 163 | gcode: 164 | # config 165 | {% set z_speed = (printer.configfile.settings['stepper_z'].homing_speed)|float * 60 %} 166 | 167 | # beacon config 168 | {% set beacon_contact_expansion_compensation = true if printer["gcode_macro BEACON_VARS"].beacon_contact_expansion_compensation|default(false)|lower == 'true' else false %} 169 | 170 | {% if beacon_contact_expansion_compensation %} 171 | 172 | # ratos variables file 173 | {% set svv = printer.save_variables.variables %} 174 | 175 | # get applied offset 176 | {% set applied_offset = svv.nozzle_expansion_applied_offset|default(0)|float %} 177 | 178 | # remove applied offset 179 | SET_GCODE_OFFSET Z_ADJUST={(-applied_offset)} MOVE=0 SPEED={z_speed} 180 | 181 | {% endif %} 182 | 183 | [gcode_macro _BEACON_STORE_NOZZLE_TEMP_OFFSET] 184 | gcode: 185 | # parameters 186 | {% set temp = params.TEMP|int %} 187 | 188 | #variable file 189 | {% set svv = printer.save_variables.variables %} 190 | 191 | # get last probe result 192 | {% set last_z = printer.beacon.last_z_result|default(0)|float %} 193 | 194 | # set temperature offset 195 | {% if temp == 150 %} 196 | SET_GCODE_VARIABLE MACRO=BEACON_CALIBRATE_NOZZLE_TEMP_OFFSET VARIABLE=reference_z VALUE={last_z} 197 | {% else %} 198 | {% set reference_z = printer["gcode_macro BEACON_CALIBRATE_NOZZLE_TEMP_OFFSET"].reference_z|default(0)|float %} 199 | SAVE_VARIABLE VARIABLE=nozzle_expansion_coefficient VALUE={(last_z - reference_z)} 200 | {% endif %} 201 | 202 | [gcode_macro _BEACON_NOZZLE_TEMP_OFFSET] 203 | gcode: 204 | {% set svv = printer.save_variables.variables %} 205 | RESPOND MSG={'"expansion coefficient %.6f"' % svv.nozzle_expansion_coefficient} 206 | 207 | [gcode_macro BEACON_APPLY_MULTIPLIER] 208 | gcode: 209 | 210 | # beacon config 211 | {% set beacon_contact_calibration_temp = printer["gcode_macro BEACON_VARS"].beacon_contact_calibration_temp|default(150)|int %} 212 | {% set beacon_contact_expansion_compensation = true if printer["gcode_macro BEACON_VARS"].beacon_contact_expansion_compensation|default(false) %} 213 | 214 | {% if beacon_contact_expansion_compensation %} 215 | # variables file 216 | {% set svv = printer.save_variables.variables %} 217 | 218 | # get coefficient 219 | {% set nozzle_expansion_coefficient = svv.nozzle_expansion_coefficient|default(0)|float %} 220 | 221 | # get coefficient multiplier 222 | {% set beacon_contact_expansion_multiplier = svv.nozzle_expansion_coefficient_multiplier|default(1.0)|float %} 223 | 224 | # calculate new multiplier 225 | {% set print_temp = printer['extruder'].target|float %} 226 | {% set z_offset = printer.gcode_move.homing_origin.z|float %} 227 | {% set temp_delta = print_temp - beacon_contact_calibration_temp %} 228 | {% set coefficient_per_degree = nozzle_expansion_coefficient / 100 %} 229 | {% set z_offset_per_degree = z_offset / temp_delta %} 230 | {% set new_multiplier = z_offset_per_degree / coefficient_per_degree %} 231 | 232 | # store new multiplier 233 | SAVE_VARIABLE VARIABLE=nozzle_expansion_coefficient_multiplier VALUE={new_multiplier} 234 | 235 | # console echo 236 | RESPOND MSG={'"New multiplier is: %.6f_N_Value has been automatically saved and activated."' % new_multiplier} 237 | 238 | {% endif %} 239 | -------------------------------------------------------------------------------- /Config/Print_start/bacon_print_start.cfg: -------------------------------------------------------------------------------- 1 | [gcode_macro BEACON_VARS] 2 | variable_beacon_contact_calibration_temp: 150 # nozzle temperature for auto calibration 3 | variable_adaptive_mesh: False # REQUIRES zero_reference_position to be setup in [bed_mesh] 4 | # Do not modify below 5 | gcode: 6 | 7 | [gcode_macro FAST_QGL] 8 | gcode: 9 | M117 QUAD_GANTRY_LEVEL 10 | {% if printer.configfile.settings.quad_gantry_level %} 11 | {% if printer.quad_gantry_level.applied == False %} 12 | QUAD_GANTRY_LEVEL RETRY_TOLERANCE=1 13 | {% endif %} 14 | QUAD_GANTRY_LEVEL horizontal_move_z=2 15 | {% endif %} 16 | 17 | [gcode_macro FAST_Z_TILT] 18 | gcode: 19 | M117 Z_TILT 20 | {% if printer.configfile.settings.z_tilt %} 21 | {% if printer.z_tilt.applied == False %} 22 | Z_TILT_ADJUST RETRY_TOLERANCE=1 23 | {% endif %} 24 | Z_TILT_ADJUST horizontal_move_z=2 25 | {% endif %} 26 | 27 | ##################################################################### 28 | # print_start macro 29 | ##################################################################### 30 | 31 | [gcode_macro PRINT_START] 32 | gcode: 33 | # This part fetches data from your slicer. Such as bed temp, extruder temp, chamber temp and size of your printer. 34 | {% set target_bed = params.BED|int %} 35 | {% set target_extruder = params.EXTRUDER|int %} 36 | {% set target_chamber = params.CHAMBER|default("40")|int %} 37 | 38 | # Collecting variables 39 | {% set x_wait = printer.toolhead.axis_maximum.x|float / 2 %} 40 | {% set y_wait = printer.toolhead.axis_maximum.y|float / 2 %} 41 | {% if printer.configfile.settings['beacon'].home_z_hop is defined %} 42 | {% set z_hop = printer.configfile.settings['beacon'].home_z_hop|float %} 43 | {% set speed = printer.configfile.settings['beacon'].home_xy_move_speed|float %} 44 | {% set z_hop_speed = printer.configfile.settings['beacon'].home_z_hop_speed|float %} 45 | {% else %} 46 | {% set z_hop = printer.configfile.settings['safe_z_home'].home_z_hop|float %} 47 | {% set speed = printer.configfile.settings['safe_z_home'].home_xy_move_speed|float %} 48 | {% set z_hop_speed = printer.configfile.settings['safe_z_home'].home_z_hop_speed|float %} 49 | {% endif %} 50 | {% set beacon_contact_calibration_temp = printer["gcode_macro BEACON_VARS"].beacon_contact_calibration_temp|default(150)|int %} 51 | {% set adaptive_meshing = printer["gcode_macro BEACON_VARS"].adaptive_mesh|default(false) %} 52 | 53 | SET_DISPLAY_TEXT MSG="Hotend: {beacon_contact_calibration_temp}c" # Displays info 54 | M109 S{beacon_contact_calibration_temp} # Heats up the nozzle to contact temps 55 | 56 | {% if printer.toolhead.homed_axes != "xy" %} 57 | G28 XY # Partial home (XY) 58 | {% else %} 59 | G1 Z{z_hop} F{z_hop_speed} # Moves to z_hop height 60 | G1 X{x_wait} Y{y_wait} F{speed} # Goes to center of the bed 61 | {% endif %} 62 | G90 # Absolute positioning 63 | 64 | BED_MESH_CLEAR # Clears old saved bed mesh (if any) 65 | SET_GCODE_OFFSET Z=0 # Clears current offset 66 | 67 | # Checks if the bed temp is higher than 90c - if so then trigger a heatsoak. 68 | {% if params.BED|int > 90 %} 69 | M106 S255 # Turns on the Part cooling fans 70 | 71 | {% if printer.configfile.settings["output_pin nevermore"] is defined %} 72 | SET_PIN PIN=nevermore VALUE=1 # Turns on nevermore if setup 73 | {% endif %} 74 | 75 | SET_DISPLAY_TEXT MSG="Bed: {target_bed}c" # Displays info 76 | M190 S{target_bed} # Sets the target temp for the bed 77 | 78 | {% if printer.configfile.config["temperature_sensor chamber"] is defined %} 79 | SET_DISPLAY_TEXT MSG="Heatsoak: {target_chamber}c" # Displays info 80 | TEMPERATURE_WAIT SENSOR="temperature_sensor chamber" MINIMUM={target_chamber} # Waits for chamber to reach desired temp 81 | {% endif %} 82 | 83 | # If the bed temp is not over 90c, then it skips the heatsoak and just heats up to set temp with a 5min soak 84 | {% else %} 85 | SET_DISPLAY_TEXT MSG="Bed: {target_bed}c" # Displays info 86 | M190 S{target_bed} # Sets the target temp for the bed 87 | 88 | SET_DISPLAY_TEXT MSG="Soak for 5min" # Displays info 89 | G4 P300000 # Waits 5 min for the bedtemp to stabilize 90 | {% endif %} 91 | 92 | 93 | # Heating nozzle to 150 degrees. This helps with getting a correct Z-home 94 | SET_DISPLAY_TEXT MSG="Hotend: {beacon_contact_calibration_temp}c" # Displays info 95 | M109 S{beacon_contact_calibration_temp} # Heats up the nozzle to contact temps 96 | 97 | {% if printer.configfile.config["gcode_macro WIPE_NOZZLE"] is defined %} 98 | WIPE_NOZZLE # Wipes the nozzle via macro if setup 99 | {% endif %} 100 | 101 | SET_DISPLAY_TEXT MSG="Hotend: {beacon_contact_calibration_temp}c" # Displays info 102 | M109 S{beacon_contact_calibration_temp} # Heats up the nozzle to contact temps 103 | 104 | # If you don't change build plates then you may remove this by commenting it out 105 | G28 Z METHOD=CONTACT CALIBRATE=1 # Calibrate z offset and beacon model hot 106 | 107 | {% if printer.z_tilt is defined and not printer.z_tilt.applied %} 108 | SET_DISPLAY_TEXT MSG="Z-tilt adjust" # Displays info 109 | {% if printer.configfile.config["gcode_macro FAST_Z_TILT"] is defined %} 110 | {% if printer.configfile.settings['beacon'].default_probe_method != contact %} 111 | FAST_Z_TILT # Levels the buildplate via Z_TILT but FASTER 112 | {% endif %} 113 | {% else %} 114 | Z_TILT_ADJUST # Levels the buildplate via Z_TILT 115 | {% endif %} 116 | G28 Z # Homes Z again after z_tilt_adjust 117 | {% endif %} 118 | 119 | {% if printer.quad_gantry_level is defined and not printer.quad_gantry_level.applied %} 120 | SET_DISPLAY_TEXT MSG="QGL" # Displays info 121 | {% if printer.configfile.config["gcode_macro FAST_QGL"] is defined %} 122 | {% if printer.configfile.settings['beacon'].default_probe_method != contact %} 123 | FAST_QGL # Levels the buildplate via QGL but FASTER 124 | {% endif %} 125 | {% else %} 126 | quad_gantry_level # Levels the buildplate via QGL 127 | {% endif %} 128 | G28 Z # Homes Z again after QGL 129 | {% endif %} 130 | 131 | ## comment if you want to load a previous mesh 132 | SET_DISPLAY_TEXT MSG="Bed mesh" # Displays info 133 | {% if adaptive_meshing %} 134 | bed_mesh_calibrate ADAPTIVE=1 # Runs an adaptive bed mesh 135 | {% else %} 136 | bed_mesh_calibrate # Runs a bed mesh 137 | {% endif %} 138 | 139 | {% if printer.configfile.config["gcode_macro WIPE_NOZZLE"] is defined %} 140 | WIPE_NOZZLE # Wipes the nozzle via macro if setup 141 | {% endif %} 142 | 143 | SET_DISPLAY_TEXT MSG="Hotend: {beacon_contact_calibration_temp}c" # Displays info 144 | M109 S{beacon_contact_calibration_temp} # Heats up the nozzle to contact temps 145 | 146 | G28 Z METHOD=CONTACT CALIBRATE=0 # Calibrate z offset only after tilt/mesh 147 | 148 | 149 | # Heats up the nozzle up to target via data from slicer 150 | SET_DISPLAY_TEXT MSG="Hotend: {target_extruder}c" # Displays info 151 | {% if printer.configfile.config["gcode_macro SMART_PARK"] is defined %} 152 | SMART_PARK # Parks using KAMP 153 | {% else %} 154 | G1 Z{z_hop} F{z_hop_speed} # Moves to z_hop height 155 | G1 X{x_wait} Y{y_wait} F{speed} # Goes to center of the bed 156 | {% endif %} 157 | 158 | M107 # Turns off partcooling fan 159 | M109 S{target_extruder} # Heats the nozzle to printing temp 160 | 161 | {% if printer.configfile.config["gcode_macro _BEACON_SET_NOZZLE_TEMP_OFFSET"] is defined %} 162 | _BEACON_SET_NOZZLE_TEMP_OFFSET # Adds toolhead expansion offset (REQUIRES ADDITIONAL MACROS NOT BY DEFAULT Found at:https://github.com/YanceyA/Beacon_Thermal_Expansion_Compensation ) 163 | {% endif %} 164 | 165 | SET_GCODE_OFFSET Z_ADJUST=0 # Apply any additional offset u wish to apply 166 | 167 | # Gets ready to print by doing a purge line 168 | SET_DISPLAY_TEXT MSG="Printer goes brr" # Displays info 169 | {% if printer.configfile.config["gcode_macro PURGE_NOZZLE"] is defined %} 170 | PURGE_NOZZLE # Purges the nozzle via macro if setup 171 | {% elif printer.configfile.config["gcode_macro LINE_PURGE"] is defined %} 172 | LINE_PURGE # Purges the nozzle using KAMP adaptive purging if setup 173 | {% elif printer.configfile.config["gcode_macro VORON_PURGE"] is defined %} 174 | VORON_PURGE # Purges the nozzle using KAMP adaptive purging if setup 175 | {% endif %} 176 | 177 | G90 # Absolute positioning 178 | -------------------------------------------------------------------------------- /Config/Printer_config/Voron2_Octopus_Beacon.cfg: -------------------------------------------------------------------------------- 1 | # This file contains common pin mappings for the BigTreeTech Octopus V1. 2 | # To use this config, the firmware should be compiled for the STM32F446 with a "32KiB bootloader" 3 | # Enable "extra low-level configuration options" and select the "12MHz crystal" as clock reference 4 | 5 | # after running "make", copy the generated "klipper/out/klipper.bin" file to a 6 | # file named "firmware.bin" on an SD card and then restart the OctoPus with that SD card. 7 | 8 | # See docs/Config_Reference.md for a description of parameters. 9 | 10 | ## Voron Design VORON2 250/300/350mm BigTreeTech OctoPus V1 TMC2209 UART config 11 | 12 | ## This config is has been updated to work with the Beacon 3D Surface Scanner and will not 13 | ## work with with the voron stock inductive probe. 14 | 15 | ## *** THINGS TO CHANGE/CHECK: *** 16 | ## MCU paths [mcu] section 17 | ## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types 18 | ## Hotend heater pin [extruder] section 19 | ## Homing end position [gcode_macro G32] section 20 | ## Beacon MCU path [beacon] section 21 | ## Beacon Y offset [beacon] section 22 | ## Z Home Position X,Y [beacon] section 23 | ## Enable Resonance Tester [resonance_tester] if Beacon RevH installed 24 | ## Zero Reference Position [bed_mesh] section 25 | ## Probe points [quad_gantry_level] section 26 | ## Min & Max gantry corner postions [quad_gantry_level] section 27 | ## PID tune [extruder] and [heater_bed] sections 28 | ## Fine tune E steps [extruder] section 29 | ## Setup Print_Start macro [print_start] macro 30 | ## Slicer configuration Located in the slicer of choice - See https://github.com/YanceyA/BeaconPrinterTools/blob/main/Config/Print_start/Print_start.md 31 | 32 | [mcu] 33 | ## Obtain definition by "ls /dev/serial/by-id/*" then unplug to verify 34 | ##-------------------------------------------------------------------- 35 | serial: /dev/serial/by-id/{REPLACE WITH YOUR SERIAL} 36 | restart_method: command 37 | ##-------------------------------------------------------------------- 38 | 39 | [printer] 40 | kinematics: corexy 41 | max_velocity: 300 42 | max_accel: 3000 #Max 4000 43 | max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V 44 | max_z_accel: 350 45 | square_corner_velocity: 5.0 46 | 47 | ##################################################################### 48 | # X/Y Stepper Settings 49 | ##################################################################### 50 | 51 | ## B Stepper - Left 52 | ## Connected to MOTOR_0 53 | ## Endstop connected to DIAG_0 54 | [stepper_x] 55 | step_pin: PF13 56 | dir_pin: !PF12 57 | enable_pin: !PF14 58 | rotation_distance: 40 59 | microsteps: 32 60 | full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper 61 | endstop_pin: PG6 62 | position_min: 0 63 | ##-------------------------------------------------------------------- 64 | 65 | ## Uncomment below for 250mm build 66 | #position_endstop: 250 67 | #position_max: 250 68 | 69 | ## Uncomment for 300mm build 70 | #position_endstop: 300 71 | #position_max: 300 72 | 73 | ## Uncomment for 350mm build 74 | #position_endstop: 350 75 | #position_max: 350 76 | 77 | ##-------------------------------------------------------------------- 78 | homing_speed: 25 #Max 100 79 | homing_retract_dist: 5 80 | homing_positive_dir: true 81 | 82 | ## Make sure to update below for your relevant driver (2208 or 2209) 83 | [tmc2209 stepper_x] 84 | uart_pin: PC4 85 | interpolate: false 86 | run_current: 0.8 87 | sense_resistor: 0.110 88 | stealthchop_threshold: 0 89 | 90 | ## A Stepper - Right 91 | ## Connected to MOTOR_1 92 | ## Endstop connected to DIAG_1 93 | [stepper_y] 94 | step_pin: PG0 95 | dir_pin: !PG1 96 | enable_pin: !PF15 97 | rotation_distance: 40 98 | microsteps: 32 99 | full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper 100 | endstop_pin: PG9 101 | position_min: 0 102 | ##-------------------------------------------------------------------- 103 | 104 | ## Uncomment for 250mm build 105 | #position_endstop: 250 106 | #position_max: 250 107 | 108 | ## Uncomment for 300mm build 109 | #position_endstop: 300 110 | #position_max: 300 111 | 112 | ## Uncomment for 350mm build 113 | #position_endstop: 350 114 | #position_max: 350 115 | 116 | ##-------------------------------------------------------------------- 117 | homing_speed: 25 #Max 100 118 | homing_retract_dist: 5 119 | homing_positive_dir: true 120 | 121 | ## Make sure to update below for your relevant driver (2208 or 2209) 122 | [tmc2209 stepper_y] 123 | uart_pin: PD11 124 | interpolate: false 125 | run_current: 0.8 126 | sense_resistor: 0.110 127 | stealthchop_threshold: 0 128 | 129 | ##################################################################### 130 | # Z Stepper Settings 131 | ##################################################################### 132 | 133 | ## Z0 Stepper - Front Left 134 | ## Connected to MOTOR_2 135 | ## Endstop connected to DIAG_2 136 | [stepper_z] 137 | step_pin: PF11 138 | dir_pin: !PG3 139 | enable_pin: !PG5 140 | rotation_distance: 40 141 | gear_ratio: 80:16 142 | microsteps: 32 143 | ##-------------------------------------------------------------------- 144 | 145 | ## Uncomment below for 250mm build 146 | #position_max: 210 147 | 148 | ## Uncomment below for 300mm build 149 | #position_max: 260 150 | 151 | ## Uncomment below for 350mm build 152 | #position_max: 310 153 | 154 | ##-------------------------------------------------------------------- 155 | position_min: -5 156 | 157 | endstop_pin: probe:z_virtual_endstop 158 | # Configure z homing to use beacon as a virtual endstop 159 | homing_retract_dist: 0 160 | # Beacon does not require a homing retract. Setting this to something 161 | # other than 0 will cause occasional erroneous results. 162 | 163 | ## Make sure to update below for your relevant driver (2208 or 2209) 164 | [tmc2209 stepper_z] 165 | uart_pin: PC6 166 | interpolate: false 167 | run_current: 0.8 168 | sense_resistor: 0.110 169 | stealthchop_threshold: 0 170 | 171 | ## Z1 Stepper - Rear Left 172 | ## Connected to MOTOR_3 173 | [stepper_z1] 174 | step_pin: PG4 175 | dir_pin: PC1 176 | ## Octopus 1.0 & 1.1. Octopus PRO 1.0 177 | #enable_pin: !PA0 178 | ## Octopus PRO 1.1 179 | #enable_pin: !PA2 180 | rotation_distance: 40 181 | gear_ratio: 80:16 182 | microsteps: 32 183 | 184 | ## Make sure to update below for your relevant driver (2208 or 2209) 185 | [tmc2209 stepper_z1] 186 | uart_pin: PC7 187 | interpolate: false 188 | run_current: 0.8 189 | sense_resistor: 0.110 190 | stealthchop_threshold: 0 191 | 192 | ## Z2 Stepper - Rear Right 193 | ## Connected to MOTOR_4 194 | [stepper_z2] 195 | step_pin: PF9 196 | dir_pin: !PF10 197 | enable_pin: !PG2 198 | rotation_distance: 40 199 | gear_ratio: 80:16 200 | microsteps: 32 201 | 202 | ## Make sure to update below for your relevant driver (2208 or 2209) 203 | [tmc2209 stepper_z2] 204 | uart_pin: PF2 205 | interpolate: false 206 | run_current: 0.8 207 | sense_resistor: 0.110 208 | stealthchop_threshold: 0 209 | 210 | ## Z3 Stepper - Front Right 211 | ## Connected to MOTOR_5 212 | [stepper_z3] 213 | step_pin: PC13 214 | dir_pin: PF0 215 | enable_pin: !PF1 216 | rotation_distance: 40 217 | gear_ratio: 80:16 218 | microsteps: 32 219 | 220 | ## Make sure to update below for your relevant driver (2208 or 2209) 221 | [tmc2209 stepper_z3] 222 | uart_pin: PE4 223 | interpolate: false 224 | run_current: 0.8 225 | sense_resistor: 0.110 226 | stealthchop_threshold: 0 227 | 228 | 229 | ##################################################################### 230 | # Extruder 231 | ##################################################################### 232 | 233 | ## Connected to MOTOR_6 234 | ## Heater - HE0 235 | ## Thermistor - T0 236 | [extruder] 237 | step_pin: PE2 238 | dir_pin: PE3 239 | enable_pin: !PD4 240 | ## Update value below when you perform extruder calibration 241 | ## If you ask for 100mm of filament, but in reality it is 98mm: 242 | ## rotation_distance = * / 100 243 | ## 22.6789511 is a good starting point 244 | rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears 245 | ## Update Gear Ratio depending on your Extruder Type 246 | ## Use 50:10 for Stealthburner/Clockwork 2 247 | ## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio) 248 | ## Use 80:20 for M4, M3.1 249 | gear_ratio: 50:10 250 | microsteps: 32 251 | full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree 252 | nozzle_diameter: 0.400 253 | filament_diameter: 1.75 254 | ## Octopus 1.0 & 1.1. Octopus PRO 1.0 255 | #heater_pin: PA2 256 | ## Octopus PRO 1.1 257 | #heater_pin: PA0 258 | ## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. 259 | ## Use "Generic 3950" for NTC 100k 3950 thermistors 260 | #sensor_type: 261 | sensor_pin: PF4 262 | min_temp: 10 263 | max_temp: 270 264 | max_power: 1.0 265 | min_extrude_temp: 170 266 | control = pid 267 | pid_kp = 26.213 268 | pid_ki = 1.304 269 | pid_kd = 131.721 270 | ## Try to keep pressure_advance below 1.0 271 | #pressure_advance: 0.05 272 | ## Default is 0.040, leave stock 273 | #pressure_advance_smooth_time: 0.040 274 | 275 | ## E0 on MOTOR6 276 | ## Make sure to update below for your relevant driver (2208 or 2209) 277 | [tmc2209 extruder] 278 | uart_pin: PE1 279 | interpolate: false 280 | run_current: 0.5 281 | sense_resistor: 0.110 282 | stealthchop_threshold: 0 283 | 284 | 285 | ##################################################################### 286 | # Bed Heater 287 | ##################################################################### 288 | 289 | ## SSR Pin - HE1 290 | ## Thermistor - TB 291 | [heater_bed] 292 | ## Uncomment the following line if using the default SSR wiring from the docs site 293 | #heater_pin: PA3 294 | ## Other wiring guides may use BED_OUT to control the SSR. Uncomment the following line for those cases 295 | #heater_pin: PA1 296 | ## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types. 297 | ## Use "Generic 3950" for Keenovo heaters 298 | #sensor_type: 299 | sensor_pin: PF3 300 | ## Adjust max_power so it doesn't exceed the SSR rating. The Omron G3NA-210B-DC5 SSR is rated at 4 amps without a heatsink. 301 | ## The formula is "4 / (Wattage_of_bed_heater / Mains_voltage) = max_power" 302 | ## If max_power is greater than 1.0, use 1.0 303 | max_power: 0.6 304 | min_temp: 0 305 | max_temp: 120 306 | control: pid 307 | pid_kp: 58.437 308 | pid_ki: 2.347 309 | pid_kd: 363.769 310 | 311 | ##################################################################### 312 | # Z Probe - Beacon 313 | ##################################################################### 314 | 315 | [beacon] 316 | serial: /dev/serial/by-id/usb-Beacon_Beacon_RevD_<..addyourserial..>-if00 317 | ## Path to the serial port for the beacon device. 318 | x_offset: 0 319 | ## X offset for Stealthburner style toolhead is 0 320 | y_offset: 321 | ## Update with offset from nozzle center to beacon coil center. 322 | ## This will be positive if beacon is behind the nozzle. 323 | mesh_main_direction: x 324 | mesh_runs: 2 325 | 326 | default_probe_method: proximity 327 | ## Sets the default probing method for mesh, tilt, qgl, probe, etc. 328 | home_method: contact 329 | ## Use contact for homing if the printer is unhomed 330 | home_method_when_homed: proximity 331 | ## After initial calibration use induction homing 332 | home_autocalibrate: unhomed 333 | ## Calibrate beacon on first home 334 | 335 | contact_max_hotend_temperature: 180 336 | ## Temperature limit for the hotend when contacting, override this for temps which may damage some surfaces. 337 | 338 | ##-------------------------------------------------------------------- 339 | 340 | ## Uncomment below for 250mm build 341 | #home_xy_position: 125, 125 342 | 343 | ## Uncomment for 300mm build 344 | #home_xy_position: 150, 150 345 | 346 | ## Uncomment for 350mm build 347 | #home_xy_position: 175, 175 348 | 349 | ##-------------------------------------------------------------------- 350 | 351 | home_z_hop: 5 352 | home_z_hop_speed: 30 353 | home_xy_move_speed: 300 354 | 355 | 356 | ##################################################################### 357 | # Accelerometer - RevH Beacon 358 | ##################################################################### 359 | 360 | ## Uncomment if RevH Beacon is installed 361 | 362 | #[resonance_tester] 363 | #accel_chip: beacon 364 | ## Selects beacon as the accelerometer used for resonance testing. This value 365 | ## can be used to switch between multiple accelerometers in your system. 366 | 367 | ##-------------------------------------------------------------------- 368 | 369 | ## Uncomment below for 250mm build 370 | #probe_points: 125, 125, 20 371 | 372 | ## Uncomment for 300mm build 373 | #probe_points: 150, 150, 20 374 | 375 | ## Uncomment for 350mm build 376 | #probe_points: 175, 175, 20 377 | 378 | ## Default X,Y,Z position for resonance testing. 379 | ##-------------------------------------------------------------------- 380 | 381 | 382 | ##################################################################### 383 | # Bed Mesh - Beacon 384 | ##################################################################### 385 | 386 | [bed_mesh] 387 | speed: 100 388 | ## Movement speed during mesh measurement. 389 | 390 | ##-------------------------------------------------------------------- 391 | 392 | ## Uncomment below for 250mm build 393 | #zero_reference_position: 125, 125 394 | 395 | ## Uncomment for 300mm build 396 | #zero_reference_position: 150, 150 397 | 398 | ## Uncomment for 350mm build 399 | #zero_reference_position: 175, 175 400 | 401 | ## Setting this parameter will normalize mesh adjustments to the offset found 402 | ## at the specified position. This should be the same as your 403 | ## home_xy_position position and the position where beacon_calibrate was performed. 404 | ##-------------------------------------------------------------------- 405 | 406 | 407 | 408 | ##################################################################### 409 | # Fan Control 410 | ##################################################################### 411 | 412 | ## Print Cooling Fan - FAN0 413 | [fan] 414 | pin: PA8 415 | kick_start_time: 0.5 416 | ## Depending on your fan, you may need to increase this value 417 | ## if your fan will not start. Can change cycle_time (increase) 418 | ## if your fan is not able to slow down effectively 419 | off_below: 0.10 420 | 421 | 422 | ## Hotend Fan - FAN1 423 | [heater_fan hotend_fan] 424 | pin: PE5 425 | max_power: 1.0 426 | kick_start_time: 0.5 427 | heater: extruder 428 | heater_temp: 50.0 429 | ## If you are experiencing back flow, you can reduce fan_speed 430 | #fan_speed: 1.0 431 | 432 | ## Controller fan - FAN2 433 | [controller_fan controller_fan] 434 | pin: PD12 435 | kick_start_time: 0.5 436 | heater: heater_bed 437 | 438 | ## Exhaust fan - FAN3 439 | #[heater_fan exhaust_fan] 440 | #pin: PD13 441 | #max_power: 1.0 442 | #shutdown_speed: 0.0 443 | #kick_start_time: 5.0 444 | #heater: heater_bed 445 | #heater_temp: 60 446 | #fan_speed: 1.0 447 | 448 | ##################################################################### 449 | # LED Control 450 | ##################################################################### 451 | 452 | ## Chamber Lighting - HE2 Connector (Optional) 453 | #[output_pin caselight] 454 | ##Octopus 1.0 & 1.1, Octopus PRO 1.0 455 | #pin: PB10 456 | ##Octopus PRO 1.1 457 | #pin: PB0 458 | #pwm:true 459 | #shutdown_value: 0 460 | #value:1 461 | #cycle_time: 0.01 462 | 463 | ##################################################################### 464 | # Homing and Gantry Adjustment Routines 465 | ##################################################################### 466 | 467 | [idle_timeout] 468 | timeout: 1800 469 | 470 | ## Use QUAD_GANTRY_LEVEL to level a gantry. 471 | ## Min & Max gantry corners - measure from nozzle at MIN (0,0) and 472 | ## MAX (250, 250), (300,300), or (350,350) depending on your printer size 473 | ## to respective belt positions 474 | [quad_gantry_level] 475 | 476 | #-------------------------------------------------------------------- 477 | ## Gantry Corners for 250mm Build 478 | ## Uncomment for 250mm build 479 | #gantry_corners: 480 | # -60,-10 481 | # 310, 320 482 | ## Probe points 483 | #points: 484 | # 50,25 485 | # 50,175 486 | # 200,175 487 | # 200,25 488 | 489 | ## Gantry Corners for 300mm Build 490 | ## Uncomment for 300mm build 491 | #gantry_corners: 492 | # -60,-10 493 | # 360,370 494 | ## Probe points 495 | #points: 496 | # 50,25 497 | # 50,225 498 | # 250,225 499 | # 250,25 500 | 501 | ## Gantry Corners for 350mm Build 502 | ## Uncomment for 350mm build 503 | #gantry_corners: 504 | # -60,-10 505 | # 410,420 506 | ## Probe points 507 | #points: 508 | # 50,25 509 | # 50,275 510 | # 300,275 511 | # 300,25 512 | 513 | #-------------------------------------------------------------------- 514 | speed: 100 515 | horizontal_move_z: 10 516 | retries: 5 517 | retry_tolerance: 0.0075 518 | max_adjust: 10 519 | 520 | ######################################## 521 | # EXP1 / EXP2 (display) pins 522 | ######################################## 523 | 524 | [board_pins] 525 | aliases: 526 | # EXP1 header 527 | EXP1_1=PE8, EXP1_2=PE7, 528 | EXP1_3=PE9, EXP1_4=PE10, 529 | EXP1_5=PE12, EXP1_6=PE13, # Slot in the socket on this side 530 | EXP1_7=PE14, EXP1_8=PE15, 531 | EXP1_9=, EXP1_10=<5V>, 532 | 533 | # EXP2 header 534 | EXP2_1=PA6, EXP2_2=PA5, 535 | EXP2_3=PB1, EXP2_4=PA4, 536 | EXP2_5=PB2, EXP2_6=PA7, # Slot in the socket on this side 537 | EXP2_7=PC15, EXP2_8=, 538 | EXP2_9=, EXP2_10=<5V> 539 | 540 | ##################################################################### 541 | # Displays 542 | ##################################################################### 543 | 544 | ## Uncomment the display that you have 545 | #-------------------------------------------------------------------- 546 | 547 | 548 | ## RepRapDiscount 128x64 Full Graphic Smart Controller 549 | #[display] 550 | #lcd_type: st7920 551 | #cs_pin: EXP1_4 552 | #sclk_pin: EXP1_5 553 | #sid_pin: EXP1_3 554 | #menu_timeout: 40 555 | #encoder_pins: ^EXP2_5, ^EXP2_3 556 | #click_pin: ^!EXP1_2 557 | 558 | #[output_pin beeper] 559 | #pin: EXP1_1 560 | 561 | #-------------------------------------------------------------------- 562 | 563 | 564 | ## mini12864 LCD Display 565 | #[display] 566 | #lcd_type: uc1701 567 | #cs_pin: EXP1_3 568 | #a0_pin: EXP1_4 569 | #rst_pin: EXP1_5 570 | #encoder_pins: ^EXP2_5, ^EXP2_3 571 | #click_pin: ^!EXP1_2 572 | #contrast: 63 573 | #spi_software_miso_pin: EXP2_1 574 | #spi_software_mosi_pin: EXP2_6 575 | #spi_software_sclk_pin: EXP2_2 576 | 577 | ## To control Neopixel RGB in mini12864 display 578 | #[neopixel btt_mini12864] 579 | #pin: EXP1_6 580 | #chain_count: 3 581 | #initial_RED: 0.1 582 | #initial_GREEN: 0.5 583 | #initial_BLUE: 0.0 584 | #color_order: RGB 585 | 586 | ## Set RGB values on boot up for each Neopixel. 587 | ## Index 1 = display, Index 2 and 3 = Knob 588 | #[delayed_gcode setdisplayneopixel] 589 | #initial_duration: 1 590 | #gcode: 591 | # SET_LED LED=btt_mini12864 RED=1 GREEN=1 BLUE=1 INDEX=1 TRANSMIT=0 592 | # SET_LED LED=btt_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=2 TRANSMIT=0 593 | # SET_LED LED=btt_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=3 594 | 595 | #-------------------------------------------------------------------- 596 | 597 | 598 | ##################################################################### 599 | # Macros 600 | ##################################################################### 601 | [gcode_macro PARK] 602 | gcode: 603 | {% set th = printer.toolhead %} 604 | G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y//2} Z30 605 | 606 | [gcode_macro G32] 607 | gcode: 608 | SAVE_GCODE_STATE NAME=STATE_G32 609 | G90 610 | G28 611 | FAST_QGL 612 | G28 613 | PARK 614 | RESTORE_GCODE_STATE NAME=STATE_G32 615 | 616 | [gcode_macro BEACON_VARS] 617 | variable_beacon_contact_calibration_temp: 150 # nozzle temperature for auto calibration 618 | variable_adaptive_mesh: False # REQUIRES zero_reference_position to be setup in [bed_mesh] 619 | # Do not modify below 620 | gcode: 621 | 622 | [gcode_macro FAST_QGL] 623 | gcode: 624 | M117 QUAD_GANTRY_LEVEL 625 | {% if printer.configfile.settings.quad_gantry_level %} 626 | {% if printer.quad_gantry_level.applied == False %} 627 | QUAD_GANTRY_LEVEL RETRY_TOLERANCE=1 628 | {% endif %} 629 | QUAD_GANTRY_LEVEL horizontal_move_z=2 630 | {% endif %} 631 | 632 | [gcode_macro PRINT_START] 633 | ## Refer to the following github for guidance on how to setup your slicer to use this macro 634 | ## https://github.com/YanceyA/BeaconPrinterTools/blob/main/Config/Print_start/Print_start.md 635 | gcode: 636 | # This part fetches data from your slicer. Such as bed temp, extruder temp, chamber temp and size of your printer. 637 | {% set target_bed = params.BED|int %} 638 | {% set target_extruder = params.EXTRUDER|int %} 639 | {% set target_chamber = params.CHAMBER|default("40")|int %} 640 | 641 | # Collecting variables 642 | {% set x_wait = printer.toolhead.axis_maximum.x|float / 2 %} 643 | {% set y_wait = printer.toolhead.axis_maximum.y|float / 2 %} 644 | {% if printer.configfile.settings['beacon'].home_z_hop is defined %} 645 | {% set z_hop = printer.configfile.settings['beacon'].home_z_hop|float %} 646 | {% set speed = printer.configfile.settings['beacon'].home_xy_move_speed|float %} 647 | {% set z_hop_speed = printer.configfile.settings['beacon'].home_z_hop_speed|float %} 648 | {% else %} 649 | {% set z_hop = printer.configfile.settings['safe_z_home'].home_z_hop|float %} 650 | {% set speed = printer.configfile.settings['safe_z_home'].home_xy_move_speed|float %} 651 | {% set z_hop_speed = printer.configfile.settings['safe_z_home'].home_z_hop_speed|float %} 652 | {% endif %} 653 | {% set beacon_contact_calibration_temp = printer["gcode_macro BEACON_VARS"].beacon_contact_calibration_temp|default(150)|int %} 654 | {% set adaptive_meshing = printer["gcode_macro BEACON_VARS"].adaptive_mesh|default(false) %} 655 | 656 | SET_DISPLAY_TEXT MSG="Hotend: {beacon_contact_calibration_temp}c" # Displays info 657 | M109 S{beacon_contact_calibration_temp} # Heats up the nozzle to contact temps 658 | 659 | {% if printer.toolhead.homed_axes != "xy" %} 660 | G28 XY # Partial home (XY) 661 | {% else %} 662 | G1 Z{z_hop} F{z_hop_speed} # Moves to z_hop height 663 | G1 X{x_wait} Y{y_wait} F{speed} # Goes to center of the bed 664 | {% endif %} 665 | G90 # Absolute positioning 666 | 667 | BED_MESH_CLEAR # Clears old saved bed mesh (if any) 668 | SET_GCODE_OFFSET Z=0 # Clears current offset 669 | 670 | # Checks if the bed temp is higher than 90c - if so then trigger a heatsoak. 671 | {% if params.BED|int > 90 %} 672 | M106 S255 # Turns on the Part cooling fans 673 | 674 | {% if printer.configfile.settings["output_pin nevermore"] is defined %} 675 | SET_PIN PIN=nevermore VALUE=1 # Turns on nevermore if setup 676 | {% endif %} 677 | 678 | SET_DISPLAY_TEXT MSG="Bed: {target_bed}c" # Displays info 679 | M190 S{target_bed} # Sets the target temp for the bed 680 | 681 | {% if printer.configfile.config["temperature_sensor chamber"] is defined %} 682 | SET_DISPLAY_TEXT MSG="Heatsoak: {target_chamber}c" # Displays info 683 | TEMPERATURE_WAIT SENSOR="temperature_sensor chamber" MINIMUM={target_chamber} # Waits for chamber to reach desired temp 684 | {% endif %} 685 | 686 | # If the bed temp is not over 90c, then it skips the heatsoak and just heats up to set temp with a 5min soak 687 | {% else %} 688 | SET_DISPLAY_TEXT MSG="Bed: {target_bed}c" # Displays info 689 | M190 S{target_bed} # Sets the target temp for the bed 690 | 691 | SET_DISPLAY_TEXT MSG="Soak for 5min" # Displays info 692 | G4 P300000 # Waits 5 min for the bedtemp to stabilize 693 | {% endif %} 694 | 695 | 696 | # Heating nozzle to 150 degrees. This helps with getting a correct Z-home 697 | SET_DISPLAY_TEXT MSG="Hotend: {beacon_contact_calibration_temp}c" # Displays info 698 | M109 S{beacon_contact_calibration_temp} # Heats up the nozzle to contact temps 699 | 700 | {% if printer.configfile.config["gcode_macro WIPE_NOZZLE"] is defined %} 701 | WIPE_NOZZLE # Wipes the nozzle via macro if setup 702 | {% endif %} 703 | 704 | SET_DISPLAY_TEXT MSG="Hotend: {beacon_contact_calibration_temp}c" # Displays info 705 | M109 S{beacon_contact_calibration_temp} # Heats up the nozzle to contact temps 706 | 707 | # If you don't change build plates then you may remove this by commenting it out 708 | G28 Z METHOD=CONTACT CALIBRATE=1 # Calibrate z offset and beacon model hot 709 | 710 | {% if printer.quad_gantry_level is defined and not printer.quad_gantry_level.applied %} 711 | SET_DISPLAY_TEXT MSG="QGL" # Displays info 712 | {% if printer.configfile.config["gcode_macro FAST_QGL"] is defined %} 713 | {% if printer.configfile.settings['beacon'].default_probe_method != contact %} 714 | FAST_QGL # Levels the buildplate via QGL but FASTER 715 | {% endif %} 716 | {% else %} 717 | quad_gantry_level # Levels the buildplate via QGL 718 | {% endif %} 719 | G28 Z # Homes Z again after QGL 720 | {% endif %} 721 | 722 | ## comment if you want to load a previous mesh 723 | SET_DISPLAY_TEXT MSG="Bed mesh" # Displays info 724 | {% if adaptive_meshing %} 725 | bed_mesh_calibrate ADAPTIVE=1 # Runs an adaptive bed mesh 726 | {% else %} 727 | bed_mesh_calibrate # Runs a bed mesh 728 | {% endif %} 729 | 730 | {% if printer.configfile.config["gcode_macro WIPE_NOZZLE"] is defined %} 731 | WIPE_NOZZLE # Wipes the nozzle via macro if setup 732 | {% endif %} 733 | 734 | SET_DISPLAY_TEXT MSG="Hotend: {beacon_contact_calibration_temp}c" # Displays info 735 | M109 S{beacon_contact_calibration_temp} # Heats up the nozzle to contact temps 736 | 737 | G28 Z METHOD=CONTACT CALIBRATE=0 # Calibrate z offset only after tilt/mesh 738 | 739 | 740 | # Heats up the nozzle up to target via data from slicer 741 | SET_DISPLAY_TEXT MSG="Hotend: {target_extruder}c" # Displays info 742 | {% if printer.configfile.config["gcode_macro SMART_PARK"] is defined %} 743 | SMART_PARK # Parks using KAMP 744 | {% else %} 745 | G1 Z{z_hop} F{z_hop_speed} # Moves to z_hop height 746 | G1 X{x_wait} Y{y_wait} F{speed} # Goes to center of the bed 747 | {% endif %} 748 | 749 | M107 # Turns off partcooling fan 750 | M109 S{target_extruder} # Heats the nozzle to printing temp 751 | 752 | {% if printer.configfile.config["gcode_macro _BEACON_SET_NOZZLE_TEMP_OFFSET"] is defined %} 753 | _BEACON_SET_NOZZLE_TEMP_OFFSET # Adds toolhead expansion offset (REQUIRES ADDITIONAL MACROS NOT BY DEFAULT Found at:https://github.com/YanceyA/Beacon_Thermal_Expansion_Compensation ) 754 | {% endif %} 755 | 756 | SET_GCODE_OFFSET Z_ADJUST=0 # Apply any additional offset u wish to apply 757 | 758 | # Gets ready to print by doing a purge line 759 | SET_DISPLAY_TEXT MSG="Printer goes brr" # Displays info 760 | {% if printer.configfile.config["gcode_macro PURGE_NOZZLE"] is defined %} 761 | PURGE_NOZZLE # Purges the nozzle via macro if setup 762 | {% elif printer.configfile.config["gcode_macro LINE_PURGE"] is defined %} 763 | LINE_PURGE # Purges the nozzle using KAMP adaptive purging if setup 764 | {% elif printer.configfile.config["gcode_macro VORON_PURGE"] is defined %} 765 | VORON_PURGE # Purges the nozzle using KAMP adaptive purging if setup 766 | {% endif %} 767 | 768 | G90 769 | 770 | [gcode_macro PRINT_END] 771 | # Use PRINT_END for the slicer ending script - please customise for your slicer of choice 772 | gcode: 773 | # safe anti-stringing move coords 774 | {% set th = printer.toolhead %} 775 | {% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %} 776 | {% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %} 777 | {% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %} 778 | 779 | SAVE_GCODE_STATE NAME=STATE_PRINT_END 780 | 781 | M400 ; wait for buffer to clear 782 | G92 E0 ; zero the extruder 783 | G1 E-5.0 F1800 ; retract filament 784 | 785 | TURN_OFF_HEATERS 786 | 787 | G90 ; absolute positioning 788 | G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing 789 | G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear 790 | M107 ; turn off fan 791 | 792 | BED_MESH_CLEAR 793 | 794 | # The purpose of the SAVE_GCODE_STATE/RESTORE_GCODE_STATE 795 | # command pair is to restore the printer's coordinate system 796 | # and speed settings since the commands above change them. 797 | # However, to prevent any accidental, unintentional toolhead 798 | # moves when restoring the state, explicitly set MOVE=0. 799 | RESTORE_GCODE_STATE NAME=STATE_PRINT_END MOVE=0 800 | 801 | 802 | --------------------------------------------------------------------------------