-
Notifications
You must be signed in to change notification settings - Fork 0
/
printer.cfg
682 lines (602 loc) · 17.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
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
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
#####################################################################
# Includes
#####################################################################
[include knomi.cfg]
[include ledbarf.cfg]
[include mainsail.cfg]
[include nozzle_scrub.cfg]
[include config_backup.cfg]
[include K-ShakeTune/*.cfg]
#####################################################################
# Boards Config
#####################################################################
[mcu]
canbus_uuid: b7497c5448f4
[mcu EBBCan]
canbus_uuid: 049c9a44ee4e
#####################################################################
# ADXL Config
#####################################################################
[adxl345]
cs_pin: EBBCan:gpio1
spi_software_sclk_pin: EBBCan:gpio2
spi_software_mosi_pin: EBBCan:gpio0
spi_software_miso_pin: EBBCan:gpio3
axes_map: z,-y,x
[resonance_tester]
probe_points: 150, 150, 20
accel_chip: adxl345
[input_shaper]
#shaper_type_x: mzv
#shaper_freq_x: 55.8
#shaper_type_y: mzv
#shaper_freq_y: 44.6
#####################################################################
# General Settings
#####################################################################
[printer]
kinematics: corexy
max_velocity: 300 #PERFORMANCE
max_accel: 6000 #ADXL ADVIES
max_accel_to_decel: 6000 #ADXL ADVIES
max_z_velocity: 15 #Max 15 for 12V TMC Drivers, can increase for 24V
max_z_accel: 350
square_corner_velocity: 5.0
[exclude_object]
[respond]
default_type: command
#####################################################################
# X/Y Stepper Settings
#####################################################################
[stepper_x]
## Connected to X-MOT (B Motor)
step_pin: PE11
dir_pin: PE10
enable_pin: !PE9
rotation_distance: 40
microsteps: 16
full_steps_per_rotation:400
endstop_pin: EBBCan:gpio24
position_min: 0
position_endstop: 300
position_max: 300
homing_speed: 80
homing_retract_dist: 5
homing_positive_dir: true
[tmc2209 stepper_x]
uart_pin: PE7
interpolate: True
run_current: 1.0
hold_current: 0.7
sense_resistor: 0.110
stealthchop_threshold: 0
[stepper_y]
## Connected to Y-MOT (A Motor)
step_pin: PD8
dir_pin: PB12
enable_pin: !PD9
rotation_distance: 40
microsteps: 16
full_steps_per_rotation:400
endstop_pin: ^PB13
position_min: 0
position_endstop: 300
position_max: 300
homing_speed: 80
homing_retract_dist: 5
homing_positive_dir: true
[tmc2209 stepper_y]
uart_pin: PE15
interpolate: True
run_current: 1.0
hold_current: 0.7
sense_resistor: 0.110
stealthchop_threshold: 0
#####################################################################
# Z Stepper Settings
#####################################################################
## In Z-MOT Position
## Z0 Stepper - Front Left
[stepper_z]
step_pin: PD14
dir_pin: !PD13
enable_pin: !PD15
rotation_distance: 40
gear_ratio: 80:16
microsteps: 16
endstop_pin: ^PA0
position_max: 290
position_min: -5
homing_speed: 8
second_homing_speed: 3
homing_retract_dist: 3
[tmc2209 stepper_z]
uart_pin: PD10
uart_address: 0
interpolate: True
run_current: 0.8
hold_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 100
## In E1-MOT Position
## Z1 Stepper - Rear Left
[stepper_z1]
step_pin: PE6
dir_pin: PC13
enable_pin: !PE5
rotation_distance: 40
gear_ratio: 80:16
microsteps: 16
[tmc2209 stepper_z1]
uart_pin: PC14
interpolate: True
run_current: 0.8
hold_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 100
## In E2-MOT Position
## Z2 Stepper - Rear Right
[stepper_z2]
step_pin: PE2
dir_pin: !PE4
enable_pin: !PE3
rotation_distance: 40
gear_ratio: 80:16
microsteps: 16
[tmc2209 stepper_z2]
uart_pin: PC15
interpolate: true
run_current: 0.8
hold_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 100
## In E3-MOT Position
## Z3 Stepper - Front Right
[stepper_z3]
step_pin: PD12
dir_pin: PC4
enable_pin: !PE8
rotation_distance: 40
gear_ratio: 80:16
microsteps: 16
[tmc2209 stepper_z3]
uart_pin: PA15
interpolate: true
run_current: 0.8
hold_current: 0.8
sense_resistor: 0.110
stealthchop_threshold: 100
#####################################################################
# Extruder
#####################################################################
[extruder]
step_pin: EBBCan:gpio18
dir_pin: !EBBCan:gpio19
enable_pin: !EBBCan:gpio17
microsteps: 16
rotation_distance: 13.214989 #Bondtech 5mm Drive Gears
gear_ratio: 50:17 #BMG Gear Ratio
full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree
filament_diameter: 1.750
nozzle_diameter: 0.400
heater_pin: EBBCan:gpio7
sensor_type: ATC Semitec 104GT-2
sensor_pin: EBBCan:gpio27
#control: pid
#pid_Kp: 21.527
#pid_Ki: 1.063
#pid_Kd: 108.982
min_temp: 0
max_temp: 250
max_extrude_only_distance: 200.0
max_extrude_cross_section: 50.0
min_extrude_temp: 0
[tmc2209 extruder]
uart_pin: EBBCan:gpio20
interpolate: false
run_current: 0.6
stealthchop_threshold: 0
#####################################################################
# Bed Heater
#####################################################################
[heater_bed]
## SSR Pin - In BED OUT position
heater_pin: PB4
sensor_type: Generic 3950
sensor_pin: PC3
max_power: 1.0
min_temp: 0
max_temp: 120
#####################################################################
# Probe
#####################################################################
[probe]
pin: EBBCan:gpio6
x_offset: 0
y_offset: 25.0
z_offset: 0
speed: 20.0
samples: 3
samples_result: median
sample_retract_dist: 3.0
samples_tolerance: 0.007
samples_tolerance_retries: 5
#####################################################################
# Fan Control & Temperature Sensors
#####################################################################
[heater_fan hotend_fan]
## Hotend Fan
pin: EBBCan:gpio14
max_power: 1.0
kick_start_time: 0.5
heater: extruder
heater_temp: 40.0
[fan]
## Print Cooling Fan
pin: EBBCan:gpio13
max_power: 1.0
kick_start_time: 0.5
off_below: 0.10
[fan_generic NevermoreFan]
## Nevermore fans
pin: PB0
max_power: 1.0
kick_start_time: 0.5
[heater_fan controller_fan]
## Controller fan (Spider and RPI)
pin: PB2
kick_start_time: 0.5
max_power: 1.0
heater: heater_bed
heater_temp: 40.0
fan_speed: 1.0
[temperature_sensor SB2209]
sensor_type: Generic 3950
sensor_pin: EBBCan:gpio28
[temperature_sensor Chamber]
sensor_type: NTC 100K MGB18-104F39050L32
sensor_pin: PC1
max_temp: 70
[temperature_sensor SpiderBoard]
sensor_type: temperature_mcu
min_temp: 0
max_temp: 80
[temperature_sensor Raspberry_pi]
sensor_type: temperature_host
min_temp: 10
max_temp: 80
#####################################################################
# LED Control
#####################################################################
[neopixel caselight]
## Chamber Lighting - In 5V-RGB Position
pin: PD3
chain_count: 32
color_order: GRB
initial_RED: 0.5
initial_GREEN: 0.5
initial_BLUE: 0.5
[neopixel fysetc_mini12864]
## To control Neopixel RGB in mini12864 display
pin: PC12
chain_count: 3
chain_count: 60
initial_RED: 0.1
initial_GREEN: 0.5
initial_BLUE: 0.0
color_order: RGB
#####################################################################
# Homing and Gantry Adjustment Routines
#####################################################################
[safe_z_home]
home_xy_position:208,297
speed:30
z_hop:10
[idle_timeout]
timeout: 1800
[quad_gantry_level]
gantry_corners:
-60,-10
360,370
## Probe points
points:
50,25
50,225
250,225
250,25
speed: 500
horizontal_move_z: 10
retries: 5
retry_tolerance: 0.0075
max_adjust: 10
[bed_mesh]
speed: 300
horizontal_move_z: 8
move_check_distance: 5
split_delta_z: .025
mesh_min: 40, 40
mesh_max: 260,260
fade_start: 0.6
fade_end: 10.0
probe_count: 5,5
algorithm: bicubic
#####################################################################
# Displays
#####################################################################
[display]
## mini12864 LCD Display
lcd_type: uc1701
cs_pin: PC11
a0_pin: PD2
rst_pin: PC10
encoder_pins: ^PC6,^PC7
click_pin: ^!PA8
contrast: 63
spi_bus: spi1
##spi_software_mosi_pin: PA7
##spi_software_mosi_pin: PA6
##spi_software_sclk_pin: PA5
#####################################################################
# Macros & Delayed_gcode
#####################################################################
[gcode_macro LEDOFF]
gcode: SET_LED LED=caselight RED=0 GREEN=0 BLUE=0 WHITE=0
SET_LED LED=fysetc_mini12864 RED=0 GREEN=0 BLUE=0 WHITE=0
[gcode_macro LEDHALFRED]
gcode: SET_LED LED=caselight RED=0.5 GREEN=0 BLUE=0 WHITE=0
SET_LED LED=fysetc_mini12864 RED=0.5 GREEN=0 BLUE=0 WHITE=0
[gcode_macro LEDHALFBLUE]
gcode: SET_LED LED=caselight RED=0 GREEN=0 BLUE=0.5 WHITE=0
SET_LED LED=fysetc_mini12864 RED=0 GREEN=0 BLUE=0.5 WHITE=0
[gcode_macro LEDHALFWHITE]
gcode: SET_LED LED=caselight RED=0.5 GREEN=0.5 BLUE=0.5 WHITE=0
SET_LED LED=fysetc_mini12864 RED=0.5 GREEN=0.5 BLUE=0.5 WHITE=0
[gcode_macro LEDWHITE]
gcode: SET_LED LED=caselight RED=1 GREEN=1 BLUE=1 WHITE=0
SET_LED LED=fysetc_mini12864 RED=1 GREEN=1 BLUE=1 WHITE=0
[gcode_macro NEVERMORE]
gcode:
{% if printer.heater_bed.temperature > 40 %}
SET_FAN_SPEED FAN=NevermoreFan SPEED=1
{% else %}
SET_FAN_SPEED FAN=NevermoreFan SPEED=0
{% endif %}
[delayed_gcode NEVERMORECHECK]
initial_duration: 10
gcode:
NEVERMORE
UPDATE_DELAYED_GCODE ID=NEVERMORECHECK DURATION=10
[delayed_gcode setdisplayneopixel]
initial_duration: 1
gcode:
SET_LED LED=fysetc_mini12864 RED=1 GREEN=1 BLUE=1 INDEX=1 TRANSMIT=0
SET_LED LED=fysetc_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=2 TRANSMIT=0
SET_LED LED=fysetc_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=3
[gcode_macro M600]
gcode:
{% set X = params.X|default(50)|float %}
{% set Y = params.Y|default(0)|float %}
{% set Z = params.Z|default(10)|float %}
SAVE_GCODE_STATE NAME=M600_state
PAUSE
G91
G1 E-.8 F2700
G1 Z{Z}
G90
G1 X{X} Y{Y} F3000
G91
G1 E-50 F1000
RESTORE_GCODE_STATE NAME=M600_state
[gcode_macro PURGE_LINE]
gcode:
{% set z = params.Z|default(0.25)|float %}
{% set n = params.N|default(0.4)|float %}
{% if printer.toolhead.homed_axes != "xyz" %}
{action_respond_info("Please home XYZ first")}
{% elif printer.extruder.temperature < 170 %}
{action_respond_info("Extruder temperature too low")}
SAVE_GCODE_STATE NAME=PURGE_LINE_state
M82
G90
G92 E0
G1 X290 Y20 Z5 F3000
G1 Z{z} F3000
G1 X290 Y150 F1500 E10.83
G1 X{ n + 290.0 } F5000
G1 Y22 F1500 E21.5
G1 Y20 F5000
RESTORE_GCODE_STATE NAME=PURGE_LINE_state MOVE=0
{% else %}
SAVE_GCODE_STATE NAME=PURGE_LINE_state
M82
G90
G92 E0
G1 X290 Y20 Z5 F3000
G1 Z{z} F3000
G1 X290 Y150 F1500 E10.83
G1 X{ n + 290.0 } F5000
G1 Y22 F1500 E21.5
G1 Y20 F5000
RESTORE_GCODE_STATE NAME=PURGE_LINE_state MOVE=0
{% endif %}
[gcode_macro BED_MESH_LOAD]
description: Load an existing mesh or generate a new one
gcode:
##### get target get temperature #####
{% set bed_temp = printer.heater_bed.target|int %}
##### join everything to a single mesh name #####
{% set mesh_name = "Bed_Temp-" + bed_temp|string + "C" %}
##### end of definitions #####
{% if printer.configfile.config["bed_mesh " + mesh_name] is defined %}
BED_MESH_CLEAR
BED_MESH_PROFILE LOAD={mesh_name}
{% else %}
BED_MESH_CALIBRATE PROFILE={mesh_name}
{action_respond_info("Run SAVE_CONFIG after the print to store the mesh")}
{% endif %}
## UPDATE_DELAYED_GCODE ID=_BED_MESH_SAVE DURATION=10
[delayed_gcode BED_MESH_SAVE]
initial_duration: 10
gcode:
{% if printer["gcode_macro MESH_STORE"].save_at_end == 'true' %}
_PRINT_AR T="BED_MESH: Save Config!"
SAVE_CONFIG
{% endif %}
[gcode_macro PRINT_START]
# Use PRINT_START for the slicer starting script - please customise for your slicer of choice
gcode:
G28 ; home all axes
M106 S128 ; Turn Fan on for oozing
M104 S{params.T_EXTRUDER}
M190 S{params.T_BED}
QUAD_GANTRY_LEVEL
BED_MESH_LOAD
CLEAN_NOZZLE
G28
M107 ; Fan Off
M117 Print Start..
PURGE_LINE
M117
[gcode_macro PRINT_END]
# Use PRINT_END for the slicer ending script - please customise for your slicer of choice
gcode:
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-10.0 F3600 ; retract filament
G91 ; relative positioning
G0 Z1.00 X20.0 Y20.0 F20000 ; move nozzle to remove stringing
TURN_OFF_HEATERS
M107 ; turn off fan
G1 Z2 F3000 ; move nozzle up 2mm
G90 ; absolute positioning
G0 X125 Y250 F3600 ; park nozzle at rear
BED_MESH_CLEAR
M84
NEVERMORECHECK
M117 Finished...
[gcode_macro TIMELAPSE_TAKE_FRAME]
gcode:
{action_call_remote_method("timelapse_newframe")}
[gcode_macro TIMELAPSE_RENDER]
gcode:
{action_call_remote_method("timelapse_render")}
[gcode_macro SPEEDTEST]
gcode:
# Speed
{% set speed = params.SPEED|default(printer.configfile.settings.printer.max_velocity)|int %}
# Iterations
{% set iterations = params.ITERATIONS|default(5)|int %}
# Acceleration
{% set accel = params.ACCEL|default(printer.configfile.settings.printer.max_accel)|int %}
# Bounding box (in case the machine min/maxes are not perfect)
{% set bound = params.BOUND|default(20)|int %}
# Set speed test bounds (machine minimum/maximum positions, inset by the bounding box)
{% set x_min = printer.toolhead.axis_minimum.x + bound %}
{% set x_max = printer.toolhead.axis_maximum.x - bound %}
{% set y_min = printer.toolhead.axis_minimum.y + bound %}
{% set y_max = printer.toolhead.axis_maximum.y - bound %}
# Save current gcode state (absolute/relative, etc)
SAVE_GCODE_STATE NAME=TEST_SPEED
# Absolute positioning
G90
# Set new limits
SET_VELOCITY_LIMIT VELOCITY={speed} ACCEL={accel} ACCEL_TO_DECEL={accel / 2}
# Home and get position for comparison later:
G28
# QGL if not already QGLd (only if QGL section exists in config)
{% if printer.configfile.settings.quad_gantry_level %}
{% if printer.quad_gantry_level.applied == False %}
QUAD_GANTRY_LEVEL
G28 Z
{% endif %}
{% endif %}
G0 X{printer.toolhead.axis_maximum.x} Y{printer.toolhead.axis_maximum.y} F{30 * 60}
G4 P1000
GET_POSITION
# Go to starting position
G0 X{x_min} Y{y_min} Z{bound + 10} F{speed * 60}
{% for i in range(iterations) %}
# Diagonals
G0 X{x_min} Y{y_min} F{speed * 60}
G0 X{x_max} Y{y_max} F{speed * 60}
G0 X{x_min} Y{y_min} F{speed * 60}
G0 X{x_max} Y{y_min} F{speed * 60}
G0 X{x_min} Y{y_max} F{speed * 60}
G0 X{x_max} Y{y_min} F{speed * 60}
# Box
G0 X{x_min} Y{y_min} F{speed * 60}
G0 X{x_min} Y{y_max} F{speed * 60}
G0 X{x_max} Y{y_max} F{speed * 60}
G0 X{x_max} Y{y_min} F{speed * 60}
{% endfor %}
# Restore max speed/accel/accel_to_decel to their configured values
SET_VELOCITY_LIMIT VELOCITY={printer.configfile.settings.printer.max_velocity} ACCEL={printer.configfile.settings.printer.max_accel} ACCEL_TO_DECEL={printer.configfile.settings.printer.max_accel_to_decel}
# Re-home XY and get position again for comparison:
G28 X Y
# Go to XY home positions (in case your homing override leaves it elsewhere)
G0 X{printer.toolhead.axis_maximum.x} Y{printer.toolhead.axis_maximum.y} F{30 * 60}
G4 P1000
GET_POSITION
# Restore previous gcode state (absolute/relative, etc)
RESTORE_GCODE_STATE NAME=TEST_SPEED
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 24.443
#*# pid_ki = 1.283
#*# pid_kd = 116.411
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.062500, -0.012500, -0.015000, 0.002500, 0.060000
#*# 0.150000, 0.027500, 0.017500, 0.040000, 0.115000
#*# 0.120000, 0.025000, 0.000000, 0.047500, 0.125000
#*# 0.122500, 0.010000, -0.027500, 0.027500, 0.100000
#*# 0.142500, 0.025000, 0.002500, 0.040000, 0.125000
#*# tension = 0.2
#*# min_x = 40.0
#*# algo = bicubic
#*# y_count = 5
#*# mesh_y_pps = 2
#*# min_y = 40.0
#*# x_count = 5
#*# max_y = 260.0
#*# mesh_x_pps = 2
#*# max_x = 260.0
#*#
#*# [stepper_z]
#*# position_endstop = 2.320
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 42.848
#*# pid_ki = 1.017
#*# pid_kd = 451.506
#*#
#*# [input_shaper]
#*# shaper_type_x = mzv
#*# shaper_freq_x = 55.8
#*# shaper_type_y = mzv
#*# shaper_freq_y = 44.6
#*#
#*# [bed_mesh Bed_Temp-60C]
#*# version = 1
#*# points =
#*# 0.082500, 0.020000, -0.007500, 0.017500, 0.052500
#*# 0.125000, 0.037500, 0.022500, 0.032500, 0.100000
#*# 0.107500, 0.035000, 0.000000, 0.042500, 0.100000
#*# 0.095000, 0.015000, -0.015000, 0.030000, 0.077500
#*# 0.105000, -0.002500, -0.022500, -0.002500, 0.077500
#*# tension = 0.2
#*# min_x = 40.0
#*# algo = bicubic
#*# y_count = 5
#*# mesh_y_pps = 2
#*# min_y = 40.0
#*# x_count = 5
#*# max_y = 260.0
#*# mesh_x_pps = 2
#*# max_x = 260.0