Ajouter printer.cfg

This commit is contained in:
2026-01-14 12:49:53 +00:00
parent 2003228312
commit 9cd7d6cc86

797
printer.cfg Normal file
View File

@@ -0,0 +1,797 @@
# Auto-generated on 2026-01-09T14:20:19 | printer_model: n4pro | current: 1.2
#----------------------------------------------------------------------------
# ____ _ __ __ ____
# / __ \___ ___ ___ / |/ /__ ___ / /_/ / /__ _____ ___
# / /_/ / _ \/ -_) _ \/ / -_) _ \/ __/_ _/ // / _ \/ -_)
# \____/ .__/\__/_//_/_/|_/\__/ .__/\__/ /_/ \_,_/_//_/\__/
# /_/ /_/
#----------------------------------------------------------------------------
; Neptune 4 Series Custom Image by (OpenNeptune3D/OpenNept4une):
#----------------------------------------------------------------------------
; Wiki : https://github.com/OpenNeptune3D/OpenNept4une/wiki
; Discord : https://discord.com/invite/X6kwchT6WM
#############################################################################
# External Config Includes
#############################################################################
[include mainsail.cfg] ; mainsail runs on port 81 (http://IP_ADDRESS:81)
[include fluidd.cfg]
[include KAMP_Settings.cfg]
[include ./KAMP/Smart_Park.cfg]
[include ./KAMP/Line_Purge.cfg]
#[include klipper_debug.cfg]
#[include adxl.cfg] ; Comment this out when you disconnect the Pico/MellowFly
#############################################################################
# Base Config
#############################################################################
[mcu]
serial: /dev/ttyS0 ; The hardware use USART1 PA10/PA9 connect to RK3328
baud: 250000
restart_method: command
[printer]
kinematics:cartesian
max_velocity: 250
max_accel: 3000
max_z_velocity: 8
max_z_accel: 120
square_corner_velocity: 5.0
minimum_cruise_ratio: 0.0
[respond]
[gcode_arcs]
[pause_resume]
[display_status]
[exclude_object]
[firmware_retraction]
[virtual_sdcard]
path: ~/printer_data/gcodes
[force_move]
enable_force_move : True
[idle_timeout]
timeout: 2100 ; 35min idle timeout (when not paused or printing)
#############################################################################
# Print Start & End Macros
#############################################################################
[gcode_macro PRINT_START]
variable_small_print: False
variable_outer_bed_force_activation_temp: 80
variable_force_outer_bed_heater: False
gcode:
Frame_Light_ON
Part_Light_ON
G92 E0
G90 ; Use absolute coordinates
BED_MESH_CLEAR
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set BED_HEAT_SOAK_MINUTES = params.BED_HEAT_SOAK_MINUTES|default(0)|float %}
{% set BED_MESH = params.BED_MESH|default('adaptive')|string %} ; One of: adaptive (default), full, default (or any other value as the bed mesh profile name), none
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(200)|float %}
{% set area_start = params.AREA_START|default('0,0')|string %}
{% set area_end = params.AREA_END|default('0,0')|string %}
{% set start_coords = area_start.split(',')|map('float')|list %}
{% set end_coords = area_end.split(',')|map('float')|list %}
{% set center_min_x = 62.5 %} ; define centre area bounds
{% set center_min_y = 62.5 %}
{% set center_max_x = 172.5 %}
{% set center_max_y = 172.5 %}
; Check if print is within center area
{% if start_coords[0] >= center_min_x and start_coords[1] >= center_min_y and end_coords[0] <= center_max_x and end_coords[1] <= center_max_y %}
SET_GCODE_VARIABLE MACRO=PRINT_START VARIABLE=small_print VALUE=True
{% else %} ; print extends beyond center, set temperatures for both beds
SET_GCODE_VARIABLE MACRO=PRINT_START VARIABLE=small_print VALUE=False
{% endif %}
# If the bed is particularly hot, use both heaters in any case, wether it is a small print or not
{% if BED_TEMP >= outer_bed_force_activation_temp %}
SET_GCODE_VARIABLE MACRO=PRINT_START VARIABLE=force_outer_bed_heater VALUE=True
{% else %}
# Print extends beyond center, set temperatures for both beds
SET_GCODE_VARIABLE MACRO=PRINT_START VARIABLE=force_outer_bed_heater VALUE=False
{% endif %}
SET_BED_TEMPERATURE TARGET={BED_TEMP} ; Heat Bed to target temp
BED_TEMPERATURE_WAIT MINIMUM={BED_TEMP-2} MAXIMUM={BED_TEMP+4} ; Waits until the bed reaches close to target
{% if BED_HEAT_SOAK_MINUTES > 0 %}
RESPOND MSG="Waiting {BED_HEAT_SOAK_MINUTES} minutes for the bed to settle."
G4 P{BED_HEAT_SOAK_MINUTES * 60000}
{% endif %}
CG28
{% if BED_MESH == 'full' %}
BED_MESH_CALIBRATE
{% elif BED_MESH == 'adaptive' %}
BED_MESH_CALIBRATE ADAPTIVE=1
{% elif BED_MESH != 'none' %}
BED_MESH_PROFILE LOAD={BED_MESH}
{% endif %}
Smart_Park
SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=1
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={EXTRUDER_TEMP} ; Set and heat the final extruder temperature
TEMPERATURE_WAIT SENSOR=extruder MINIMUM={EXTRUDER_TEMP-4} MAXIMUM={EXTRUDER_TEMP+10} ; Wait for extruder to reach near target temperature
LINE_PURGE ; KAMP Line Purge near print
G92 E0 ; Reset Extruder
G1 Z2.0 F3000 ; Move Z Axis up
M117 Printing
[gcode_macro PRINT_END]
gcode:
Frame_Light_OFF
Part_Light_OFF
M400 ; wait for buffer to clear
TURN_OFF_HEATERS
G92 E0 ; zero the extruder
G91 ; Relative positioning
G1 E-2 F2700 ; Retract a bit
G1 X5 Y5 F3000 ; Wipe out
G1 E-2 Z0.2 F1600 ; Retract and raise Z
G1 Z4 F3000 ; Raise Z more
G90 ; Absolute positioning
G1 X0 Y230 ; Present print
M107 ; turn off fan
M84 ; turn off steppers
SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=0
M117
END_TUNE ; Print End Beeper Jingle
#############################################################################
# Pause, Resume & Cancel Macros
#############################################################################
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
gcode:
PAUSE_TUNE
{% set z = params.Z|default(30)|int %}
{% if printer['pause_resume'].is_paused|int == 0 %}
SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=etemp VALUE={printer['extruder'].target|default(220)}
# Store current extruder temperature before cooling
SET_GCODE_VARIABLE MACRO=LOAD_FILAMENT VARIABLE=prev_temp VALUE={printer['extruder'].target|default(220)}
SET_GCODE_VARIABLE MACRO=UNLOAD_FILAMENT VARIABLE=prev_temp VALUE={printer['extruder'].target|default(220)}
# Store Z-hop value for RESUME
SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE={z}
SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=0
SAVE_GCODE_STATE NAME=PAUSE
BASE_PAUSE
G91
{% if (printer.gcode_move.position.z + z) < printer.toolhead.axis_maximum.z %}
G1 E-2 F2700
G1 X3 Y3 F3000
G1 E-2 Z{z} F1600
SAVE_GCODE_STATE NAME=ZLIFT
{% else %}
{ action_respond_info("Pause zhop exceeds maximum Z height.") }
SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE=0
G1 E-2 F2700
G1 X3 Y3 F3000
G1 E-2 F1600
SAVE_GCODE_STATE NAME=ZLIFT
{% endif %}
G90
G1 X{printer.toolhead.axis_minimum.x+5} Y{printer.toolhead.axis_maximum.y-5} F6000
SAVE_GCODE_STATE NAME=PAUSEPARK
SET_HEATER_TEMPERATURE HEATER=extruder TARGET=175
SET_IDLE_TIMEOUT TIMEOUT=43200
{% endif %}
[gcode_macro RESUME]
rename_existing: BASE_RESUME
variable_zhop: 0
variable_etemp: 0
gcode:
{% if printer['pause_resume'].is_paused|int == 1 %}
SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=1 ; enable filament sensor
SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout} ; set timeout back to configured value
{% if etemp > 0 %}
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={etemp|int}
TEMPERATURE_WAIT SENSOR=extruder MINIMUM={etemp|int - 4} MAXIMUM={etemp|int + 10} ; wait for hotend to heat back up to print temp
{% endif %}
RESTORE_GCODE_STATE NAME=PAUSEPARK MOVE=1 MOVE_SPEED=100 ; go back to park position in case toolhead was moved during pause ; enable extruder stepper motor
G91 ; relative positioning
M83 ; set extruder to relative mode
G1 E80 F200 ; extrude 80mm of filament to prime the nozzle
G4 P2000 ; wait for 2 seconds to stabilise pressure
G1 X20 F15000 ; wiggle movement to ensure free movement of purge
G1 X-20
G1 X20
G1 X-20
G1 X20
G1 X-20
RESTORE_GCODE_STATE NAME=ZLIFT MOVE=1 MOVE_SPEED=60 ; restore to the zlift position above the print
G1 X-3 Y-3 F3000 ; Undo the pause Wipe out
G1 Z{zhop * -1} F900
RESTORE_GCODE_STATE NAME=PAUSE MOVE=1 MOVE_SPEED=60 ; restore to the paused position (lowers to final print location)
M400 ; wait for all moves to complete
BASE_RESUME ; resume print
{% endif %}
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout} ; set timeout back to configured value
CLEAR_PAUSE
SDCARD_RESET_FILE
PRINT_END
BASE_CANCEL_PRINT
#############################################################################
# Filament Sensor & Change Macros
#############################################################################
[filament_switch_sensor filament_sensor]
pause_on_runout: True
insert_gcode:
M117 Insert Detected
runout_gcode:
M117 Runout Detected
SET_GCODE_VARIABLE MACRO=UNLOAD_FILAMENT VARIABLE=prev_temp VALUE={printer.extruder.target|int}
UNLOAD_FILAMENT
event_delay: 3.0
pause_delay: 1.0
switch_pin: PA12
[delayed_gcode DISABLE_FILAMENT_SENSOR]
initial_duration: 1
gcode:
SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=0
[gcode_macro M600]
description: Pause for colour change
gcode:
PAUSE
[gcode_macro LOAD_FILAMENT]
variable_prev_temp: 0
variable_load_distance: 25
variable_purge_distance: 75
gcode:
{%
# pick the first non-zero value: prev_temp → current target → 220
set target_temp = prev_temp|int or printer.extruder.target|round(0) or 220
%}
{% if prev_temp|int == 0 and printer.extruder.target|round(0) == 0 %}
RESPOND PREFIX="LOAD_FILAMENT" MSG="No temp set — defaulting to {target_temp}°C"
{% endif %}
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={target_temp}
TEMPERATURE_WAIT SENSOR=extruder MINIMUM={target_temp - 4} MAXIMUM={target_temp + 40}
{% set speed = params.SPEED|default(300) %}
{% set max_vel = printer.configfile.settings.extruder.max_extrude_only_velocity * 30 %}
SAVE_GCODE_STATE NAME=load_state
G91
G92 E0
G1 E{load_distance} F{max_vel}
G1 E{purge_distance} F{speed}
RESTORE_GCODE_STATE NAME=load_state
[gcode_macro UNLOAD_FILAMENT]
variable_prev_temp: 0
variable_unload_distance: 75
variable_purge_distance: 15
gcode:
{%
set target_temp = prev_temp|int or printer.extruder.target|round(0) or 220
%}
{% if prev_temp|int == 0 and printer.extruder.target|round(0) == 0 %}
RESPOND PREFIX="UNLOAD_FILAMENT" MSG="No temp set — defaulting to {target_temp}°C"
{% endif %}
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={target_temp}
TEMPERATURE_WAIT SENSOR=extruder MINIMUM={target_temp - 4} MAXIMUM={target_temp + 40}
{% set speed = params.SPEED|default(300) %}
{% set max_vel = printer.configfile.settings.extruder.max_extrude_only_velocity * 30 %}
SAVE_GCODE_STATE NAME=unload_state
G91
G92 E0
G1 E{purge_distance} F{speed}
G1 E-{unload_distance} F{max_vel}
RESTORE_GCODE_STATE NAME=unload_state
{% if printer['pause_resume'].is_paused|int == 1 %}
G4 P3000 ; wait 3 s before cooling
SET_HEATER_TEMPERATURE HEATER=extruder TARGET=175
{% endif %}
#############################################################################
# X/Y/Z Stepper Config
#############################################################################
[stepper_x]
step_pin: PC14
dir_pin: PC13
enable_pin: !PC15
microsteps: 16
rotation_distance: 40
full_steps_per_rotation:200 ; set to 400 for 0.9 degree stepper
endstop_pin: PC0
position_min: -6.5
position_endstop: -6.5
position_max: 235
homing_speed: 50
homing_retract_dist: 5
homing_positive_dir: false
[stepper_y]
step_pin: PB4
dir_pin: PB3
enable_pin: !PB5
microsteps: 16
rotation_distance: 40
full_steps_per_rotation:200 ; set to 400 for 0.9 degree stepper
endstop_pin: PB8
position_min: -2
position_endstop: -2
position_max: 235
homing_speed:50
homing_retract_dist: 5
homing_positive_dir:false
[stepper_z]
step_pin: PC10
dir_pin: !PA15
enable_pin: !PC11
microsteps: 16
rotation_distance: 8
full_steps_per_rotation: 200
endstop_pin:probe:z_virtual_endstop
position_max: 268
position_min: -5
homing_speed: 8
second_homing_speed: 3
homing_retract_dist: 5
#############################################################################
# TMC Stepper-driver UART Config
#############################################################################
[tmc2209 stepper_x]
uart_pin: PB9
run_current: 1.2
interpolate: True
stealthchop_threshold: 999999
[tmc2209 stepper_y]
uart_pin: PD2
run_current: 1.2
interpolate: True
stealthchop_threshold: 999999
[tmc2209 stepper_z]
uart_pin: PC5
run_current: 0.8
interpolate: True
[tmc2209 extruder]
uart_pin: PC4
run_current: 0.9
interpolate: false
#############################################################################
# Extruder Config
#############################################################################
[extruder]
step_pin:PA5
dir_pin:!PA6
enable_pin:!PA4
microsteps: 16
rotation_distance: 28.888 ; 31.4 Bondtech 5mm Drive Gears
gear_ratio: 52:10
full_steps_per_rotation: 200 ; 200 for 1.8 degree, 400 for 0.9 degree
nozzle_diameter: 0.400
filament_diameter: 1.750
min_temp: 0
max_temp: 330
heater_pin: PA7
sensor_type:NTC 100K MGB18-104F39050L32
sensor_pin: PA1
max_power: 1
control = pid
pid_kp = 25.825
pid_ki = 1.979
pid_kd = 84.254
pressure_advance: 0.02725
pressure_advance_smooth_time: 0.02
max_extrude_cross_section: 5 ; standard klipper default 4* (NozzleDiam^2)
instantaneous_corner_velocity: 5.0
max_extrude_only_distance: 100
max_extrude_only_velocity:45
max_extrude_only_accel:2000
step_pulse_duration:0.000002
[verify_heater extruder]
max_error: 120
check_gain_time: 30
hysteresis: 10
heating_gain: 2
#############################################################################
# Bed Heater Config
#############################################################################
[heater_bed]
heater_pin:PB10
sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin: PA0
max_power: 1.0
control = pid
pid_kp = 68.601
pid_ki = 1.550
pid_kd = 758.895
min_temp: 0
max_temp: 120
pwm_cycle_time: 0.3
[verify_heater heater_bed]
max_error: 120
check_gain_time: 120
hysteresis: 10
heating_gain: 1
#####################################################################
# Outer Bed Heater Config
#####################################################################
[heater_generic heater_bed_outer]
heater_pin:PC8
max_power:1.0
sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin:PC2
control = pid
pid_kp = 75.301
pid_ki = 1.383
pid_kd = 1025.032
min_temp:0
max_temp:120
pwm_cycle_time: 0.3
[verify_heater heater_bed_outer] ; heating bed temperature tolerance configuration
max_error: 600 ; maximum error
check_gain_time:120 ; tolerance time
hysteresis: 10 ; tolerance temperature
heating_gain: 1 ; heating gain
[gcode_macro SET_BED_TEMPERATURE] ; macros for innner & outer bed temperature depending on the print size
gcode:
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={params.TARGET}
{% if printer["gcode_macro PRINT_START"].force_outer_bed_heater or not printer["gcode_macro PRINT_START"].small_print %}
SET_HEATER_TEMPERATURE HEATER=heater_bed_outer TARGET={params.TARGET}
{% endif %}
[gcode_macro BED_TEMPERATURE_WAIT]
gcode:
{% if params.MINIMUM is defined and params.MAXIMUM is defined %}
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={params.MINIMUM} MAXIMUM={params.MAXIMUM}
{% if printer["gcode_macro PRINT_START"].force_outer_bed_heater or not printer["gcode_macro PRINT_START"].small_print %}
TEMPERATURE_WAIT SENSOR="heater_generic heater_bed_outer" MINIMUM={params.MINIMUM} MAXIMUM={params.MAXIMUM}
{% endif %}
{% elif params.MINIMUM is defined %}
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={params.MINIMUM}
{% if printer["gcode_macro PRINT_START"].force_outer_bed_heater or not printer["gcode_macro PRINT_START"].small_print %}
TEMPERATURE_WAIT SENSOR="heater_generic heater_bed_outer" MINIMUM={params.MINIMUM}
{% endif %}
{% elif params.MAXIMUM is defined %}
TEMPERATURE_WAIT SENSOR=heater_bed MAXIMUM={params.MAXIMUM}
{% if printer["gcode_macro PRINT_START"].force_outer_bed_heater or not printer["gcode_macro PRINT_START"].small_print %}
TEMPERATURE_WAIT SENSOR="heater_generic heater_bed_outer" MAXIMUM={params.MAXIMUM}
{% endif %}
{% else %}
RESPOND TYPE=error MSG="Error on 'BED_TEMPERATURE_WAIT': missing MINIMUM or MAXIMUM."
{% endif %}
[gcode_macro M140] ; redefine the existing M140
rename_existing: M99140
gcode:
{% if params.S is defined %}
SET_BED_TEMPERATURE TARGET={params.S|int}
{% endif %}
[gcode_macro M141]
gcode:
{% if params.S is defined %}
SET_HEATER_TEMPERATURE HEATER=heater_bed_outer TARGET={params.S|int}
{% endif %}
[gcode_macro M190]
rename_existing: M99190
gcode:
{% if params.S is defined %}
SET_BED_TEMPERATURE TARGET={params.S|int}
BED_TEMPERATURE_WAIT MINIMUM={(params.S|int)-2} MAXIMUM={(params.S|int)+4}
{% endif %}
[gcode_macro M191]
gcode:
{% if params.S is defined %}
SET_HEATER_TEMPERATURE HEATER=heater_bed_outer TARGET={params.S|int}
TEMPERATURE_WAIT SENSOR="heater_generic heater_bed_outer" MINIMUM={(params.S|int)-2} MAXIMUM={(params.S|int)+4}
{% endif %}
#############################################################################
# Probe Config
#############################################################################
[probe]
pin:^PA11
x_offset: -24.25
y_offset: 20.45
#z_offset = 0.0
speed: 6.0
samples: 3
samples_result: median
sample_retract_dist: 3.0
samples_tolerance: 0.025
samples_tolerance_retries: 3
[bed_mesh]
speed:150
horizontal_move_z:5
mesh_min: 10,21
mesh_max: 210,211
probe_count:11,11
algorithm:bicubic
bicubic_tension:0.2
mesh_pps: 4, 4
fade_start: 1.0
fade_end: 10.0
#############################################################################
# LED Config
#############################################################################
[output_pin Frame_Light]
pin: PB7
[output_pin Part_Light]
pin: PC7
[gcode_macro Frame_Light_ON]
gcode:
SET_PIN PIN=Frame_Light VALUE=1
[gcode_macro Frame_Light_OFF]
gcode:
SET_PIN PIN=Frame_Light VALUE=0
[gcode_macro Part_Light_ON]
gcode:
SET_PIN PIN=Part_Light VALUE=1
[gcode_macro Part_Light_OFF]
gcode:
SET_PIN PIN=Part_Light VALUE=0
#############################################################################
# Beeper Config
#############################################################################
[pwm_cycle_time beeper]
pin: PA2
value: 0
shutdown_value: 0
cycle_time: 0.0005 ; Default PWM frequency: 2 kHz
[gcode_macro M300]
gcode:
{% set S = params.S|default(2000)|int %} ; Set frequency (S), default to 2 kHz if omitted or invalid
{% set P = params.P|default(100)|int %} ; Set duration (P), default to 100ms if omitted or invalid
SET_PIN PIN=beeper VALUE=0.8 CYCLE_TIME={ 1.0/S if S > 0 else 1 } ; Activate the beeper at a 80% duty cycle
G4 P{P} ; Hold the beep for the specified duration
SET_PIN PIN=beeper VALUE=0 ; Turn off the beeper
[gcode_macro PAUSE_TUNE]
gcode:
M300 S784 P300
M300 S587 P600
[gcode_macro END_TUNE]
gcode:
M300 S392 P250
M300 S494 P250
M300 S587 P250
M300 S523 P300
#############################################################################
# Fan & Temp Monitoring Config
#############################################################################
[fan]
pin: PC9
[controller_fan heatbreak+mainboard_fan]
pin: PA8
fan_speed: 1.0
idle_speed: 0.5
idle_timeout: 43200 ; 50% speed for 12h then OFF
shutdown_speed: 1
heater: extruder, heater_bed, heater_bed_outer
stepper: stepper_x, stepper_y, stepper_z, extruder
[delayed_gcode start_fan_at_idle_speed]
initial_duration: 5. ; 5s wait after boot
gcode:
# Gcode Hack to trigger the mainboard fan from printer boot
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=1 ; bed heat to 1degC
G4 P2000 ; wait 2s
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=0 ; bed heat off
[temperature_sensor RockchipHost]
sensor_type: temperature_host
min_temp: 10
max_temp: 80
[temperature_sensor STM32MCU]
sensor_type: temperature_mcu
min_temp: 10
max_temp: 85
#############################################################################
# Homing & Levelling Config/Macros
#############################################################################
[gcode_macro CG28]
gcode:
{% if "xyz" not in printer.toolhead.homed_axes %}
G28
{% else %}
{% endif %}
[safe_z_home]
home_xy_position: 141.75,97.05
speed: 100
z_hop: 10
z_hop_speed: 5
[axis_twist_compensation]
calibrate_start_x: 30
calibrate_end_x: 210
calibrate_y: 117.5
[gcode_macro Axis_Twist_Comp_Tune]
gcode:
CG28
AXIS_TWIST_COMPENSATION_CALIBRATE
[screws_tilt_adjust]
screw1: 56.75, 182.05
screw1_name: rear left screw
screw2: 56.75, 12.05
screw2_name: front left screw
screw3: 226.75, 12.05
screw3_name: front right screw
screw4: 226.75, 182.05
screw4_name: rear right screw
horizontal_move_z: 5
speed: 150
screw_thread: CW-M4
[gcode_macro Bed_Level_Screws_Tune]
gcode:
BED_MESH_CLEAR
{% set current = printer.heater_bed.target|round(0) %}
{% set target = current or 60 %}
{% if current == 0 %}
RESPOND PREFIX="Bed_Level_Screws_Tune" MSG="No bed target, heating to {target} °C"
SET_BED_TEMPERATURE TARGET={target}
{% else %}
RESPOND PREFIX="Bed_Level_Screws_Tune" MSG="Waiting for bed to reach {target} °C"
{% endif %}
BED_TEMPERATURE_WAIT MINIMUM={target - 2} MAXIMUM={target + 5}
CG28
SCREWS_TILT_CALCULATE
[gcode_macro Calibrate_Probe_Z_Offset]
gcode:
CG28
PROBE_CALIBRATE
[gcode_macro Auto_Full_Bed_Level]
gcode:
RESPOND PREFIX="info" MSG="Running Custom Bed Leveling Macro"
BED_MESH_CLEAR
SET_BED_TEMPERATURE TARGET=60
BED_TEMPERATURE_WAIT MINIMUM=58 MAXIMUM=65
CG28
BED_MESH_CALIBRATE
#############################################################################
# PID Tuning Macros
#############################################################################
[gcode_macro PID_Tune_EXTRUDER]
gcode:
{% set temperature = params.TEMPERATURE|default(210) %}
CG28
M106 S255
PID_CALIBRATE HEATER=extruder TARGET={temperature}
SAVE_CONFIG
[gcode_macro PID_Tune_BED]
gcode:
{% set temperature = params.TEMPERATURE|default(60) %}
CG28
M106 S255 ;Sets Print Fans to 100%
PID_CALIBRATE HEATER=heater_bed TARGET={temperature}
SAVE_CONFIG
[gcode_macro PID_Tune_Outer_BED]
gcode:
{% set temperature = params.TEMPERATURE|default(60) %}
G28
M106 S255 ;Sets Print Fans to 100%
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={temperature} ;Heats Inner Zone at the same time for better tuning
PID_CALIBRATE HEATER=heater_bed_outer TARGET={temperature}
SAVE_CONFIG
#############################################################################
# SPI Accelerometer Config
#############################################################################
[mcu rpi]
serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#spi_bus: spidev0.2
#[resonance_tester]
#accel_chip: adxl345
#probe_points:
# 100, 100, 20
#############################################################################
# Input Shaper Config
#############################################################################
[input_shaper]
shaper_type_x: mzv
shaper_freq_x: 111.6
shaper_type_y: mzv
shaper_freq_y: 32.4
#############################################################################
[include user_settings.cfg] ; Users custom macros
#############################################################################
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.060000, 0.040000, 0.035000, 0.032500, 0.032500, 0.047500, 0.057500, 0.075000, 0.087500, 0.092500, 0.110000
#*# 0.050000, 0.035000, 0.010000, 0.002500, 0.007500, 0.022500, 0.022500, 0.040000, 0.045000, 0.062500, 0.050000
#*# 0.042500, 0.007500, 0.002500, -0.010000, -0.015000, -0.002500, 0.000000, 0.005000, 0.010000, 0.017500, 0.032500
#*# 0.017500, 0.000000, -0.030000, -0.035000, -0.017500, -0.002500, -0.010000, -0.005000, -0.012500, 0.010000, 0.007500
#*# 0.015000, -0.015000, -0.045000, -0.047500, -0.030000, -0.020000, -0.025000, -0.027500, -0.030000, -0.020000, 0.007500
#*# 0.005000, -0.010000, -0.045000, -0.047500, -0.025000, -0.002500, -0.010000, -0.017500, -0.017500, 0.007500, 0.010000
#*# 0.020000, -0.005000, -0.030000, -0.030000, -0.015000, -0.005000, -0.010000, -0.010000, -0.012500, -0.002500, 0.017500
#*# 0.022500, 0.017500, -0.007500, -0.007500, 0.007500, 0.022500, 0.012500, 0.015000, 0.007500, 0.030000, 0.025000
#*# 0.017500, 0.000000, -0.005000, -0.010000, -0.005000, 0.010000, 0.010000, 0.012500, 0.015000, 0.022500, 0.037500
#*# -0.002500, 0.005000, -0.010000, -0.015000, -0.010000, 0.010000, 0.010000, 0.020000, 0.025000, 0.045000, 0.042500
#*# -0.007500, -0.015000, -0.015000, -0.010000, -0.007500, 0.007500, 0.015000, 0.030000, 0.042500, 0.060000, 0.077500
#*# x_count = 11
#*# y_count = 11
#*# mesh_x_pps = 4
#*# mesh_y_pps = 4
#*# algo = bicubic
#*# tension = 0.2
#*# min_x = 10.0
#*# max_x = 210.0
#*# min_y = 21.0
#*# max_y = 211.0
#*#
#*# [probe]
#*# z_offset = 1.130