-
Notifications
You must be signed in to change notification settings - Fork 0
/
printer.cfg
349 lines (320 loc) · 7.62 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
# This file contains pin mappings for the stock 2020 Creality Ender 3
# V2. To use this config, during "make menuconfig" select the
# STM32F103 with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
# communication.
# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
# cable used for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC
# Flash this firmware by copying "out/klipper.bin" to a SD card and
# turning on the printer with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PC2
dir_pin: PB9
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA5
position_min: -10
position_max: 225
position_endstop: -10
homing_speed: 50
[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA6
position_max: 200
position_min: -27
position_endstop: -27
homing_speed: 50
[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
#endstop_pin: ^PA7
#position_endstop: 0.0
endstop_pin: probe:z_virtual_endstop
#position_max: 230
position_max: 180
position_min: -3
[extruder]
max_extrude_only_distance: 100.0
step_pin: PB4
dir_pin: PB3
enable_pin: !PC3
microsteps: 16
# stock
#rotation_distance: 34.406
#rotation_distance: 32.0
# BMG
rotation_distance: 22.679
gear_ratio: 50:17
nozzle_diameter: 0.600
filament_diameter: 1.750
heater_pin: PA1
#sensor_type: EPCOS 100K B57560G104F
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC5
#control: pid
# tuned for stock hardware with 200 degree Celsius target
#pid_Kp: 21.527
#pid_Ki: 1.063
#pid_Kd: 108.982
# tuned for Dragon with 230C target and 50% fan
# pid_kp = 26.410
# pid_ki = 1.645
# pid_kd = 105.970
min_temp: 0
max_temp: 280
# E-PLA, 210C, 0.4mm nozzle, 100mm/s
#pressure_advance: 0.05
# X-PLA, 210C, 0.6mm nozzle, 100mm/s
pressure_advance: 0.02
[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: pid
# tuned for stock hardware with 50 degree Celsius target
pid_Kp: 54.027
pid_Ki: 0.770
pid_Kd: 948.182
min_temp: 0
max_temp: 130
[fan]
pin: PA0
[temperature_sensor RPi]
sensor_type: temperature_host
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
[virtual_sdcard]
path: ~/virtual_sdcard/
[display_status]
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 4000
max_accel_to_decel: 1000
max_z_velocity: 5
max_z_accel: 100
[input_shaper]
# 100 mm/s
# X: 17.1mm 5 osc = 29.2Hz
# X: 19.7mm 6 osc = 30.5Hz
# X2 16.0mm 5 osc = 31.3Hz
# Y: 14.3mm 4 osc = 28.0Hz
shaper_freq_x: 31.3
shaper_type_x: mzv
shaper_freq_y: 28.0
shaper_type_y: ei
#[input_shaper]
#old
# 80 mm/s
# X: 13.4mm 5 osc = 29.8Hz
# Y: 8.6mm 4 osc = 37.2Hz
#shaper_freq_x: 29.8
#shaper_type_x: ei
#shaper_freq_y: 37.2
#shaper_type_y: mzv
[respond]
default_type: command
[pause_resume]
recover_velocity: 50
[bltouch]
sensor_pin: ^PB1
control_pin: PB0
#x_offset: -46.7
#y_offset: -20.8
x_offset: 45.8
y_offset: 14.2
#z_offset: 0
# 0.4mm pc
#z_offset = 1.535
# 0.6mm pc
#z_offset =
# 0.8mm brass
#z_offset = 1.425
stow_on_each_sample: False
probe_with_touch_mode: True
[safe_z_home]
home_xy_position: 64, 96
#home_xy_position: 161, 129
z_hop: 10
z_hop_speed: 5
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 36, 0
#mesh_min: 15, 15
#mesh_min: 35, 35
#mesh_max: 205, 205
mesh_max: 210, 200
#mesh_max: 195, 205
#mesh_max: 195, 195
#probe_count: 7, 7
probe_count: 9, 9
algorithm: bicubic
fade_start: 1
fade_end: 10
fade_target: 0
[screws_tilt_adjust]
#screw1: 245, 219
screw1: 150, 165
screw1_name: rear rights screw
#screw2: 75, 219
screw2: -10, 165
screw2_name: rear left screw
#screw3: 75, 48
screw3: -10, -5
screw3_name: front left screw
#screw4: 245, 48
screw4: 150, 48
screw4_name: front right screw
horizontal_move_z: 10
speed: 120
screw_thread: CW-M4
[gcode_macro START_PRINT]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(200)|float %}
# Use absolute coordinates and relative extruder
G90
M83
# Set temporary nozzle temp to prevent oozing during homing
M104 S140
# Start bed heating
M140 S{BED_TEMP}
# Reset the G-Code Z offset (adjust Z offset if needed)
SET_GCODE_OFFSET Z=0.0
# Home X and Y
G28 X Y
# Wait for bed temperature
M190 S{BED_TEMP}
# Home Z (middle of bed due to BLTouch)
G28 Z
# Start nozzle heating
M104 S{EXTRUDER_TEMP}
# Move up and to priming location
G1 Z40 F240
#G1 X2 Y10 F3000
G1 X0 Y0 F3000
# Wait for nozzle temperature
M109 S{EXTRUDER_TEMP}
# Detract (counter retraction in END_PRINT)
G92 E0
G1 E5 F500
# Reset extruder
G92 E0
# Prime nozzle / intro lines
G1 X2 Y10 Z0.28 F240
G1 Y140 E10 F1500
G1 X2.3 F5000
G92 E0
G1 Y10 E10 F1200
G92 E0
# Move up a little
G1 E-1 F3000
G1 Y5 F3000
G1 Z1.0 F240
G1 E1 F2000
G92 E0
[gcode_macro END_PRINT]
gcode:
# Turn off bed, extruder and fan
TURN_OFF_HEATERS
M107
# Retract
G92 E0
G1 E-5 F500
# Relative movement and raise 100
G91
G1 Z10
G90
# Retract some more
G1 E-10 F1000
# Present print
G1 X220 Y200 F5000
# Disable steppers except Z
M84 X Y E
[gcode_macro G29]
gcode:
G28
BED_MESH_CALIBRATE
G0 X0 Y0 Z10 F6000
BED_MESH_PROFILE save=default
SAVE_CONFIG
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
gcode:
{% set X = params.X|default(225)|float %}
{% set Y = params.Y|default(200)|float %}
{% set Z = params.Z|default(10)|float %}
{% set E = params.E|default(1)|float %}
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-{E} F2100
G1 Z{Z}
G90
G1 X{X} Y{Y} F6000
[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
{% set E = params.E|default(1)|float %}
G91
G1 E{E} F2100
G90
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
TURN_OFF_HEATERS
CLEAR_PAUSE
SDCARD_RESET_FILE
BASE_CANCEL_PRINT
END_PRINT
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bltouch]
#*# z_offset = 1.54
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 26.410
#*# pid_ki = 1.645
#*# pid_kd = 105.970
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.032500, 0.000000, -0.020000, -0.027500, -0.025000, -0.025000, 0.025000, 0.065000, 0.067500
#*# 0.030000, -0.010000, -0.007500, -0.027500, -0.042500, -0.017500, 0.020000, 0.037500, 0.042500
#*# 0.020000, 0.002500, -0.012500, -0.020000, -0.027500, -0.012500, 0.020000, 0.062500, 0.047500
#*# 0.005000, -0.022500, -0.015000, 0.005000, -0.037500, -0.015000, 0.022500, 0.045000, 0.062500
#*# 0.025000, -0.002500, -0.002500, 0.012500, -0.015000, -0.007500, 0.027500, 0.065000, 0.060000
#*# 0.025000, 0.002500, 0.002500, 0.010000, -0.002500, 0.020000, 0.040000, 0.065000, 0.077500
#*# 0.047500, 0.012500, 0.072500, -0.002500, 0.015000, 0.012500, 0.052500, 0.077500, 0.090000
#*# 0.062500, 0.025000, 0.025000, 0.015000, 0.000000, 0.022500, 0.057500, 0.100000, 0.105000
#*# 0.050000, 0.035000, 0.027500, 0.017500, 0.005000, 0.025000, 0.070000, 0.112500, 0.127500
#*# tension = 0.2
#*# min_x = 36.0
#*# algo = bicubic
#*# y_count = 9
#*# mesh_y_pps = 2
#*# min_y = 0.0
#*# x_count = 9
#*# max_y = 200.0
#*# mesh_x_pps = 2
#*# max_x = 210.0