-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprinter.cfg
483 lines (396 loc) · 10.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
# This file contains common pin mappings for MKS SKIPR
# boards. To use this config, the firmware should be compiled for the
# stm32f407. When running "make menuconfig", select the 48KiB
# bootloader, and enable "Serial for communication" and select the "on USART1 PA10/PA9"
# The "make flash" command does not work on the MKS SKIPR. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "mks_skipr.bin" on an SD card and then restart the
# MKS SKIPR with that SD card.
# See docs/Config_Reference.md for a description of parameters.
[mcu]
# The hardware use USART1 PA10/PA9 connect to RK3328
#serial: /dev/serial/by-id/usb-Klipper_stm32f407xx_4D0045001850314335393520-if00
#serial: /dev/ttyS0
canbus_uuid= 68878be8f0c2
[mcu MKS_THR]
#serial: /dev/serial/by-id/usb-Klipper_rp2040_D5CE4D95252C4958-if00
canbus_uuid= ee577f753f81
[temperature_sensor Core]
sensor_type: temperature_mcu
sensor_mcu: mcu
[temperature_sensor MKS_THR]
sensor_type: temperature_mcu
sensor_mcu: MKS_THR
[temperature_sensor Recinto]
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC3
min_temp: 0
max_temp: 100
[mcu rpi]
serial: /tmp/klipper_host_mcu
[printer]
kinematics:corexy
max_velocity: 500
max_accel: 5000
max_z_velocity: 30
max_z_accel: 200
square_corner_velocity: 5.0
minimum_cruise_ratio: 0.5
[include TEST_SPEED.cfg]
#####################################################################
# X/Y Stepper Settings
#####################################################################
[stepper_x]
step_pin:PC14
dir_pin:!PC13
enable_pin:!PC15
microsteps: 32
rotation_distance: 40
full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper
endstop_pin: !MKS_THR:gpio24
position_min: 0
position_endstop: 350
position_max: 350
homing_speed:50
homing_retract_dist:5
homing_positive_dir:true
step_pulse_duration:0.000002
[stepper_y]
step_pin:PE5
dir_pin:!PE4
enable_pin:!PD14
microsteps:32
rotation_distance: 40
full_steps_per_rotation:200 #set to 400 for 0.9 degree stepper
endstop_pin:!PA15
position_min: 0
position_endstop:350
position_max:350
homing_speed:50
homing_retract_dist:5
#homing_positive_dir:true
step_pulse_duration:0.000002
[stepper_z]
# Adelnate izquierda
step_pin:PC7
dir_pin:!PC6
enable_pin:!PC8
microsteps: 32
rotation_distance: 40
full_steps_per_rotation: 200
gear_ratio: 80:16
endstop_pin: probe:z_virtual_endstop
position_max: 380
position_min: -2
[stepper_z1]
# atras izquierda
step_pin:PD2
dir_pin:PD1
enable_pin:!PD3
microsteps:32
rotation_distance: 40
full_steps_per_rotation: 200
gear_ratio: 80:16
[stepper_z2]
# atras derecha
step_pin:PD6
dir_pin:!PD5
enable_pin:!PD7
microsteps: 32
rotation_distance: 40
full_steps_per_rotation: 200
gear_ratio: 80:16
[stepper_z3]
# adelante derecha
step_pin:PE1
dir_pin:PE0
enable_pin: !PE2
microsteps:32
rotation_distance: 40
full_steps_per_rotation: 200
gear_ratio:80:16
#####################################################################
# Extruder
#####################################################################
[extruder]
sensor_type: ATC Semitec 104NT-4-R025H42G
step_pin: MKS_THR:gpio5
dir_pin: !MKS_THR:gpio4
enable_pin: !MKS_THR:gpio10
rotation_distance: 22.678 #22.6789511 #Bondtech 5mm Drive Gears
gear_ratio: 50:10
microsteps: 16
full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree
nozzle_diameter: 0.400
filament_diameter: 1.75
heater_pin:MKS_THR:gpio0
sensor_pin: MKS_THR:gpio26
min_temp:-10
max_temp: 380
max_power: 0.6
min_extrude_temp: 170
control = pid
pid_Kp: 20.479 #ABS KP 20.479 PLA 19.097
pid_Ki: 1.708 #ABS KP 1.708 PLA 1.554
pid_Kd: 61.373 #ABS KD 61.373 PLA 58.663
max_extrude_only_distance: 300
#####################################################################
# Bed Heater
#####################################################################
[heater_bed]
heater_pin: PD12
sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin: PC0
max_power: 1.0
control = pid
pid_kp = 62.981 #ABS KP 62.981 PLA KP 61.955
pid_ki = 3.110 #ABS KI 3.110 PLA KI 1.828
pid_kd = 318.839 #ABS KI 318.839 PLA KD 525.065
min_temp: 0
max_temp: 120
#####################################################################
# Probe
#####################################################################
[probe]
pin: !MKS_THR:gpio21
z_offset: 2.750 #6.25
speed: 7
samples: 3
samples_result: median
sample_retract_dist: 5
samples_tolerance: 0.05
samples_tolerance_retries: 3
#####################################################################
# Fan Control
#####################################################################
[heater_fan hotend_fan]
pin:MKS_THR:gpio1
max_power: 1.0
kick_start_time: 0.5
heater: extruder
heater_temp: 50.0
fan_speed: 1.0
## FAN1
[fan]
pin: MKS_THR:gpio2
max_power: 1.0
off_below: 0.10
[fan_generic fan1]
pin:MKS_THR:gpio3
max_power: 1.0
kick_start_time: 0.5
off_below: 0.10
[output_pin mcu_fan]
pin: PA2
value: 1.0
####################################################################
# Homing and Gantry Adjustment Routines
#####################################################################
[idle_timeout]
timeout: 3600
[safe_z_home]
home_xy_position: 175,175 # Change coordinates to the center of your print bed
speed: 100
z_hop: 10 # Move up 10mm
z_hop_speed: 5
[quad_gantry_level]
gantry_corners:
10,20
320,320
## Probe points
points:
15,20
15,300
320,300
320,20
speed: 80
horizontal_move_z: 10
retries: 5
retry_tolerance: 0.01
max_adjust: 15
#####################################################################
# LED Control
#####################################################################
#[output_pin caselight ](Use PA9)
## Chamber Lighting - In 5V-RGB Position
#pin: PC5
#pwm: true
#shutdown_value: 0
#value:100
#cycle_time: 0.01
########################################
# TMC UART configuration
########################################
[tmc2209 stepper_x]
uart_pin: PE6
run_current: 1.1
stealthchop_threshold: 0
interpolate: false
sense_resistor: 0.110
driver_SGTHRS: 95
[tmc2209 stepper_y]
uart_pin: PE3
run_current: 1.1
stealthchop_threshold: 0
interpolate: false
sense_resistor: 0.110
driver_SGTHRS: 95
[tmc2209 stepper_z]
uart_pin: PB7
run_current: 1.0
interpolate: True
[tmc2209 stepper_z1]
uart_pin: PD4
run_current: 1.0
interpolate: True
[tmc2209 stepper_z2]
uart_pin: PD0
run_current: 1.0
interpolate: True
[tmc2209 stepper_z3]
uart_pin: PD15
run_current: 1.0
interpolate: True
[tmc2208 extruder]
uart_pin: MKS_THR:gpio6
interpolate: false
run_current: 0.5
sense_resistor: 0.110
stealthchop_threshold: 0
########################################
# TMC SPI configuration
########################################
#[tmc2130 stepper_x]
#spi_bus: spi4
#cs_pin: PE6
#diag1_pin: PA14
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 999999
#[tmc2130 stepper_y]
#spi_bus: spi4
#cs_pin: PE3
#diag1_pin: PA15
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 999999
#[tmc2130 stepper_z]
#spi_bus: spi4
#cs_pin: PB7
#diag1_pin: PB15
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 999999
#[tmc2130 extruder]
#spi_bus: spi4
#cs_pin: PB3
#diag1_pin: PA13
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 999999
#[tmc2130 extruder1]
#spi_bus: spi4
#cs_pin: PD4
#diag1_pin: PC5
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 999999
#[tmc2130 extruder2]
#spi_bus: spi4
#cs_pin: PD0
#diag1_pin: PB14
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 999999
#[tmc2130 extruder3]
#spi_bus: spi4
#cs_pin: PD15
#run_current: 0.800
#hold_current: 0.500
#stealthchop_threshold: 999999
########################################
# EXP1 / EXP2 (display) pins
########################################
[board_pins]
aliases:
# EXP1 header
EXP1_1=PB2, EXP1_3=PE11, EXP1_5=PD9, EXP1_7=PE15, EXP1_9=<GND>,
EXP1_2=PE10, EXP1_4=PD10, EXP1_6=PD8, EXP1_8=PE7, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PA6, EXP2_3=PE9, EXP2_5=PE8, EXP2_7=PD13, EXP2_9=<GND>,
EXP2_2=PA5, EXP2_4=PA4, EXP2_6=PA7, EXP2_8=<RST>, EXP2_10=<3.3v>
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "ssp1"
# See the sample-lcd.cfg file for definitions of common LCD displays.
# Some alternate glyphs for use with 128x64 LCDs. These are used by
# adding them to your printer.cfg.
# See docs/Config_Reference.md for a description of parameters.
######################################################################
# MKS Mini 12864v3.0 (with neopixel backlight leds)
######################################################################
[display]
lcd_type: uc1701
cs_pin: EXP1_3
a0_pin: EXP1_4
rst_pin: EXP1_5
contrast: 63
encoder_pins: ^EXP2_5, ^EXP2_3
click_pin: ^!EXP1_2
## Some micro-controller boards may require an spi bus to be specified:
#spi_bus: spi
## Alternatively, some micro-controller boards may work with software spi:
spi_software_miso_pin: EXP2_1
spi_software_mosi_pin: EXP2_6
spi_software_sclk_pin: EXP2_2
[output_pin beeper]
pin: EXP1_1
#[neopixel fysetc_mini12864]
#pin: EXP1_6
#chain_count: 3
#color_order: RGB
#initial_RED: 1.0
#initial_GREEN: 1.0
#initial_BLUE: 0.0
# See the MKS Lcd Config path file for definitions of common LCD displays.
[adxl345]
cs_pin: MKS_THR:gpio13
spi_software_sclk_pin: MKS_THR:gpio14
spi_software_mosi_pin: MKS_THR:gpio15
spi_software_miso_pin: MKS_THR:gpio12
[resonance_tester]
accel_chip: adxl345
probe_points:
100, 100, 20 # an example
[input_shaper]
shaper_freq_x: 63.2
shaper_type_x: ei
shaper_freq_y: 62.0
shaper_type_y: mzv
[virtual_sdcard]
#path:/home/mks/uploads
path: /home/mks/printer_data/gcodes
[pause_resume]
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
G91 ; Poner en modo de coordenadas relativas
G1 Z20 F1200 ; Mover el eje Z hacia arriba 20 mm
G90 ; Volver a modo de coordenadas absolutas
M104 S0 ; Apagar el hotend
M140 S0 ; Apagar la cama caliente
M107 ; Apagar el ventilador de capa
CANCEL_PRINT_BASE
[display_status]
[gcode_macro G32]
gcode:
BED_MESH_CLEAR
G28
QUAD_GANTRY_LEVEL
G28
[include moonraker_obico_macros.cfg]
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 30, 20
mesh_max: 310, 320
probe_count: 5, 5