Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1. STEAPP-914: added main logic for used the new fan for cooling extruders. Printer v630 #250

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion stereotech_config/630/board_stm32f4.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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, heatsink_sensor_pin=PF7, heatsink_servo_pin=PD7,
# for debug
fan_pin=PD15,
28 changes: 3 additions & 25 deletions stereotech_config/630/chamber.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[fan]
pin: fan_pin

[fan_generic chamber_fan]
pin: PA8

Expand All @@ -14,31 +17,6 @@ target_temp: 45.0
min_speed: 0.0
gcode_id: E

[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}
{% endif %}

[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 %}

# LED Light controls

[led case_led]
Expand Down
2 changes: 1 addition & 1 deletion stereotech_config/630/main_extruder.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
48 changes: 48 additions & 0 deletions stereotech_config/630/printhead.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[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: 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 %}
# 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 angle = (start_pos_extruder1 - (ko * s))|round %}
{% elif curr_ex == 'extruder1' %}
{% 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
2 changes: 1 addition & 1 deletion stereotech_config/HTE630-0-C-23.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Loading