probe and stability changes

This commit is contained in:
Kyle Brown 2022-06-15 21:22:44 -07:00
parent 22b1a8f3d8
commit dd3d1c7be7
8 changed files with 100 additions and 80 deletions

View file

@ -10,15 +10,16 @@ gcode:
M104 S{hotendTemp|float*0.6} # set extruder pre warm temp
M140 S{bedTemp} # set bed temp to warm while starting up
G28 # home after setting temps
M140 S{bedTemp} # set & wait for bed temp
M117 Waiting for temperatures...
M190 S{bedTemp} # Wait for bed to come to temperature
M117 Waiting for thermal expansion...
HEATSOAK DWELL={DWELL} # Dwelling
CLEAN_NOZZLE # Clean before getting offsets
CALIBRATE_Z # Auto calibrate the bed height
BED_MESH_CALIBRATE AREA_START={params.AREA_START} AREA_END={params.AREA_END}
GO_TO_BUCKET
GO_TO_BUCKET # No cleanup from nozzle ooze
M109 S{hotendTemp} # Set extruder to printing temperature
CLEAN_NOZZLE
CLEAN_NOZZLE # Final clean before print
G90
G1 X{X} F6000 # Avoid brush
G91
@ -111,7 +112,8 @@ gcode:
G91
G1 Z{Z}
G90
G1 X{X} Y{Y} F6000
G1 X{X} F6000
G1 Y{Y} F6000
G91

View file

@ -66,3 +66,10 @@ type: git_repo
primary_branch: main
path: ~/moonraker-timelapse
origin: https://github.com/mainsail-crew/moonraker-timelapse.git
[update_manager client z_calibration]
type: git_repo
path: ~/klipper_z_calibration
origin: https://github.com/protoloft/klipper_z_calibration.git
install_script: install.sh
managed_services: klipper

View file

@ -11,15 +11,17 @@
[include purge_bucket.cfg]
[include timelapse.cfg]
[include sensorless.cfg]
[include probe.cfg]
[pause_resume]
[display_status]
[virtual_sdcard]
path: ~/gcode_files
[printer]
kinematics: corexy
max_velocity: 1000
max_velocity: 800
max_accel: 15000
max_accel_to_decel: 15000
max_z_velocity: 80
@ -42,66 +44,11 @@ max_temp: 125
max_power: 0.6
pwm_cycle_time: 0.0166
[bed_screws]
screw1: 12,0
screw2: 12,300
screw3: 312,300
screw4: 312,0
[screws_tilt_adjust]
screw1: 0, 0
screw1_name: front left screw
screw2: 294, 0
screw2_name: front right screw
screw3: 294, 239
screw3_name: rear right screw
screw4: 0, 239
screw4_name: rear left screw
horizontal_move_z: 20
speed: 500
screw_thread: CCW-M3
[firmware_retraction]
retract_length: 0.3
retract_speed: 80
unretract_speed: 80
[dockable_probe]
pin: PF7 # your probe pin goes here
x_offset: 26 # offset for microswitch x direction off nozzle
y_offset: 55 # offset for microswitch y direction off nozzle
z_offset: 5.644 # offset for microswitch in z height
samples: 1
sample_retract_dist: 3 # this is so the machine has time for the switch to reset properly, especially with a higher retract speed
samples_result: median
samples_tolerance: 0.04
samples_tolerance_retries: 3
speed: 15 # do not go higher than 10mm/s, you will destroy the switch
lift_speed: 20
dock_position: 322,317, 15 #you need to set these on your own
safe_z_position: 165,165 #used the center of the bed for this
approach_position: 290,317, 15 #you need to set these on your own
detach_position: 322,280 #you need to set these on your own
attach_speed: 30
detach_speed: 30
travel_speed: 500
check_open_attach: True #checks to see if the probe is attached before moving the toolhead, if not retries to pick up the probe
dock_fixed_z: True # k series printers use a dock fixed in the z axis, this was off a K2
dock_retries: 3
allow_delayed_detach: False
[bed_mesh]
speed: 500
horizontal_move_z: 7
mesh_min: 26, 66
mesh_max: 320, 305
probe_count: 6, 6
algorithm: bicubic
fade_start: 1
fade_end: 10
fade_target: 0
[input_shaper]
shaper_type_x = zv
shaper_freq_x = 119.2 # accel=55400

67
probe.cfg Normal file
View file

@ -0,0 +1,67 @@
[bed_screws]
screw1: 12,0
screw2: 12,300
screw3: 312,300
screw4: 312,0
[screws_tilt_adjust]
screw1: 0, 0
screw1_name: front left screw
screw2: 294, 0
screw2_name: front right screw
screw3: 294, 239
screw3_name: rear right screw
screw4: 0, 239
screw4_name: rear left screw
horizontal_move_z: 20
speed: 500
screw_thread: CCW-M3
[dockable_probe]
pin: PF7
x_offset: 26
y_offset: 55
z_offset: 5.644
samples: 3
sample_retract_dist: 3
samples_result: median
samples_tolerance: 0.04
samples_tolerance_retries: 3
speed: 5
lift_speed: 20
dock_position: 322,317, 15
safe_z_position: 165,165
approach_position: 290,317, 15
detach_position: 322,280
attach_speed: 30
detach_speed: 30
travel_speed: 500
check_open_attach: True
dock_fixed_z: True
dock_retries: 1
allow_delayed_detach: False
[z_calibration]
nozzle_xy_position: 332,245
switch_xy_position: 305,187
bed_xy_position: 150,150
switch_offset: 0.75
max_deviation: 10
samples: 3
samples_result: median
samples_tolerance: 0.04
samples_tolerance_retries: 3
start_gcode: ATTACH_PROBE
end_gcode: DETACH_PROBE
[bed_mesh]
speed: 500
horizontal_move_z: 7
mesh_min: 26, 66
mesh_max: 320, 305
probe_count: 6, 6
algorithm: bicubic
fade_start: 1
fade_end: 10
fade_target: 0

