From 039e316af5afe3867b5749ad34040dce73095c35 Mon Sep 17 00:00:00 2001 From: aria Date: Mon, 26 May 2025 18:46:09 +1000 Subject: [PATCH] feat: changes after firmware upgrade BREAKING CHANGE: --- Neptune4Pro/printer.cfg | 337 ++++++++++++++++++++++------------------ 1 file changed, 182 insertions(+), 155 deletions(-) diff --git a/Neptune4Pro/printer.cfg b/Neptune4Pro/printer.cfg index ee33802..636091a 100644 --- a/Neptune4Pro/printer.cfg +++ b/Neptune4Pro/printer.cfg @@ -1,7 +1,7 @@ #################################################################################### # Machine type: NEPTUNE 4 PRO -# Current configuration version: V1.4 -# Date:2023-12-1 +# Current configuration version: V1.6 +# Date:2024-6-24 #################################################################################### # This product (Neptune 4/4pro/4plus/4max) adopts Klipper firmware # and does not support users to update the official klipper/fluidd @@ -45,9 +45,9 @@ microsteps: 16 rotation_distance: 40 full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper endstop_pin:PC0 -position_min: -10 +position_min: -8.5 position_endstop:-8 -position_max: 235 +position_max: 235.1 homing_speed:50 homing_retract_dist:5 homing_positive_dir:false @@ -60,9 +60,9 @@ 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:0 -position_max:235 +position_min: -0.5 +position_endstop: 0 +position_max:235.1 homing_speed:50 homing_retract_dist:5 homing_positive_dir:false @@ -82,7 +82,7 @@ endstop_pin:probe:z_virtual_endstop ## PB12 for Z-max; endstop have'!' is NO ## 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:-5 -position_max: 268 +position_max: 270.1 position_min: -5 homing_speed: 8 homing_retract_dist: 5 @@ -94,6 +94,7 @@ dir_pin:!PA6 enable_pin:!PA4 microsteps:16 +#rotation_distance: 29.0 #31.4 #Bondtech 5mm Drive Gears STOCK rotation_distance: 29.07 # Sunlu PLA # rotation_distance: 28 # #3DFillies PETG # rotation_distance: 28 # #3DFillies PLA Matte @@ -104,12 +105,18 @@ 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 +max_temp: 310 heater_pin: PA7 sensor_type:NTC 100K MGB18-104F39050L32 sensor_pin: PA1 max_power: 1 +# STOCK +# control :pid +# pid_kp : 26.213 +# pid_ki : 1.304 +# pid_kd : 131.721 + # 255C [3DFillies PETG] # control: pid # pid_kp: 20.038 @@ -145,18 +152,18 @@ pid_kd: 98.687 #pid_ki : 1.304 #pid_kd : 131.721 +pressure_advance: 0.020 # STOCK + [SUNLU PLA+ V2] # pressure_advance: 0.0475 # 3DFillies PETG -pressure_advance: 0.02 # [SUNLU PLA+ V2] # pressure_advance: 0.021 # [3DFillies PLA Mate, SUNLU PLA] -#pressure_advance: 0.024 #DEFAULT -pressure_advance_smooth_time: 0.01 +# pressure_advance_smooth_time: 0.01 +pressure_advance_smooth_time: 0.04 # STOCK instantaneous_corner_velocity: 2.5 max_extrude_only_distance: 300 -max_extrude_only_velocity:30 +max_extrude_only_velocity:60 max_extrude_only_accel:5000 -max_extrude_cross_section: 99 -min_extrude_temp:0 +max_extrude_cross_section: 9999999 +min_extrude_temp:100 [verify_heater extruder] max_error: 120 @@ -170,6 +177,12 @@ sensor_type: NTC 100K MGB18-104F39050L32 sensor_pin: PA0 max_power: 1.0 +# STOCK +# control : pid +# pid_kp : 75.397 +# pid_ki : 0.823 +# pid_kd : 1727.531 + # 80C # control: pid # pid_Kp: 70.251 @@ -188,17 +201,13 @@ pid_kp: 69.585 pid_ki: 2.220 pid_kd: 545.376 -# Default -#control = pid -#pid_kp = 75.397 -#pid_ki = 0.823 -#pid_kd = 1727.531 +pwm_cycle_time: 0.016 min_temp: 0 max_temp: 120 [verify_heater heater_bed] -max_error: 120 +max_error: 600 check_gain_time:120 hysteresis: 10 heating_gain: 2 @@ -330,7 +339,7 @@ gcode: SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=saved_x VALUE="{position.x}" SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=saved_y VALUE="{position.y}" SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=saved_z VALUE="{position.z}" - SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=saved_e VALUE="{E}" + SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=saved_e VALUE="{position.e}" SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=etemp VALUE={printer['extruder'].target} SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=bed_temp VALUE={printer['heater_bed'].target} SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=bed1_temp VALUE={printer['heater_generic heater_bed1'].target} @@ -404,6 +413,7 @@ gcode: pause_on_runout: True runout_gcode: SET_FILAMENT_SENSOR SENSOR=fila ENABLE=1 + M118 ;Filament detection is triggered,please check. insert_gcode: event_delay: 3.0 pause_delay: 1.0 @@ -421,33 +431,32 @@ pin: PC9 pin: PA8 shutdown_speed: 1 -# [controller_fan controller_fan1] -# pin: PA8 -# fan_speed: 1.0 -# idle_timeout: 900 - - [printer] kinematics:cartesian max_velocity: 500 max_accel: 4800 -# max_accel: 5000 -max_accel_to_decel: 2500 -max_z_velocity: 20 +# max_accel: 5000 # STOCK +# max_accel_to_decel: 2500 +max_accel_to_decel: 20000 # STOCK +# max_z_velocity: 20 +max_z_velocity: 10 # STOCK max_z_accel: 100 square_corner_velocity: 9.0 -[input_shaper] +# STOCK +# [input_shaper] # shaper_freq_x: 66.66 -shaper_freq_x: 96.2 -shaper_freq_y: 40.2 # shaper_freq_y: 42.05 # shaper_type_x: mzv +# shaper_type_y: ei +# #damping_ratio_x: 0.1 +# #damping_ratio_y: 0.1 + +[input_shaper] +shaper_freq_x: 96.2 +shaper_freq_y: 40.2 shaper_type_x: mzv shaper_type_y: mzv -# shaper_type_y: ei -#damping_ratio_x: 0.1 -#damping_ratio_y: 0.1 #################################################################### # Homing and Gantry Adjustment Routines @@ -477,7 +486,7 @@ gcode: M400 BED_MESH_CLEAR G28 - BED_MESH_CALIBRATE profile=6 mesh_min=10,21 mesh_max=200,220 probe_count=6 algorithm=bicubic + BED_MESH_CALIBRATE profile=6 mesh_min=15,21 mesh_max=210,220 probe_count=6 algorithm=bicubic M400 G4 P2000 G91 @@ -495,10 +504,10 @@ gcode: pin:^PA11 x_offset: -24.25 y_offset: 20.45 -z_offset: 1.650 # Flat Side -# z_offset: 1.800 +z_offset: 0.0 speed: 10.0 -samples: 2 +samples: 5 +# samples: 2 # STOCK samples_result: median sample_retract_dist: 3.0 samples_tolerance: 0.05 @@ -507,9 +516,10 @@ samples_tolerance_retries: 5 [bed_mesh] speed:500 horizontal_move_z:10 -mesh_min:10,21 +mesh_min:15,21 mesh_max:210,211 -probe_count:6,6 +probe_count:11,11 +# probe_count:6,6 # STOCK algorithm:bicubic bicubic_tension:0.2 mesh_pps: 2, 2 @@ -520,6 +530,7 @@ fade_end:30.0 ##################################################################### # LED Control ##################################################################### +# LED Control 1.0 [output_pin caselight] pin: PB7 pwm: false @@ -555,24 +566,24 @@ description: Turn off Logo LEDs gcode: SET_PIN PIN=caselight1 VALUE=0 +# LED Control 2.0 +[gcode_macro FLASHLIGHT_SWITCH] +description: Switch Hotend LEDs +gcode: + RUN_SHELL_COMMAND CMD=FLASHLIGHT -# [gcode_macro FLASHLIGHT_SWITCH] -# description: Switch Hotend LEDs -# gcode: -# RUN_SHELL_COMMAND CMD=FLASHLIGHT +[gcode_shell_command FLASHLIGHT] +command: sh /home/mks/sled2.sh +timeout: 5. -# [gcode_shell_command FLASHLIGHT] -# command: sh /home/mks/sled2.sh -# timeout: 5. +[gcode_macro MODLELIGHT_SWITCH] +description: Switch Logo LEDs +gcode: + RUN_SHELL_COMMAND CMD=MODLELIGHT -# [gcode_macro MODLELIGHT_SWITCH] -# description: Switch Logo LEDs -# gcode: -# RUN_SHELL_COMMAND CMD=MODLELIGHT - -# [gcode_shell_command MODLELIGHT] -# command: sh /home/mks/sled1.sh -# timeout: 5. +[gcode_shell_command MODLELIGHT] +command: sh /home/mks/sled1.sh +timeout: 5. @@ -589,7 +600,7 @@ stealthchop_threshold:0 [tmc2209 stepper_y] uart_pin: PD2 -run_current: 1.1 +run_current: 1.2 hold_current: 0.8 interpolate: True stealthchop_threshold:0 @@ -603,7 +614,7 @@ stealthchop_threshold: 0 [tmc2209 extruder] uart_pin: PC4 -run_current: 0.8 +run_current: 0.7 hold_current: 0.5 interpolate: True stealthchop_threshold: 0 @@ -611,39 +622,19 @@ stealthchop_threshold: 0 [mcu rpi] serial: /tmp/klipper_host_mcu -# [adxl345] -# cs_pin: rpi:None -# spi_bus: spidev0.2 +[adxl345] +cs_pin: rpi:None +spi_bus: spidev0.2 -# [resonance_tester] -# accel_chip: adxl345 -# probe_points: -# 100, 100, 20 # an example +[resonance_tester] +accel_chip: adxl345 +probe_points: + 100, 100, 20 # an example [force_move] enable_force_move : true - - - -[gcode_macro M109] -rename_existing: M99109 -gcode: - #Parameters - {% if 'S' in params %} - {% set s = params.S|float %} - M104 {% for p in params %}{'%s%s' % (p, params[p])}{% endfor %} - {% if printer[printer.toolhead.extruder].temperature >= s-4 %} - M104 {% for p in params %}{'%s%s' % (p, params[p])}{% endfor %} - {% else %} - TEMPERATURE_WAIT SENSOR=extruder MINIMUM={s-4} MAXIMUM={s+10} - {% endif %} - {% else %} - M104 S0 - {% endif %} - - [display_status] @@ -714,7 +705,6 @@ heater_pin:PC8 max_power:1.0 sensor_type: NTC 100K MGB18-104F39050L32 sensor_pin:PC2 -#control = watermark # 80C # control = pid @@ -740,8 +730,10 @@ pid_Kd = 1247.725 # pid_Kp = 70.591 # pid_Ki = 1.055 # pid_Kd = 1180.632 -min_temp:0 -max_temp:120 + +pwm_cycle_time: 0.016 +min_temp: 0 +max_temp: 120 [verify_heater heater_bed1] max_error: 600 @@ -749,66 +741,111 @@ check_gain_time:120 hysteresis: 10 heating_gain: 2 +[gcode_macro M104] +rename_existing: M99104 +gcode: + {% if 'S' in params %} + {% if (params.S|float) > 300 %} + M118 ;The nozzle setting temperature is out of limit and has been automatically adjusted to Limit the temperature. + M118 ;热端设置温度超限,已经自动调整至限制温度。 + {% endif %} + {% set TARGET = (params.S|float, 300)|min %} + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={TARGET|int} + {% endif %} + +[gcode_macro M109] +rename_existing: M99109 +gcode: + {% if 'S' in params %} + {% if (params.S|float) > 300 %} + M118 ;The nozzle setting temperature is out of limit and has been automatically adjusted to Limit the temperature. + M118 ;热端设置温度超限,已经自动调整至限制温度。 + {% endif %} + {% set TARGET = (params.S|float, 300)|min %} + SET_HEATER_TEMPERATURE HEATER=extruder TARGET={TARGET|int} + TEMPERATURE_WAIT SENSOR=extruder MINIMUM={TARGET - 4} MAXIMUM={TARGET + 35} + {% endif %} + + [gcode_macro M191] gcode: - {% set s = (params.S|float,120)|min %} - {% if params.S is defined %} - SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={s|int} - SET_HEATER_TEMPERATURE HEATER=heater_bed1 TARGET={s|int} - {% if printer.heater_bed.temperature <= s-2 %} - TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={s-2} MAXIMUM={s+10} - # G4 P20000 - # {% else %} - # G4 P10000 - {% endif %} - {% else %} - M140 S0 - {% endif %} + {% if 'S' in params %} + {% if (params.S|float) > 110 %} + M118 ;The hot bed setting temperature is out of limit and has been automatically adjusted to Limit the temperature. + M118 ;热床设置温度超限,已经自动调整至限制温度。 + {% endif %} + {% set TARGET = (params.S|float, 110)|min %} + SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={TARGET|int} + SET_HEATER_TEMPERATURE HEATER=heater_bed1 TARGET={TARGET|int} + TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={TARGET - 2} MAXIMUM={TARGET + 35} + {% endif %} [gcode_macro M190] rename_existing: M99190 gcode: - {% set s = (params.S|float,120)|min %} - {% if params.S is defined %} - SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={s|int} - SET_HEATER_TEMPERATURE HEATER=heater_bed1 TARGET={s|int} - {% if printer.heater_bed.temperature <= s-2 %} - TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={s-2} MAXIMUM={s+10} - # G4 P20000 - # {% else %} - # G4 P10000 - {% endif %} - {% else %} - M140 S0 - {% endif %} + {% if 'S' in params %} + {% if (params.S|float) > 110 %} + M118 ;The hot bed setting temperature is out of limit and has been automatically adjusted to Limit the temperature. + M118 ;热床设置温度超限,已经自动调整至限制温度。 + {% endif %} + {% set TARGET = (params.S|float, 110)|min %} + SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={TARGET|int} + SET_HEATER_TEMPERATURE HEATER=heater_bed1 TARGET={TARGET|int} + TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={TARGET - 2} MAXIMUM={TARGET + 35} + {% endif %} [gcode_macro M140] rename_existing: M99140 gcode: - {% set s = (params.S|float,120)|min %} - {% if params.S is defined %} - SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={s|int} - SET_HEATER_TEMPERATURE HEATER=heater_bed1 TARGET={s|int} - {% else %} - SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=0 - SET_HEATER_TEMPERATURE HEATER=heater_bed1 TARGET=0 - {% endif %} + {% if 'S' in params %} + {% if (params.S|float) > 110 %} + ;M118 The hot bed setting temperature is out of limit and has been automatically adjusted to Limit the temperature. + ;M118 热床设置温度超限,已经自动调整至限制温度。 + {% endif %} + {% set TARGET = (params.S|float, 110)|min %} + SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={TARGET|int} + SET_HEATER_TEMPERATURE HEATER=heater_bed1 TARGET={TARGET|int} + {% endif %} [gcode_macro M141] gcode: - {% set s = (params.S|float,120)|min %} - {% if params.S is defined %} - SET_HEATER_TEMPERATURE HEATER=heater_bed1 TARGET={s|int} - {% else %} - SET_HEATER_TEMPERATURE HEATER=heater_bed1 TARGET=0 - {% endif %} + {% if 'S' in params %} + {% if (params.S|float) > 110 %} + M118 ;The hot bed setting temperature is out of limit and has been automatically adjusted to Limit the temperature. + M118 ;热床设置温度超限,已经自动调整至限制温度。 + {% endif %} + {% set TARGET = (params.S|float, 110)|min %} + SET_HEATER_TEMPERATURE HEATER=heater_bed1 TARGET={TARGET|int} + {% endif %} - #################################################################### ## G-code macro definition ##################################################################### +[gcode_macro m600] +description: Pauses the current print. +gcode: + M400 + PAUSE + M400 + +[gcode_macro M106] +rename_existing: M99106 +gcode: + {% if 'S' in params %} + {% set s = (params.S|float, 255)|min %} + {% if (printer.toolhead.fan_mode) == 0 %} + MKS_M106 S={(204, s)|min} + {% endif %} + {% if (printer.toolhead.fan_mode) == 1 %} + MKS_M106 S={(153, s)|min} + {% endif %} + {% if (printer.toolhead.fan_mode) == 2 %} + MKS_M106 S={s} + {% endif %} + {% endif %} + [gcode_macro M205] description: Sets square corner velocity. Usage: M205 [X] [Y] @@ -820,7 +857,6 @@ gcode: SET_VELOCITY_LIMIT {% endif %} - [gcode_macro M203] description: Sets maximum velocity. Usage: M203 [X] [Y] @@ -834,15 +870,6 @@ gcode: {% endif %} -[gcode_macro m600] -description: Pauses the current print. - Usage: M600 [B] [E] [L] [R] [U] [X] [Y] - [Z] -gcode: - PAUSE P=2{% for k in params|select("in", "BEXYZ") %}{ - ' '~k~'="'~params[k]~'"'}{% endfor %} - - ################ Buzzer configuration ################## [output_pin beeper] @@ -873,7 +900,7 @@ gcode: [gcode_arcs] - +resolution: 0.1 [exclude_object] @@ -883,19 +910,19 @@ gcode: #*# [bed_mesh 11] #*# version = 1 #*# points = -#*# -0.026250, -0.001250, 0.011250, 0.018750, 0.030000, 0.017500, 0.021250, 0.010000, 0.003750, 0.001250, -0.013750 -#*# -0.037500, -0.015000, -0.016250, -0.001250, 0.013750, 0.013750, 0.022500, 0.018750, 0.008750, 0.006250, 0.002500 -#*# -0.060000, -0.050000, -0.050000, -0.035000, -0.022500, -0.017500, -0.003750, -0.015000, -0.038750, -0.035000, -0.041250 -#*# -0.030000, -0.025000, -0.027500, -0.017500, -0.003750, -0.010000, -0.011250, -0.033750, -0.053750, -0.070000, -0.081250 -#*# -0.023750, -0.020000, -0.027500, -0.013750, 0.007500, -0.001250, -0.005000, -0.023750, -0.056250, -0.067500, -0.082500 -#*# -0.037500, -0.036250, -0.035000, -0.018750, -0.003750, 0.000000, -0.011250, -0.040000, -0.058750, -0.063750, -0.081250 -#*# -0.050000, -0.032500, -0.037500, -0.013750, -0.001250, 0.002500, 0.003750, -0.012500, -0.033750, -0.042500, -0.048750 -#*# -0.042500, -0.023750, -0.022500, 0.000000, 0.008750, 0.005000, 0.003750, -0.011250, -0.031250, -0.037500, -0.051250 -#*# -0.041250, -0.021250, -0.008750, 0.010000, 0.021250, 0.020000, 0.022500, 0.016250, 0.000000, -0.005000, -0.012500 -#*# -0.043750, -0.017500, -0.017500, 0.005000, 0.011250, 0.006250, 0.013750, 0.001250, -0.006250, -0.016250, -0.018750 -#*# -0.040000, -0.005000, 0.001250, 0.020000, 0.030000, 0.026250, 0.028750, 0.020000, 0.012500, 0.006250, -0.002500 +#*# -0.028750, -0.022500, 0.006250, 0.032500, 0.038750, 0.042500, 0.041250, 0.051250, 0.043750, 0.040000, 0.035000 +#*# 0.002500, 0.012500, 0.025000, 0.038750, 0.043750, 0.047500, 0.040000, 0.043750, 0.028750, 0.031250, 0.028750 +#*# -0.003750, -0.008750, 0.007500, 0.021250, 0.030000, 0.038750, 0.028750, 0.020000, 0.006250, -0.002500, 0.003750 +#*# 0.021250, 0.015000, 0.020000, 0.032500, 0.025000, 0.028750, 0.012500, 0.002500, -0.035000, -0.046250, -0.040000 +#*# 0.012500, -0.005000, -0.005000, 0.028750, 0.031250, 0.036250, 0.016250, 0.016250, -0.016250, -0.031250, -0.025000 +#*# 0.015000, 0.005000, 0.013750, 0.036250, 0.037500, 0.041250, 0.017500, 0.006250, -0.016250, -0.033750, -0.028750 +#*# 0.032500, 0.027500, 0.023750, 0.051250, 0.045000, 0.053750, 0.028750, 0.015000, -0.010000, -0.021250, -0.006250 +#*# 0.031250, 0.027500, 0.040000, 0.048750, 0.051250, 0.048750, 0.038750, 0.026250, 0.003750, 0.000000, 0.005000 +#*# 0.025000, 0.036250, 0.051250, 0.067500, 0.072500, 0.076250, 0.063750, 0.065000, 0.053750, 0.047500, 0.048750 +#*# 0.037500, 0.038750, 0.052500, 0.068750, 0.063750, 0.068750, 0.051250, 0.057500, 0.041250, 0.041250, 0.032500 +#*# 0.041250, 0.050000, 0.058750, 0.077500, 0.083750, 0.078750, 0.062500, 0.061250, 0.056250, 0.046250, 0.040000 #*# tension = 0.2 -#*# min_x = 10.0 +#*# min_x = 15.0 #*# algo = bicubic #*# y_count = 11 #*# mesh_y_pps = 2 @@ -903,4 +930,4 @@ gcode: #*# x_count = 11 #*# max_y = 219.9 #*# mesh_x_pps = 2 -#*# max_x = 200.0 +#*# max_x = 210.0