-
Notifications
You must be signed in to change notification settings - Fork 1
/
printer.cfg
392 lines (332 loc) · 11.2 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
[include moonraker_obico_macros.cfg]
[include mainsail.cfg]
# This file contains common pin mappings for the BIGTREETECH SKR mini
# E3 v2.0. To use this config, the firmware should be compiled for the
# STM32F103 with a "28KiB bootloader" and USB communication. Also,
# select "Enable extra low-level configuration options" and configure
# "GPIO pins to set at micro-controller startup" to "!PA14".
# The "make flash" command does not work on the SKR mini E3. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "firmware.bin" on an SD card and then restart the SKR
# mini E3 with that SD card.
# See docs/Config_Reference.md for a description of parameters.
[mcu rpi]
serial: /tmp/klipper_host_mcu
#[resonance_tester]
#accel_chip: adxl345
#probe_points: 120, 120, 40
#ADXL on MCU
#[adxl345]
#cs_pin: EXP1_1
#spi_software_sclk_pin: EXP1_6
#spi_software_mosi_pin: EXP1_7
#spi_software_miso_pin: EXP1_8
#[adxl345]
#cs_pin: rpi:None
#[resonance_tester]
#accel_chip: adxl345
#probe_points:
# 115, 115, 20 # an example
[gcode_arcs]
resolution: 0.4
# An arc will be split into segments. Each segment's length will
# equal the resolution in mm set above. Lower values will produce a
# finer arc, but also more work for your machine. Arcs smaller than
# the configured value will become straight lines. The default is
# 1mm.
[exclude_object]
[virtual_sdcard]
path: /home/pi/printer_data/gcodes
on_error_gcode: CANCEL_PRINT
# Timelapse Settings
#[include timelapse.cfg]
[include display.cfg]
[include ./KLACK/KlackEnderRev2.cfg]
[include ./KLACK/klack-probe.cfg]
#[include macros.cfg]
#[virtual_sdcard]
#path: ~/gcode_files
[pause_resume]
[stepper_x]
step_pin: PB13
dir_pin: !PB12
enable_pin: !PB14
microsteps: 16
rotation_distance: 40
endstop_pin: ^PC0
position_endstop: 0
position_max: 244.2
position_min: 0
homing_speed: 80
[tmc2209 stepper_x]
uart_pin: PC11
tx_pin: PC10
uart_address: 0
run_current: 0.8
hold_current: 0.400
#stealthchop_threshold: 1
[autotune_tmc stepper_x]
motor: creality-42-34
tuning_goal: silent
[stepper_y]
step_pin: PB10
dir_pin: !PB2
enable_pin: !PB11
microsteps: 16
rotation_distance: 40
endstop_pin: ^PC1
position_endstop: -15
position_max: 235
position_min: -15
homing_speed: 100
[tmc2209 stepper_y]
uart_pin: PC11
tx_pin: PC10
uart_address: 2
run_current: 0.8
hold_current: 0.400
#stealthchop_threshold: 1
[autotune_tmc stepper_y]
motor: creality-42-34
tuning_goal: silent
[stepper_z]
step_pin: PB0
dir_pin: PC5
enable_pin: !PB1
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
#position_endstop: 0
position_max: 250
position_min: -2
homing_speed: 100
[tmc2209 stepper_z]
uart_pin: PC11
tx_pin: PC10
uart_address: 1
run_current: 0.700
hold_current: 0.400
#stealthchop_threshold: 1
[autotune_tmc stepper_z]
motor: creality-42-34
tuning_goal: silent
[extruder]
step_pin: PB3
dir_pin: !PB4
enable_pin: !PD2
microsteps: 16
rotation_distance: 7.619
#rotation_distance: 3.825
full_steps_per_rotation: 400
nozzle_diameter: 0.4
filament_diameter: 1.750
heater_pin: PC8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
#control: pid
#pid_Kp: 21.527
#pid_Ki: 1.063
#pid_Kd: 108.982
min_temp: 0
max_temp: 300
pressure_advance = 0.04
PRESSURE_ADVANCE_SMOOTH_TIME = 0.03
#max_extrude_only_distance: 100
max_extrude_only_distance: 999999999
max_extrude_cross_section: 50
[tmc2209 extruder]
uart_pin: PC11
tx_pin: PC10
uart_address: 3
run_current: 0.85
hold_current: 0.400
stealthchop_threshold: 0
[autotune_tmc extruder]
motor: ldo-42sth25-1404ac
[heater_bed]
heater_pin: PC9
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC3
control: pid
pid_Kp: 54.027
pid_Ki: 0.770
pid_Kd: 948.182
min_temp: 0
max_temp: 130
#[heater_fan nozzle_cooling_fan]
#pin: PC7
#heater_temp: 50.0
[fan]
pin: PC6
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f103xe_38FFD8054253383239802057-if00
[printer]
kinematics: cartesian
max_velocity: 400
max_accel: 7000
SQUARE_CORNER_VELOCITY: 5
max_z_velocity: 5
max_z_accel: 100
[static_digital_output usb_pullup_enable]
pins: !PA14
[board_pins]
aliases:
# EXP1 header
EXP1_1=PB5, EXP1_3=PA9, EXP1_5=PA10, EXP1_7=PB8, EXP1_9=<GND>,
EXP1_2=PA15, EXP1_4=<RST>, EXP1_6=PB9, EXP1_8=PB15, EXP1_10=<5V>
# See the sample-lcd.cfg file for definitions of common LCD displays.
[temperature_sensor mcu_temp]
sensor_type: temperature_mcu
min_temp: 0
max_temp: 100
[temperature_sensor raspberry_pi]
sensor_type: temperature_host
min_temp: 10
max_temp: 100
[idle_timeout]
#gcode:
# A list of G-Code commands to execute on an idle timeout. See
# docs/Command_Templates.md for G-Code format. The default is to run
# "TURN_OFF_HEATERS" and "M84".
timeout: 18000
# Idle time (in seconds) to wait before running the above G-Code
# commands. The default is 600 seconds.
######################################################################
# 128x64 Full Graphic Creality CR10 / ENDER 3 stockdisplay
######################################################################
# This section is used for a Creality "12864" display with a single
# ribbon cable between the display's EXP3 plug and the
# micro-controller board's EXP1 connector.
[display]
lcd_type: st7920
cs_pin: EXP1_7
sclk_pin: EXP1_6
sid_pin: EXP1_8
encoder_pins: ^EXP1_5, ^EXP1_3
click_pin: ^!EXP1_2
[output_pin beeper]
pin: EXP1_1
#====================================================================
# MANUAL ADJUST BED SCREWS
#====================================================================
[bed_screws]
screw1: 30,30
screw2: 30,200
screw3: 200,200
screw4: 200,30
[screws_tilt_adjust]
screw1: 30, 0
screw1_name: front left screw
screw2:200, 0
screw2_name: front right screw
screw3: 200, 170
screw3_name: rear right screw
screw4: 30, 170
screw4_name: rear left screw
horizontal_move_z: 10.
speed: 60.
screw_thread: CW-M3
######################################################################
# Manual Bed Mesh
######################################################################
[input_shaper]
shaper_freq_x: 86.2
shaper_freq_y: 41.2
shaper_type_x: 3hump_ei
shaper_type_y: mzv
# shaper_type: mzv
#[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 PAUSE]
rename_existing: BASE_PAUSE
gcode:
# Parameters
{% set z = params.Z|default(10)|int %} ; z hop amount
{% if printer['pause_resume'].is_paused|int == 0 %}
SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE={5} ; set z hop variable for reference in resume macro
SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=etemp VALUE={printer['extruder'].target} ; set hotend temp variable for reference in resume macro
#SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=0 ; disable filament sensor
SAVE_GCODE_STATE NAME=PAUSE ; save current print position for resume
BASE_PAUSE ; pause print
{% if (printer.gcode_move.position.z + z) < printer.toolhead.axis_maximum.z %} ; check that zhop doesn't exceed z max
G91 ; relative positioning
G1 Z{z} F900 ; raise Z up by z hop amount
{% else %}
{ action_respond_info("Pause zhop exceeds maximum Z height.") } ; if z max is exceeded, show message and set zhop value for resume to 0
SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE=0
{% endif %}
G90 ; absolute positioning
G1 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_minimum.y+5} F6000 ; park toolhead at front center
SAVE_GCODE_STATE NAME=PAUSEPARK ; save parked position in case toolhead is moved during the pause (otherwise the return zhop can error)
M104 S0 ; turn off hotend
SET_IDLE_TIMEOUT TIMEOUT=43200 ; set timeout to 12 hours
{% endif %}
[gcode_macro RESUME]
rename_existing: BASE_RESUME
variable_zhop: 0
variable_etemp: 0
gcode:
# Parameters
{% set e = params.E|default(2.5)|int %} ; hotend prime amount (in mm)
{% if printer['pause_resume'].is_paused|int == 1 %}
#SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=1 ; enable filament sensor
#INITIAL_RGB ; reset LCD color
SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout} ; set timeout back to configured value
{% if etemp > 0 %}
M109 S{etemp|int} ; wait for hotend to heat back up
{% endif %}
RESTORE_GCODE_STATE NAME=PAUSEPARK MOVE=1 MOVE_SPEED=100 ; go back to parked position in case toolhead was moved during pause (otherwise the return zhop can error)
G91 ; relative positioning
M83 ; relative extruder positioning
{% if printer[printer.toolhead.extruder].temperature >= printer.configfile.settings.extruder.min_extrude_temp %}
G1 Z{zhop * -1} E{e} F900 ; prime nozzle by E, lower Z back down
{% else %}
G1 Z{zhop * -1} F900 ; lower Z back down without priming (just in case we are testing the macro with cold hotend)
{% endif %}
RESTORE_GCODE_STATE NAME=PAUSE MOVE=1 MOVE_SPEED=60 ; restore position
BASE_RESUME ; resume print
{% endif %}
[gcode_macro M600]
gcode:
#LCDRGB R=0 G=1 B=0 ; Turn LCD green
PAUSE ; Pause
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 18.260
#*# pid_ki = 0.870
#*# pid_kd = 95.865
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.252500, 0.178750, 0.153750, 0.148750, 0.243750
#*# 0.106250, 0.076250, 0.070000, 0.115000, 0.255000
#*# 0.083750, 0.031250, 0.031250, 0.055000, 0.131250
#*# 0.118750, 0.076250, 0.060000, 0.052500, 0.082500
#*# 0.252500, 0.188750, 0.132500, 0.126250, 0.222500
#*# x_count = 5
#*# y_count = 5
#*# mesh_x_pps = 4
#*# mesh_y_pps = 4
#*# algo = bicubic
#*# tension = 0.2
#*# min_x = 8.0
#*# max_x = 220.0
#*# min_y = 30.0
#*# max_y = 201.0