-
Notifications
You must be signed in to change notification settings - Fork 0
/
printer.cfg
496 lines (432 loc) · 12.7 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
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
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
[include mainsail.cfg]
[include stealthburner_leds.cfg]
[include air_filter_timer.cfg]
[include nozzle_scrub.cfg]
[include led_effects.cfg]
[include runout_sensor.cfg]
[include tmc_autotune.cfg]
[include macros.cfg]
[include KAMP_Settings.cfg]
[include ./KAMP/Adaptive_Meshing.cfg]
[include ./KAMP/Line_Purge.cfg]
#[include ./KAMP/Voron_Purge.cfg]
[include ./KAMP/Smart_Park.cfg]
[exclude_object]
[save_variables]
filename: ~/saved_variables.cfg
[virtual_sdcard]
path: /home/pi/printer_data/gcodes
on_error_gcode: CANCEL_PRINT
[mcu]
#serial: /dev/serial/by-id/usb-Klipper_stm32h723xx_1E0016001951313236343430-if00
canbus_uuid: 9fc7e4571297
[mcu sb2040]
#canbus_uuid: 27d65112b208 #old
canbus_uuid: 58846bbef3b3
##--------------------------------------------------------------------
[printer]
kinematics: corexy
max_velocity: 400
max_accel: 10000
max_z_velocity: 30
max_z_accel: 350
square_corner_velocity: 5.0
[temperature_sensor M8P]
sensor_type: temperature_mcu
#[temperature_sensor CM4]
#sensor_type: temperature_host
[temperature_sensor SB2040]
sensor_type: temperature_mcu
sensor_mcu: sb2040
[temperature_sensor chamber]
sensor_type: BME280
i2c_address: 118
i2c_software_scl_pin: PA8
i2c_software_sda_pin: PC9
#####################################################################
# X/Y Stepper Settings
#####################################################################
## X Stepper on Motor1(B Motor)
[stepper_x]
step_pin: PE6
dir_pin: PE5
enable_pin: !PC14
microsteps: 32
rotation_distance: 40
full_steps_per_rotation: 400
endstop_pin: sb2040:gpio29
position_min: 0
position_endstop: 300
position_max: 300
homing_speed: 75 #Max 100
homing_retract_dist: 5
homing_positive_dir: true
[tmc2209 stepper_x]
uart_pin: PC13
interpolate: True
run_current: 0.8
hold_current: 0.7
sense_resistor: 0.110
stealthchop_threshold: 0
## Y Stepper on Motor2 (A Motor)
[stepper_y]
step_pin: PE2
dir_pin: PE1
enable_pin: !PE4
microsteps: 32
rotation_distance: 40
full_steps_per_rotation: 400
endstop_pin: ^PC15
position_min: 0
position_endstop: 305
position_max: 305
homing_speed: 75 #Max 100
homing_retract_dist: 5
homing_positive_dir: true
[tmc2209 stepper_y]
uart_pin: PE3
interpolate: True
run_current: 0.8
hold_current: 0.7
sense_resistor: 0.110
stealthchop_threshold: 0
#####################################################################
# input shaper definition
#####################################################################
[input_shaper]
shaper_freq_x: 58.6
shaper_freq_y: 42.4
shaper_type_x: zv
shaper_type_y: zv
#damping_ratio_x: 0.1
#damping_ratio_y: 0.1
## ADXL345
[adxl345]
cs_pin: sb2040:gpio1
spi_software_sclk_pin: sb2040:gpio0
spi_software_mosi_pin: sb2040:gpio3
spi_software_miso_pin: sb2040:gpio2
[resonance_tester]
accel_chip: adxl345
probe_points:
150,150,20
#####################################################################
# Z Stepper Settings
#####################################################################
## Z0 Stepper - Front Left on MOTOR3
[stepper_z]
step_pin: PB8
dir_pin: PB7
enable_pin: !PE0
rotation_distance: 40
gear_ratio: 80:16
microsteps: 16
endstop_pin: probe:z_virtual_endstop
position_max: 290
position_min: -5
homing_speed: 15
second_homing_speed: 3
homing_retract_dist: 3
[tmc2209 stepper_z]
uart_pin: PB9
interpolate: true
run_current: 0.8
hold_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0
## Z1 Stepper - Rear Left on Motor5
[stepper_z1]
step_pin: PG13
dir_pin: !PG12
enable_pin: !PG15
rotation_distance: 40
gear_ratio: 80:16
microsteps: 16
[tmc2209 stepper_z1]
uart_pin: PG14
interpolate: true
run_current: 0.8
hold_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 0
## Z2 Stepper - Rear Right on Motor6
[stepper_z2]
step_pin: PG9
dir_pin: PD7
enable_pin: !PG11
rotation_distance: 40
gear_ratio: 80:16
microsteps: 16
[tmc2209 stepper_z2]
uart_pin: PG10
interpolate: true
run_current: 0.8
hold_current: 0.80
sense_resistor: 0.110
stealthchop_threshold: 0
## Z3 Stepper - Front Right on Motor7
[stepper_z3]
step_pin: PD4
dir_pin: !PD3
enable_pin: !PD6
rotation_distance: 40
gear_ratio: 80:16
microsteps: 16
[tmc2209 stepper_z3]
uart_pin: PD5
interpolate: true
run_current: 0.8
hold_current: 0.80
sense_resistor: 0.110
stealthchop_threshold: 0
#####################################################################
# Extruder
#####################################################################
# Extruder on SB2040
[extruder]
step_pin: sb2040:gpio9
dir_pin: sb2040:gpio10
enable_pin: !sb2040:gpio7
rotation_distance: 46.87636
gear_ratio: 9:1
microsteps: 16
full_steps_per_rotation: 200
nozzle_diameter: 0.400
filament_diameter: 1.75
heater_pin: sb2040:gpio6
sensor_type: ATC Semitec 104GT-2
sensor_pin: sb2040:gpio27
min_temp: -50
max_temp: 290
max_power: 1.0
min_extrude_temp: 180
pressure_advance: 0.032
pressure_advance_smooth_time: 0.040
control: pid
pid_Kp: 26.152
pid_Ki: 2.602
pid_Kd: 65.705
max_extrude_only_distance: 150.0
max_extrude_cross_section: 5
pwm_cycle_time: 0.001
## E0 on SB2040
[tmc2240 extruder]
cs_pin: sb2040:gpio11
spi_software_sclk_pin: sb2040:gpio0
spi_software_mosi_pin: sb2040:gpio3
spi_software_miso_pin: sb2040:gpio2
run_current: 0.6
interpolate: False
rref: 12300
stealthchop_threshold: 99999
driver_TPFD: 0
#####################################################################
# Bed Heater
#####################################################################
[heater_bed]
## SSR Pin - BED_OUT
heater_pin: PA1
sensor_type: ATC Semitec 104GT-2
sensor_pin: PB1
max_power: 0.93
min_temp: 0
max_temp: 120
control: pid
pid_Kp: 60.276
pid_Ki: 1.225
pid_Kd: 741.396
[verify_heater heater_bed]
max_error: 120
check_gain_time: 90
hysteresis: 5
heating_gain: 2
#####################################################################
# Probe
#####################################################################
[probe]
pin: ^sb2040:gpio25
x_offset: 0
y_offset: 0
#z_offset: -1.725 old
z_offset: -1.660
speed: 10
samples: 3
samples_result: median
sample_retract_dist: 3.0
samples_tolerance: 0.01
samples_tolerance_retries: 5
activate_gcode:
{% set PROBE_TEMP = 150 %}
{% set MAX_TEMP = PROBE_TEMP + 5 %}
{% set ACTUAL_TEMP = printer.extruder.temperature %}
{% set TARGET_TEMP = printer.extruder.target %}
{% if TARGET_TEMP > PROBE_TEMP %}
{ action_respond_info('Extruder temperature target of %.1fC is too high, lowering to %.1fC' % (TARGET_TEMP, PROBE_TEMP)) }
M109 S{ PROBE_TEMP }
{% else %}
# Temperature target is already low enough, but nozzle may still be too hot.
{% if ACTUAL_TEMP > MAX_TEMP %}
{ action_respond_info('Extruder temperature %.1fC is still too high, waiting until below %.1fC' % (ACTUAL_TEMP, MAX_TEMP)) }
TEMPERATURE_WAIT SENSOR=extruder MAXIMUM={ MAX_TEMP }
{% endif %}
{% endif %}
#####################################################################
# Fan Control
#####################################################################
## Print Cooling Fan
[fan]
pin: sb2040:gpio13
kick_start_time: 0.5
off_below: 0.10
## Hotend Fan
[heater_fan hotend_fan]
pin: sb2040:gpio14
max_power: 1.0
kick_start_time: 0.5
heater: extruder
heater_temp: 50.0
## Controller fans
[multi_pin controller_fans_pins]
pins: PF7, PF9
[heater_fan controller_fan]
pin: multi_pin:controller_fans_pins
kick_start_time: 0.5
heater: heater_bed
heater_temp: 40.0
fan_speed: 1.0
[fan_generic nevermore]
pin: PA3
max_power: 1.0
kick_start_time: 0.5
cycle_time:0.01
off_below:0.1
[temperature_fan CM4]
sensor_type: temperature_host #This is what the Pi3's Temperature sensor is known as.
pin: PF6 #Set this to your fan pin
max_temp: 80.0 #Set below 85C, Pi3+ MCU can be damaged at 85C
target_temp: 43.0 #Set this to your preferred running temperature
min_temp: 0
shutdown_speed: 0.0
kick_start_time: 0.5
off_below: 0.19
max_speed: 1.0
min_speed: 0.0
control: pid
pid_Kp: 2.0
pid_Ki: 5.0
pid_Kd: 0.5
pid_deriv_time: 2.0
## Controller fan - SB2040
[heater_fan SB2040_fan]
pin: sb2040:gpio15
kick_start_time: 0.5
heater: extruder
heater_temp: 50.0
#####################################################################
# LED Control
#####################################################################
# Chamber Lighting - HE2 Connector
[output_pin caselight]
pin: PA5
pwm: true
shutdown_value: 0
value:1
cycle_time: 0.01
#####################################################################
# Homing and Gantry Adjustment Routines
#####################################################################
[idle_timeout]
timeout: 1800
[safe_z_home]
home_xy_position: 150,150
speed:100
z_hop:10
[quad_gantry_level]
gantry_corners:
-60,-10
360,370
# Probe points
points:
75,25
75,225
225,225
225,25
speed: 200
horizontal_move_z: 10
retries: 6
retry_tolerance: 0.0075
max_adjust: 10
#--------------------------------------------------------------------
[bed_mesh]
speed: 300
horizontal_move_z: 10
mesh_min: 30, 20
mesh_max: 270,240
fade_start: 0.6
fade_end: 10.0
probe_count: 5,5
algorithm: bicubic
zero_reference_position: 150, 130
#####################################################################
# Shell commands
#####################################################################
[gcode_shell_command backup_cfg]
command: /usr/bin/bash /home/pi/printer_data/config/autocommit.sh
timeout: 30
verbose: True
[gcode_macro BACKUP_CFG]
description: Backs up config directory GitHub
gcode:
RUN_SHELL_COMMAND CMD=backup_cfg
#####################################################################
# Shaketune
#####################################################################
[shaketune]
result_folder: ~/printer_data/config/ShakeTune_results
# Path where the processed results will be stored. If the folder doesn't exist,
# it will be automatically created. You can change this if you'd like to store
# results in a different location.
number_of_results_to_keep: 10
# This setting defines how many results you want to keep in the result folder.
# Once the specified number is exceeded, older results will be automatically deleted
# to free up space on the SD card and avoid cluttering the results folder.
keep_raw_data: False
# If set to True, Shake&Tune will store both the processed graphs and the raw accelerometer
# .stdata files in the results folder. This can be useful for debugging or archiving purposes.
# Please always attach them when reporting any issues on GitHub or Discord.
show_macros_in_webui: True
# Mainsail and Fluidd doesn't create buttons for system commands (macros that are not part
# of the printer.cfg file). This option allow Shake&Tune to inject them into the webui at runtime.
# If set to False, the macros will be hidden but still accessible from the console by typing
# their names manually, which can be useful if you prefer to encapsulate them into your own macros.
timeout: 600
# This defines the maximum processing time (in seconds) to allows to Shake&Tune for generating
# graphs from a .stdata file. 10 minutes should be more than enough in most cases, but if you have
# slower hardware (e.g., older SD cards or low-performance devices), increase it to prevent timeouts.
measurements_chunk_size: 2
# Each Shake&Tune command uses the accelerometer to take multiple measurements. By default,
# Shake&Tune will write a chunk of data to disk every two measurements, and at the end of the
# command will merge these chunks into the final .stdata file for processing. "2" is a very
# conservative setting to avoid Klipper Timer Too Close errors on lower end devices with little
# RAM, and should work for everyone. However, if you are using a powerful computer, you may
# wish to increase this value to keep more measurements in memory (e.g., 15-20) before writing
# the chunk and avoid stressing the filesystem too much.
max_freq: 200
# This setting defines the maximum frequency at which the calculation of the power spectral density
# is cutoff. The default value should be fine for most machines and accelerometer combinations and
# avoid touching it unless you know what you're doing.
dpi: 300
# Controls the resolution of the generated graphs. The default value of 300 dpi was optimized
# and strikes a balance between performance and readability, ensuring that graphs are clear
# without using too much RAM to generate them. Usually, you shouldn't need to change this value.
#####################################################################
# Misc
#####################################################################
## Thermistor Types
## "EPCOS 100K B57560G104F"
## "ATC Semitec 104GT-2"
## "NTC 100K beta 3950"
## "Honeywell 100K 135-104LAG-J01"
## "NTC 100K MGB18-104F39050L32" (Keenovo Heater Pad)
## "AD595"
## "PT100 INA826"