-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprinter.cfg
More file actions
493 lines (443 loc) · 13.3 KB
/
printer.cfg
File metadata and controls
493 lines (443 loc) · 13.3 KB
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
[include mainsail.cfg]
[include huvud.cfg]
#[include neopixel.cfg]
[include macros.cfg]
# This file contains common pin mappings for the Duet3 Mini 5+. To use
# this config, the firmware should be compiled for the SAME54P20 with
# a "25Mhz crystal", "16KiB bootloader", and USB communication.
# To flash the board, double tap the board's reset button to enter the
# bootloader and then run: make flash FLASH_DEVICE=/dev/ttyACM0
# Set it to CAN bridge mode, then serial device will be gone
# See docs/Config_Reference.md for a description of parameters.
# set RPI can bus speed
# /etc/network/interfaces.d/can0
# Flashing the Duet3
# ------------------
# double tap the reset button so you see flashing red LED
# https://www.klipper3d.org/Installation.html
#
# ls /dev/serial/by-id/*
# By default the can0, mini5, and huvud are all set to 250K speed
# need to first flash huvud to 1000k, then mini5, then change can0 to be the same
# Enable extra low-level config
# Micro Controller: SAME54P20 (SAME5x)
# Processor Model: SAME54P20
# Bootloader offset: 16KiB bootloader (Duet3)
# Clock Reference: 25Mhz crystal
# Processor Speed: 120 MHz (standard)
# Communication: (USB to CAN bus bridge)
# CAN bus interface: CAN bus on PB15/PB14
# CAN speed (250k initially but then set to 1000k)
#
# make clean
# make
# ls /dev/serial/by-id/*
# sudo service klipper stop
# make flash FLASH_DEVICE=/dev/serial/by-id/{the id you found above here}
# sudo service klipper start
# Pins for reference:
# Driver Step Pins - 0:PC26, 1:PC25, 2:PC24, 3:PC19, 4:PC16, 5:PC30, 6:PC18
# Driver Dir pins - 0:PB3, 1:PB29, 2:PB28, 3:PD20, 4:PD21, 5:PB0, 6:PA27
# Driver Enable - !PC28
# Uart addresses - 0:0 1:1 2:2 3:3 4:!0 5:!1 6:!2 | "!" is for inverted select pin
# Thermistor Pins - T0:PC0, T1:PC1, T2:PC2
# Vssa Sense:PB4 | Vref Sense:PB5
# Current Sense resistor for drivers - .076ohm
# SPI lines:{PD11, PC7} -> Shared SerCom#7, SPIMosi:PC12, SPIMiso:PC15, SPISCLK:PC13
# Vin Monitor:PC3, uses 11:1 voltage divider
# LED's - Diag:PA31, Act:PA30
# 12864 LCD - LCDCSPIN:PC6, ENCA:PC11, ENCB:PD1, ENCSW:PB9, LCD A0:PA2, LCDBeep:PA9, LCD Neopixel Out:PB12 (shared with IO3.out)
# Neopixel Out - PA8
# Serial0 - TX:PB25, RX:PB24 (USB)
# Serial1 - TX:PB31, RX:PB30
# SBC SPISS pin:PA6, SBCTfrReady:PA3, SerComPins:{PA4, PA5, PA6, PA7}
# CAN Pins - TX:PB14 RX:PB15
# Heaters, Fan outputs - {Out0:PB17 Out1:PC10 Out2:PB13 Out3:PB11 Out4:PA11, Out5:PB2, Out6:PB1} | Out6 is shared with VFD_Out
# Tach Pins for Fans - {Out3.Tach:PB27 Out4.Tach:PB26}
# GPIO_out - {IO1:PB31 IO2:PD9 IO3:PB12 IO4:PD10} IO4 is shared with PSON
# GPIO_in - {IO1:PB30 IO2:PD8 IO3:PB7 IO4:PC5 IO5:PC4 IO6:PC31}
# Driver Diag - {D0:PA10, D1:PB8, D2:PA22, D3:PA23, D4:PC21, D5:PB10, D6:PA27}
# Mux Pin - PD0
# EXP headers only support 12864 LCD's
# Enable arcs support
[gcode_arcs]
resolution: 0.1
[stepper_x]
#driver1 LDO-42STH48-2804AH (1.8degree) @2.8A
#Motor B (Left Side)
step_pin: PC25
dir_pin: !PB29
enable_pin: !PC28
microsteps: 16
rotation_distance: 40
endstop_pin: !huvud:LIMIT_3 # PB12
position_endstop: 247
position_min: 0
position_max: 247
homing_speed: 25.0
homing_retract_speed: 5.0
second_homing_speed: 5.0
homing_positive_dir: true
[tmc2209 stepper_x]
uart_pin: PA1
tx_pin: PA0
select_pins: PD0
uart_address: 1
run_current: 1
sense_resistor: 0.056
[stepper_y]
#driver0 LDO-42STH48-2804AH (1.8degree) @2.8A
#Motor A (Right Side)
step_pin: PC26
dir_pin: !PB3
enable_pin: !PC28
microsteps: 16
rotation_distance: 40
endstop_pin: !PB30
position_endstop: 225
position_min: 0
position_max: 225
homing_speed: 25.0
homing_retract_speed: 5.0
second_homing_speed: 5.0
homing_positive_dir: true
[tmc2209 stepper_y]
uart_pin: PA1
tx_pin: PA0
select_pins: PD0
uart_address: 0
run_current: 1
sense_resistor: 0.056
[stepper_z]
#driver2 Creality 42-40(S) (1.8degree) @1A
#Lead_Screws = T8 PTFE Teflonoto Lead Screw 2MM 400
step_pin: PC24
dir_pin: PB28
enable_pin: !PC28
microsteps: 16
rotation_distance: 2
endstop_pin: probe:z_virtual_endstop # use beacon as virtual endstop
position_min: -15.0
homing_retract_dist: 0 # beacon needs this to be set to 0
#position_endstop: 0
position_max: 400
full_steps_per_rotation: 200
[stepper_z1]
#driver4 Creality 42-34 (1.8degree) @1A
step_pin: PC16
dir_pin: PD21
enable_pin: !PC28
microsteps: 16
rotation_distance: 2
full_steps_per_rotation: 200
[stepper_z2]
#driver3 Creality 42-34 (1.8degree) @1A
step_pin: PC19
dir_pin: PD20
enable_pin: !PC28
microsteps: 16
rotation_distance: 2
full_steps_per_rotation: 200
[tmc2209 stepper_z]
uart_pin: PA1
tx_pin: PA0
select_pins: PD0
uart_address: 2
run_current: 0.8
sense_resistor: 0.056
[tmc2209 stepper_z1]
uart_pin: PA1
tx_pin: PA0
select_pins: !PD0
uart_address: 0
run_current: 0.8
sense_resistor: 0.056
[tmc2209 stepper_z2]
uart_pin: PA1
tx_pin: PA0
select_pins: PD0
uart_address: 3
run_current: 0.8
sense_resistor: 0.056
## EXTRUDERS
[tmc2209 extruder]
run_current: 0.5
sense_resistor: 0.110
uart_pin: huvud:EXT_UART_RX
tx_pin: huvud:EXT_UART_TX
[extruder]
step_pin: huvud:EXT_STEP
dir_pin: huvud:EXT_DIR
max_extrude_only_distance: 200
enable_pin: !huvud:EXT_EN
heater_pin: huvud:HE0
sensor_pin: huvud:TH1
sensor_type: PT1000 # Rapido HF
pullup_resistor: 2200 # 4700 is default and does not need defining, 2200 is used for the PT1000
min_extrude_temp: 170
min_temp: 0
max_temp: 285
pressure_advance: 0.03
nozzle_diameter: 0.4
filament_diameter: 1.75
control = pid
pid_kp = 23.826
pid_ki = 1.185
pid_kd = 119.725
max_extrude_only_distance: 600 # default is 50mm
# LGX Lite
rotation_distance: 53.494165 # LGX Lite 5mm Drive Gears
gear_ratio: 44:10, 37:17 # LGX Lite - Gear Ratio Primary=44:10, Secondary=37:17
full_steps_per_rotation: 200 # 1.8 Degree Stepper
microsteps: 16
# ------------------
# | Z2 = 245,0
# | |
# Z0 = 124.5,224 | [Front]
# | |
# | Z1 = 7,0
# ------------------
# 0,0
[z_tilt]
z_positions: # nozzle positions
128.5, 224 #stepper_z Mini Tank
9, 20.5 #stepper_z1 Mini Tank
243.5, 20.5 #stepper_z2 Mini Tank
points:
#243,220 #probe location Right Rear
#8,220 #probe location Left Rear
128.5, 220 # probe center Rear
9, 0.5 #probe location Left Front
243.5, 0.5 #probe location Right Front
speed: 100
horizontal_move_z: 30
retries: 5 # Number of times to retry if the probed points aren't within tolerance.
retry_tolerance:0.150
[adc_scaled vref_scaled]
vref_pin: PB5
vssa_pin: PB4
[heater_bed]
heater_pin: PB17 #out1
sensor_type: Generic 3950
sensor_pin: vref_scaled:PC0
#control: pid
pullup_resistor: 2200
#pid_Kp: 61.049
#pid_Ki: 2.339
#pid_Kd: 398.344
min_temp: 0
max_temp: 130
[heater_fan heatbreak_fan]
pin: PB11
[temperature_fan duet_mcu_fan]
pin: PA11 #out3
tachometer_pin: PB27 #Out3.Tach
max_power: 0.4 #amps
sensor_type: temperature_mcu
max_temp: 55.0 #Set below 60C, Pi3+ MCU can be damaged at 85C
target_temp: 49.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
[mcu]
#serial: /dev/ttyACM0
canbus_uuid: 3e1b9fbf635c
[printer]
kinematics: corexy
max_velocity: 350
max_accel: 20000
max_z_velocity: 8
max_z_accel: 350
square_corner_velocity: 5
[temperature_sensor raspberry_pi]
sensor_type: temperature_host
min_temp: 10
max_temp: 100
# EXP1 / EXP2 (display) pins
[board_pins]
aliases:
# EXP1 header
EXP1_1=PA9, EXP1_3=PC6, EXP1_5=<LCD_RST>, EXP1_7=<NC>, EXP1_9=<GND>,
EXP1_2=PB9, EXP1_4=PA2, EXP1_6=PB12, EXP1_8=<NC>, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PC15, EXP2_3=PD1, EXP2_5=PC11, EXP2_7=PD12, EXP2_9=<GND>,
EXP2_2=PC13, EXP2_4=PC14, EXP2_6=PC12, EXP2_8=<RESET_EXT>, EXP2_10=<NC>
# Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of spi bus "sercom7"
# See the sample-lcd.cfg file for definitions of common LCD displays.
[beacon]
serial: /dev/serial/by-id/usb-Beacon_Beacon_RevD_2510B6D4515137474C202020FF0D281B-if00
x_offset: 0 # update with offset from nozzle on your machine
y_offset: -20 # update with offset from nozzle on your machine
contact_max_hotend_temperature: 180 # increase to probe at print temps
home_xy_position: 128.5, 112.5 # update with your safe position
home_z_hop: 5
home_z_hop_speed: 15
home_xy_move_speed: 150
home_method: contact # use proximity for induction homing
home_method_when_homed: proximity # after initial calibration use induction
home_autocalibrate: unhomed # contact will calibrate beacon on first home
[bed_mesh]
# rectangular bed, probe_count = 3, 3:
# x---x---x (max_point)
# |
# x---x---x
# |
# (min_point) x---x---x
speed: 75
horizontal_move_z: 10
mesh_min: 10, 2.5 #probe location
mesh_max: 214, 180 #probe location
probe_count: 6, 6
fade_start: 1
fade_end: 10
algorithm: bicubic
#################### Klipperscreen ############################
[virtual_sdcard]
path: ~/printer_data/gcodes
[display_status]
[pause_resume]
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
gcode:
PAUSE_BASE
_TOOLHEAD_PARK_PAUSE_CANCEL
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read extrude from _TOOLHEAD_PARK_PAUSE_CANCEL macro #####
{% set extrude = printer['gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL'].extrude %}
#### get VELOCITY parameter if specified ####
{% if 'VELOCITY' in params|upper %}
{% set get_params = ('VELOCITY=' + params.VELOCITY) %}
{%else %}
{% set get_params = "" %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
M83
G1 E{extrude} F2100
{% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %}
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
[gcode_macro _TOOLHEAD_PARK_PAUSE_CANCEL]
description: Helper: park toolhead used in PAUSE and CANCEL_PRINT
variable_extrude: 1.0
gcode:
##### set park positon for x and y #####
# default is your max posion from your printer.cfg
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
{% set z_park_delta = 2.0 %}
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% if act_z < (max_z - z_park_delta) %}
{% set z_safe = z_park_delta %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
{% if printer.extruder.can_extrude|lower == 'true' %}
M83
G1 E-{extrude} F2100
{% if printer.gcode_move.absolute_extrude |lower == 'true' %} M82 {% endif %}
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G91
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% if printer.gcode_move.absolute_coordinates|lower == 'false' %} G91 {% endif %}
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
variable_park: True
gcode:
## Move head and retract only if not already in the pause state and park set to true
{% if printer.pause_resume.is_paused|lower == 'false' and park|lower == 'true'%}
_TOOLHEAD_PARK_PAUSE_CANCEL
{% endif %}
TURN_OFF_HEATERS
CANCEL_PRINT_BASE
[gcode_macro LOAD_FILAMENT]
variable_load_distance: 50
variable_purge_distance: 25
gcode:
{% set speed = params.SPEED|default(300) %}
{% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity * 60 %}
SAVE_GCODE_STATE NAME=load_state
G91
G92 E0
G1 E{load_distance} F{max_velocity} # fast-load
G1 E{purge_distance} F{speed} # purge
RESTORE_GCODE_STATE NAME=load_state
[gcode_macro UNLOAD_FILAMENT]
variable_unload_distance: 50
variable_purge_distance: 25
gcode:
{% set speed = params.SPEED|default(300) %}
{% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity * 60 %}
SAVE_GCODE_STATE NAME=unload_state
G91
G92 E0
G1 E{purge_distance} F{speed} # purge
G1 E-{unload_distance} F{max_velocity} # fast-unload
RESTORE_GCODE_STATE NAME=unload_state
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [beacon model default]
#*# model_coef = 1.6856775497409744,
#*# 1.9852942828081892,
#*# 0.7678586864334999,
#*# 0.44332262179922277,
#*# 0.03690780789408446,
#*# -0.29003170042942883,
#*# 0.06849765478947417,
#*# 0.38530073524629976,
#*# 0.043249456036992796,
#*# -0.12009198902908388
#*# model_domain = 3.2957864573473716e-07,3.34639451012628e-07
#*# model_range = 0.200000,5.000000
#*# model_temp = 22.105410
#*# model_offset = 0.00000
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# -0.157480, 0.195218, 0.205399
#*# -0.341180, 0.108551, 0.156333
#*# -0.536521, -0.034581, 0.067976
#*# x_count = 3
#*# y_count = 3
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = lagrange
#*# tension = 0.2
#*# min_x = 8.0
#*# max_x = 220.0
#*# min_y = 0.5
#*# max_y = 200.0
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 37.967
#*# pid_ki = 1.446
#*# pid_kd = 249.155