-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathprinter.cfg
396 lines (354 loc) · 9.44 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
[gcode_macro START_PRINT]
gcode:
CLEAR_PAUSE
SET_IDLE_TIMEOUT TIMEOUT=900
G90 ; absolute positioning
M82 ; absolute extruder mode
M107 ; turn fan off
; G29 ; bed mesh levelling
BED_MESH_PROFILE LOAD=cr10s
G28 ; move to origin
; PRIME_LINE
# prime the nozzle
[gcode_macro PRIME_LINE]
gcode:
SAVE_GCODE_STATE NAME=PRIME_LINE_state
G91 ; relative positioning
G92 E0 ; reset extruder
G1 Z2.0 F3000 ; move Z Axis up
G1 X20 Y30 Z0.28 F5000.0 ; move to start position
G1 X20 Y200.0 Z0.28 F1500.0 E15 ; draw the first line
G1 X22 Y200.0 Z0.28 F5000.0 ; move to side a little
G1 X22 Y50 Z0.28 F1500.0 E30 ; draw the second line
G92 E0 ; reset Extruder
G1 Z2.0 F3000 ; move Z Axis up
RESTORE_GCODE_STATE NAME=PRIME_LINE_state
[gcode_macro END_PRINT]
gcode:
G91 ; relative positioning
G1 Z10 ; move Z Axis up
G1 E-5 F300 ; retract filament
G90 ; absolute positioning
G1 X0 Y300 ; present print
M107 ; turn fan off
M104 S0 ; turn-off hotend
M140 S0 ; turn-off heat bed
M84 ; turn off all motors
BED_MESH_CLEAR
# Filament change
[gcode_macro M600]
gcode:
PAUSE_MACRO
UNLOAD
[gcode_macro PAUSE_MACRO]
gcode:
; SAVE_GCODE_STATE NAME=PAUSE_state
PAUSE
RESPOND TYPE=command MSG=action:paused
PARK_MACRO
SET_IDLE_TIMEOUT TIMEOUT=3600
[gcode_macro RESUME_MACRO]
gcode:
SET_IDLE_TIMEOUT TIMEOUT=600
; RESTORE_GCODE_STATE NAME=PAUSE_state
RESUME
RESPOND TYPE=command MSG=action:resumed
[gcode_macro PARK_MACRO]
default_parameter_X: 20
default_parameter_Y: 280
default_parameter_Z: 100
gcode:
SAVE_GCODE_STATE NAME=PARK_MACRO_state
G91 ; relative positioning
G1 E-2 F1000 ; retract filament
G1 Z10 ; lift z slightly
G90 ; absolute positioning
G1 X{X} Y{Y} Z{Z} F3000 ; park the head
RESTORE_GCODE_STATE name=PARK_MACRO_state
[gcode_macro UNLOAD]
gcode:
SAVE_GCODE_STATE NAME=UNLOAD_state
G91 ; relative positioning
G1 E5.0 F1200 ; extrude a little
G1 E3.0 F1600 ; extrude a little more
G1 E-13.14 F7000 ; retract
G1 E-540 F3000 ; retract a lot more
RESTORE_GCODE_STATE name=UNLOAD_state
[gcode_macro PURGE]
gcode:
SAVE_GCODE_STATE NAME=PURGE_state
G91 ; relative positioning
G1 E45.0 F2500 ; purge
RESTORE_GCODE_STATE name=PURGE_state
[gcode_macro LOAD_FILAMENT]
gcode:
SAVE_GCODE_STATE NAME=LOAD_FILAMENT
G91 ; relative positioning
G1 E25.0 F1000 ; extrude
G1 E435 F2500 ; extrude a lot more
G4 P900 ; dwell
G1 E45.0 F2500 ; extrude a littel more
RESTORE_GCODE_STATE name=LOAD_FILAMENT
# z-tilt-adjust
[gcode_macro Z_TILT_MACRO]
gcode:
G28 ; move to origin
Z_TILT_ADJUST
# probe-calibrate
[gcode_macro PROBE_CALIBRATE_MACRO]
gcode:
G28 ; move to origin
PROBE_CALIBRATE
# Bed Levelling (Automatic)
[gcode_macro G29]
gcode:
G28 ; move to origin
; Z_TILT_ADJUST
BED_MESH_CALIBRATE
BED_MESH_PROFILE SAVE=cr10s
G28 Z
; SAVE_CONFIG
[force_move]
enable_force_move: True
[pause_resume]
[respond]
default_type: echo
[bed_mesh]
speed: 450
horizontal_move_z: 8
mesh_min: 40,40
mesh_max: 260,260
probe_count: 5
algorithm: bicubic
[probe]
pin: !P1.25
x_offset: -25
y_offset: -18
speed: 20.0
[z_tilt]
z_positions:
329,150
-29,150
points:
32,150
175,150
293,150
speed: 450
[stepper_x]
step_pin: P2.2
dir_pin: P2.6
enable_pin: !P2.1
# step_distance: 0.025 # (4 calculated)
step_distance: 0.0063 # (16 calculated)
# step_distance: 0.0031 # (32 calculated)
endstop_pin: !P1.29
position_endstop: -13
position_min: -13
position_max: 300
homing_speed: 250
[tmc2209 stepper_x]
uart_pin: P1.17
microsteps: 16
interpolate: True
run_current: 1.27
hold_current: 0.9
# stealthchop_threshold: 183 # 275 RPM
stealthchop_threshold: 60
[stepper_y]
step_pin: P0.19
dir_pin: P0.20
enable_pin: !P2.8
# step_distance: 0.025 # (4 calculated)
step_distance: 0.0063 # (16 calculated)
# step_distance: 0.0031 # (32 calculated)
endstop_pin: !P1.27
position_endstop: -5
position_min: -5
position_max: 300
homing_speed: 250
[tmc2209 stepper_y]
uart_pin: P1.15
microsteps: 16
interpolate: True
run_current: 1.27
hold_current: 0.9
# stealthchop_threshold: 183 # 275 RPM
stealthchop_threshold: 60
[stepper_z]
step_pin: P0.22
dir_pin: P2.11
enable_pin: !P0.21
# step_distance: .01 # 4 (calculated)
step_distance: .0025 # 16 (calculated)
endstop_pin: probe:z_virtual_endstop
position_min: -3
position_max: 400
homing_speed: 30
[tmc2209 stepper_z]
uart_pin: P1.10
microsteps: 16
interpolate: True
run_current: 1.27
hold_current: 0.9
# stealthchop_threshold: 183 # 275 RPM
stealthchop_threshold: 60
[stepper_z1]
step_pin: P0.1
dir_pin: !P0.0
enable_pin: !P0.10
# step_distance: .01 # 4 (calculated)
step_distance: .0025 # 16 (calculated)
[tmc2209 stepper_z1]
uart_pin: P1.1
microsteps: 16
interpolate: True
run_current: 1.27
hold_current: 0.9
# stealthchop_threshold: 183 # 275 RPM
stealthchop_threshold: 60
[safe_z_home]
home_xy_position: 160,160
speed: 700
z_hop: 10
z_hop_speed: 100
# thermistor values taken from https://www.sliceengineering.com/pages/documentation
[thermistor mosquito_thermistor]
temperature1 = 20
resistance1 = 613400
temperature2 = 190
resistance2 = 4509
temperature3 = 260
resistance3 = 1359
### To tune extruder step_distance:
## mark 120mm from extruder entrance
## M83
## G1 E100 F100
## ((120 - measured) / 100) * current_step_distance
[extruder]
max_extrude_only_distance: 100.0
step_pin: P2.13
dir_pin: !P0.11
enable_pin: !P2.12
nozzle_diameter: 0.400
filament_diameter: 1.75
heater_pin: P2.7
sensor_type: mosquito_thermistor
sensor_pin: P0.24
min_temp: 0
max_temp: 270
step_distance: 0.002409 # (BMG recommended value)
max_extrude_cross_section: 5
### PRESSURE ADVANCE CONFIG ###
## PLA:
# pressure_advance: 0.67 # Overture SpaceLight Gray 1.75mm PLA
pressure_advance: 0.96 # Overture Blue 1.75mm PLA
# pressure_advance: 0.78 # Overture Space Gray 1.75mm PLA
# pressure_advance: 0.9196 # Overture Black 1.75mm PLA
# pressure_advance: 0.6376 # Overture White 1.75mm PLA
# pressure_advance: 0.86 # Overture Red 1.75mm PLA
## PLA+
# pressure_advance: 0.5448 # Overture Light Gray 1.75mm PLA+
## PETG
# pressure_advance: 0.6888 # Overture Blue 1.75mm PETG
# pressure_advance: 0.6212 # Overture Red 1.75mm PETG
[tmc2209 extruder]
uart_pin: P1.8
microsteps: 16
interpolate: False
run_current: 1.07
hold_current: 0.869
# stealthchop_threshold: 183 # 275 RPM
stealthchop_threshold: 10
[heater_bed]
heater_pin: P2.5
sensor_type: ATC Semitec 104GT-2
sensor_pin: P0.23
min_temp: 0
max_temp: 130
[verify_heater heater_bed]
max_error: 150
[fan]
pin: P2.3
# hotend fan wired into the second extruder heater output marked 'HE1'
[heater_fan e0_fan]
pin: P2.4
heater: extruder
heater_temp: 50.0
fan_speed: 0.75
[filament_switch_sensor filament]
pause_on_runout: False
runout_gcode: PAUSE_MACRO
pause_delay: 1
switch_pin: ^!P1.24
[mcu]
serial: /dev/serial/by-id/usb-Klipper_lpc1768_0380000407083DAFA845665CC42000F5-if00
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 4500
#max_accel_to_decel: 400
max_z_velocity: 30
max_z_accel: 100
# square_corner_velocity: 3
######################################################################
# no display...
######################################################################
##### NOTE: The above is all specific to my printer. If you are
##### using this as a base for your own config, delete the entire
##### section as it is auto-generated by Klipper when SAVE_CONFIG
##### g-code command is used...
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [probe]
#*# z_offset = 1.350
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 35.289
#*# pid_ki = 2.768
#*# pid_kd = 112.482
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# -0.017500, -0.065000, -0.110000, -0.147500, -0.112500
#*# 0.035000, -0.025000, -0.060000, -0.100000, -0.092500
#*# 0.020000, -0.032500, -0.085000, -0.142500, -0.162500
#*# -0.040000, -0.062500, -0.117500, -0.205000, -0.270000
#*# -0.182500, -0.185000, -0.255000, -0.380000, -0.495000
#*# x_count = 5
#*# y_count = 5
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = bicubic
#*# tension = 0.2
#*# min_x = 29.9999
#*# max_x = 269.998800001
#*# min_y = 30.0001
#*# max_y = 279.999600001
#*#
#*# [bed_mesh cr10s]
#*# version = 1
#*# points =
#*# -0.017500, -0.065000, -0.110000, -0.147500, -0.112500
#*# 0.035000, -0.025000, -0.060000, -0.100000, -0.092500
#*# 0.020000, -0.032500, -0.085000, -0.142500, -0.162500
#*# -0.040000, -0.062500, -0.117500, -0.205000, -0.270000
#*# -0.182500, -0.185000, -0.255000, -0.380000, -0.495000
#*# x_count = 5
#*# y_count = 5
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = bicubic
#*# tension = 0.2
#*# min_x = 29.9999
#*# max_x = 269.998800001
#*# min_y = 30.0001
#*# max_y = 279.999600001
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 53.561
#*# pid_ki = 0.486
#*# pid_kd = 1474.275