View file

@ -18,7 +18,7 @@ variable_purge_ret: 2 ; Retract length, in mm, after
variable_ooze_dwell: 1 ; Dwell/wait time, in seconds, after purging and retracting.
# Adjust this so that your nozzle scrubs within the brush. Currently defaulted to be a lot higher for safety. Be careful not to go too low!
variable_brush_top: 6
variable_brush_top: 2
# These parameters define your scrubbing, travel speeds, safe z clearance and how many times you want to wipe. Update as necessary. Wipe
# direction is randomized based off whether the left or right bucket is randomly selected in the purge & scrubbing routine.
@ -47,7 +47,7 @@ variable_wipe_spd_xy: 5000 ; Nozzle wipe speed in mm/min.
variable_brush_start: 230
# This value is defaulted from brush location in CAD (rear left). Change if your brush width is different.
variable_brush_width: 34
variable_brush_width: 30
## These are only used if location_bucket_rear is False. You specify a custom location in y axis for your brush - see diagram above. ##
variable_brush_front: 320
@ -118,6 +118,9 @@ gcode:
### Raise Z for travel.
G1 Z{brush_top + clearance_z} F{prep_spd_z}
### Position for purge. Randomly selects middle of left or right bucket. It references from the middle of the left bucket.
G1 X{bucket_start + (bucket_left_width / (2 - bucket_pos)) + (bucket_pos * bucket_gap) + (bucket_pos * (bucket_right_width / 2))} F{prep_spd_xy}
### Check if user chose to use rear location.
{% if location_bucket_rear %}
G1 Y{Ry} F{prep_spd_xy}
@ -125,9 +128,6 @@ gcode:
G1 Y{brush_front + (brush_depth / 2)} F{prep_spd_xy}
{% endif %}
### Position for purge. Randomly selects middle of left or right bucket. It references from the middle of the left bucket.
G1 X{bucket_start + (bucket_left_width / (2 - bucket_pos)) + (bucket_pos * bucket_gap) + (bucket_pos * (bucket_right_width / 2))}
### Perform purge if the temp is up to min temp. If not, it will skip and continue executing rest of macro. Small retract after
### purging to minimize any persistent oozing at 5x purge_spd. G4 dwell is in milliseconds, hence * 1000 in formula.
{% if printer.extruder.temperature >= purge_temp_min %}
@ -165,7 +165,7 @@ gcode:
G1 Z{brush_top + clearance_z} F{prep_spd_z}
## Restore the gcode state to how it was before the macro.
RESTORE_GCODE_STATE NAME=clean_nozzle MOVE=1 MOVE_SPEED=1000
RESTORE_GCODE_STATE NAME=clean_nozzle MOVE=1 MOVE_SPEED=800
{% else %}

View file

@ -47,20 +47,15 @@ gcode:
[homing_override]
axes: xyz
set_position_y: 316
set_position_z: -1.8
gcode:
# Parameters
{% set Y = -20 %} # Avoid dock
{% set Z = 10 %}
SET_VELOCITY_LIMIT ACCEL=500 ACCEL_TO_DECEL=500 VELOCITY=100
G90
G1 Z{Z}
G91
G1 Y{Y}
SET_VELOCITY_LIMIT ACCEL=500 ACCEL_TO_DECEL=500 VELOCITY=100 # Lower accels/speed
G90
G1 Z{Z} # Z lift
{% set home_all = params.X is not defined and params.Y is not defined and params.Z is not defined %}
@ -75,9 +70,13 @@ gcode:
{% if params.Z is defined or home_all %}
{action_respond_info("Doing G28 Z0")}
# You can do your logic for safe z here
SET_VELOCITY_LIMIT VELOCITY=800 ACCEL=15000 ACCEL_TO_DECEL=15000
G90
G1 x332 y245 F30000
G28 Z0
G1 Z{Z}
G91
{% endif %}
SET_VELOCITY_LIMIT VELOCITY=1000 ACCEL=15000 ACCEL_TO_DECEL=15000
SET_VELOCITY_LIMIT VELOCITY=800 ACCEL=15000 ACCEL_TO_DECEL=15000

View file

@ -36,9 +36,10 @@ dir_pin: !PG3
enable_pin: !PG5
microsteps: 16
rotation_distance: 4
endstop_pin: PG10
position_endstop: -2.510
position_min: -2.6
#endstop_pin: PG11 # Bed Endstop
endstop_pin: PG10 # Nozzle Endstop
position_endstop: -0.2
position_min: -5
position_max: 400
full_steps_per_rotation: 200
homing_retract_dist: 5.0

View file

@ -10,6 +10,3 @@ driver_TBL: 1
driver_TOFF: 3
driver_HSTRT: 0
driver_HEND: 3
[endstop_phase stepper_z]
trigger_phase = 22/64