-
Notifications
You must be signed in to change notification settings - Fork 1
/
printer.cfg
439 lines (395 loc) · 10 KB
/
printer.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
#-------------------------------------
# Ender 5 Plus w/ SKR 1.4 Turbo, 2209's
# v. 0.10
#-------------------------------------
[include mainsail.cfg]
#-------------------------------------
# Firmware Retraction
#-------------------------------------
# [firmware_retraction]
# retract_length: 0.8
# retract_speed: 60
# unretract_extra_length: 0
# unretract_speed: 60
#-------------------------------------
# Pressure Advance
#-------------------------------------
# [extruder]
# pressure_advance: 0.0 # Overture PLA
#-------------------------------------
# Input Shaper
#-------------------------------------
[mcu rpi]
serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#[resonance_tester]
#accel_chip: adxl345
#probe_points:
# 180, 180, 20 # an example
#-------------------------------------
# Extruder
#-------------------------------------
[extruder]
step_pin: P2.13
dir_pin: !P0.11
enable_pin: !P2.12
microsteps: 16
rotation_distance: 8 #NEW rotation_distance = <previous_rotation_distance> x <actual_extrude_distance> / <requested_extrude_distance>
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: P2.7
sensor_type: EPCOS 100K B57560G104F
sensor_pin: P0.24
min_temp: 0
max_temp: 260
max_extrude_only_distance: 500
#-------------------------------------
# Printer General
#-------------------------------------
[safe_z_home]
home_xy_position: 180, 180
speed: 100
z_hop: 10
z_hop_speed: 100
[bltouch]
sensor_pin: P0.10 #Probe
control_pin: P2.0 #SERVOS
stow_on_each_sample: False
probe_with_touch_mode: True
pin_up_touch_mode_reports_triggered: False
set_output_mode: 5V
speed: 100
pin_move_time: 0.675
lift_speed: 200
samples: 4
sample_retract_dist: 10
#Mount Offset
x_offset: -42.5
y_offset: -14
[bed_mesh]
speed: 100
horizontal_move_z: 5
mesh_min: 5, 15
mesh_max: 310,337
probe_count: 5,5
fade_start: 1
fade_end: 10
[heater_bed]
heater_pin: P2.5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: P0.25
max_power: 0.8
min_temp: 0
max_temp: 130
pwm_cycle_time: 0.01666
[fan]
pin: P2.3
[mcu]
serial: /dev/serial/by-id/usb-Klipper_lpc1769_1E900008A8943BAFE7AD685CC02000F5-if00
[filament_switch_sensor filament_sensor]
switch_pin:P1.26
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 2500
max_z_velocity: 5
max_z_accel: 100
[temperature_sensor raspberry_pi]
sensor_type: temperature_host
max_temp: 100
#-------------------------------------
# Bed Leveling
#-------------------------------------
[z_tilt]
z_positions: -18.4,180
378.4,180
points: 38,180
360,180
speed: 50
horizontal_move_z: 5
retries: 15
retry_tolerance:0.01
[screws_tilt_adjust]
screw1: 71,60
screw1_name: front left screw
screw2: 332,60
screw2_name: front right screw
screw3: 332,321
screw3_name: rear right screw
screw4: 71,321
screw4_name: rear left screw
horizontal_move_z: 10.
speed: 50.
screw_thread: CW-M4
[bed_screws]
screw1: 27.5, 47
screw2: 327.5, 47
screw3: 327.5, 307
screw4: 27.5, 307
#-------------------------------------
# Board
#-------------------------------------
[board_pins]
aliases:
EXP1_1=P1.30, EXP1_3=P1.18, EXP1_5=P1.20, EXP1_7=P1.22, EXP1_9=<GND>,
EXP1_2=P0.28, EXP1_4=P1.19, EXP1_6=P1.21, EXP1_8=P1.23, EXP1_10=<5V>,
EXP2_1=P0.17, EXP2_3=P3.26, EXP2_5=P3.25, EXP2_7=P1.31, EXP2_9=<GND>,
EXP2_2=P0.15, EXP2_4=P0.16, EXP2_6=P0.18, EXP2_8=<RST>, EXP2_10=<NC>
[display]
lcd_type: emulated_st7920
en_pin: EXP1_4
spi_software_sclk_pin: EXP1_5
spi_software_mosi_pin: EXP1_3
spi_software_miso_pin: EXP1_6
encoder_pins: ^EXP2_5, ^EXP2_3
click_pin: ^!EXP1_2
[output_pin BEEPER_pin]
pin: EXP1_1
pwm: True
value: 0
shutdown_value: 0
cycle_time: 0.001
#-------------------------------------
# Others
#-------------------------------------
[force_move]
enable_force_move: True
[virtual_sdcard]
path: /home/pi/printer_data/gcodes
[exclude_object]
[display_status]
[pause_resume]
#[respond]
# default_type: echo
[idle_timeout]
timeout: 1800
gcode:
TURN_OFF_HEATERS
#-------------------------------------
# Stepper Drivers
#-------------------------------------
[tmc2209 stepper_x]
uart_pin: P1.10
interpolate: False
sense_resistor: 0.110
run_current: 0.800
hold_current: 0.500
stealthchop_threshold: 999999
[tmc2209 stepper_y]
uart_pin: P1.9
interpolate: False
sense_resistor: 0.110
run_current: 0.800
stealthchop_threshold: 999999
[tmc2209 stepper_z] #z
uart_pin: P1.8
interpolate: False
sense_resistor: 0.110
run_current: 0.800
stealthchop_threshold: 999999
[tmc2209 stepper_z1] #z1
uart_pin: P1.1
interpolate: False
sense_resistor: 0.110
run_current: 0.800
stealthchop_threshold: 999999
[tmc2209 extruder]
uart_pin: P1.4
run_current: 0.800
interpolate: False
stealthchop_threshold: 999999
#-------------------------------------
# Steppers
#-------------------------------------
[stepper_x]
step_pin: P2.2
dir_pin: !P2.6
enable_pin: !P2.1
microsteps: 16
rotation_distance: 39.88
endstop_pin: P1.29
position_endstop: 360
position_min: 0
position_max: 360
homing_speed: 50
homing_retract_dist: 5
[stepper_y]
step_pin: P0.19
dir_pin: !P0.20
enable_pin: !P2.8
microsteps: 16
rotation_distance: 39.83
endstop_pin: P1.28
position_endstop: 360
position_min: 0
position_max: 360
homing_speed: 50
homing_retract_dist: 5
[stepper_z]
step_pin: P1.15
dir_pin: !P1.14
enable_pin: !P1.16
microsteps: 16
rotation_distance: 4
endstop_pin: probe:z_virtual_endstop
position_max: 400
position_min: -5
[stepper_z1]
step_pin: P0.22
dir_pin: !P2.11
enable_pin: !P0.21
microsteps: 16
rotation_distance: 4
endstop_pin: probe:z_virtual_endstop
#-------------------------------------
# Macros
#-------------------------------------
[gcode_macro _CLIENT_VARIABLE]
variable_use_custom_pos : False ; use custom park coordinates for x,y [True/False]
variable_custom_park_x : 0.0 ; custom x position; value must be within your defined min and max of X
variable_custom_park_y : 0.0 ; custom y position; value must be within your defined min and max of Y
variable_custom_park_dz : 2.0 ; custom dz value; the value in mm to lift the nozzle when move to park position
variable_retract : 1.0 ; the value to retract while PAUSE
variable_cancel_retract : 1 ; the value to retract while CANCEL_PRINT
variable_speed_retract : 35.0 ; retract speed in mm/s
variable_unretract : 1.0 ; the value to unretract while RESUME
variable_speed_unretract : 35.0 ; unretract speed in mm/s
variable_speed_hop : 15.0 ; z move speed in mm/s
variable_speed_move : 100.0 ; move speed in mm/s
variable_park_at_cancel : False ; allow to move the toolhead to park while execute CANCEL_PRINT [True,False]
## !!! Caution [firmware_retraction] must be defined in the printer.cfg if you set use_fw_retract: True !!!
#variable_use_fw_retract : False ; use fw_retraction instead of the manual version [True/False]
gcode:
[gcode_macro BEEP_ALERT]
gcode:
M300 S200 P200
M300 S200 P200
M300 S200 P200
[gcode_macro BEEP_READY]
gcode:
M300 S500 P50
M300 S600 P50
M300 S700 P50
[gcode_macro BEEP_CONFIRM]
gcode:
M300 S1000 P100
M300 S1200 P100
M300 S1400 P100
[gcode_macro G29]
gcode:
G28
M190 S60
BED_MESH_CALIBRATE
BED_MESH_PROFILE SAVE=default
# G1 X0 Y0 Z5 F4000
M140 S0
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
variable_extrude: 1.0
gcode:
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
{% 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 %}
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:
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
{% 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
[gcode_macro load_mesh]
gcode:
BED_MESH_PROFILE load=default
[gcode_macro M300]
gcode:
# Use a default 1kHz tone if S is omitted.
{% set S = params.S|default(1000)|int %}
# Use a 10ms duration is P is omitted.
{% set P = params.P|default(100)|int %}
SET_PIN PIN=BEEPER_pin VALUE=0.5 CYCLE_TIME={ 1.0/S if S > 0 else 1 }
G4 P{P}
SET_PIN PIN=BEEPER_pin VALUE=0
#-------------------------------------
# Printer Save Config
#-------------------------------------
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 28.979
#*# pid_ki = 1.558
#*# pid_kd = 134.755
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 61.999
#*# pid_ki = 0.771
#*# pid_kd = 1246.178
#*#
#*# [bltouch]
#*# z_offset = 3.550
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# -0.148125, -0.127188, -0.105938, -0.106875, -0.149688
#*# -0.100000, -0.073438, -0.047188, -0.049063, -0.106875
#*# -0.083438, -0.045625, -0.011250, -0.026563, -0.095313
#*# -0.108438, -0.083750, -0.050000, -0.057813, -0.115625
#*# -0.114375, -0.095938, -0.090000, -0.089375, -0.135313
#*# x_count = 5
#*# y_count = 5
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = lagrange
#*# tension = 0.2
#*# min_x = 5.0
#*# max_x = 310.01
#*# min_y = 14.989999999999998
#*# max_y = 337.0
#*#
#*# [input_shaper]
#*# shaper_type_x = mzv
#*# shaper_freq_x = 70.6
#*# shaper_type_y = mzv
#*# shaper_freq_y = 57.0