Chamber heating
This commit is contained in:
parent
1c7d795848
commit
42e3acf2f4
10 changed files with 257 additions and 11 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@ printer-*.cfg
|
||||||
.theme
|
.theme
|
||||||
*.bkp
|
*.bkp
|
||||||
*.swp
|
*.swp
|
||||||
|
*.backup
|
||||||
|
|
|
@ -13,9 +13,9 @@ gcode:
|
||||||
G28 # home after setting temps
|
G28 # home after setting temps
|
||||||
M117 Waiting for bed temperature...
|
M117 Waiting for bed temperature...
|
||||||
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={bedTemp} MAXIMUM={bedTemp+1} # Wait for bed temp (within 1 degree)
|
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={bedTemp} MAXIMUM={bedTemp+1} # Wait for bed temp (within 1 degree)
|
||||||
#{% if chamberTemp != 0 %} # If chamber temp set
|
{% if chamberTemp != 0 %} # If chamber temp set
|
||||||
# CHAMBER_WARMER TEMPERATURE={chamberTemp} # Warm chamber
|
CHAMBER_WARMER TEMPERATURE={chamberTemp} # Warm chamber
|
||||||
#{% endif %}
|
{% endif %}
|
||||||
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={hotendTemp|float*0.6} # Set extruder don't drip temp
|
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={hotendTemp|float*0.6} # Set extruder don't drip temp
|
||||||
SET_DOCKABLE_PROBE AUTO_ATTACH_DETACH=1 # Disable probe attach/detach
|
SET_DOCKABLE_PROBE AUTO_ATTACH_DETACH=1 # Disable probe attach/detach
|
||||||
ATTACH_PROBE
|
ATTACH_PROBE
|
||||||
|
@ -32,6 +32,26 @@ gcode:
|
||||||
M117 Printing...
|
M117 Printing...
|
||||||
|
|
||||||
|
|
||||||
|
[gcode_macro CHAMBER_WARMER]
|
||||||
|
description: Uses the bed and part cooling fan to warm the chamber
|
||||||
|
gcode:
|
||||||
|
# User Parameters
|
||||||
|
{% set z_pcf_height = 5 %} # Height from the bed while warming
|
||||||
|
{% set fan_speed = 100 %} # Fan speed in percent
|
||||||
|
|
||||||
|
{% set chamberTemp = params.TEMPERATURE|default(0)|int %}
|
||||||
|
{% if printer["temperature_sensor chamber"].temperature < chamberTemp %}
|
||||||
|
BEDFANSFAST # Force bed fans to fast speed
|
||||||
|
# Only move and turn on fan if chamber is not to temp.
|
||||||
|
G90 # Absolute positioning
|
||||||
|
# park above bed center
|
||||||
|
G1 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_maximum.y/2} Z{z_pcf_height}
|
||||||
|
M106 S{fan_speed / 100 * 255} # Max out part cooling to cycle chamber air
|
||||||
|
M117 Waiting for chamber temperature {chamberTemp}c...
|
||||||
|
TEMPERATURE_WAIT SENSOR="temperature_sensor chamber" MINIMUM={chamberTemp} # Wait for chamber temp
|
||||||
|
M106 S0 # Disable part cooling fan after soak
|
||||||
|
{% endif %}
|
||||||
|
M117 Chamber at temp
|
||||||
|
|
||||||
[gcode_macro PARK]
|
[gcode_macro PARK]
|
||||||
gcode:
|
gcode:
|
||||||
|
|
145
bedfans.cfg
Normal file
145
bedfans.cfg
Normal file
|
@ -0,0 +1,145 @@
|
||||||
|
############### Config options ##################
|
||||||
|
|
||||||
|
[gcode_macro _BEDFANVARS]
|
||||||
|
variable_threshold: 100 # If bed temp target is above this threshold, fans will be enabled. If temp is set to below this threshold, fans will be disabled.
|
||||||
|
variable_fast: 0.8 # Fan speed once bed temp is reached
|
||||||
|
variable_slow: 0.2 # Fan speed while bed is heating
|
||||||
|
variable_max_temp: 65 # Temp fans will turn off
|
||||||
|
variable_target_temp: 60 # Temp fans will turn back to slow speed
|
||||||
|
gcode:
|
||||||
|
|
||||||
|
########## Bed Fans #########
|
||||||
|
|
||||||
|
[fan_generic BedFans]
|
||||||
|
pin: PB6
|
||||||
|
#cycle_time: 0.05
|
||||||
|
kick_start_time: 0.5
|
||||||
|
|
||||||
|
########## Aliases #########
|
||||||
|
|
||||||
|
[gcode_macro BEDFANSSLOW]
|
||||||
|
gcode:
|
||||||
|
# Vars
|
||||||
|
{% set SLOW = printer["gcode_macro _BEDFANVARS"].slow|float %}
|
||||||
|
|
||||||
|
SET_FAN_SPEED FAN=BedFans SPEED={SLOW}
|
||||||
|
|
||||||
|
[gcode_macro BEDFANSFAST]
|
||||||
|
gcode:
|
||||||
|
# Vars
|
||||||
|
{% set FAST = printer["gcode_macro _BEDFANVARS"].fast|float %}
|
||||||
|
|
||||||
|
SET_FAN_SPEED FAN=BedFans SPEED={FAST}
|
||||||
|
|
||||||
|
[gcode_macro BEDFANSOFF]
|
||||||
|
gcode:
|
||||||
|
SET_FAN_SPEED FAN=BedFans SPEED=0
|
||||||
|
|
||||||
|
############ Command overrides ############
|
||||||
|
|
||||||
|
# Override, set fan speeds to low and start monitoring loop.
|
||||||
|
[gcode_macro SET_HEATER_TEMPERATURE]
|
||||||
|
rename_existing: _SET_HEATER_TEMPERATURE
|
||||||
|
gcode:
|
||||||
|
# Parameters
|
||||||
|
{% set HEATER = params.HEATER|default("None") %}
|
||||||
|
{% set TARGET = params.TARGET|default(0)|int %}
|
||||||
|
# Vars
|
||||||
|
{% set THRESHOLD = printer["gcode_macro _BEDFANVARS"].threshold|int %}
|
||||||
|
|
||||||
|
{% if HEATER|lower == "extruder" %}
|
||||||
|
M104 S{TARGET}
|
||||||
|
{% elif HEATER|lower == "heater_bed" %}
|
||||||
|
M99140 S{TARGET}
|
||||||
|
{% else %}
|
||||||
|
{action_respond_info("Heater %s not supported" % HEATER)}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
# Set fans to low if heater_bed temp is requested above threshold temp, and kick off monitoring loop.
|
||||||
|
{% if HEATER|lower == "heater_bed" %}
|
||||||
|
{% if TARGET >= THRESHOLD %}
|
||||||
|
BEDFANSSLOW
|
||||||
|
UPDATE_DELAYED_GCODE ID=bedfanloop DURATION=1
|
||||||
|
{% else %}
|
||||||
|
BEDFANSOFF
|
||||||
|
UPDATE_DELAYED_GCODE ID=bedfanloop DURATION=0 # Cancel bed fan loop if it's running
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
# Override M190 (Wait for Bed Temperature)
|
||||||
|
# As a bonus, use TEMPERATURE_WAIT so we don't have to wait for PID to level off.
|
||||||
|
[gcode_macro M190]
|
||||||
|
rename_existing: M99190
|
||||||
|
gcode:
|
||||||
|
# Parameters
|
||||||
|
{% set S = params.S|int %}
|
||||||
|
# Vars
|
||||||
|
{% set THRESHOLD = printer["gcode_macro _BEDFANVARS"].threshold|int %}
|
||||||
|
|
||||||
|
{% if S >= THRESHOLD %}
|
||||||
|
BEDFANSSLOW # >= Threshold temp: Low speed fans while heating
|
||||||
|
{% else %}
|
||||||
|
BEDFANSOFF # < Threshold temp: Turn bed fans off
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
# Set bed temp
|
||||||
|
M140 {% for p in params%}{'%s%s' % (p, params[p])}{% endfor %}
|
||||||
|
|
||||||
|
{% if S != 0 %}
|
||||||
|
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={S|int} MAXIMUM={S|int + 5} # Wait for bed temp within 5 degrees
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
# Post-heating fan speeds
|
||||||
|
{% if S >= THRESHOLD %}
|
||||||
|
# >= Threshold temp: Higher speed fans after heating finished
|
||||||
|
BEDFANSFAS
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
# Replace M140 (Set Bed Temperature) to just be an alias of SET_HEATER_TEMPERATURE (which has associated bed fan logic if enabled)
|
||||||
|
[gcode_macro M140]
|
||||||
|
rename_existing: M99140
|
||||||
|
gcode:
|
||||||
|
# Parameters
|
||||||
|
{% set S = params.S|float %}
|
||||||
|
|
||||||
|
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={S}
|
||||||
|
|
||||||
|
# Replace TURN_OFF_HEATERS
|
||||||
|
[gcode_macro TURN_OFF_HEATERS]
|
||||||
|
rename_existing: _TURN_OFF_HEATERS
|
||||||
|
gcode:
|
||||||
|
BEDFANSOFF
|
||||||
|
_TURN_OFF_HEATERS
|
||||||
|
|
||||||
|
################ Monitoring loop #####################
|
||||||
|
|
||||||
|
# Turns bed fans to "fast" speed once target bed temp is reached, and back to slow once max temp is reached.
|
||||||
|
[delayed_gcode bedfanloop]
|
||||||
|
gcode:
|
||||||
|
# Vars
|
||||||
|
{% set THRESHOLD = printer["gcode_macro _BEDFANVARS"].threshold|int %}
|
||||||
|
{% set MAX_TEMP = printer["gcode_macro _BEDFANVARS"].max_temp|int %}
|
||||||
|
{% set TARGET_TEMP = printer["gcode_macro _BEDFANVARS"].target_temp|int %}
|
||||||
|
{% set CHAMBER_TEMP = printer["temperature_sensor chamber"].temperature|float %}
|
||||||
|
|
||||||
|
# Continue only if target temp greater than threshold.
|
||||||
|
{% if printer.heater_bed.target >= THRESHOLD %}
|
||||||
|
# If within 1 degree of target temp: Higher speed fans
|
||||||
|
{% if printer.heater_bed.temperature|int >= (printer.heater_bed.target|int - 1) %}
|
||||||
|
{% if CHAMBER_TEMP >= MAX_TEMP %}
|
||||||
|
# If chamber is at max temp, top fans
|
||||||
|
BEDFANSOFF
|
||||||
|
UPDATE_DELAYED_GCODE ID=bedfanloop DURATION=5 # If temp not reached yet: loop again
|
||||||
|
{% elif CHAMBER_TEMP >= TARGET_TEMP %}
|
||||||
|
# If chamber is at target temp, slow fans
|
||||||
|
BEDFANSSLOW
|
||||||
|
UPDATE_DELAYED_GCODE ID=bedfanloop DURATION=5 # If temp not reached yet: loop again
|
||||||
|
{% else %}
|
||||||
|
# If chamber is still under max, fast fans
|
||||||
|
BEDFANSFAST
|
||||||
|
UPDATE_DELAYED_GCODE ID=bedfanloop DURATION=5 # If temp not reached yet: loop again
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
UPDATE_DELAYED_GCODE ID=bedfanloop DURATION=5 # If temp not reached yet: loop again
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
42
crowsnest.conf
Normal file
42
crowsnest.conf
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
#### crowsnest.conf
|
||||||
|
#### This is a typical default config.
|
||||||
|
#### Also used as default in mainsail / MainsailOS
|
||||||
|
#### See:
|
||||||
|
#### https://github.com/mainsail-crew/crowsnest/blob/master/README.md
|
||||||
|
#### for details to configure to your needs.
|
||||||
|
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
#### #####
|
||||||
|
#### Information about ports and according URL's #####
|
||||||
|
#### #####
|
||||||
|
#####################################################################
|
||||||
|
#### #####
|
||||||
|
#### Port 8080 equals /webcam/?action=[stream/snapshot] #####
|
||||||
|
#### Port 8081 equals /webcam2/?action=[stream/snapshot] #####
|
||||||
|
#### Port 8082 equals /webcam3/?action=[stream/snapshot] #####
|
||||||
|
#### Port 8083 equals /webcam4/?action=[stream/snapshot] #####
|
||||||
|
#### #####
|
||||||
|
#####################################################################
|
||||||
|
#### RTSP Stream URL: ( if enabled and supported ) #####
|
||||||
|
#### rtsp://<ip>:<rtsp_port>/stream.h264 #####
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
|
||||||
|
[crowsnest]
|
||||||
|
log_path: /home/kdb424/printer_data/logs/crowsnest.log
|
||||||
|
log_level: verbose # Valid Options are quiet/verbose/debug
|
||||||
|
delete_log: false # Deletes log on every restart, if set to true
|
||||||
|
no_proxy: false
|
||||||
|
|
||||||
|
[cam 1]
|
||||||
|
mode: ustreamer # ustreamer - Provides mjpg and snapshots. (All devices)
|
||||||
|
# camera-streamer - Provides webrtc, mjpg and snapshots. (rpi + Raspi OS based only)
|
||||||
|
enable_rtsp: false # If camera-streamer is used, this enables also usage of an rtsp server
|
||||||
|
rtsp_port: 8554 # Set different ports for each device!
|
||||||
|
port: 8080 # HTTP/MJPG Stream/Snapshot Port
|
||||||
|
device: /dev/video0 # See Log for available ...
|
||||||
|
resolution: 640x480 # widthxheight format
|
||||||
|
max_fps: 15 # If Hardware Supports this it will be forced, otherwise ignored/coerced.
|
||||||
|
#custom_flags: # You can run the Stream Services with custom flags.
|
||||||
|
#v4l2ctl: # Add v4l2-ctl parameters to setup your camera, see Log what your cam is capable of.
|
6
fans.cfg
6
fans.cfg
|
@ -51,3 +51,9 @@ sensor_type: Generic 3950
|
||||||
sensor_pin: PA3 # TH2
|
sensor_pin: PA3 # TH2
|
||||||
min_temp: 0
|
min_temp: 0
|
||||||
max_temp: 100
|
max_temp: 100
|
||||||
|
|
||||||
|
[temperature_sensor chamber_insulation]
|
||||||
|
sensor_type: Generic 3950
|
||||||
|
sensor_pin: PA2 # TH2
|
||||||
|
min_temp: 0
|
||||||
|
max_temp: 100
|
||||||
|
|
10
force_move.cfg
Normal file
10
force_move.cfg
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[force_move]
|
||||||
|
enable_force_move: True
|
||||||
|
|
||||||
|
|
||||||
|
[gcode_macro FORCE_UP]
|
||||||
|
gcode:
|
||||||
|
{% set MOVE_MM = params.MM|default(20)|float %}
|
||||||
|
SET_KINEMATIC_POSITION X=0 Y=0 Z=0
|
||||||
|
G0 Z{MOVE_MM} F600
|
||||||
|
M84
|
|
@ -46,8 +46,8 @@ subscriptions:
|
||||||
|
|
||||||
# this enables moonraker's update manager
|
# this enables moonraker's update manager
|
||||||
[update_manager]
|
[update_manager]
|
||||||
refresh_interval: 48
|
refresh_interval: 9999999
|
||||||
enable_auto_refresh: True
|
enable_auto_refresh: False
|
||||||
|
|
||||||
[update_manager mainsail]
|
[update_manager mainsail]
|
||||||
type: web
|
type: web
|
||||||
|
@ -60,4 +60,22 @@ path: /home/biqu/klipper_z_calibration
|
||||||
origin: https://github.com/protoloft/klipper_z_calibration.git
|
origin: https://github.com/protoloft/klipper_z_calibration.git
|
||||||
managed_services: klipper
|
managed_services: klipper
|
||||||
|
|
||||||
|
# Crowsnest update_manager entry
|
||||||
|
[update_manager crowsnest]
|
||||||
|
type: git_repo
|
||||||
|
path: ~/crowsnest
|
||||||
|
origin: https://github.com/mainsail-crew/crowsnest.git
|
||||||
|
managed_services: crowsnest
|
||||||
|
install_script: tools/pkglist.sh
|
||||||
|
|
||||||
|
[update_manager timelapse]
|
||||||
|
type: git_repo
|
||||||
|
primary_branch: main
|
||||||
|
path: ~/moonraker-timelapse
|
||||||
|
origin: https://github.com/mainsail-crew/moonraker-timelapse.git
|
||||||
|
managed_services: klipper moonraker
|
||||||
|
|
||||||
|
[timelapse]
|
||||||
|
output_path: ~/printer_data/timelapse/
|
||||||
|
frame_path: /tmp/timelapse/printer
|
||||||
|
|
||||||
|
|
13
printer.cfg
13
printer.cfg
|
@ -28,9 +28,12 @@ unretract_speed: 50
|
||||||
[include fans.cfg]
|
[include fans.cfg]
|
||||||
[include basic_macros.cfg]
|
[include basic_macros.cfg]
|
||||||
[include sensorless.cfg]
|
[include sensorless.cfg]
|
||||||
#[include autoz.cfg]
|
[include autoz.cfg]
|
||||||
[include calibration_macros.cfg]
|
[include calibration_macros.cfg]
|
||||||
[include purge_bucket.cfg]
|
[include purge_bucket.cfg]
|
||||||
|
[include force_move.cfg]
|
||||||
|
[include timelapse.cfg]
|
||||||
|
[include bedfans.cfg]
|
||||||
|
|
||||||
[virtual_sdcard]
|
[virtual_sdcard]
|
||||||
path: ~/printer_data/gcodes
|
path: ~/printer_data/gcodes
|
||||||
|
@ -74,7 +77,7 @@ pid_kd: 238.614
|
||||||
pin: PA4
|
pin: PA4
|
||||||
x_offset: 0
|
x_offset: 0
|
||||||
y_offset: 26.0
|
y_offset: 26.0
|
||||||
z_offset: 3.475
|
z_offset: 3.6
|
||||||
samples: 3
|
samples: 3
|
||||||
samples_result: median
|
samples_result: median
|
||||||
sample_retract_dist: 1.0
|
sample_retract_dist: 1.0
|
||||||
|
@ -87,7 +90,7 @@ z_hop: 18
|
||||||
dock_retries: 3
|
dock_retries: 3
|
||||||
attach_speed: 50
|
attach_speed: 50
|
||||||
detach_speed: 15
|
detach_speed: 15
|
||||||
travel_speed: 100
|
travel_speed: 300
|
||||||
auto_attach_detach: True
|
auto_attach_detach: True
|
||||||
check_open_attach: True
|
check_open_attach: True
|
||||||
speed: 10.0
|
speed: 10.0
|
||||||
|
@ -114,14 +117,14 @@ points:
|
||||||
160,120
|
160,120
|
||||||
160,2
|
160,2
|
||||||
|
|
||||||
speed: 100
|
speed: 500
|
||||||
horizontal_move_z: 15
|
horizontal_move_z: 15
|
||||||
retries: 5
|
retries: 5
|
||||||
retry_tolerance: 0.0075
|
retry_tolerance: 0.0075
|
||||||
max_adjust: 10
|
max_adjust: 10
|
||||||
|
|
||||||
[bed_mesh]
|
[bed_mesh]
|
||||||
speed: 120
|
speed: 500
|
||||||
horizontal_move_z: 5
|
horizontal_move_z: 5
|
||||||
mesh_min: 2,26
|
mesh_min: 2,26
|
||||||
mesh_max: 170,156
|
mesh_max: 170,156
|
||||||
|
|
|
@ -68,7 +68,7 @@ gear_ratio: 60:16
|
||||||
microsteps: 32
|
microsteps: 32
|
||||||
endstop_pin: PC13
|
endstop_pin: PC13
|
||||||
position_endstop: 0.625
|
position_endstop: 0.625
|
||||||
position_max: 165
|
position_max: 155
|
||||||
position_min: -5
|
position_min: -5
|
||||||
homing_speed: 8
|
homing_speed: 8
|
||||||
second_homing_speed: 3
|
second_homing_speed: 3
|
||||||
|
|
1
timelapse.cfg
Symbolic link
1
timelapse.cfg
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/home/biqu/moonraker-timelapse/klipper_macro/timelapse.cfg
|
Loading…
Add table
Reference in a new issue