-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprinter.cfg
383 lines (336 loc) · 10.1 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
[include mainsail.cfg]
# This file contains common pin mappings for the BIGTRE use this config, the firmware should be compiled for the
# STM32G0B1 with a "8KiB bootloader" and USB communication/USART.
# 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.
[stepper_x]
step_pin: PB13
dir_pin: !PB12
enable_pin: !PB14
microsteps: 16
rotation_distance: 40
endstop_pin: ^PC0
position_endstop: 0
position_max: 230
position_min: 0
homing_speed: 50
[tmc2209 stepper_x]
uart_pin: PC11
tx_pin: PC10
uart_address: 0
run_current: 0.580
hold_current: 0.500
stealthchop_threshold: 999999
[stepper_y]
step_pin: PB10
dir_pin: !PB2
enable_pin: !PB11
microsteps: 16
rotation_distance: 40
endstop_pin: ^PC1
position_endstop: -12
position_max: 218
position_min: -12
homing_speed: 50
[tmc2209 stepper_y]
uart_pin: PC11
tx_pin: PC10
uart_address: 2
run_current: 0.580
hold_current: 0.500
stealthchop_threshold: 999999
[stepper_z]
step_pin: PB0
dir_pin: PC5
enable_pin: !PB1
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
position_max: 235
position_min: 0
[tmc2209 stepper_z]
uart_pin: PC11
tx_pin: PC10
uart_address: 1
run_current: 0.580
hold_current: 0.500
stealthchop_threshold: 999999
[extruder]
step_pin: PB3
dir_pin: !PB4
enable_pin: !PD1
microsteps: 16
gear_ratio: 42:12
rotation_distance: 24.813
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
min_temp: 0
max_temp: 300
;max_extrude_only_distance: 101 # Added for flow rate calc
[tmc2209 extruder]
uart_pin: PC11
tx_pin: PC10
uart_address: 3
run_current: 0.650
hold_current: 0.500
stealthchop_threshold: 999999
[heater_bed]
heater_pin: PC9
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
min_temp: 0
max_temp: 100
[heater_fan hotend_fan]
pin: PB15
#heater: extruder # Disable if extruder...
#heater_temp: 50.0 # Temperature is below 50 deg C
[controller_fan electronic_enclosure_fan]
pin: PC7
#idle_timeout: 60 # Need to further investigate fan timeout
[fan]
pin: PC6
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_380014001250415833323520-if00
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 2300
max_z_velocity: 5
max_z_accel: 100
[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=PD6, EXP1_10=<5V>
[safe_z_home]
home_xy_position: 115,109 # Coordinates to the center of your print bed
speed: 100
z_hop: 10 # Move up 10mm after probe
z_hop_speed: 5
[bltouch]
sensor_pin: ^PC14
control_pin: PA1
x_offset: -32.4
y_offset: -49.1
#z_offset: 4 # Uncomment if starting fresh; This should be enough to avoid bed collision.
probe_with_touch_mode: true
stow_on_each_sample: false
# Bed Leveling: https://www.klipper3d.org/Bed_Level.html#determining-thermal-expansion
[bed_mesh]
speed: 120
horizontal_move_z: 6
mesh_min: 10, 10
mesh_max: 190, 165
probe_count: 6, 6
[screws_tilt_adjust]
screw1: 64.4,80.1
screw1_name: front_left
screw2: 230,80.1
screw2_name: front_right
screw3: 230,218
screw3_name: back_right
screw4: 64.4,218
screw4_name: back_left
[input_shaper]
shaper_freq_x: 45.8
shaper_type_x: 2hump_ei
shaper_freq_y: 41.6
shaper_type_y: mzv
#[mcu rpi]
#serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#[resonance_tester]
#accel_chip: adxl345
#probe_points:
# 100, 100, 20 # an example
######################################################################
# Start Print and End Print
######################################################################
# Replace the slicer's custom start and end g-code scripts with
# START_PRINT and END_PRINT. See docs/Slicers.md for more information on using these macros.
[gcode_macro START_PRINT]
gcode:
{% set BED_TEMP=params.BED_TEMP|default(60)|float %} # Get initial bed temp from slicer
{% set EXTRUDER_TEMP=params.EXTRUDER_TEMP|default(210)|float %} # Get initial extruder temp from slicer
;SETUP_KAMP_MESHING DISPLAY_PARAMETERS=1 LED_ENABLE=1 FUZZ_ENABLE=1 # Setup KAMP adaptive mesh
;SETUP_LINE_PURGE DISPLAY_PARAMETERS=1 ADAPTIVE_ENABLE=1 Z_HEIGHT=.3 PURGE_AMOUNT=30 # Setup KAMP purge line
G90 # Use absolute coordinates
M83 # Extruder relative mode
M104 S150 # Set temporary nozzle temp to prevent oozing during homing and auto bed leveling
M140 S{BED_TEMP} # Start bed heating
M109 S170 # Wait for bed temp
G4 S10 # allow partial nozzle warmup
G28 # home all axis
BED_MESH_CLEAR # Clear previous bed mesh
BED_MESH_CALIBRATE # Calibrate new bed mesh
G1 Z50 F240
G1 X5 Y10 F3000
M190 S{BED_TEMP} # Wait for bed to reach temperature
M109 S{EXTRUDER_TEMP} # Set and wait for nozzle to reach temperature
G0 Z50 F240
G0 X2 Y10 F3000
G1 Z0.28 F240
G92 E0
#G1 Y140 E10 F1500 # prime the nozzle
#G1 X5.3 F5000
#G92 E0
#G1 Y10 E10 F1200 # prime the nozzle
G1 X200 E10 F1500 # prime the nozzle
G1 Y10 F5000
G92 E0
G1 X10 E10 F1200 # prime the nozzle
G92 E0
;LINE_PURGE # Purge nozzle
[gcode_macro END_PRINT]
gcode:
G91 # Use relative coordinates
G1 Z10 F600 # Move print head up
G28 X Y
G90 # Use absolute coordinates
G1 Y200 F1500 # Move Bed forward
# G1 X5 Y{print_bed_max[1]*0.8} F{travel_speed*60} # present print
M140 S0 # turn off heatbed
M104 S0 # turn off temperature
M107 # turn off fan
M84 X Y E # disable motors
####################################
## MACROS
####################################
[exclude_object]
#[include KAMP_Settings.cfg]
# All customizations are documented in globals.cfg. Just copy a variable from
# there into the section below, and change the value to meet your needs.
#.0
# Hide the Octoprint LCD[gcode_macro _km_options]
# These are examples of some likely customizations:
# Any sheets in the below list will be available with a configurable offset.
#variable_bed_surfaces: ['smooth_1','texture_1']
# Length (in mm) of filament to load (bowden tubes will be longer).
#variable_load_length: 50 menu since I don't use it.
#variable_menu_show_octoprint: False
# Customize the filament menus (up to 10 entries).
#variable_menu_temperature: [
# {'name' : 'PLA', 'extruder' : 200.0, 'bed' : 60.0},
# {'name' : 'PETG', 'extruder' : 230.0, 'bed' : 85.0},
# {'name' : 'ABS', 'extruder' : 245.0, 'bed' : 110.0, 'chamber' : 60}]
# Length of filament (in millimeters) to purge at print start.
#variable_start_purge_length: 30 # This value works for most setups.
#gcode: # This line is required by Klipper.
# Any code you put here will run at klipper startup, after the initialization
# for these macros. For example, you could uncomment the following line to
# automatically adjust your bed surface offsets to account for any changes made
# to your Z endstop or probe offset.
# ADJUST_SURFACE_OFFSETS
# This line includes all the standard macros.
#[include klipper-macros/*.cfg]
# Uncomment to include features that require specific hardware support.
# LCD menu support for features like bed surface selection and pause next layer.
#[include klipper-macros/optional/lcd_menus.cfg]
# Optimized bed leveling
#[include klipper-macros/optional/bed_mesh.cfg]
# The sections below here are required for the macros to work.
#[idle_timeout]
#gcode:
# _KM_IDLE_TIMEOUT
#[pause_resume]
#[respond]
#[save_variables]
#filename: /home/wilsonm/printer5_data/config/variables.cfg # UPDATE THIS FOR YOUR PATH!!!
#[virtual_sdcard]
#path: /home/wilsonm/printer5_data/gcodes
#[display_status]
[gcode_macro home_check]
description: Checks if the printer is homed, if not it homes the printer
gcode:
{% if printer.toolhead.homed_axes != "xyz" %}
G28
{% endif %}
[gcode_macro BED_MESH]
description: Heats bed, makes a mesh and saves it
gcode:
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={BED_TEMP}
HOME_CHECK
M190 S{BED_TEMP}
BED_MESH_CLEAR
BED_MESH_CALIBRATE
TURN_OFF_HEATERS
SAVE_CONFIG
[gcode_macro PID_EXTRUDER]
description: PID Tune for the Extruder
gcode:
{% set TARGET_TEMP = params.TARGET_TEMP|default(200)|float %}
PID_CALIBRATE HEATER=extruder TARGET={TARGET_TEMP}
TURN_OFF_HEATERS
SAVE_CONFIG
[gcode_macro PID_BED]
description: PID Tune for the Bed
gcode:
{% set TARGET_TEMP = params.TARGET_TEMP|default(60)|float %}
PID_CALIBRATE HEATER=heater_bed TARGET={TARGET_TEMP}
TURN_OFF_HEATERS
SAVE_CONFIG
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 19.246
#*# pid_ki = 0.995
#*# pid_kd = 93.104
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 66.262
#*# pid_ki = 1.096
#*# pid_kd = 1001.382
#*#
#*# [bltouch]
#*# z_offset = 1.425
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# -0.020000, -0.060000, -0.080000, -0.067500, -0.030000, -0.000000
#*# 0.065000, -0.005000, -0.050000, -0.030000, -0.010000, 0.022500
#*# 0.070000, 0.060000, -0.002500, 0.017500, 0.052500, 0.082500
#*# 0.095000, 0.045000, -0.000000, 0.022500, 0.047500, 0.067500
#*# 0.060000, 0.050000, 0.015000, 0.010000, 0.047500, 0.055000
#*# 0.055000, -0.010000, -0.015000, -0.012500, 0.030000, 0.040000
#*# tension = 0.2
#*# min_x = 10.0
#*# algo = lagrange
#*# y_count = 6
#*# mesh_y_pps = 2
#*# min_y = 10.0
#*# x_count = 6
#*# max_y = 165.0
#*# mesh_x_pps = 2
#*# max_x = 190.0
#*#
#*# [bed_mesh 2024-Jun-30]
#*# version = 1
#*# points =
#*# -0.042500, -0.070000, -0.072500, -0.045000, -0.025000, -0.025000
#*# 0.020000, -0.010000, -0.022500, -0.012500, 0.012500, -0.020000
#*# 0.047500, 0.030000, 0.012500, 0.017500, 0.040000, 0.030000
#*# 0.037500, 0.030000, -0.007500, 0.015000, 0.045000, 0.042500
#*# 0.017500, -0.010000, -0.020000, -0.010000, 0.027500, -0.002500
#*# -0.025000, -0.050000, -0.060000, -0.032500, 0.032500, -0.030000
#*# x_count = 6
#*# y_count = 6
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = lagrange
#*# tension = 0.2
#*# min_x = 10.0
#*# max_x = 190.0
#*# min_y = 10.0
#*# max_y = 165.0