-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprinter-20240419_143109.cfg
469 lines (403 loc) · 10.6 KB
/
printer-20240419_143109.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
#####################################################################
# Voron V2.4 - http://voron.local
#####################################################################
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_270020001050334636383920-if00
restart_method: command
[mcu EBBCan]
#canbus_uuid: 3a1fcbf723e4 BTT SB2240
#canbus_uuid: 7c25c6b9944f #Fly SB2040
canbus_uuid: df9ee7029587 #BTT SB2209 RP2040
[printer]
kinematics: corexy
max_velocity: 600
max_accel: 12000
max_z_velocity: 150 #20
max_z_accel: 350
square_corner_velocity: 5.0
[virtual_sdcard]
path: /home/pi/printer_data/gcodes
on_error_gcode: CANCEL_PRINT
[include sensorless.cfg]
[include bedfans.cfg]
[include nozzle_scrub.cfg]
[include stealthburner.cfg]
[include speedtest.cfg]
[include extras.cfg]
[include print_area_bed_mesh.cfg]
[include mainsail.cfg]
[include config_backup.cfg]
[skew_correction]
[exclude_object]
#####################################################################
# X/Y Stepper Settings
#####################################################################
[stepper_x]
step_pin: PF13
dir_pin: PF12
enable_pin: !PF14
rotation_distance: 40
microsteps: 32
full_steps_per_rotation:200
endstop_pin: tmc2209_stepper_x:virtual_endstop
position_min: 0
position_endstop: 350
position_max: 350
homing_speed: 30
homing_retract_dist: 0
homing_positive_dir: true
[tmc2209 stepper_x]
uart_pin: PC4
interpolate: false
run_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0
diag_pin: PG6
driver_SGTHRS: 68 # 255 is most sensitive value, 0 is least sensitive
[stepper_y]
step_pin: PG0
dir_pin: PG1
enable_pin: !PF15
rotation_distance: 40
microsteps: 32
full_steps_per_rotation:200
endstop_pin: tmc2209_stepper_y:virtual_endstop
position_min: 0
position_endstop: 350
position_max: 350
homing_speed: 30
homing_retract_dist: 0
homing_positive_dir: true
[tmc2209 stepper_y]
uart_pin: PD11
interpolate: false
run_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0
diag_pin: PG9
driver_SGTHRS: 65 # 255 is most sensitive value, 0 is least sensitive
#####################################################################
# Z Stepper Settings
#####################################################################
[stepper_z]
step_pin: PF11
dir_pin: PG3
enable_pin: !PG5
rotation_distance: 40
gear_ratio: 80:16
microsteps: 32
endstop_pin: probe:z_virtual_endstop
position_max: 310
position_min: -5
homing_speed: 5
second_homing_speed: 3
homing_retract_dist: 3
[tmc2209 stepper_z]
uart_pin: PC6
interpolate: false
run_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0
[stepper_z1]
step_pin: PG4
dir_pin: !PC1
enable_pin: !PA0
rotation_distance: 40
gear_ratio: 80:16
microsteps: 32
[tmc2209 stepper_z1]
uart_pin: PC7
interpolate: false
run_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0
[stepper_z2]
step_pin: PF9
dir_pin: PF10
enable_pin: !PG2
rotation_distance: 40
gear_ratio: 80:16
microsteps: 32
[tmc2209 stepper_z2]
uart_pin: PF2
interpolate: false
run_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0
[stepper_z3]
step_pin: PC13
dir_pin: !PF0
enable_pin: !PF1
rotation_distance: 40
gear_ratio: 80:16
microsteps: 32
[tmc2209 stepper_z3]
uart_pin: PE4
interpolate: false
run_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0
#####################################################################
# Homing Override
#####################################################################
[homing_override]
axes: xyz
gcode:
{% set home_all = 'X' not in params and 'Y' not in params and 'Z' not in params %}
{% if home_all or 'X' in params %}
_HOME_X
{% endif %}
{% if home_all or 'Y' in params %}
_HOME_Y
{% endif %}
{% if home_all or 'Z' in params %}
G90
G0 X 175 Y 175 F 15000
G28 Z
G1 Z10
{% endif %}
set_position_z:0
#####################################################################
# Extruder
#####################################################################
[extruder]
step_pin: EBBCan: gpio18
dir_pin: EBBCan: gpio19
enable_pin: !EBBCan: gpio17
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: EBBCan:gpio7
sensor_type: MAX31865
sensor_pin: EBBCan:gpio9
spi_software_sclk_pin: EBBCan:gpio10
spi_software_mosi_pin: EBBCan:gpio8
spi_software_miso_pin: EBBCan:gpio11
rtd_nominal_r: 100
rtd_reference_r: 430
rtd_num_of_wires: 2
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 290
max_power: 1.0
min_extrude_temp: 170
#control = pid
#pid_kp = 26.213
#pid_ki = 1.304
#pid_kd = 131.721
pressure_advance: 0.04
pressure_advance_smooth_time: 0.040
[tmc2209 extruder]
uart_pin: EBBCan:gpio20
run_current: 0.650
stealthchop_threshold: 999999
#####################################################################
# Bed Heater
#####################################################################
[heater_bed]
heater_pin: PA3
sensor_type:Generic 3950
sensor_pin: PF3
max_power: 1
min_temp: 0
max_temp: 120
#control: pid
#pid_kp: 58.437
#pid_ki: 2.347
#pid_kd: 363.769
#####################################################################
# Temperature Sensors
#####################################################################
[temperature_sensor Chamber_Temp]
gcode_id: C
sensor_type: Generic 3950
sensor_pin: PF5
[temperature_sensor EBB_NTC]
sensor_type: Generic 3950
sensor_pin: EBBCan: gpio28
[temperature_sensor raspberry_pi]
sensor_type: temperature_host
min_temp: 10
max_temp: 100
#####################################################################
# Probe
#####################################################################
[probe]
pin: ^EBBCan: gpio22
x_offset: 0
y_offset: 0
#z_offset: 0
speed: 5
samples: 3
samples_result: median
sample_retract_dist: 3.0
samples_tolerance: 0.006
samples_tolerance_retries: 3
activate_gcode:
{% set PROBE_TEMP = 150 %}
{% set MAX_TEMP = PROBE_TEMP + 10 %}
{% set ACTUAL_TEMP = printer.extruder.temperature %}
{% set TARGET_TEMP = printer.extruder.target %}
{% if TARGET_TEMP > PROBE_TEMP %}
{ action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) }
M109 S{ PROBE_TEMP }
{% else %}
# Temperature target is already low enough, but nozzle may still be too hot.
{% if ACTUAL_TEMP > MAX_TEMP %}
{ action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) }
TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP }
{% endif %}
{% endif %}
#####################################################################
# Fan Control
#####################################################################
[fan]
pin: EBBCan: gpio13
kick_start_time: 0.5
off_below: 0.10
[heater_fan hotend_fan]
pin: EBBCan: gpio14
max_power: 1.0
kick_start_time: 0.5
heater: extruder
heater_temp: 50.0
[controller_fan controller_fan]
pin: PD12
kick_start_time: 0.2
heater: heater_bed
fan_speed: 0.6
#####################################################################
# Homing and Gantry Adjustment Routines
#####################################################################
[idle_timeout]
timeout: 1800
[quad_gantry_level]
gantry_corners:
-60,-10
410,420
points:
50,25
50,275
300,275
300,25
speed: 300
horizontal_move_z: 8
retries: 5
retry_tolerance: 0.0075
max_adjust: 20 #10
[bed_mesh]
speed: 300
horizontal_move_z: 8
mesh_min: 40, 40
mesh_max: 310,310
fade_start: 0.6
fade_end: 10.0
probe_count: 5,5
algorithm: bicubic
#relative_reference_index: 12
zero_reference_position: 175, 175
#####################################################################
# Macros
#####################################################################
[gcode_macro G32]
gcode:
SAVE_GCODE_STATE NAME=STATE_G32
G90
G28
QUAD_GANTRY_LEVEL
#G28 Z
G0 X175 Y175 Z5 F20000
RESTORE_GCODE_STATE NAME=STATE_G32
[gcode_macro PRINT_START]
gcode:
LIGHTS_ON
STATUS_HEATING
M190 S{ params.BED }
M109 S150
G90
STATUS_HOMING
G28 ; home all axes
STATUS_LEVELING
QUAD_GANTRY_LEVEL
#G28 Z
BED_MESH_CALIBRATE PRINT_MIN={params.PRINT_MIN} PRINT_MAX={params.PRINT_MAX} FORCE_NEW_MESH=True
STATUS_HEATING
M109 S{ params.EXTRUDER }
STATUS_CLEANING
CLEAN_NOZZLE
G90 ; absolute positioning
SET_SKEW XY=140.89,140.69,99.53
G0 X175 Y175 Z5 F20000
#G1 Z20 F3000 ; move nozzle away from bed
STATUS_BUSY
[gcode_macro PRINT_END]
gcode:
# safe anti-stringing move coords
{% set th = printer.toolhead %}
{% set x_safe = th.position.x + 20 * (1 if th.axis_maximum.x - th.position.x > 20 else -1) %}
{% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %}
{% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %}
SAVE_GCODE_STATE NAME=STATE_PRINT_END
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-5.0 F1800 ; retract filament
TURN_OFF_HEATERS
G90 ; absolute positioning
G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing
G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear
M107 ; turn off fan
M84 ; turn off motors
LIGHTS_OFF
BED_MESH_CLEAR
SET_SKEW CLEAR=1
RESTORE_GCODE_STATE NAME=STATE_PRINT_END
[gcode_macro SAVE_ENDSTOP]
gcode:
Z_OFFSET_APPLY_PROBE
SAVE_CONFIG
[gcode_macro QUAD_GANTRY_LEVEL]
description: QGL and then Home Z to move probe to centre of bed
rename_existing: QUAD_GANTRY_LEVEL_BASE
gcode:
QUAD_GANTRY_LEVEL_BASE
G28 Z
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 45.922
#*# pid_ki = 1.770
#*# pid_kd = 297.918
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 22.327
#*# pid_ki = 2.011
#*# pid_kd = 61.957
#*#
#*# [probe]
#*# z_offset = -1.050
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.021251, 0.036251, 0.037501, 0.017501, -0.009999
#*# -0.027499, -0.014999, -0.011249, -0.018749, -0.017499
#*# -0.018749, 0.001251, 0.000001, -0.003749, -0.018749
#*# 0.012501, -0.002499, 0.021251, 0.005001, 0.022501
#*# 0.071251, 0.071251, 0.038751, 0.043751, 0.041251
#*# x_count = 5
#*# y_count = 5
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = bicubic
#*# tension = 0.2
#*# min_x = 103.32
#*# max_x = 246.64
#*# min_y = 103.32
#*# max_y = 246.68