-
Notifications
You must be signed in to change notification settings - Fork 0
/
printer-20240308_203748.cfg
460 lines (411 loc) · 10.7 KB
/
printer-20240308_203748.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
[include mainsail.cfg]
[include KAMP_Settings.cfg]
[virtual_sdcard]
path: /home/kevin/printer_data/gcodes
on_error_gcode: CANCEL_PRINT
# This file contains common pin mappings for the BIGTREETECH SKR Pico V1.0
# To use this config, the firmware should be compiled for the RP2040 with
# USB communication.
# The "make flash" command does not work on the SKR Pico V1.0. Instead,
# after running "make", copy the generated "out/klipper.uf2" file
# to the mass storage device in RP2040 boot mode
# See docs/Config_Reference.md for a description of parameters.
[exclude_object]
[autotune_tmc stepper_x]
motor: creality-42-34
tuning_goal=silent
[autotune_tmc stepper_y]
motor: creality-42-34
tuning_goal=silent
[autotune_tmc stepper_z]
motor: creality-42-34
tuning_goal=silent
[motor_constants BJ42D09-20V02]
#Creality Sprite Pro https://user-images.githubusercontent.com/862951/235050029-79124b76-81d3-4f77-9501-6404f7c38336.png
resistance: 1.75
inductance: 0.003
holding_torque: 0.15
max_current: 0.84
steps_per_revolution: 200
[autotune_tmc extruder]
motor: BJ42D09-20V02
tuning_goal=performance
[stepper_x]
step_pin: gpio11
dir_pin: !gpio10
enable_pin: !gpio12
microsteps: 16
rotation_distance: 40
endstop_pin: ^gpio4
position_endstop: 0
position_max: 234
homing_speed: 50
[tmc2209 stepper_x]
uart_pin: gpio9
tx_pin: gpio8
uart_address: 0
run_current: 0.580
stealthchop_threshold: 999999
[stepper_y]
step_pin: gpio6
dir_pin: !gpio5
enable_pin: !gpio7
microsteps: 16
rotation_distance: 40
endstop_pin: ^gpio3
position_endstop: 0
position_max: 240
homing_speed: 50
[tmc2209 stepper_y]
uart_pin: gpio9
tx_pin: gpio8
uart_address: 2
run_current: 0.580
stealthchop_threshold: 999999
[stepper_z]
step_pin: gpio19
dir_pin: gpio28
enable_pin: !gpio2
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
position_min: -4.0 # The Z carriage may need to travel below the Z=0
# homing point if the bed has a significant tilt.
#position_endstop: 0.0
position_max: 250
[tmc2209 stepper_z]
uart_pin: gpio9
tx_pin: gpio8
uart_address: 1
run_current: 0.580
stealthchop_threshold: 999999
[extruder]
max_extrude_only_distance: 200.0
step_pin: gpio14
dir_pin: !gpio13
enable_pin: !gpio15
microsteps: 16
gear_ratio: 3.5:1
rotation_distance: 25.6
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: gpio23
sensor_type: Generic 3950
sensor_pin: gpio27
#control: pid
#pid_Kp: 21.527
#pid_Ki: 1.063
#pid_Kd: 108.982
min_temp: 0
max_temp: 300
pressure_advance = 0.0525
max_extrude_cross_section = 16
[tmc2209 extruder]
uart_pin: gpio9
tx_pin: gpio8
uart_address: 3
run_current: 0.75
stealthchop_threshold: 999999
[heater_bed]
heater_pin: gpio21
sensor_type: EPCOS 100K B57560G104F
sensor_pin: gpio26
#control: pid
#pid_Kp: 54.027
#pid_Ki: 0.770
#pid_Kd: 948.182
min_temp: 0
max_temp: 130
[fan]
pin: gpio17
[heater_fan heatbreak_cooling_fan]
pin: gpio18
heater: extruder
heater_temp: 50.0
max_power: 0.8
shutdown_speed: 0.0
[heater_fan controller_fan]
pin: gpio20
[temperature_sensor pico]
sensor_type: temperature_mcu
[mcu]
serial: /dev/serial/by-id/usb-Klipper_rp2040_45503571288CCBA8-if00
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 5000
max_accel_to_decel: 5000
max_z_velocity: 10
max_z_accel: 200
square_corner_velocity: 3.5
[neopixel board_neopixel]
pin: gpio24
chain_count: 1
color_order: GRB
initial_RED: 0.0
initial_GREEN: 0.05
initial_BLUE: 0.0
[mcu display]
serial: /dev/serial/by-id/usb-Klipper_stm32f042x6_1A0008000A43304146393720-if00
restart_method: command
[display]
lcd_type: sh1106
i2c_mcu: display
i2c_bus: i2c1a
# Set the direction of the encoder wheel
# Standard: Right (clockwise) scrolls down or increases values. Left (counter-clockwise scrolls up or decreases values.
encoder_pins: ^display:PA3, ^display:PA4
# Reversed: Right (clockwise) scrolls up or decreases values. Left (counter-clockwise scrolls down or increases values.
#encoder_pins: ^display:PA4, ^display:PA3
click_pin: ^!display:PA1
kill_pin: ^!display:PA5
x_offset: 2
# Use X offset to shift the display towards the right. Value can be 0 to 3
vcomh: 31
# Set the Vcomh value on SSD1306/SH1106 displays. This value is
# associated with a "smearing" effect on some OLED displays. The
# value may range from 0 to 63. Default is 0.
# Adjust this value if you get some vertical stripes on your display. (31 seems to be a good value)
[neopixel displayStatus]
pin: display:PA0
chain_count: 1
color_order: GRB
initial_RED: 0.3
initial_GREEN: 0.05
initial_BLUE: 0
[bltouch]
sensor_pin: ^gpio16
control_pin: gpio29
#pin_up_touch_mode_reports_triggered: FALSE
stow_on_each_sample = False
#probe_with_touch_mode = False
x_offset: -34
y_offset: -34
#z_offset: 0
speed: 150
samples: 2
samples_result:average
sample_retract_dist: 1.5
[temperature_sensor Raspberry_Pi]
sensor_type: temperature_host
min_temp: 0
max_temp: 100
[safe_z_home]
#home_xy_position: 146.7,157 # Change coordinates to the center of your print bed
home_xy_position: 146.5,151.5
speed: 50
z_hop: 15 # Move up 15mm
z_hop_speed: 5
[gcode_macro G29]
gcode:
M190 S55
G28
BED_MESH_CALIBRATE
BED_MESH_PROFILE SAVE=mesh1
[bed_mesh]
speed: 300
mesh_min: 30,30
mesh_max: 200,200
algorithm: bicubic
bicubic_tension: 0.3
probe_count: 7,7
horizontal_move_z: 5
fade_start: 1
fade_end: 3
fade_target: 0
[screws_tilt_adjust]
screw1: 60.5,76.5
screw1_name: front left screw
screw2: 230.5,73.5
screw2_name: front right screw
screw3: 233.5,239.5
screw3_name: rear right screw
screw4: 63.5,240
screw4_name: rear left screw
horizontal_move_z: 10
speed: 100
screw_thread: CW-M4
######################################################################
# Filament Change
######################################################################
# M600: Filament Change. This macro will pause the printer, move the
# tool to the change position, and retract the filament 50mm. Adjust
# the retraction settings for your own extruder. After filament has
# been changed, the print can be resumed from its previous position
# with the "RESUME" gcode.
[pause_resume]
[gcode_macro M600]
gcode:
{% set X = params.X|default(50)|float %}
{% set Y = params.Y|default(0)|float %}
{% set Z = params.Z|default(10)|float %}
SAVE_GCODE_STATE NAME=M600_state
PAUSE
G91
G1 E-.8 F2700
G1 Z{Z}
G90
G1 X{X} Y{Y} F3000
G91
G1 E-50 F1000
RESTORE_GCODE_STATE NAME=M600_state
[gcode_macro M420]
gcode:
BED_MESH_PROFILE LOAD=mesh1
[gcode_macro level_bed]
gcode:
M190 S55
G28
SCREWS_TILT_CALCULATE
[gcode_macro START_PRINT]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(55)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(200)|float %}
# Heat bed for probing
M190 S{BED_TEMP}
# Use absolute coordinates
G90
# Home the printer
G28
# If you are generating a new bed mesh:
BED_MESH_CALIBRATE
# Move the nozzle near the bed
#G1 Z5 F3000
#KAMP Smart Park
Smart_Park
# Set and wait for nozzle to reach printing temperature
M109 S{EXTRUDER_TEMP}
# Start printing!
#KAMP Line Purge
LINE_PURGE
[pause_resume]
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
PAUSE_BASE
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
G91
G1 E{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
CANCEL_PRINT_BASE
[input_shaper]
#shaper_freq_x: 46.6
#shaper_type_x: zv
#shaper_freq_y: 33.2
#shaper_type_y: zv
#[filament_switch_sensor runout_sensor]
#switch_pin: ^gpio16
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 21.117
#*# pid_ki = 1.100
#*# pid_kd = 101.364
#*#
#*# [bltouch]
#*# z_offset = 3.399
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 62.399
#*# pid_ki = 0.898
#*# pid_kd = 1083.411
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# -0.256250, -0.172500, -0.126250, -0.171250, -0.101250, -0.228750
#*# -0.188750, -0.137500, -0.080000, -0.120000, -0.060000, -0.147500
#*# -0.148750, -0.063750, -0.018750, -0.036250, 0.027500, -0.101250
#*# -0.165000, -0.088750, -0.058750, -0.082500, -0.002500, -0.077500
#*# -0.215000, -0.117500, -0.061250, -0.066250, 0.010000, -0.107500
#*# -0.266250, -0.205000, -0.160000, -0.175000, -0.095000, -0.155000
#*# tension = 0.3
#*# min_x = 40.61
#*# algo = lagrange
#*# y_count = 6
#*# mesh_y_pps = 2
#*# min_y = 40.06
#*# x_count = 6
#*# max_y = 180.01
#*# mesh_x_pps = 2
#*# max_x = 179.46
#*#
#*# [bed_mesh mesh1]
#*# version = 1
#*# points =
#*# 0.028750, 0.151250, 0.230000, 0.161250, 0.205000
#*# 0.027500, 0.057500, -0.126250, 0.055000, 0.212500
#*# 0.030000, 0.085000, -0.022500, 0.080000, 0.206250
#*# -0.007500, 0.122500, 0.025000, 0.092500, 0.166250
#*# 0.017500, 0.133750, 0.033750, 0.088750, 0.175000
#*# tension = 0.3
#*# min_x = 30.0
#*# algo = bicubic
#*# y_count = 5
#*# mesh_y_pps = 2
#*# min_y = 30.0
#*# x_count = 5
#*# max_y = 190.0
#*# mesh_x_pps = 2
#*# max_x = 190.0
#*#
#*# [input_shaper]
#*# shaper_type_x = 2hump_ei
#*# shaper_freq_x = 44.8
#*# shaper_type_y = 2hump_ei
#*# shaper_freq_y = 39.0