-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprinter.cfg
407 lines (351 loc) · 9.29 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
# This is a Klipper configuration for Tron XY-2 Pro, with
# BIGTREETECH SKR V1.4 Turbo board
# ALWAYS SUBSTRACT 0.075 FROM PROBE CALIBRATION!
[virtual_sdcard]
path: ~/gcode_files
[exclude_object]
[display_status]
[pause_resume]
# [include adxl345-pi-pico.cfg]
[mcu]
serial: /dev/serial/by-id/usb-Klipper_lpc1769_03E0000B28813AAFFB7F6A5CC62000F5-if00
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 150
max_accel: 4000
max_z_velocity: 5
max_z_accel: 100
[input_shaper]
shaper_freq_x: 61.8
shaper_type_x: mzv
shaper_freq_y: 36.8
shaper_type_y: mzv
[probe]
pin: !P1.27
speed: 5
lift_speed: 10
samples: 3
x_offset: 53
y_offset: 0
# z_offset: 3.347 # 25*C
#z_offset: 3.260 # noz: 240*C, bed: 110*C
#z_offset: 3.300
[safe_z_home]
home_xy_position: 50,20
speed: 50
z_hop: 5
z_hop_speed: 25
[bed_mesh]
speed: 120
probe_count: 8,8
horizontal_move_z: 6
algorithm: lagrange
mesh_min : 53,15
mesh_max : 230,220
mesh_pps: 0
adaptive_margin: 5
[screws_tilt_adjust]
screw1: 0,20
screw1_name: front-left
screw2: 180,20
screw2_name: front-right
screw3: 0,230
screw3_name: back-left
screw4: 180,230
screw4_name: back-right
speed: 100
[stepper_x]
step_pin: P2.2
dir_pin: P2.6
enable_pin: !P2.1
microsteps: 8
rotation_distance: 39.83 # DevilDesign ASA (prev: 39.86)
# rotation_distance: 39.96 # eSUN PLA+
endstop_pin: !P1.29
position_endstop: 0
position_max: 248
homing_speed: 100
homing_retract_dist: 10
second_homing_speed: 10.0
[tmc2209 stepper_x]
uart_pin: P1.10
run_current: 0.800
# hold_current: 0.400
# stealthchop_threshold: 250
[stepper_y]
step_pin: P0.19
dir_pin: !P0.20
enable_pin: !P2.8
microsteps: 8
rotation_distance: 39.76 # DevilDesign ASA (prev: 39.75)
# rotation_distance: 39.92 # eSUN PLA+
endstop_pin: !P1.28
position_endstop: 0
position_max: 230
homing_speed: 50
homing_retract_dist: 10
second_homing_speed: 10.0
[tmc2209 stepper_y]
uart_pin: P1.9
run_current: 1.200
# hold_current: 0.500
# stealthchop_threshold: 250
[stepper_z]
step_pin: P0.22
dir_pin: !P2.11
enable_pin: !P0.21
microsteps: 8
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
position_min: -2
position_max: 215
homing_retract_dist: 1
second_homing_speed: 0.5
[tmc2209 stepper_z]
uart_pin: P1.8
run_current: 1.200
# hold_current: 0.500
# stealthchop_threshold: 50
# STOCK TRONXY EXTRUDER ---------
# [extruder]
# step_pin: P2.13
# dir_pin: P0.11
# enable_pin: !P2.12
# microsteps: 16
# rotation_distance: 34.421
# 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
# min_extrude_temp: 180
# max_extrude_only_distance: 100
# control = pid
# pid_kp = 20.789
# pid_ki = 0.845
# pid_kd = 127.852
# [tmc2209 extruder]
# uart_pin: P1.4
# run_current: 1.200
# # hold_current: 0.500
# # stealthchop_threshold: 5
# ORIBTER EXTRUDER V2.0 --------------
[extruder]
step_pin: P2.13
dir_pin: !P0.11
enable_pin: !P2.12
microsteps: 16
full_steps_per_rotation: 200
rotation_distance: 4.81
nozzle_diameter: 0.400
filament_diameter: 1.750
max_extrude_only_distance: 500
max_extrude_only_velocity: 120
pressure_advance: 0.025 # to be calibrated
pressure_advance_smooth_time: 0.03 # to be calibrated
heater_pin: P2.7
sensor_type: EPCOS 100K B57560G104F
sensor_pin: P0.24
min_temp: 0
max_temp: 300
min_extrude_temp: 0.180
max_extrude_only_distance: 100
[tmc2209 extruder]
uart_pin: P1.4
interpolate: true
run_current: 0.85
hold_current: 0.100
sense_resistor: 0.11
stealthchop_threshold: 0
driver_TBL: 0
driver_HEND: 6
driver_HSTRT: 7
driver_TOFF: 4
# END EXTRUDER ---------------------------
[heater_bed]
heater_pin: P2.5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: P0.25
min_temp: 0
max_temp: 130
control = pid
pid_kp = 72.156
pid_ki = 1.886
pid_kd = 689.990
[heater_fan my_nozzle_fan]
pin: P2.4
heater: extruder
heater_temp: 50.0
fan_speed: 1.0
[fan]
pin: P2.3
# EXP1 / EXP2 (display) pins
[board_pins]
aliases:
# EXP1 header
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 header
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>
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "ssp0"
[skew_correction]
# ======
# MACROS
# ======
[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
[gcode_macro PROBE_BED_CENTER]
description: Place probe on bed PROBE_BED_CENTER
gcode:
G1 X165 Y Y125 F7800
[gcode_macro Z_OFFSET_MINUS_008]
description: Set Z Offset to -0.08
gcode:
SET_GCODE_OFFSET Z_ADJUST=-0.08 MOVE=1
[gcode_macro Z_OFFSET_MINUS_0075]
description: Set Z Offset to -0.075
gcode:
SET_GCODE_OFFSET Z_ADJUST=-0.075 MOVE=1
[gcode_macro SCREWS_TILT_CALCULATE_]
gcode:
SCREWS_TILT_CALCULATE
[gcode_macro BED_MESH_CALIBRATE_]
gcode:
BED_MESH_CALIBRATE
[gcode_macro TESTZ_M_1]
gcode:
TESTZ Z=-1
[gcode_macro TESTZ_M_01]
gcode:
TESTZ Z=-0.1
[gcode_macro TESTZ_M_001]
gcode:
TESTZ Z=-0.01
[gcode_macro TESTZ_P_1]
gcode:
TESTZ Z=+1
[gcode_macro TESTZ_P_01]
gcode:
TESTZ Z=+0.1
[gcode_macro TESTZ_P_001]
gcode:
TESTZ Z=+0.01
[gcode_macro PRINT_START]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
M140 S{BED_TEMP} # Start bed heating (but don't wait for it)
M190 S{BED_TEMP} # Wait for bed to reach temperature
M109 S{EXTRUDER_TEMP} # Set and wait for nozzle to reach temperature
BED_MESH_CLEAR # Clear old mesh
BED_MESH_CALIBRATE ADAPTIVE=1 # Get bed mesh
G92 E0 # Reset Extruder
G28 # Home all axes
G1 Z2.0 F3000 # Move Z Axis up little to prevent scratching of Heat Bed
G1 X5.5 Y20 Z0.3 F2000.0 # Move to start position
G1 X5.5 Y200.0 Z0.3 F1500.0 E15 # Draw the first line
G1 X6.0 Y200.0 Z0.3 F5000.0 # Move to side a little
G1 X6.0 Y20 Z0.3 F1500.0 E30 # Draw the second line
G92 E0 # Reset Extruder
G1 Z2.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
SKEW_PROFILE LOAD=my_skew_profile
# SKEW_PROFILE LOAD=esun_pla_plus
[gcode_macro PRINT_END]
gcode:
SET_SKEW CLEAR=1 # Remove skew profile
G91 # Relative positioning
G1 E-2 F2700 # Retract a bit
G1 E-2 Z0.2 F2400 # Retract and raise Z
G1 X5 Y5 F3000 # Wipe out
G1 Z10 # Raise Z more
G90 # Absolute positionning
G1 X0 Y160 # Present print (move bed forward)
M106 S0 # Turn-off fan
M104 S0 # Turn-off hotend
M140 S0 # Turn-off bed
M84 X Y E # Disable all steppers except Z
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [probe]
#*# z_offset = 4.600
#*#
#*# [skew_correction my_skew_profile]
#*# xy_skew = -9.99350869216e-05
#*# xz_skew = 0.0
#*# yz_skew = 0.0
#*#
#*# [skew_correction esun_pla_plus]
#*# xy_skew = 0.000900047097369
#*# xz_skew = 0.0
#*# yz_skew = 0.0
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 30.454
#*# pid_ki = 2.137
#*# pid_kd = 108.491