-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprinter-20240915_160158.cfg
488 lines (443 loc) · 13.6 KB
/
printer-20240915_160158.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
## *** THINGS TO CHANGE/CHECK: ***
## MCU paths [mcu] section
## Thermistor types [extruder] and [heater_bed] sections - See 'sensor types' list at end of file
## PID tune [extruder] and [heater_bed] sections
## Fine tune E steps [extruder] section
## For wiring directions please see https://docs.vorondesign.com/build/electrical/sw_miniE3_v20_wiring.html
## Webclient config files. Uncomment one depending on UI being used.
[include mainsail.cfg]
[include stealthburner_leds.cfg]
[include config_backup.cfg]
[exclude_object]
[force_move]
enable_force_move: True
#Bed screws adjust using the probe
[screws_tilt_adjust]
screw1: 23,3
screw1_name: front left screw
screw2: 23,175
screw2_name: rear left screw
screw3: 195,175
screw3_name: rear right screw
screw4: 195,3
screw4_name: front right screw
speed: 500
horizontal_move_z: 10
screw_thread: CW-M4
[scanner]
#canbus_uuid: 0ca8d67388c2
#adjust to suit your scanner
serial: /dev/serial/by-id/usb-Cartographer_614e_1E0002000543303459323220-if00
x_offset: 0
#adjust for your offset
y_offset: 21.1
#adjust for your offset
calibration_method: touch
sensor: cartographer
sensor_alt: carto
#alternate name to call commands. CARTO_TOUCH etc
scanner_touch_z_offset: 0.05
#this is the default and will be overwritten and added to the DO NOT SAVE area by using UI to save z offset
mesh_main_direction: x
[adxl345]
cs_pin: cartographer:PA3
#spi_bus: spi1
[resonance_tester]
accel_chip: adxl345
probe_points:
110, 115, 20
[printer]
kinematics: corexz
max_velocity: 200
max_accel: 1000
max_z_velocity: 50
max_z_accel: 1000
square_corner_velocity: 4.0
[mcu]
###Change to device found by "ls -l /dev/serial/by-id/" with just one this MCU connected to Pi
serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_030032001350415833323520-if00
#####################################################################
# X Stepper Settings
#####################################################################
######
# Motor -XM
# Endstop - X-STOP
###############
[stepper_x]
step_pin: PB13
dir_pin: PB12
enable_pin: !PB14
rotation_distance: 40
full_steps_per_rotation: 200
microsteps: 32
#endstop_pin: ^PC0
endstop_pin: ^PC1
#endstop_pin: tmc2209_stepper_x:virtual_endstop
position_endstop: 220
position_min: 0
position_max: 220
homing_speed: 40
#homing_positive_dir: true
homing_retract_dist: 0
[tmc2209 stepper_x]
uart_pin: PC11
tx_pin: PC10
uart_address: 0
run_current: 0.5
interpolate: False
stealthchop_threshold: 0
#####################################################################
# Y Stepper Settings
#####################################################################
######
# Motor -YM
# Endstop - Y-STOP
###############
[stepper_y]
step_pin: PB10
dir_pin: PB2
enable_pin: !PB11
rotation_distance: 40
full_steps_per_rotation: 200
microsteps: 32
## Ucomment one of the following:
## Switch-based endstop for Y
#endstop_pin: ^!PC1
endstop_pin: ^PC0
## Sensorless endstop for Y
#endstop_pin: tmc2209_stepper_y:virtual_endstop
#homing_retract_dist: 0 # Uncomment this line too
position_endstop: 0
position_min: 0
position_max: 230
homing_speed: 40
#homing_positive_dir: true
[tmc2209 stepper_y]
uart_pin: PC11
tx_pin: PC10
uart_address: 2
run_current: 0.5
interpolate: False
stealthchop_threshold: 0
## Uncomment if using sensorless Y homing.
#driver_SGTHRS: 120 # tune this once it's working.
#####################################################################
# Z Stepper Settings
#####################################################################
######
# Motor -ZAM
# Endstop - Z-STOP
###############
[stepper_z]
step_pin: PB0
dir_pin: PC5
enable_pin: !PB1
rotation_distance: 40
full_steps_per_rotation: 200
microsteps: 32
endstop_pin: probe:z_virtual_endstop
position_max: 250
homing_speed: 40
position_min: -8.0
homing_retract_dist: 0 # cartographer needs this to be set to 0
[tmc2209 stepper_z]
uart_pin: PC11
tx_pin: PC10
uart_address: 1
run_current: 0.5
interpolate: False
stealthchop_threshold: 0
#####################################################################
# Extruder Settings
#####################################################################
######
#Motor - EM
###############
[extruder]
# E0_STEP_PIN PB3
# E0_DIR_PIN PB4
# E0_ENABLE_PIN PB1
# E0_UART_RX PC11
# E0_UART_TX PC10
step_pin: PB3
dir_pin: PB4
enable_pin: !PD1
## Update value below when you perform extruder calibration
## If you ask for 100mm of filament, but in reality it is 98mm:
## rotation_distance = <previous_rotation_distance> * <actual_extrude_distance> / 100
## 22.6789511 is a good starting point
rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears
## Update Gear Ratio depending on your Extruder Type
## Use 50:10 for Stealthburner/Clockwork 2
## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio)
## Use 80:20 for M4, M3.1
gear_ratio: 50:10
microsteps: 32
full_steps_per_rotation: 200
nozzle_diameter: 0.400
filament_diameter: 1.75
heater_pin: PC8
## Validate the following thermistor type to make sure it is correct
## See https://www.klipper3d.org/Config_Reference.html#common-thermistors for additional options
sensor_type: ATC Semitec 104NT-4-R025H42G
sensor_pin: PA0
min_temp: 10
max_temp: 270
max_power: 1.0
min_extrude_temp: 170
#control = pid
#pid_kp = 26.213
#pid_ki = 1.304
#pid_kd = 131.721
#Set appropriate once tuning your printer
pressure_advance: .075
## Default is 0.040, leave stock
# pressure_advance_smooth_time: 0.040
max_extrude_only_distance: 100.0
[tmc2209 extruder]
#uart_pin: PC11
#tx_pin: PC10
#uart_address: 3
run_current: 0.7
hold_current: 0.3
#interpolate: False
sense_resistor: 0.100
uart_pin: nhk:gpio0
tx_pin: nhk:gpio1
interpolate: false
#####################################################################
# Bed Heater
#####################################################################
######
# BED Connector
###############
[heater_bed]
heater_pin: PC9
## Validate the following thermistor type to make sure it is correct
## See https://www.klipper3d.org/Config_Reference.html#common-thermistors for additional options
sensor_type: Generic 3950
sensor_pin: PC4
min_temp: 0
max_temp: 130
#control: pid
#pid_kp: 58.437
#pid_ki: 2.347
#pid_kd: 363.769
#####################################################################
# Probe
#####################################################################
######
#Z Max Connector on Z(main) Board
#Inductive Probe
###############
[probe]
## If your probe is NO instead of NC, add change pin to !z:P1.24
#pin: ^PC2
#x_offset: 0
#y_offset: 25
#z_offset: 0
#samples: 3
#samples_result: median
#sample_retract_dist: 3
#samples_tolerance: 0.006
#samples_tolerance: 0.03
#samples_tolerance_retries: 3
#####################################################################
# Fan Control
#####################################################################
######
# Electronics Fan
# FAN1 Connector
###############
[controller_fan my_controller_fan]
pin: PC7
max_power: 1.00
kick_start_time: 0.200
heater: heater_bed
######
# Hot End Fan
# FAN2 Connector
###############
[heater_fan extruder_fan]
pin: PB15
heater: extruder
heater_temp: 50.0
## If you are experiencing back flow, you can reduce fan_speed
#fan_speed: 1.0
######
# Part Cooling Fan
# FAN0 Connector
###############
[fan]
pin: PC6 # "FAN0"
cycle_time: .08
## Depending on your fan, you may need to increase this value
## if your fan will not start. Can change cycle_time (increase)
## if your fan is not able to slow down effectively
kick_start_time: .25
#####################################################################
# Homing and Bed Mesh
#####################################################################
[homing_override]
axes: z
set_position_z: 0
gcode:
G90
G0 Z5 F500
G28 X0 Y0
G0 X125 Y125 F9000
G28 Z0
G0 Z5 F500
[bed_mesh]
speed: 500
horizontal_move_z: 5
mesh_min: 30,30
mesh_max: 200,200
probe_count: 20,20
algorithm: bicubic
zero_reference_position: 110, 115 # set this to your touch_location or middle of your bed
#####################################################################
# Displays
#####################################################################
## For the mini12864 Display, the [display] and [neopixel] must be uncommented
# mini12864 LCD Display
# connected to exp1/2
#[display]
## mini12864 LCD Display
#lcd_type: uc1701
#cs_pin: PB8
#a0_pin: PB15
#rst_pin: PB9
#encoder_pins: ^PA9,^PA10
#click_pin: ^!PB5
#contrast: 63
#spi_software_sclk_pin: PA5
#spi_software_mosi_pin: PA7
#spi_software_miso_pin: PA6
#menu_reverse_navigation: True
#[neopixel fysetc_mini12864]
## To control Neopixel RGB in mini12864 display
## Remember with these ones, you'll need to remove the connector header on the LCD for EXT1 + 2
## (it slides off) and reverse it for it to work on your SKR (1.3 and 1.4) board
#pin: PA15
#chain_count: 3
#initial_RED: 1
#initial_GREEN: 1
#initial_BLUE: 1
#color_order: RGB
## Set RGB values on boot up for each Neopixel.
## Index 1 = display, Index 2 and 3 = Knob
#[delayed_gcode setdisplayneopixel]
#initial_duration: 1
#gcode:
# SET_LED LED=fysetc_mini12864 RED=1 GREEN=1 BLUE=1 INDEX=1 TRANSMIT=0 # Backlit Screen colour
# SET_LED LED=fysetc_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=2 TRANSMIT=0 # Top left Knob colour
# SET_LED LED=fysetc_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=3 # Bottom right knob colour
#####################################################################
# Case Lights
#####################################################################
#[output_pin LIGHTS]
#pin: PA8
#value: 0
#shutdown_value: 0
[gcode_macro lights_on]
gcode:
SET_PIN PIN=LIGHTS VALUE=1.0
[gcode_macro lights_off]
gcode:
SET_PIN PIN=LIGHTS VALUE=0.0
#####################################################################
# Macros
#####################################################################
[gcode_macro PRINT_START]
# Use PRINT_START for the slicer starting script - PLEASE CUSTOMISE THE SCRIPT
gcode:
{% set target_bed = params.BED|int %}
{% set target_extruder = params.EXTRUDER|int %}
{% set target_chamber = params.CHAMBER|default("40")|int %}
{% set x_wait = printer.toolhead.axis_maximum.x|float / 2 %}
{% set y_wait = printer.toolhead.axis_maximum.y|float / 2 %}
G28 ; Home all axes
M104 S{target_bed} ; Set bed temperature
M109 S150 ; Wait for extuder to reach 150°C (intermediate step)
M140 S{target_bed} ; Set final bed temperature
G28 Z ; Home Z axis again to account for thermal expansion
BED_MESH_CALIBRATE ; Calibrate the bed mesh
CARTOGRAPHER_TOUCH ; Perform touch probe
M109 S{target_extruder} ; Wait for extruder to reach target temperature
G0 X{x_wait - 50} Y4 F10000 # Moves to starting point
G0 Z0.4 # Raises Z to 0.4
G91 # Incremental positioning
G1 X100 E20 F1000 # Purge line
G90 # Absolut position
[gcode_macro PRINT_END]
# Use PRINT_END for the slicer ending script
gcode:
# Get Boundaries
{% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %}
{% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %}
{% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %}
# Check end position to determine safe directions to move
{% if printer.toolhead.position.x < (max_x - 20) %}
{% set x_safe = 20.0 %}
{% else %}
{% set x_safe = -20.0 %}
{% endif %}
{% if printer.toolhead.position.y < (max_y - 20) %}
{% set y_safe = 20.0 %}
{% else %}
{% set y_safe = -20.0 %}
{% endif %}
{% if printer.toolhead.position.z < (max_z - 2) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - printer.toolhead.position.z %}
{% endif %}
# Commence PRINT_END
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-4.0 F3600 ; retract
G91 ; relative positioning
G0 Z{z_safe} F3600 ; move nozzle up
G0 X{x_safe} Y{y_safe} F20000 ; move nozzle to remove stringing
M104 S0 ; turn off hotend
M140 S0 ; turn off bed
M106 S0 ; turn off fan
G90 ; absolute positioning
G0 X{max_x / 2} Y{max_y} F3600 ; park nozzle at rear
M117 Finished!
[include moonraker_obico_macros.cfg]
[include nitehawk-sb.cfg]
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 17.099
#*# pid_ki = 0.991
#*# pid_kd = 73.739
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 64.643
#*# pid_ki = 0.837
#*# pid_kd = 1248.418
#*#
#*# [scanner model default]
#*# model_coef = 1.4968525735225322,
#*# 2.008982382273416,
#*# 0.485249320681919,
#*# -0.19417520417323925,
#*# 1.5033032745974524,
#*# 1.2361101659056317,
#*# -2.234877525742669,
#*# -0.9775219006096351,
#*# 1.2929751001986713,
#*# 0.3717417539396767
#*# model_domain = 3.191815605133134e-07,3.3117090101613953e-07
#*# model_range = 0.100000,5.000000
#*# model_temp = 35.634388
#*# model_offset = 0.00000
#*#
#*# [scanner]
#*# scanner_touch_threshold = 4500