-
Notifications
You must be signed in to change notification settings - Fork 0
/
printer-20231001_174245.cfg
481 lines (411 loc) · 13.9 KB
/
printer-20231001_174245.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
# This file contains pin mappings for the stock Sovol SV06.
#
# Find installation instructions at https://github.com/bassamanator/Sovol-SV06-firmware
#
# See https://www.klipper3d.org/Config_Reference.html for configuration reference.
[include misc-macros.cfg]
[include PARKING.cfg]
[include MECHANICAL_GANTRY_CALIBRATION.cfg]
[include CALIBRATION.cfg]
# NOTE Uncomment the ONE of the following lines if you're using an adxl345
# [include ./cfgs/adxl-rp2040.cfg]
# [include ./cfgs/adxl-rpi-pico-2x.cfg]
#[include adxl-direct.cfg]
#[include mainsail.cfg]
[include mainsail1.cfg]
[include macros.cfg]
[include timelapse.cfg]
[include ADXL_SHAPER.cfg ]
[include KAMP_Settings.cfg]
[include config_backup.cfg]
[include Smart_Park.cfg]
[include Line_Purge.cfg]
[exclude_object]
[skew_correction]
[virtual_sdcard]
path: /home/Klipper/printer_data/gcodes
# Enable arcs support
[gcode_arcs]
resolution: 0.1
[mcu]
# NOTE Obtain definition by "ls -l /dev/serial/by-path/" or "ls -l /dev/serial/by-id/"
serial: /dev/serial/by-id/usb-1a86_USB2.0-Serial-if00-port0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 275
max_accel: 3500
max_z_velocity: 15
max_z_accel: 45
square_corner_velocity: 8.0
#####################################################################
# X/Y/Z Stepper Settings
#####################################################################
[stepper_x]
step_pin: PC2
dir_pin: !PB9
enable_pin: !PC3
microsteps: 128
rotation_distance: 39.56
endstop_pin: tmc2209_stepper_x:virtual_endstop
position_endstop: 0
position_max: 223 # NOTE You can adjust this if you have more room
homing_speed: 40
homing_retract_dist: 0
[tmc2209 stepper_x]
uart_pin: PC1
run_current: 0.900
stealthchop_threshold: 0
interpolate: False
sense_resistor: 0.110
uart_address: 3
driver_SGTHRS: 81
diag_pin: PA5
[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 128
rotation_distance: 39.40
endstop_pin: tmc2209_stepper_y:virtual_endstop
position_endstop: 0
position_max: 223 # NOTE You can adjust this if you have more room
homing_speed: 40
homing_retract_dist: 0
[tmc2209 stepper_y]
uart_pin: PC0
run_current: 1.000
stealthchop_threshold: 0
interpolate: False
sense_resistor: 0.110
uart_address: 3
driver_SGTHRS: 81
diag_pin: PA6
[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
microsteps: 128
rotation_distance: 4
endstop_pin: probe:z_virtual_endstop
position_min: -3
position_max: 258 # NOTE You can adjust this if you have more room
homing_speed: 5
[tmc2209 stepper_z]
uart_pin: PA15
run_current: 1.000
stealthchop_threshold: 0
interpolate: False
sense_resistor: 0.110
uart_address: 3
diag_pin: PA7
#####################################################################
# Extruder
#####################################################################
[extruder]
step_pin: PB4
dir_pin: !PB3
enable_pin: !PC3
microsteps: 256
rotation_distance: 4.10 # NOTE Calibrate e-steps and adjust https://www.klipper3d.org/Rotation_Distance.html
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
min_temp: 0
max_temp: 300
max_extrude_only_distance: 150.0
pressure_advance: 0.0465 # 0.044
max_extrude_cross_section: 5
[tmc2209 extruder]
uart_pin: PC14
run_current: 0.550
stealthchop_threshold: 0
interpolate: False
sense_resistor: 0.110
uart_address: 3
#####################################################################
# Bed Heater
#####################################################################
[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
min_temp: 0
max_temp: 110
#####################################################################
# Probe Related
#####################################################################
[probe]
pin: PB1
x_offset: 27
y_offset: -20
# z_offset: 0
samples: 3
samples_result: median
samples_tolerance: 0.01
samples_tolerance_retries: 5
[safe_z_home]
home_xy_position: 84.50, 135 # NOTE The probe is at the center of the bed.
speed: 100.0
z_hop: 10
z_hop_speed: 15
[bed_mesh]
speed: 175
mesh_min: 27, 5
mesh_max: 222, 203
probe_count: 5,5
algorithm: bicubic
fade_start: 1
fade_end: 10
fade_target: 0
#####################################################################
# Fans
#####################################################################
[fan]
pin: PA0
#####################################################################
# Misc
#####################################################################
[display]
lcd_type: st7920
cs_pin: PB12
sclk_pin: PB13
sid_pin: PB15
encoder_pins: ^PB14, ^PB10
click_pin: ^!PB2
[input_shaper]
shaper_freq_x: 55.0 # 97.2 # 82.2 # 84.2; 4020
shaper_type_x: mzv # 3hump_ei # 2hump_ei
shaper_freq_y: 40.6 # 41.8; 4020
shaper_type_y: mzv
[bed_screws]
screw1_name: front left
screw1: 26.5, 31
screw2_name: front right
screw2: 196.75, 31
screw3_name: back right
screw3: 196.75, 201
screw4_name: back left
screw4: 26.5, 201
[screws_tilt_adjust]
screw1_name: center
screw1: 84.50, 135
screw2_name: front left
screw2: 0, 51
screw3_name: front right
screw3: 169.75, 51
screw4_name: back right
screw4: 169.75, 221
screw5_name: back left
screw5: 0, 221
speed: 50
horizontal_move_z: 10
screw_thread: CCW-M4
[output_pin beeper]
pin: PC6
value: 0
shutdown_value: 0
pwm: True
cycle_time: 0.0005 ; Default beeper tone in kHz. 1 / 0.0005 = 2000Hz (2kHz)
[filament_switch_sensor filament_sensor]
switch_pin: !PA4 # "Pulled-high"
pause_on_runout: True
insert_gcode:
M117 Insert Detected
{ action_respond_info("Insert Detected") }
runout_gcode:
M117 Runout Detected
{ action_respond_info("Runout Detected") }
CONDITIONAL_BEEP i=3 dur=300 freq=400
##################################################
# Print Start Macro
##################################################
# [gcode_macro START_PRINT]
# gcode:
# G92 E0 ; Reset Extruder
# {% set bed_temp = params.BED_TEMP|default(0)|float %}
# {% set extruder_temp = params.EXTRUDER_TEMP|default(0)|float %}
# {% set FL_SIZE = params.SIZE|default("0_0_0_0")|string %}
# M140 S{bed_temp} ;Start heating bed
# G28 ; Home all axes
# M190 S{bed_temp} ;Wait for bed to reach temp before proceeding
# M104 S{extruder_temp} ;Start heating extruder
# BED_MESH_CALIBRATE
# G1 Y0 F10000
# M109 S{extruder_temp} ;Wait for extruder to reach temp before proceeding
# G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
# G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
# G92 E0 ; Reset Extruder
# G1 Z3.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
# G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish
# LINE_PURGE
[gcode_macro PRINT_START]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set HOTEND_TEMP = params.HOTEND_TEMP|default(215)|float %}
BED_MESH_CLEAR ; Clear bed mesh
G90 ; Absolute positioning mode
{% if printer.heater_bed.temperature < (BED_TEMP * 0.95) %} ; Park if bed not hot
M140 S{BED_TEMP} ; Start bed heating
G28 ; Home the printer
G0 X{printer.toolhead.axis_minimum.x + 10} Y{printer.toolhead.axis_minimum.y + 10} Z5 F{250 * 60} ; Park at front corner
{% endif %}
M190 S{BED_TEMP} ; Wait for bed to fully heat
G28 ; Home the printer
BED_MESH_CALIBRATE ; KAMP bed mesh
M104 S{HOTEND_TEMP} ; Start heating hotend to final temp
SMART_PARK ; KAMP smart park
M109 S{HOTEND_TEMP} ; Fully heat hotend
LINE_PURGE ; KAMP Line purge
SKEW_PROFILE LOAD=my_skew_profile
[gcode_macro PRINT_END]
gcode:
ADJUST_FILAMENT_SENSOR_STATUS ENABLE=0
CONDITIONAL_BEEP I=2 DUR=30 FREQ=8500
{% set PRE_PURGE_PRIME_LENGTH=printer["gcode_macro _globals"].pre_purge_prime_length|default(1.40)|float %}
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-{PRE_PURGE_PRIME_LENGTH} F400 ; retract filament
G91 ; relative positioning
# Set safe speeds
{% set zVelocity = printer.configfile.settings.printer.max_z_velocity|default(15)|int %}
{% set maxVelocity = printer.configfile.settings.printer.max_velocity|default(200)|int %}
{% set zVelocityAdjusted = (0.95 * zVelocity * 60)|int %}
{% set maxVelocityAdjusted = (0.95 * maxVelocity * 60)|int %}
# Get Boundaries
{% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %}
{% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %}
{% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %}
# Check end position to determine safe direction to move
{% if printer.toolhead.position.x < (max_x - 20) %}
{% set x_safe = 20.0 %}
{% else %}
{% set x_safe = -20.0 %}
{% endif %}
{% if printer.toolhead.position.y < (max_y - 20) %}
{% set y_safe = 20.0 %}
{% else %}
{% set y_safe = -20.0 %}
{% endif %}
{% set lift_height = 25.0 %}
{% if printer.toolhead.position.z < (max_z - lift_height) %}
{% set z_safe = lift_height %}
{% else %}
{% set z_safe = max_z - printer.toolhead.position.z %}
{% endif %}
G0 Z{z_safe} F{zVelocityAdjusted} ; move nozzle up
G0 X{x_safe} Y{y_safe} F{maxVelocityAdjusted} ; move nozzle to remove stringing
TURN_OFF_HEATERS
M107 ; turn off fan
G90 ; absolute positioning
G0 X60 Y{max_y} F3600 ; park nozzle at rear
SET_SKEW CLEAR=1
[gcode_macro Home_Check]
description: Checks if the printer is homed, if not it homes the printer
gcode:
{% if printer.toolhead.homed_axes != "xyz" %}
G28
{% endif %}
[gcode_macro PREHEAT_PETG_Hatchbox]
description: Preheats extruder and bed for PLA printing, extruder set to 150 to prevent filament leaking while homing etc
gcode:
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(230)|float %}
{% set BED_TEMP = params.BED_TEMP|default(70)|float %}
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={EXTRUDER_TEMP}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={BED_TEMP}
[gcode_macro PREHEAT_PLA_Hatchbox]
description: Preheats extruder and bed for PLA printing, extruder set to 150 to prevent filament leaking while homing etc
gcode:
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(225)|float %}
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={EXTRUDER_TEMP}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={BED_TEMP}
[gcode_macro PREHEAT_PLA_Eryone]
description: Preheats extruder and bed for PLA printing, extruder set to 150 to prevent filament leaking while homing etc
gcode:
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(215)|float %}
{% set BED_TEMP = params.BED_TEMP|default(65)|float %}
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={EXTRUDER_TEMP}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={BED_TEMP}
[gcode_macro PREHEAT_PLA+_Eryone]
description: Preheats extruder and bed for PLA printing, extruder set to 150 to prevent filament leaking while homing etc
gcode:
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(215)|float %}
{% set BED_TEMP = params.BED_TEMP|default(65)|float %}
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={EXTRUDER_TEMP}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={BED_TEMP}
[gcode_macro PREHEAT_PETG_Polymaker]
description: Preheats extruder and bed for PLA printing, extruder set to 150 to prevent filament leaking while homing etc
gcode:
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(235)|float %}
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={EXTRUDER_TEMP}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={BED_TEMP}
[gcode_macro PREHEAT_PETG_California_Filament]
description: Preheats extruder and bed for PLA printing, extruder set to 150 to prevent filament leaking while homing etc
gcode:
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(240)|float %}
{% set BED_TEMP = params.BED_TEMP|default(70)|float %}
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={EXTRUDER_TEMP}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={BED_TEMP}
[gcode_macro PREHEAT_PETG_Sunlu]
description: Preheats extruder and bed for PLA printing, extruder set to 150 to prevent filament leaking while homing etc
gcode:
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(225)|float %}
{% set BED_TEMP = params.BED_TEMP|default(70)|float %}
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={EXTRUDER_TEMP}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={BED_TEMP}
[gcode_macro DISABLE_STEPPERS]
description: Disables the printers stepper motors
gcode:
M84 X Y E
[gcode_macro UNLOAD_FILAMENT]
gcode:
M83 ; set extruder to relative
G1 X125 Y50 Z80 ; move to servicing position
G1 E10 F300 ; extrude a little to soften tip
G1 E-10 F3000 ; jerk the filament out of the melt zone
G1 E-50 F1800 ; retract the rest of the way
G1 E-10 F900 ; retract the rest of the way
M82
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 23.147
#*# pid_ki = 1.559
#*# pid_kd = 85.934
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 68.957
#*# pid_ki = 1.281
#*# pid_kd = 928.332
#*#
#*# [probe]
#*# z_offset = 1.660
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.531719, 0.152031, -0.196406, -0.520469
#*# 0.523125, 0.156875, -0.200625, -0.520313
#*# 0.496562, 0.150937, -0.206250, -0.530469
#*# x_count = 4
#*# y_count = 3
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = lagrange
#*# tension = 0.2
#*# min_x = 46.71
#*# max_x = 173.28
#*# min_y = 100.21
#*# max_y = 119.78999999999999
#*#
#*# [skew_correction my_skew_profile]
#*# xy_skew = -2.220446049250313e-16
#*# xz_skew = 0.0
#*# yz_skew = 0.0