From 30317978cd8591ce7f8a91d159a097887c441a6f Mon Sep 17 00:00:00 2001 From: sokolovjek Date: Wed, 14 Feb 2024 07:11:40 +0000 Subject: [PATCH 1/5] STEAPP-914: added main logic for used the new fan for cooling extruders. Printer v630 --- stereotech_config/630/board_stm32f4.cfg | 3 +- stereotech_config/630/chamber.cfg | 38 +++++++++++++++---------- stereotech_config/630/printhead.cfg | 21 ++++++++++++++ stereotech_config/HTE630-0-C-23.cfg | 2 +- 4 files changed, 47 insertions(+), 17 deletions(-) create mode 100644 stereotech_config/630/printhead.cfg diff --git a/stereotech_config/630/board_stm32f4.cfg b/stereotech_config/630/board_stm32f4.cfg index a682fc1711ea..a50cbb00ea21 100644 --- a/stereotech_config/630/board_stm32f4.cfg +++ b/stereotech_config/630/board_stm32f4.cfg @@ -6,7 +6,7 @@ aliases: a_step_pin=PG4, a_dir_pin=PC1, a_en_pin=PA0, a_endstop_pin=PG11, c_step_pin=PF9, c_dir_pin=PF10, c_en_pin=PG2, c_endstop_pin=PB7, bed_heater=PA1, bed_sensor=PF5, - five_axis_pin=PG12, heatsink_fan_pin=PD12, + five_axis_pin=PG12, main_extruder_step_pin=PC13, main_extruder_dir_pin=PF0, main_extruder_enable_pin=PF1, main_extruder_heater_pin=PA2, main_extruder_sensor_pin=PF3, @@ -18,5 +18,6 @@ aliases: fiber_cut_step_pin=PE6, fiber_cut_dir_pin=PA14, fiber_cut_enable_pin=PE0, case_led=PE5, status_led=PB0, + heatsink_fan_pin=PD12, sensor_heatsink_fan_pin=PF7, # for debug fan_pin=PD15, diff --git a/stereotech_config/630/chamber.cfg b/stereotech_config/630/chamber.cfg index bedbd36c44b5..c9040e44892e 100644 --- a/stereotech_config/630/chamber.cfg +++ b/stereotech_config/630/chamber.cfg @@ -14,30 +14,38 @@ target_temp: 45.0 min_speed: 0.0 gcode_id: E +[servo heatsink_servo] +pin: manta_mcu:PC6 +initial_angle: 180 + [gcode_macro M106] rename_existing: M106.1 gcode: - {% set p = params.P|default(0)|int %} {% set s = params.S|default(0)|int %} - {% if p > 0 %} - {% if p == 3 %} - SET_FAN_SPEED FAN=chamber_fan SPEED={params.S|default(0)|int / 255} - {% endif %} - {% else %} - M106.1 S{s} + # extruyder1 79-0 (0% - 100%) 79 + {% set allowed_motion_extruder1 = 79.0 %} + {% set start_pos_extruder1 = 79 %} + # extruder2 106-180 (0% - 100%) 74 + {% set allowed_motion_extruder2 = 74.0 %} + {% set start_pos_extruder2 = 106 %} + + {% set curr_ex = printer.toolhead.extruder %} + + {% if curr_ex == 'extruder' %} + {% set ko = allowed_motion_extruder1 / 255 %} + {% set angle = (start_pos_extruder1 - (ko * s))|round %} + + {% elif curr_ex == 'extruder1' %} + {% set ko = allowed_motion_extruder2 / 255 %} + {% set angle = (start_pos_extruder2 + (ko * s))|round %} {% endif %} + { action_respond_info('----------ex=%s----SET_SERVO SERVO=heatsink_servo ANGLE=%s' % (curr_ex, angle)) } + # SET_SERVO SERVO=heatsink_servo ANGLE={angle} [gcode_macro M107] rename_existing: M107.1 gcode: - {% set p = params.P|default(0)|int %} - {% if p > 0 %} - {% if p == 3 %} - SET_FAN_SPEED FAN=chamber_fan SPEED=0.0 - {% endif %} - {% else %} - M107.1 - {% endif %} + SET_SERVO SERVO=heatsink_servo ANGLE=90 # LED Light controls diff --git a/stereotech_config/630/printhead.cfg b/stereotech_config/630/printhead.cfg new file mode 100644 index 000000000000..9b53f85d8a7d --- /dev/null +++ b/stereotech_config/630/printhead.cfg @@ -0,0 +1,21 @@ +[fan] +pin: fan_pin + +# [heater_fan heatsink_fan] +# pin: heatsink_fan_pin +# heater: extruder, extruder1 +# heater_temp: 50.0 + +[temperature_fan heatsink_fan] +pin: heatsink_fan_pin +sensor_type: Trianglelab T-D500 +sensor_pin: sensor_heatsink_fan_pin +control: pid +pid_Kp: 15 +pid_Ki: 0.5 +pid_Kd: 25 +min_temp: 0 +max_temp: 400 +target_temp: 70.0 +min_speed: 0.0 +gcode_id: H diff --git a/stereotech_config/HTE630-0-C-23.cfg b/stereotech_config/HTE630-0-C-23.cfg index 85bc0bc5497a..112045ddb1cb 100644 --- a/stereotech_config/HTE630-0-C-23.cfg +++ b/stereotech_config/HTE630-0-C-23.cfg @@ -16,7 +16,7 @@ path: /home/ste/uploads [include config/630/chamber.cfg] -[include config/common/printhead.cfg] +[include config/630/printhead.cfg] # sections probe [include config/calibrate/probe_5-8-23.cfg] From 6afb709105170c67341b0f927d142e55d48d377f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BE=D0=BA=D0=BE=D0=BB=D0=BE=D0=B2=20=D0=95=D0=B2?= =?UTF-8?q?=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9?= Date: Wed, 14 Feb 2024 12:50:38 +0300 Subject: [PATCH 2/5] STEAPP-872: edited servo config, for run test move --- stereotech_config/630/board_stm32f4.cfg | 2 +- stereotech_config/630/chamber.cfg | 17 +++++++++---- stereotech_config/630/printhead.cfg | 34 ++++++++++++------------- 3 files changed, 30 insertions(+), 23 deletions(-) diff --git a/stereotech_config/630/board_stm32f4.cfg b/stereotech_config/630/board_stm32f4.cfg index a50cbb00ea21..e89f9aa69f34 100644 --- a/stereotech_config/630/board_stm32f4.cfg +++ b/stereotech_config/630/board_stm32f4.cfg @@ -18,6 +18,6 @@ aliases: fiber_cut_step_pin=PE6, fiber_cut_dir_pin=PA14, fiber_cut_enable_pin=PE0, case_led=PE5, status_led=PB0, - heatsink_fan_pin=PD12, sensor_heatsink_fan_pin=PF7, + heatsink_fan_pin=PD12, heatsink_sensor_pin=PF7, heatsink_servo_pin=PD7, # for debug fan_pin=PD15, diff --git a/stereotech_config/630/chamber.cfg b/stereotech_config/630/chamber.cfg index c9040e44892e..8d9a3dfd802d 100644 --- a/stereotech_config/630/chamber.cfg +++ b/stereotech_config/630/chamber.cfg @@ -15,12 +15,21 @@ min_speed: 0.0 gcode_id: E [servo heatsink_servo] -pin: manta_mcu:PC6 -initial_angle: 180 +pin: heatsink_servo_pin +maximum_servo_angle: 180 +minimum_pulse_width: 0.0003 +maximum_pulse_width: 0.0026 +initial_angle: 90 + +# [servo servo_probe] +# pin: PB7 +# initial_angle: 180 [gcode_macro M106] rename_existing: M106.1 gcode: + {% set curr_ex = printer.toolhead.extruder %} + {% set s = params.S|default(0)|int %} # extruyder1 79-0 (0% - 100%) 79 {% set allowed_motion_extruder1 = 79.0 %} @@ -29,8 +38,6 @@ gcode: {% set allowed_motion_extruder2 = 74.0 %} {% set start_pos_extruder2 = 106 %} - {% set curr_ex = printer.toolhead.extruder %} - {% if curr_ex == 'extruder' %} {% set ko = allowed_motion_extruder1 / 255 %} {% set angle = (start_pos_extruder1 - (ko * s))|round %} @@ -40,7 +47,7 @@ gcode: {% set angle = (start_pos_extruder2 + (ko * s))|round %} {% endif %} { action_respond_info('----------ex=%s----SET_SERVO SERVO=heatsink_servo ANGLE=%s' % (curr_ex, angle)) } - # SET_SERVO SERVO=heatsink_servo ANGLE={angle} + SET_SERVO SERVO=heatsink_servo ANGLE={angle} [gcode_macro M107] rename_existing: M107.1 diff --git a/stereotech_config/630/printhead.cfg b/stereotech_config/630/printhead.cfg index 9b53f85d8a7d..1c8c7cc4c61f 100644 --- a/stereotech_config/630/printhead.cfg +++ b/stereotech_config/630/printhead.cfg @@ -1,21 +1,21 @@ [fan] pin: fan_pin -# [heater_fan heatsink_fan] -# pin: heatsink_fan_pin -# heater: extruder, extruder1 -# heater_temp: 50.0 - -[temperature_fan heatsink_fan] +[heater_fan heatsink_fan] pin: heatsink_fan_pin -sensor_type: Trianglelab T-D500 -sensor_pin: sensor_heatsink_fan_pin -control: pid -pid_Kp: 15 -pid_Ki: 0.5 -pid_Kd: 25 -min_temp: 0 -max_temp: 400 -target_temp: 70.0 -min_speed: 0.0 -gcode_id: H +heater: extruder, extruder1 +heater_temp: 50.0 + +# [temperature_fan heatsink_fan] +# pin: heatsink_fan_pin +# sensor_type: NTC 100K MGB18-104F39050L32 +# sensor_pin: heatsink_sensor_pin +# control: pid +# pid_Kp: 15 +# pid_Ki: 0.5 +# pid_Kd: 25 +# min_temp: 0 +# max_temp: 90 +# target_temp: 45.0 +# min_speed: 0.0 +# gcode_id: H From b7cca321195ed8eb5fc91d47b55c11d4c59ff0e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BE=D0=BA=D0=BE=D0=BB=D0=BE=D0=B2=20=D0=95=D0=B2?= =?UTF-8?q?=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9?= Date: Thu, 15 Feb 2024 09:26:41 +0300 Subject: [PATCH 3/5] STEAPP-914: setting the heatsink fan --- stereotech_config/630/chamber.cfg | 43 +------------- stereotech_config/630/main_extruder.cfg | 2 +- stereotech_config/630/printhead.cfg | 74 ++++++++++++++++++------- 3 files changed, 59 insertions(+), 60 deletions(-) diff --git a/stereotech_config/630/chamber.cfg b/stereotech_config/630/chamber.cfg index 8d9a3dfd802d..00e27ef1c8a2 100644 --- a/stereotech_config/630/chamber.cfg +++ b/stereotech_config/630/chamber.cfg @@ -1,3 +1,6 @@ +[fan] +pin: fan_pin + [fan_generic chamber_fan] pin: PA8 @@ -14,46 +17,6 @@ target_temp: 45.0 min_speed: 0.0 gcode_id: E -[servo heatsink_servo] -pin: heatsink_servo_pin -maximum_servo_angle: 180 -minimum_pulse_width: 0.0003 -maximum_pulse_width: 0.0026 -initial_angle: 90 - -# [servo servo_probe] -# pin: PB7 -# initial_angle: 180 - -[gcode_macro M106] -rename_existing: M106.1 -gcode: - {% set curr_ex = printer.toolhead.extruder %} - - {% set s = params.S|default(0)|int %} - # extruyder1 79-0 (0% - 100%) 79 - {% set allowed_motion_extruder1 = 79.0 %} - {% set start_pos_extruder1 = 79 %} - # extruder2 106-180 (0% - 100%) 74 - {% set allowed_motion_extruder2 = 74.0 %} - {% set start_pos_extruder2 = 106 %} - - {% if curr_ex == 'extruder' %} - {% set ko = allowed_motion_extruder1 / 255 %} - {% set angle = (start_pos_extruder1 - (ko * s))|round %} - - {% elif curr_ex == 'extruder1' %} - {% set ko = allowed_motion_extruder2 / 255 %} - {% set angle = (start_pos_extruder2 + (ko * s))|round %} - {% endif %} - { action_respond_info('----------ex=%s----SET_SERVO SERVO=heatsink_servo ANGLE=%s' % (curr_ex, angle)) } - SET_SERVO SERVO=heatsink_servo ANGLE={angle} - -[gcode_macro M107] -rename_existing: M107.1 -gcode: - SET_SERVO SERVO=heatsink_servo ANGLE=90 - # LED Light controls [led case_led] diff --git a/stereotech_config/630/main_extruder.cfg b/stereotech_config/630/main_extruder.cfg index 5ff45b0b9717..f2306923522c 100644 --- a/stereotech_config/630/main_extruder.cfg +++ b/stereotech_config/630/main_extruder.cfg @@ -14,7 +14,7 @@ pid_Kp: 13.509 pid_Ki: 0.566 pid_Kd: 80.549 min_temp: -150 -max_temp: 500 +max_temp: 450 min_extrude_temp: 100 max_extrude_only_distance: 300.0 max_extrude_cross_section: 2.56 diff --git a/stereotech_config/630/printhead.cfg b/stereotech_config/630/printhead.cfg index 1c8c7cc4c61f..8dad6600fa3a 100644 --- a/stereotech_config/630/printhead.cfg +++ b/stereotech_config/630/printhead.cfg @@ -1,21 +1,57 @@ -[fan] -pin: fan_pin - -[heater_fan heatsink_fan] +[temperature_fan heatsink_fan] pin: heatsink_fan_pin -heater: extruder, extruder1 -heater_temp: 50.0 +#enable_pin: +# See the "fan" section for a description of the above parameters. +sensor_type: NTC 100K MGB18-104F39050L32 +sensor_pin: heatsink_sensor_pin +# control: watermark +control: pid +pid_Kp: 15 +pid_Ki: 0.5 +pid_Kd: 25 +min_temp: 0 +max_temp: 100 +target_temp: 30.0 +gcode_id: H +min_speed: 0.5 +max_speed: 1.0 + +[servo heatsink_servo] +pin: heatsink_servo_pin +maximum_servo_angle: 180 +minimum_pulse_width: 0.0003 +maximum_pulse_width: 0.0026 +initial_angle: 90 + +# [servo servo_probe] +# pin: PB7 +# initial_angle: 180 + +[gcode_macro M106] +rename_existing: M106.1 +gcode: + {% set curr_ex = printer.toolhead.extruder %} + + {% set s = params.S|default(0)|int %} + # extruyder1 79-0 (0% - 100%) 79 + {% set allowed_motion_extruder1 = 79.0 %} + {% set start_pos_extruder1 = 79 %} + # extruder2 106-180 (0% - 100%) 74 + {% set allowed_motion_extruder2 = 74.0 %} + {% set start_pos_extruder2 = 106 %} + + {% if curr_ex == 'extruder' %} + {% set ko = allowed_motion_extruder1 / 255 %} + {% set angle = (start_pos_extruder1 - (ko * s))|round %} + + {% elif curr_ex == 'extruder1' %} + {% set ko = allowed_motion_extruder2 / 255 %} + {% set angle = (start_pos_extruder2 + (ko * s))|round %} + {% endif %} + { action_respond_info('----------ex=%s----SET_SERVO SERVO=heatsink_servo ANGLE=%s' % (curr_ex, angle)) } + SET_SERVO SERVO=heatsink_servo ANGLE={angle} -# [temperature_fan heatsink_fan] -# pin: heatsink_fan_pin -# sensor_type: NTC 100K MGB18-104F39050L32 -# sensor_pin: heatsink_sensor_pin -# control: pid -# pid_Kp: 15 -# pid_Ki: 0.5 -# pid_Kd: 25 -# min_temp: 0 -# max_temp: 90 -# target_temp: 45.0 -# min_speed: 0.0 -# gcode_id: H +[gcode_macro M107] +rename_existing: M107.1 +gcode: + SET_SERVO SERVO=heatsink_servo ANGLE=90 From 8fa10d367a6068e18c3851f6ac7ff4411067e3f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BE=D0=BA=D0=BE=D0=BB=D0=BE=D0=B2=20=D0=95=D0=B2?= =?UTF-8?q?=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9?= Date: Thu, 15 Feb 2024 12:33:45 +0300 Subject: [PATCH 4/5] STEAPP-914: setting for the heat sink fan --- stereotech_config/630/printhead.cfg | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/stereotech_config/630/printhead.cfg b/stereotech_config/630/printhead.cfg index 8dad6600fa3a..98ac71449943 100644 --- a/stereotech_config/630/printhead.cfg +++ b/stereotech_config/630/printhead.cfg @@ -1,10 +1,7 @@ [temperature_fan heatsink_fan] pin: heatsink_fan_pin -#enable_pin: -# See the "fan" section for a description of the above parameters. sensor_type: NTC 100K MGB18-104F39050L32 sensor_pin: heatsink_sensor_pin -# control: watermark control: pid pid_Kp: 15 pid_Ki: 0.5 @@ -31,21 +28,15 @@ initial_angle: 90 rename_existing: M106.1 gcode: {% set curr_ex = printer.toolhead.extruder %} - {% set s = params.S|default(0)|int %} - # extruyder1 79-0 (0% - 100%) 79 - {% set allowed_motion_extruder1 = 79.0 %} - {% set start_pos_extruder1 = 79 %} - # extruder2 106-180 (0% - 100%) 74 - {% set allowed_motion_extruder2 = 74.0 %} - {% set start_pos_extruder2 = 106 %} - + # the angle of the blow hole (ex1 (0% - 100%): 75-0; ex2 (0% - 100%):105-180) + {% set angle_hole = 75.0 %} + {% set ko = angle_hole / 255 %} + {% set start_pos_extruder1 = 75 %} + {% set start_pos_extruder2 = 105 %} {% if curr_ex == 'extruder' %} - {% set ko = allowed_motion_extruder1 / 255 %} {% set angle = (start_pos_extruder1 - (ko * s))|round %} - {% elif curr_ex == 'extruder1' %} - {% set ko = allowed_motion_extruder2 / 255 %} {% set angle = (start_pos_extruder2 + (ko * s))|round %} {% endif %} { action_respond_info('----------ex=%s----SET_SERVO SERVO=heatsink_servo ANGLE=%s' % (curr_ex, angle)) } From 7c37d55a567618c848613046225a81c2eabaacdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BE=D0=BA=D0=BE=D0=BB=D0=BE=D0=B2=20=D0=95=D0=B2?= =?UTF-8?q?=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9?= Date: Thu, 15 Feb 2024 14:16:12 +0300 Subject: [PATCH 5/5] STEAPP-914: setting for the heat sink fan --- stereotech_config/630/printhead.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stereotech_config/630/printhead.cfg b/stereotech_config/630/printhead.cfg index 98ac71449943..b5d5b175d497 100644 --- a/stereotech_config/630/printhead.cfg +++ b/stereotech_config/630/printhead.cfg @@ -1,5 +1,5 @@ [temperature_fan heatsink_fan] -pin: heatsink_fan_pin +pin: !heatsink_fan_pin sensor_type: NTC 100K MGB18-104F39050L32 sensor_pin: heatsink_sensor_pin control: pid