-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprinter.cfg
More file actions
438 lines (370 loc) · 10.3 KB
/
Copy pathprinter.cfg
File metadata and controls
438 lines (370 loc) · 10.3 KB
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
[include mainsail.cfg]
[include K-ShakeTune/*.cfg]
[include macros/*.cfg]
[include macros/**/*.cfg]
[stepper_x]
step_pin: P2.2
dir_pin: !P2.6
enable_pin: !P2.1
microsteps: 256
rotation_distance: 40
endstop_pin: tmc2209_stepper_x:virtual_endstop
position_endstop: -10
position_max: 235
position_min: -15
homing_speed: 50
homing_retract_dist: 0
[stepper_y]
step_pin: P0.19
dir_pin: !P0.20
enable_pin: !P2.8
microsteps: 16
rotation_distance: 40
endstop_pin: tmc2209_stepper_y:virtual_endstop
position_endstop: -8
position_max: 226
position_min: -13
homing_speed: 50
homing_retract_dist: 0
[stepper_z]
step_pin: P0.22
dir_pin: !P2.11
enable_pin: !P0.21
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
position_max: 270
position_min: -4
[stepper_z1]
step_pin: P2.13
dir_pin: !P0.11
enable_pin: !P2.12
microsteps: 16
rotation_distance: 8
########################################
# TMC2209 configuration
########################################
[tmc2209 stepper_x]
uart_pin: P1.17
run_current: 0.600
interpolate: True
diag_pin: ^P1.29
driver_SGTHRS: 255
sense_resistor: 0.110
[autotune_tmc stepper_x]
motor: creality-42-34
[tmc2209 stepper_y]
uart_pin: P1.15
run_current: 0.800
interpolate: True
diag_pin: ^P1.27
driver_SGTHRS: 255
sense_resistor: 0.110
[autotune_tmc stepper_y]
motor: creality-42-34
[tmc2209 stepper_z]
uart_pin: P1.10
run_current: 0.650
sense_resistor: 0.110
#stealthchop_threshold: 999999
[autotune_tmc stepper_z]
motor: creality-42-34
[tmc2209 stepper_z1]
uart_pin: P1.8
run_current: 0.650
sense_resistor: 0.110
#stealthchop_threshold: 999999
[autotune_tmc stepper_z1]
motor: creality-42-34
[tmc2209 extruder]
uart_pin: P1.1
run_current: 0.800
stealthchop_threshold: 999999
sense_resistor: 0.110
[extruder]
step_pin: P0.1
dir_pin: !P0.0
enable_pin: !P0.10
microsteps: 16
gear_ratio: 42:12
rotation_distance: 26.359
nozzle_diameter: 0.200 #0.400
filament_diameter: 1.750
heater_pin: P2.4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: P0.24
min_temp: 0
max_temp: 260
max_extrude_cross_section: 5
# MPC
control: mpc
heater_power: 40
cooling_fan: fan
filament_diameter: 1.75
filament_density: 1.20
filament_heat_capacity: 1.8
[heater_bed]
heater_pin: P2.5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: P0.25
min_temp: 0
max_temp: 110
#[heater_fan hotend_fan]
#pin: PC0
[fan]
pin: P2.3
max_power: 1.0
shutdown_speed: 0
cycle_time: 0.010
hardware_pwm: False
kick_start_time: 0.100
[mcu rpi]
serial: /tmp/klipper_host_mcu
[temperature_sensor raspberry_pi]
sensor_type: temperature_host
min_temp: 10
max_temp: 100
[mcu]
#serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.1:1.0
serial: /dev/ttyAMA0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 300
# x: 5000 y:4800
max_accel: 4800
max_z_velocity: 10
max_z_accel: 100
[bed_mesh]
speed: 200
mesh_min: 25, 25
mesh_max: 200, 180
probe_count: 8,8
algorithm: bicubic
[safe_z_home]
home_xy_position: 147, 154
speed: 75
z_hop: 10
z_hop_speed: 5
#[filament_switch_sensor e0_sensor]
#switch_pin: !PC15
#pause_on_runout: true
#runout_gcode: PAUSE
[probe_eddy_ng btt_eddy]
sensor_type: btt_eddy
i2c_mcu: rpi
i2c_bus: i2c.1
x_offset: -31.8
y_offset: -40.5
[pause_resume]
recover_velocity: 25
[bed_screws]
screw1: 20, 29
screw2: 195, 29
screw3: 195, 198
screw4: 20, 198
[screws_tilt_adjust]
screw1: 53, 69
screw1_name: front left screw
screw2: 230, 69
screw2_name: front right screw
screw3: 230, 223
screw3_name: rear right screw
screw4: 53, 223
screw4_name: rear left screw
horizontal_move_z: 10.
speed: 50.
screw_thread: CW-M4
[gcode_arcs]
resolution: 0.1
## Display ##
[display]
lcd_type: ssd1306
i2c_mcu: rpi
i2c_bus: i2c.1
## Enclosure Sensor ##
[temperature_sensor enclosure_sensor]
sensor_type: BME280
gcode_id: AMB
i2c_mcu: rpi
i2c_bus: i2c.1
i2c_address: 119
[gcode_button enclosure_door_sensor]
pin: ^rpi:gpio4
press_gcode:
- M117 Door Open
release_gcode:
- M117
## Resonance Testing ##
[adxl345]
cs_pin: rpi:None
spi_bus: spidev0.0
[resonance_tester]
probe_points: 100, 100, 20
accel_chip: adxl345
[input_shaper]
shaper_freq_x: 67.2
shaper_type_x: 2hump_ei
damping_ratio_x: 0.106
shaper_freq_y: 40.6
shaper_type_y: mzv
damping_ratio_y: 0.055
[firmware_retraction]
retract_length: 0.9
retract_speed: 40
unretract_speed: 40
[led led]
white_pin: P2.7
initial_WHITE: 1.0
#[neopixel lights]
#pin: PB15
#chain_count: 24
#color_order: GRB
#initial_RED: 0.3
#initial_GREEN: 0.3
#initial_BLUE: 0.18
[filament_switch_sensor switch_sensor]
switch_pin: ^P1.24
pause_on_runout: False
runout_gcode:
PAUSE
M117 Filament switch runout
insert_gcode:
M117 Filament switch inserted
[filament_motion_sensor encoder_sensor]
switch_pin: ^P1.25
detection_length: 2.88
extruder: extruder
pause_on_runout: False
runout_gcode:
PAUSE
M117 Filament encoder runout
insert_gcode:
M117 Filament encoder inserted
# KAMP
[gcode_macro _KAMP_Settings]
description: This macro contains all adjustable settings for KAMP
# The following variables are settings for KAMP as a whole.
variable_verbose_enable: True # Set to True to enable KAMP information output when running. This is useful for debugging.
# The following variables are for adjusting adaptive mesh settings for KAMP.
variable_mesh_margin: 0 # Expands the mesh size in millimeters if desired. Leave at 0 to disable.
variable_fuzz_amount: 0 # Slightly randomizes mesh points to spread out wear from nozzle-based probes. Leave at 0 to disable.
# The following variables are for those with a dockable probe like Klicky, Euclid, etc. # ---------------- Attach Macro | Detach Macro
variable_probe_dock_enable: False # Set to True to enable the usage of a dockable probe. # ---------------------------------------------
variable_attach_macro: 'Attach_Probe' # The macro that is used to attach the probe. # Klicky Probe: 'Attach_Probe' | 'Dock_Probe'
variable_detach_macro: 'Dock_Probe' # The macro that is used to store the probe. # Euclid Probe: 'Deploy_Probe' | 'Stow_Probe'
# Legacy Gcode: 'M401' | 'M402'
# The following variables are for adjusting adaptive purge settings for KAMP.
variable_purge_height: 0.14 # Z position of nozzle during purge, default is 0.8.
variable_tip_distance: 0 # Distance between tip of filament and nozzle before purge. Should be similar to PRINT_END final retract amount.
variable_purge_margin: 10 # Distance the purge will be in front of the print area, default is 10.
variable_purge_amount: 17 # Amount of filament to be purged prior to printing.
variable_flow_rate: 15 # Flow rate of purge in mm3/s. Default is 12.
# The following variables are for adjusting the Smart Park feature for KAMP, which will park the printhead near the print area at a specified height.
variable_smart_park_height: 10 # Z position for Smart Park, default is 10.
gcode: # Gcode section left intentionally blank. Do not disturb.
{action_respond_info(" Running the KAMP_Settings macro does nothing, it is only used for storing KAMP settings. ")}
[include ./KAMP/Line_Purge.cfg]
[include ./KAMP/Smart_Park.cfg]
# Timelapses
[include timelapse.cfg]
## Start / End Macros ##
[gcode_macro START_PRINT]
description: Starts the print process
variable_parameter_EXTRUDER_TEMP: 200
variable_parameter_BED_TEMP: 60
variable_parameter_FILAMENT_TYPE: "PLA"
gcode:
UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK DURATION=0
HEAT_SOAK ACTION=STOP
CLEAR_PAUSE
M220 S100 ; reset feedrate
M117 Homing...
HOME_CHECK
; Absolute Positioning
G90
G0 X90 Y90 Z50 F3000
; turn on part fan to cooldown the probe
M106 S255
M117 Waiting for bed to reach {params.BED_TEMP}°C
; preheat nozzle
SET_HEATER_TEMPERATURE HEATER=extruder TARGET=150
; set temp and wait for bed
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={params.BED_TEMP|default(60)|float}
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={params.BED_TEMP|default(60)|float - 5} MAXIMUM={params.BED_TEMP|default(60)|float + 5}
PROBE_EDDY_NG_TAP
; part fan off
M106 S0
M117 Calibrating Bed-Mesh
BED_MESH_CLEAR
BED_MESH_CALIBRATE ADAPTIVE=1
FILAMENT_PROFILE FILAMENT_TYPE={params.FILAMENT_TYPE|default("DEFAULT")}
Smart_Park
M117 Waiting for nozzle to reach {params.EXTRUDER_TEMP}°C
; then set print nozzle temp and wait
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={params.EXTRUDER_TEMP|default(200)|float}
TEMPERATURE_WAIT SENSOR=extruder MINIMUM={params.EXTRUDER_TEMP|default(200)|float - 5} MAXIMUM={params.EXTRUDER_TEMP|default(200)|float + 5}
M117 Line Purging
G92 E0 ;Reset Extruder
LINE_PURGE
M117 Handing over to slicer
UPDATE_DELAYED_GCODE ID=clear_status DURATION=15
[gcode_macro END_PRINT]
description: Ends a print process
gcode:
M220 S100 ; reset to default speed
G91 ; relative
G1 E-2 F300
{% if printer.toolhead.position.z <= 150 %}
G90
G0 Z150 F3000
{% else %}
G91
G0 Z5 F3000
{% endif %}
G90 ; absolute pos
G1 X30 Y170 F3000
M117 Done printing!
UPDATE_DELAYED_GCODE ID=clear_status DURATION=15
CLEAR_PAUSE
TURN_OFF_HEATERS ; heaters off
;M84 ; disable steppers
M107 ; fan off
PROBE_EDDY_NG_SET_TAP_OFFSET VALUE=0
BED_MESH_CLEAR
M84 X Y E ;Disable all steppers but Z
UPDATE_DELAYED_GCODE ID=POWER_OFF_PRINTER_CHECK DURATION=30
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [extruder]
#*# pid_kp = 22.631
#*# pid_ki = 1.257
#*# pid_kd = 101.839
#*# block_heat_capacity = 15.1098
#*# sensor_responsiveness = 0.105643
#*# ambient_transfer = 0.0631077
#*# fan_ambient_transfer = 0.0631077, 0.0671127, 0.0745344, 0.0774099, 0.0840538, 0.0885609, 0.0917471
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 70.375
#*# pid_ki = 1.504
#*# pid_kd = 823.388
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.027500, -0.007500, -0.002500
#*# 0.030000, 0.015000, -0.000000
#*# 0.040000, 0.042500, 0.035000
#*# x_count = 3
#*# y_count = 3
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = lagrange
#*# tension = 0.2
#*# min_x = 100.00000000000001
#*# max_x = 120.00000000000001
#*# min_y = 100.0
#*# max_y = 120.0