-
Notifications
You must be signed in to change notification settings - Fork 18
/
TESTING-printer.cfg
1366 lines (1185 loc) · 55.5 KB
/
TESTING-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
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# VORON 2.4/350mm/24v/BTT Octopus/Bondtech LGX/Phaetus Dragon HF/Bondtech .4 CHT/Euclid Probe/Hall Effect Endstop
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Macro settings
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
[gcode_macro configvars]
#------------------------------------------------- EUCLID PROBE --------------------------------------------------
variable_EuclidX: 47 # X Position directly over probe
variable_EuclidY: 356.5 # Y Position directly over probe
variable_EuclidSwipeX: 100 # X Position, swipe to the side to free probe of dock
variable_EuclidSafeDeployZ: 25 # Z Safe height for deployment approach
variable_EuclidSafeStowZ: 30 # Z Safe height following stowing the probe (break mag pull)
variable_EuclidDeployZ: 2.5 # Lower to just above probe, no physical contact
variable_EuclidStowZ: 2.0 # Lower to exact postion for dock entry/exit
#------------------------------------------------ Z COMPENSATION -------------------------------------------------
variable_EuclidZCompensation: 9.44 # Z0 Compensation based off probe height, used in G3201. 0 to disable.
# G3201 Description and usage below, ~line 110
variable_ProbeBoundingBox: 20 # Bounding box size to take probe samples, this is used for X & Y
variable_DoApplyMesh: True # Apply mesh prior to probe sampling, for Z Compensation
variable_MeshToApply: "HOTMESH" # The saved mesh to apply, mesh name must be enclosed with "". The bundled HOTMESH
# macro will save it's results as "HOTMESH"
# *!* To perform a fresh in-situation mesh calibration, instead of loading a saved
# mesh, use "INSITU" for MeshToApply. This will be applied before Z Comp probing.
# *!* To completely skip applying mesh, use "NONE" for MeshToApply
variable_ZprobeSpeed: 5.0 # Probing speed for Z Measurements
variable_ZprobeSamples: 7 # Samples probed per position, yeilding as calculated median. Keep this number odd e.g. 3,5,7...
variable_ZprobeTolerance: 0.050 # Sample Tolerance per Z Point
variable_ZprobeAbortTolerance: 1.0 # Tolerance to apply the Measured Z-0 Point or throw an error to check things
variable_ZprobeRetract: 1.5 # Retract from each probing for a D2F-5 1.2 should be good
#----------------------------------------------- PRESSURE ADVANCE ------------------------------------------------
variable_PressureAdvance: 0.055 # Pressure Advance
variable_PressureAdvanceST: 0.030 # Pressure Advance Smooth Time
#------------------------------------------------- RETRACTIONS ---------------------------------------------------
variable_PurgeRetract: 0.1 # After completing purgeline, how much retraction to perform (Not normally needed)
variable_EndRetract: 2.0 # After print has completed, how much retraction to perform
#---------------------------------------------- HEATSOAK & COOLING -----------------------------------------------
variable_QGLbeforeSoakMesh: True # (True/False) Perfrom QGL before applying heat soak for HOTMESH
variable_QGLbeforeSoakPrint: True # (True/False) Perfrom QGL before applying heat soak for PRINT
variable_HotmeshSoakMinutes: 15 # Minutes to heat-soak prior to running mesh
variable_PrePrintSoakMinutes: 15 # Minutes to heat-soak prior to printing
variable_InsituMeshSoakMinutes: 01 # Minutes to heat-soak prior to performing an insitu mesh (in addition to PrePrintSoak)
variable_PostPrintCool: 1 # Post-Print cooling to prevent nozzle string, minutes of cooling
variable_PostPrintParkCool: 2 # Once parks, minutes of cooling
#------------------------------------------- PRINTING MOTOR CURRENTS ---------------------------------------------
variable_PrintCurrentXY: 1.1 # Steppermotor current to be used while printing
variable_PrintCurrentZ: 0.8 # Steppermotor current to be used while printing
#--------------------------------------------- DEFAULT TEMPERATURES ----------------------------------------------
variable_defaultTempNozzle: 240 # The default Nozzle Extruding temperature if none is specified
variable_defaultWarmNozzle: 160 # The default Nozzle Warming temperature if none is specified
variable_defaultTempBed: 110 # The default Bed temperature if none is specified
gcode:
# ! ! ! ! Klipper Configuration starts ~line 180 ! ! ! !
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# NOTES & INFORMATION
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# PRINT_START will home and the level the gantry*, perform a heat soak, then G3201, and lastly bring the hotend
# to temperature and execute a purge line from the front left across X-axis to check/verify easily. The purge
# line extrusion rate will be calculated by using the [nozzle_diameter] value. (*if value is True above)
#
# PRINT_END will raise by 10mm when the print has completed, then performs a cooling period by turning the fan
# fully on and then parks the toolhead at the top, front-right position. The parked Z position will be at least
# 75% of the max axis height or at the printed object's Z height + 10 - whichever is taller - this allows for
# easy visual inspection of the toolhead/nozzle (and a reminder to do so) and removal of any debris. Additionally
# to note, during PRINT_END or PRINT_START, the toolhead is placed back at Y20 to allow room for the fan(s) to
# pull air without being blocked by being pressed up against the doors.
#
# NOTE: This configuration utilizes the Euclid probe with the dock mounted on the bed rail. For fetching and
# docking the probe, use M401 and M402 as they have safety checks to prevent crashes!
# The following STL files were used:
# https://github.com/nionio6915/Euclid_Probe/blob/main/stls/Voron/Voron2.4BedMountV3.stl
# https://github.com/nionio6915/Euclid_Probe/blob/main/stls/Mount%20Adapters/Omron/OmronFotekM2_V3.stl
#
# My Github (This file) https://github.com/rkolbi/voron2.4/blob/main/printer.cfg
# RepRap G-code Wiki https://reprap.org/wiki/G-code
# Klipper Documentation (Main): https://www.klipper3d.org/Overview.html
# Klipper Configuration Reference: https://www.klipper3d.org/Config_Reference.html
# Klipper G-Code & Additional Commands: https://www.klipper3d.org/G-Codes.html
# Klipper Github: https://github.com/Klipper3d
# Klipper Reddit: https://www.reddit.com/r/klippers/
# Voron Documentation: https://docs.vorondesign.com/build/
# Voron Github: https://github.com/VoronDesign
# Voron Reddit: https://www.reddit.com/r/VORONDesign/
# Euclid Probe: https://euclidprobe.github.io/
# Bondtech LGX: https://www.bondtech.se/product/lgx-large-gears-extruder/
# Bontech CHT Nozzle: https://www.bondtech.se/product/bondtech-cht-coated-brass-nozzle/
# Thanks to Daniel0815 for testing & assistance on Z compensation.
#.................................................................................................................
# Slicer Setup
#
# SuperSlicer's start print gcode should only contain the following:
# PRINT_START BED_TEMP=[first_layer_bed_temperature] EXTRUDER_TEMP=[first_layer_temperature]
#
# SuperSlicer's end print gcode should contain the following:
# Use PRINT_END for the slicer ending script
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Bundled Macros withing this configuration:
#.................................................................................................................
# G3201 - No additional options / Usage: G3201
# Homes the toolhead, performs quad gantry leveling, homes Z, and then probes five bed center points. The five
# probing resultant median values are then averaged and compared to [variable_euclidZCompensation]. If the difference
# between the probe findings and this variable is within [ZprobeAbortTolerance], then it will applied to the current
# Z height which is defined as NEW_CURRENT_Z and then set with SET_KINEMATIC_POSITION.
# *If [variable_euclidZCompensation] is set to 0, compensation will not be applied. Additionally, once
# the Z-axis is homed, any existing compensation from G3201 will be discarded.
# -To figure the ZCompensation value, do the following: Check nozzle clean and free of debris, same for bed.
# Set [variable_euclidZCompensation] to 0 to disable G3201 from applying changes. Then dial-in your Z height as
# set forth in the procedures found here: https://docs.vorondesign.com/build/startup/. Once you are satisfied with
# your Z height, run G3201 from console. When it is done, note what it states as 'Current Average is:' - place
# that yeilded value in the top-panel settings for [variable_euclidZCompensation]. Perform a first-layer print test
# and adjust this setting up/down as required. Increasing this value will set the nozzle closer to the bed. For
# example, if you were using a value of 9.4 and wanted a little more 'squish', try 9.44.
#.................................................................................................................
# G32 - No additional options / Usage: G32
# Homes the toolhead, performs quad gantry leveling, and homes again.
#.................................................................................................................
# M401 - No additional options / # Usage: M401
# Attach the Euclid probe to the toolhead.
#.................................................................................................................
# M402 - No additional options / Usage: M402
# Remove the Euclid probe from the toolhead by placing it in the dock.
#.................................................................................................................
# HOTMESH - Optional parameters: BED_TEMP / Usage: HOTMESH, HOTMESH BED_TEMP=110
# Perform a heat soak, followed by a bed mesh. If no BED_TEMP is specified, [defaultTempBed] will be used.
#.................................................................................................................
# LOAD_FILAMENT - Optional parameters: TEMP / Usage: LOAD_FILAMENT, LOAD_FILAMENT TEMP=240
# It brings the toolhead to the front, heats up (if not already hot), and extrudes 150mm of filament.
# If no TEMP is specified, [defaultTempNozzle] will be used.
#.................................................................................................................
# UNLOAD_FILAMENT - Optional parameters: TEMP / Usage: UNLOAD_FILAMENT, UNLOAD_FILAMENT TEMP=240
# It brings the toolhead to the front, heats up (if not already hot), and retracts 200mm of filament.
# If no TEMP is specified, [defaultTempNozzle] will be used.
#.................................................................................................................
# NZL_PID - Optional parameters: BED_TEMP, NZL_TEMP / Usage: NZL_PID, NZL_PID NZL_TEMP=240 BED_TEMP=100
# It performs bed heat soak and then nozzle PID tune. If no parameters are specified, BED_TEMP will be
# [defaultTempBed], and NZL_TEMP will be [defaultTempNozzle].
#.................................................................................................................
# BED_PID - Optional parameters: BED_TEMP / Usage: BED_PID, BED_PID BED_TEMP=110
# It performs bed PID tune. If no parameters are specified, BED_TEMP will be [defaultTempBed].
#.................................................................................................................
# PA_CAL - Optional parameters: BED, EXTRUDER, PA_START, PA_STEP, NZL
# Usage: PA_CAL BED=100 EXTRUDER=240 PA_START=0.03 PA_STEP=0.002 NZL=0.4
# It performs a quick and simple line pressure advance test. First prints a line with the currently
# set PA, move 30mm and then prints 20 line segments, 5mm apart, starting with PA_START, increasing each
# line by PA_STEP. If no parameters are specified, PA_CAL will use the following:
# PA_CAL BED=[defaultTempBed] EXTRUDER=[defaultTempNozzle] PA_START=0.0 PA_STEP=0.005 NZL=(as per printer.cfg)
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Klipper Settings
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
[mcu]
# Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify
serial: /dev/serial/by-id/usb-Klipper_stm32f446xx_160022001950534146373920-if00
restart_method: command
[printer]
kinematics: corexy
max_velocity: 300
max_accel: 3500 #Max 4000
max_z_velocity: 20 #Max 15 for 12V TMC Drivers, can increase for 24V
max_z_accel: 350
square_corner_velocity: 5.0
[virtual_sdcard]
path: ~/gcode_files
[force_move]
enable_force_move: true
[display_status]
# For mainsail
[pause_resume]
# For mainsail
[respond]
default_type: echo
[idle_timeout]
timeout: 1800
#.................................................................................................................
# Settings for when using external Arduino Nano with ADXL345 for resonance testing
#[mcu ardu]
#serial: /dev/serial/by-id/usb-Silicon_Labs_CP2104_USB_to_UART_Bridge_Controller_0199928E-if00-port0
#
#[adxl345]
#cs_pin: ardu:PB2
#
#[resonance_tester]
#accel_chip: adxl345
#probe_points: 175,175,20
#.................................................................................................................
[extruder]
# Extruder 0 on MOTOR_6, Heater - HE0, Thermistor - T0
step_pin: PE2
dir_pin: PE3
enable_pin: !PD4
rotation_distance: 52.6368
gear_ratio: 44:14,37:17
microsteps: 16
full_steps_per_rotation: 200
nozzle_diameter: 0.4 # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Nozzle Diameter <<<
filament_diameter: 1.75
heater_pin: PA2
sensor_type: ATC Semitec 104GT-2
sensor_pin: PF4
min_temp: 10
max_temp: 270
max_power: 1.0
min_extrude_temp: 170
control: pid
pid_kp: 31.201
pid_ki: 1.664
pid_kd: 146.256
pressure_advance: 0.055 # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Pressure Advance <<<
pressure_advance_smooth_time: 0.030
[tmc2209 extruder]
uart_pin: PE1
interpolate: false
run_current: 0.5
sense_resistor: 0.110
stealthchop_threshold: 0
[safe_z_home]
home_xy_position:232,353 # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Z-Endstop Position <<<
speed:100
z_hop:15
[probe]
# Euclid_Probe
pin: PG11
x_offset: 0
y_offset: 25.0
z_offset: 10.00
speed: 04.0
lift_speed: 10.0
samples: 5
samples_result: median
sample_retract_dist: 1.5
samples_tolerance: 0.0075
samples_tolerance_retries: 3
[bed_mesh]
speed: 50 # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Bed-mesh Settings <<<
horizontal_move_z: 15
mesh_min: 40, 40
mesh_max: 310,310
fade_start: 0.6
fade_end: 10.0
probe_count: 11,11
algorithm: bicubic
#bicubic_tension: .2
relative_reference_index: 60
[quad_gantry_level]
gantry_corners:
-60,-10
410,420
points:
50,25
50,275
300,275
300,25
speed: 75
horizontal_move_z: 15
retries: 5
retry_tolerance: 0.0075
max_adjust: 15
#.................................................................................................................
[stepper_x]
# B Stepper - Left, Connected to MOTOR_0, Endstop connected to DIAG_0
step_pin: PF13
dir_pin: PF12
enable_pin: !PF14
rotation_distance: 40
microsteps: 32
full_steps_per_rotation:200
endstop_pin: !PG6
position_min: 0
position_endstop: 350 # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< X-Endstop Position <<<
position_max: 350
homing_speed: 60 #Max 100
second_homing_speed: 10
homing_retract_dist: 5
homing_positive_dir: true
[tmc2209 stepper_x]
uart_pin: PC4
interpolate: false
run_current: 0.4
sense_resistor: 0.105
stealthchop_threshold: 0
#.................................................................................................................
[stepper_y]
# A Stepper - Right, Connected to MOTOR_1, Endstop connected to DIAG_1
step_pin: PG0
dir_pin: PG1
enable_pin: !PF15
rotation_distance: 40
microsteps: 32
full_steps_per_rotation:200
endstop_pin: !PG9
position_min: 0
position_endstop: 353 # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Y-Endstop Position <<<
position_max: 357
homing_speed: 60 #Max 100
second_homing_speed: 10
homing_retract_dist: 5
homing_positive_dir: true
[tmc2209 stepper_y]
uart_pin: PD11
interpolate: false
run_current: 0.4
sense_resistor: 0.110
stealthchop_threshold: 0
#.................................................................................................................
[stepper_z]
# Z0 Stepper - Front Left, Connected to MOTOR_2, Endstop connected to DIAG_2
step_pin: PF11
dir_pin: PG3
enable_pin: !PG5
rotation_distance: 40
gear_ratio: 80:16
microsteps: 32
endstop_pin: PG10
position_endstop: 0.025 # <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Z-Endstop Position <<<
position_max: 301
position_min: -5
homing_speed: 10
second_homing_speed: 3
homing_retract_dist: 3
[tmc2209 stepper_z]
uart_pin: PC6
interpolate: false
run_current: 0.3
sense_resistor: 0.110
stealthchop_threshold: 0
[stepper_z1]
# Z1 Stepper - Rear Left, Connected to MOTOR_3
step_pin: PG4
dir_pin: !PC1
enable_pin: !PA0
rotation_distance: 40
gear_ratio: 80:16
microsteps: 32
[tmc2209 stepper_z1]
uart_pin: PC7
interpolate: false
run_current: 0.3
sense_resistor: 0.110
stealthchop_threshold: 0
[stepper_z2]
# Z2 Stepper - Rear Right, Connected to MOTOR_4
step_pin: PF9
dir_pin: PF10
enable_pin: !PG2
rotation_distance: 40
gear_ratio: 80:16
microsteps: 32
[tmc2209 stepper_z2]
uart_pin: PF2
interpolate: false
run_current: 0.3
sense_resistor: 0.110
stealthchop_threshold: 0
[stepper_z3]
# Z3 Stepper - Front Right, Connected to MOTOR_5
step_pin: PC13
dir_pin: !PF0
enable_pin: !PF1
rotation_distance: 40
gear_ratio: 80:16
microsteps: 32
[tmc2209 stepper_z3]
uart_pin: PE4
interpolate: false
run_current: 0.3
sense_resistor: 0.110
stealthchop_threshold: 0
#.................................................................................................................
[heater_bed]
# SSR Pin - HE1, Thermistor - TB
heater_pin: PA3
sensor_type: Generic 3950
sensor_pin: PF3
max_power: 0.75
min_temp: 0
max_temp: 120
control: pid
pid_kp: 45.529
pid_ki: 1.399
pid_kd: 370.495
#pwm_cycle_time = 1/mains hz (1/50 = 0.02 for 50hz, 1/60 = 0.0166 for 60hz)
#pwm_cycle_time: 0.02
#.................................................................................................................
[fan]
# Print Cooling Fan - FAN0
pin: PA8
kick_start_time: 0.5
# 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
off_below: 0.10
[heater_fan hotend_fan]
# Hotend Fan - FAN1
pin: PE5
max_power: 1.0
kick_start_time: 0.5
heater: extruder
heater_temp: 50.0
fan_speed: .7
[controller_fan controller_fan]
# Controller fan1 - FAN2
pin: PD12
kick_start_time: 0.5
heater: heater_bed
fan_speed: 0.4
[controller_fan controller_fan2]
# Controller fan2 - FAN3
pin: PD13
kick_start_time: 0.5
heater: heater_bed
fan_speed: 0.4
#.................................................................................................................
[neopixel nozzle]
pin: PB0
chain_count: 2
color_order: GRBW
initial_RED: 0.2
initial_GREEN: 0.5
initial_BLUE: 0.2
initial_WHITE: 0.0
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Required MACROS
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#.................................................................................................................
[delayed_gcode prerun]
initial_duration: 1
gcode:
QUERY_PROBE
M117 Printer online.
{% for s in range(0, 30) %}
SET_LED LED=nozzle INDEX=1 RED=1 GREEN=0 BLUE=1
SET_LED LED=nozzle INDEX=2 RED=.5 GREEN=.5 BLUE=.5
G4 P100
SET_LED LED=nozzle INDEX=1 RED=.5 GREEN=.5 BLUE=.5
SET_LED LED=nozzle INDEX=2 RED=1 GREEN=0 BLUE=1
G4 P50
{% endfor %}
SET_PRESSURE_ADVANCE ADVANCE={printer["gcode_macro configvars"].pressureadvance|float} SMOOTH_TIME={printer["gcode_macro configvars"].pressureadvancest|float}
SET_LED LED=nozzle RED=.2 GREEN=.5 BLUE=.2
#.................................................................................................................
# M401 - Deploy Euclid Probe
[gcode_macro M401]
gcode:
QUERY_PROBE
{% if printer.probe.last_query %}
M118 Fetching Euclid Probe.
G28 Z
_PROBE_DEPLOY
{% else %}
M118 ?!Probe is already attached.
{% endif %}
#.................................................................................................................
# M402 - Stow Euclid Probe
[gcode_macro M402]
gcode:
QUERY_PROBE
{% if not printer.probe.last_query %}
M118 Stowing Euclid Probe.
G28 Z
_PROBE_STOW
{% else %}
M118 ?!Probe is not attached.
{% endif %}
#.................................................................................................................
# Euclid probe safety checks block
[gcode_macro _do_error_if_probe_deployed]
gcode:
{% if not printer.probe.last_query %}
{action_raise_error("ERROR: probe still deployed - remove and return to dock.")}
{% else %}
M118 Euclid Probe has been stowed.
{% endif %}
[gcode_macro _error_if_probe_deployed]
gcode:
G4 P300
QUERY_PROBE
_do_error_if_probe_deployed
[gcode_macro _do_error_if_probe_not_deployed]
gcode:
{% if printer.probe.last_query %}
{action_raise_error("ERROR: probe unsuccessfully deployed.")}
{% else %}
M118 Euclid Probe has been attached.
{% endif %}
[gcode_macro _error_if_probe_not_deployed]
gcode:
G4 P300
QUERY_PROBE
_do_error_if_probe_not_deployed
#.................................................................................................................
[gcode_macro _PROBE_DEPLOY]
gcode:
G90
G0 Z{printer["gcode_macro configvars"].euclidsafedeployz|float} F800
G0 X{printer["gcode_macro configvars"].euclidx|float} Y{printer["gcode_macro configvars"].euclidy|float} F3500
G0 Z{printer["gcode_macro configvars"].eucliddeployz|float} F800
G0 X{printer["gcode_macro configvars"].euclidswipex|float} Y{printer["gcode_macro configvars"].euclidy|float} F3500
G0 Z{printer["gcode_macro configvars"].euclidsafedeployz|float} F800
_error_if_probe_not_deployed ; Verify probe attached
#.................................................................................................................
[gcode_macro _PROBE_STOW]
gcode:
G90
G0 X{printer["gcode_macro configvars"].euclidswipex|float} Y{printer["gcode_macro configvars"].euclidy|float} F3500
G0 Z{printer["gcode_macro configvars"].euclidstowz|float} F500
G0 X{printer["gcode_macro configvars"].euclidx|float} Y{printer["gcode_macro configvars"].euclidy|float} F1000
G0 Z{printer["gcode_macro configvars"].euclidsafestowz|float} F800
_error_if_probe_deployed ; Verify probe detached
#.................................................................................................................
[gcode_macro QUAD_GANTRY_LEVEL]
rename_existing: QUAD_GANTRY_LEVEL_ORIGINIAL
gcode:
QUERY_PROBE
M401
QUAD_GANTRY_LEVEL_ORIGINIAL
M402
#.................................................................................................................
[gcode_macro BED_MESH_CALIBRATE]
rename_existing: BED_MESH_CALIBRATE_ORIGINIAL
gcode:
QUERY_PROBE
M401
BED_MESH_CALIBRATE_ORIGINIAL
M402
#.................................................................................................................
[gcode_macro G32]
gcode:
BED_MESH_CLEAR
G28
QUERY_PROBE
{% if printer.probe.last_query %}
M118 Fetching Euclid Probe.
_PROBE_DEPLOY
{% endif %}
QUAD_GANTRY_LEVEL_ORIGINIAL
G28
M118 Stowing Euclid Probe.
_PROBE_STOW
QUERY_PROBE
#.................................................................................................................
[gcode_macro G3201]
gcode:
{% set X_MID = printer.configfile.config["stepper_x"]["position_max"]|float / 2.0 %}
{% set Y_MID = printer.configfile.config["stepper_y"]["position_max"]|float / 2.0 %}
{% set ZSpeed = printer["gcode_macro configvars"].zprobesamples|float %}
{% set ZSamples = printer["gcode_macro configvars"].zprobesamples|int %}
{% set ZTolerance = printer["gcode_macro configvars"].zprobetolerance|float %}
{% set ZRetract = printer["gcode_macro configvars"].zproberetract|float %}
{% set MeshToApply = printer["gcode_macro configvars"].meshtoapply|default() %}
BED_MESH_CLEAR
G28
{% if MeshToApply == "INSITU" %}
_INSITUMESH
{% else %}
QUERY_PROBE
{% if printer.probe.last_query %}
M118 Fetching Euclid Probe.
_PROBE_DEPLOY
G28 Z
{% endif %}
QUAD_GANTRY_LEVEL_ORIGINIAL
{% if printer["gcode_macro configvars"].doapplymesh|default() == true and MeshToApply != "NONE" %}
BED_MESH_PROFILE LOAD={MeshToApply}
M118 Applying {MeshToApply} mesh prior to sampling.
{% else %}
M118 Not applying {MeshToApply} mesh prior to sampling.
{% endif %}
{% endif %}
G28 Z
G90
G0 X{X_MID} Y{Y_MID} F3500
G91
PROBE samples_result=median samples={ZSamples} speed={ZSpeed} samples_tolerance={ZTolerance} samples_tolerance_retries=3 sample_retract_dist={ZRetract}
_CHECK_PROBE1
[gcode_macro _CHECK_PROBE1]
gcode:
{% set PROBE_PASS = printer.probe.last_z_result %}
{% set ZSpeed = printer["gcode_macro configvars"].zprobesamples|float %}
{% set ZSamples = printer["gcode_macro configvars"].zprobesamples|int %}
{% set ZTolerance = printer["gcode_macro configvars"].zprobetolerance|float %}
{% set ZRetract = printer["gcode_macro configvars"].zproberetract|float %}
{% set ProbeBB = printer["gcode_macro configvars"].probeboundingbox|float %}
G0 Z2 F500
G0 X-{(ProbeBB/2)} Y-{(ProbeBB/2)} F2500
PROBE samples_result=median samples={ZSamples} speed={ZSpeed} samples_tolerance={ZTolerance} samples_tolerance_retries=3 sample_retract_dist={ZRetract}
_CHECK_PROBE2 PASS={PROBE_PASS}
[gcode_macro _CHECK_PROBE2]
gcode:
{% set PASS = params.PASS|float %}
{% set PROBE_PASS = printer.probe.last_z_result %}
{% set ZSpeed = printer["gcode_macro configvars"].zprobesamples|float %}
{% set ZSamples = printer["gcode_macro configvars"].zprobesamples|int %}
{% set ZTolerance = printer["gcode_macro configvars"].zprobetolerance|float %}
{% set ZRetract = printer["gcode_macro configvars"].zproberetract|float %}
{% set ProbeBB = printer["gcode_macro configvars"].probeboundingbox|float %}
G0 Z2 F500
G0 X{ProbeBB} F2500
PROBE samples_result=median samples={ZSamples} speed={ZSpeed} samples_tolerance={ZTolerance} samples_tolerance_retries=3 sample_retract_dist={ZRetract}
_CHECK_PROBE3 PASS={PROBE_PASS + PASS}
[gcode_macro _CHECK_PROBE3]
gcode:
{% set PASS = params.PASS|float %}
{% set PROBE_PASS = printer.probe.last_z_result %}
{% set ZSpeed = printer["gcode_macro configvars"].zprobesamples|float %}
{% set ZSamples = printer["gcode_macro configvars"].zprobesamples|int %}
{% set ZTolerance = printer["gcode_macro configvars"].zprobetolerance|float %}
{% set ZRetract = printer["gcode_macro configvars"].zproberetract|float %}
{% set ProbeBB = printer["gcode_macro configvars"].probeboundingbox|float %}
G0 Z2 F500
G0 Y{ProbeBB} F2500
PROBE samples_result=median samples={ZSamples} speed={ZSpeed} samples_tolerance={ZTolerance} samples_tolerance_retries=3 sample_retract_dist={ZRetract}
_CHECK_PROBE4 PASS={PROBE_PASS + PASS}
[gcode_macro _CHECK_PROBE4]
gcode:
{% set PASS = params.PASS|float %}
{% set PROBE_PASS = printer.probe.last_z_result %}
{% set ZSpeed = printer["gcode_macro configvars"].zprobesamples|float %}
{% set ZSamples = printer["gcode_macro configvars"].zprobesamples|int %}
{% set ZTolerance = printer["gcode_macro configvars"].zprobetolerance|float %}
{% set ZRetract = printer["gcode_macro configvars"].zproberetract|float %}
{% set ProbeBB = printer["gcode_macro configvars"].probeboundingbox|float %}
G0 Z2 F500
G0 X-{ProbeBB} F2500
PROBE samples_result=median samples={ZSamples} speed={ZSpeed} samples_tolerance={ZTolerance} samples_tolerance_retries=3 sample_retract_dist={ZRetract}
_CHECK_PROBE5 PASS={PROBE_PASS + PASS}
[gcode_macro _CHECK_PROBE5]
gcode:
{% set PASS = params.PASS|float %}
{% set PROBE_PASS = printer.probe.last_z_result %}
{% set ZSpeed = printer["gcode_macro configvars"].zprobesamples|float %}
{% set ZSamples = printer["gcode_macro configvars"].zprobesamples|int %}
{% set ZTolerance = printer["gcode_macro configvars"].zprobetolerance|float %}
{% set ZRetract = printer["gcode_macro configvars"].zproberetract|float %}
G90
G0 Z25 F3500
_CHECK_PROBE6 PASS={(PROBE_PASS + PASS)/5}
[gcode_macro _CHECK_PROBE6]
gcode:
{% set ZP_CAL = printer["gcode_macro configvars"].euclidzcompensation|float %}
{% set ZAbortTolerance = printer["gcode_macro configvars"].zprobeaborttolerance|float %}
{% set MeshToApply = printer["gcode_macro configvars"].meshtoapply|default() %}
{% set DoApplyMesh = printer["gcode_macro configvars"].doapplymesh|int %}
{% set PASS = params.PASS|float %}
{% set Z_POS = printer.toolhead.position.z|float %}
{% set Z_OFFSET = PASS - ZP_CAL|float %}
{% set NEW_CURRENT_Z = (Z_POS - Z_OFFSET) %}
M118 Current Average is: {PASS}
M118 Z-Probe calibration is: {ZP_CAL}
M118 Offset: {Z_OFFSET}
{% if Z_OFFSET|abs > ZAbortTolerance %}
M118 ! ! ! Z-OFFSET is > {ZAbortTolerance}mm, check nozzle cleanliness and printer ! ! !
M118 Not applying calculated offset to Z.
{% else %}
M118 Setting current Z_Height of {Z_POS} to {NEW_CURRENT_Z}
SET_KINEMATIC_POSITION Z={NEW_CURRENT_Z}
G4 P1000
M118 Moving nozzle to newly adjusted Z25.
G0 Z25 F3500
G4 P1000
{% endif %}
QUERY_PROBE
{% if not printer.probe.last_query %}
M118 Stowing Euclid Probe.
_PROBE_STOW
{% else %}
M118 ?!Probe is not attached.
{% endif %}
{% if printer["gcode_macro configvars"].doapplymesh|default() == false and MeshToApply != "INSITU" and MeshToApply != "NONE" %}
BED_MESH_PROFILE LOAD={MeshToApply}
M118 Applied {MeshToApply} mesh post sampling.
{% endif %}
#.................................................................................................................
[gcode_macro _PARK_TOOLHEAD]
gcode:
{% set Z_MAX = printer.configfile.config["stepper_z"]["position_max"]|float -1 %}
{% set X_MAX = printer.configfile.config["stepper_x"]["position_max"]|float -1 %}
{% set Z_POS = printer.toolhead.position.z + 10 %}
M118 Parking toolhead.
G90
# park nozzle at top (at least 75% or Z max or Z + 10) front-right but allow room for hotend fan to pull air
G0 X{X_MAX} Y20 Z{ [(Z_MAX*0.75), [Z_POS, Z_MAX]|min]|max } F3600
#.................................................................................................................
[gcode_macro CURRENT_HIGH]
description: Raises stepper current for printing routine.
gcode:
M117 Increased motor currents.
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={printer["gcode_macro configvars"].printcurrentxy|float}
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={printer["gcode_macro configvars"].printcurrentxy|float}
SET_TMC_CURRENT STEPPER=stepper_z CURRENT={printer["gcode_macro configvars"].printcurrentz|float}
SET_TMC_CURRENT STEPPER=stepper_z1 CURRENT={printer["gcode_macro configvars"].printcurrentz|float}
SET_TMC_CURRENT STEPPER=stepper_z2 CURRENT={printer["gcode_macro configvars"].printcurrentz|float}
SET_TMC_CURRENT STEPPER=stepper_z3 CURRENT={printer["gcode_macro configvars"].printcurrentz|float}
#.................................................................................................................
[gcode_macro CURRENT_NORMAL]
description: Lowers stepper current for NON-printing routines, as set in [tmc2209 stepper_XX] above.
gcode:
M117 Decreased motor currents.
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={ printer.configfile.config["tmc2209 stepper_x"]["run_current"] }
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={ printer.configfile.config["tmc2209 stepper_y"]["run_current"] }
SET_TMC_CURRENT STEPPER=stepper_z CURRENT={ printer.configfile.config["tmc2209 stepper_z"]["run_current"] }
SET_TMC_CURRENT STEPPER=stepper_z1 CURRENT={ printer.configfile.config["tmc2209 stepper_z1"]["run_current"] }
SET_TMC_CURRENT STEPPER=stepper_z2 CURRENT={ printer.configfile.config["tmc2209 stepper_z2"]["run_current"] }
SET_TMC_CURRENT STEPPER=stepper_z3 CURRENT={ printer.configfile.config["tmc2209 stepper_z3"]["run_current"] }
#.................................................................................................................
[gcode_macro _HEAT_WAIT]
gcode:
{% set MINUTES = params.MINUTES|default(12)|int %}
{% for i in range(0, MINUTES) %}
M117 Warming... {MINUTES-i} minute remaining.
{% for s in range(0, 60) %}
SET_LED LED=nozzle INDEX=1 RED=.5 GREEN=0 BLUE=0
SET_LED LED=nozzle INDEX=2 RED=0 GREEN=0 BLUE=.5
G4 P500
SET_LED LED=nozzle INDEX=1 RED=0 GREEN=0 BLUE=.5
SET_LED LED=nozzle INDEX=2 RED=.5 GREEN=0 BLUE=0
G4 P500
{% endfor %}
{% endfor %}
#.................................................................................................................
[gcode_macro _COOL_WAIT]
gcode:
M106 S250
{% set MINUTES = params.MINUTES|default(1)|int %}
{% for i in range(0, MINUTES) %}
M117 Cooling... {MINUTES-i} minute remaining.
{% for s in range(0, 60) %}
SET_LED LED=nozzle INDEX=1 RED=0 GREEN=0 BLUE=0
SET_LED LED=nozzle INDEX=2 RED=0 GREEN=0 BLUE=.5
G4 P500
SET_LED LED=nozzle INDEX=1 RED=0 GREEN=0 BLUE=.5
SET_LED LED=nozzle INDEX=2 RED=0 GREEN=0 BLUE=0
G4 P500
{% endfor %}
{% endfor %}
M107
#.................................................................................................................
[gcode_macro HOTMESH]
gcode:
CLEAR_PAUSE
{% if printer.idle_timeout.state == "Printing" or printer.pause_resume.is_paused %}
{action_respond_info("Cannot do that while printing")}
{% else %}
{% set defaultWN = printer["gcode_macro configvars"].defaultwarmnozzle|float %}
{% set defaultTB = printer["gcode_macro configvars"].defaulttempbed|float %}
{% set BED_TEMP = params.BED_TEMP|default(defaultTB)|float %}
SET_LED LED=nozzle RED=.2 GREEN=.2 BLUE=1
# Bring bed to full temperature, only warm hotend
M140 S{BED_TEMP}
M104 S{defaultWN}
G90
# Reset the G-Code Z offset
SET_GCODE_OFFSET Z=0.0
M117 Performing initial homing.
{% if printer["gcode_macro configvars"].qglbeforesoakmesh|default() == true %}
G32
# Move the nozzle
G1 X0 Y20 Z25 F3000
{% else %}
G28
# Not moving the probe if QGL was not peroformed
{% endif %}
M117 Bringing bed to temperature.
M190 S{BED_TEMP}
_HEAT_WAIT MINUTES={printer["gcode_macro configvars"].hotmeshsoakminutes|float}
SET_LED LED=nozzle RED=.5 GREEN=0 BLUE=.5
M117 Performing hot level.
CURRENT_HIGH
M400
M401
QUAD_GANTRY_LEVEL_ORIGINIAL
G28
M117 Performing heated bed mesh calibration.
BED_MESH_PROFILE REMOVE=HOTMESH
BED_MESH_CALIBRATE_ORIGINIAL
BED_MESH_PROFILE SAVE=HOTMESH
BED_MESH_OUTPUT PGP=1
M118 Bed mesh calibration completed.
TURN_OFF_HEATERS
CURRENT_NORMAL
M402
_PARK_TOOLHEAD
M18 X Y E
SET_LED LED=nozzle RED=.2 GREEN=.5 BLUE=.2
M117 Finished mesh.
SAVE_CONFIG
{% endif %}
#.................................................................................................................
[gcode_macro _INSITUMESH]
gcode:
{% set defaultWN = printer["gcode_macro configvars"].defaultwarmnozzle|float %}
{% set defaultTB = printer["gcode_macro configvars"].defaulttempbed|float %}
{% set BED_TEMP = params.BED_TEMP|default(defaultTB)|float %}
SET_LED LED=nozzle RED=.2 GREEN=.2 BLUE=1
# Bring bed to full temperature, only warm hotend
M140 S{BED_TEMP}
M104 S{defaultWN}
G90
# Reset the G-Code Z offset
SET_GCODE_OFFSET Z=0.0
M117 Bringing bed to temperature.
M190 S{BED_TEMP}
_HEAT_WAIT MINUTES={printer["gcode_macro configvars"].insitumeshsoakminutes|float}
SET_LED LED=nozzle RED=.5 GREEN=0 BLUE=.5
M401
QUAD_GANTRY_LEVEL_ORIGINIAL
G28 Z
BED_MESH_CALIBRATE_ORIGINIAL
BED_MESH_PROFILE SAVE=INSITUMESH
BED_MESH_OUTPUT PGP=1
M118 INSITU Bed mesh calibration completed and applied.
SET_LED LED=nozzle RED=.2 GREEN=.5 BLUE=.2
#.................................................................................................................
[gcode_macro PRINT_START]
gcode:
CLEAR_PAUSE
BED_MESH_CLEAR
SET_LED LED=nozzle RED=.2 GREEN=.2 BLUE=1
{% set X_MID = printer.configfile.config["stepper_x"]["position_max"]|float / 2.0 %}
{% set Y_MID = printer.configfile.config["stepper_y"]["position_max"]|float / 2.0 %}
{% set defaultTN = printer["gcode_macro configvars"].defaulttempnozzle|float %}
{% set defaultWN = printer["gcode_macro configvars"].defaultwarmnozzle|float %}
{% set purgeRetract = printer["gcode_macro configvars"].purgeretract|float %}
{% set defaultTB = printer["gcode_macro configvars"].defaulttempbed|float %}
{% set BED_TEMP = params.BED_TEMP|default(defaultTB)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(defaultTN)|float %}
{% set NZLD = printer.configfile.config["extruder"]["nozzle_diameter"]|float %}
# Bring bed to full temperature, only warm hotend
M140 S{BED_TEMP}
M104 S{defaultWN}
G90
# Reset the G-Code Z offset
SET_GCODE_OFFSET Z=0.0
M117 Performing initial homing.
{% if printer["gcode_macro configvars"].qglbeforesoakprint|default() == true %}
G32
# Move the nozzle
G1 X0 Y20 Z25 F3000
{% else %}
G28
# Not moving the probe if QGL was not peroformed
{% endif %}
M117 Bringing bed to temperature.
SET_LED LED=nozzle INDEX=2 RED=1 GREEN=0 BLUE=0
SET_LED LED=nozzle INDEX=1 RED=.5 GREEN=.5 BLUE=.5
M190 S{BED_TEMP}
_HEAT_WAIT MINUTES={printer["gcode_macro configvars"].preprintsoakminutes|float}
SET_LED LED=nozzle RED=.5 GREEN=0 BLUE=.5
M117 Performing hot level.
CURRENT_HIGH
M400
G3201