-
Notifications
You must be signed in to change notification settings - Fork 0
/
printer.cfg
360 lines (324 loc) · 8.65 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
# This file contains common pin mappings for the Azteeg X5 Mini v3. To use
# this config, the firmware should be compiled for the LPC1769.
# See docs/Config_Reference.md for a description of parameters.
# MCU 'mcu' config: BUS_PINS_i2c1=P0.1,P0.0 BUS_PINS_i2c0=P0.28,P0.27 BUS_PINS_i2c2=P0.11,P0.10 BUS_PINS_i2c1a=P0.20,P0.19 BUS_PINS_ssp1=P0.8,P0.9,P0.7 STEPPER_BOTH_EDGE=1 ADC_MAX=4095 BUS_PINS_ssp0=P0.17,P0.18,P0.15 PWM_MAX=255 CLOCK_FREQ=120000000 RESERVE_PINS_USB=P0.30,P0.29,P2.9 MCU=lpc1769 STATS_SUMSQ_BASE=256
[mcu]
# serial: /dev/serial/by-id/usb-Klipper_lpc1769_0AB00001841C29AFBDEAA25BC22000F5-if00 # this disappeared for some reason, after OS updates
serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.4:1.0
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 4200
max_z_velocity: 25
max_z_accel: 300
[input_shaper]
shaper_type_x: ei
shaper_freq_x: 56.2
shaper_type_y: mzv
shaper_freq_y: 37.8
[stepper_x]
step_pin: P2.1
dir_pin: !P0.11
# enable_pin: P0.10
microsteps: 16
full_steps_per_rotation: 200
rotation_distance: 39
endstop_pin: !P1.24
position_endstop: 0
position_max: 233
position_min: -2
homing_speed: 100
homing_retract_dist: 5
homing_retract_speed: 50
second_homing_speed: 15
[tmc2660 stepper_x]
cs_pin: P0.10
run_current: 0.5656
sense_resistor: 0.1
[stepper_y]
step_pin: P2.2
dir_pin: P0.20
# enable_pin: P0.19
microsteps: 16
full_steps_per_rotation: 200
rotation_distance: 39
endstop_pin: !P1.25
position_endstop: 0
position_max: 210
position_min: -2
homing_speed: 100
homing_retract_dist: 5
homing_retract_speed: 50
second_homing_speed: 15
[tmc2660 stepper_y]
cs_pin: P0.19
run_current: 0.5656
sense_resistor: 0.1
[stepper_z]
step_pin: P2.3
dir_pin: !P0.22
# enable_pin: P0.21
microsteps: 16
full_steps_per_rotation: 200
rotation_distance: 8
endstop_pin: ~!P1.29
position_endstop: 215.90 # tune starting z height here
position_max: 220
position_min: -2
homing_speed: 25
homing_retract_dist: 5
homing_retract_speed: 10
second_homing_speed: 3
[tmc2660 stepper_z]
cs_pin: P0.21
run_current: 0.5656
sense_resistor: 0.1
[extruder]
step_pin: P2.0
dir_pin: !P0.5
# enable_pin: P0.4
microsteps: 16
full_steps_per_rotation: 200
rotation_distance: 6.7855
nozzle_diameter: 0.40
# pressure_advance: 0.05 # that awful pink shit from 3D Filament, 0.25mm hardened nozzle
pressure_advance: 0.03 # normal, PLA
# pressure_advance: 0.02 # NylonX
# pressure_advance: 0.025 # NylonG
filament_diameter: 1.750
max_extrude_only_distance: 100.0
heater_pin: P2.4
sensor_type: Generic 3950
sensor_pin: P0.24
control: pid
pid_Kp: 29.581
pid_Ki: 2.465
pid_Kd: 88.743
min_extrude_temp: 170
min_temp: 0
max_temp: 340
[tmc2660 extruder]
cs_pin: P0.4
# run_current: 0.42 # this might be 'correct', but the motor sometimes slips at this current, and 0.6 doesn't cause too much heat
run_current: 0.6
sense_resistor: 0.1
[heater_bed]
heater_pin: P2.7
sensor_type: ATC Semitec 104GT-2
sensor_pin: P0.23
control: pid
pid_Kp: 54.773
pid_Ki: 0.941
pid_Kd: 796.952
min_temp: 0
max_temp: 140
[fan]
pin: P1.22
max_power: 0.33
shutdown_speed: 0
off_below: 0.10
[heater_fan hotend]
pin: P0.26
max_power: 0.33
shutdown_speed: 0
heater: extruder
heater_temp: 45
fan_speed: 1.0
[homing_override]
gcode:
G28 Z220
G28 X0
G28 Y0
[bltouch]
sensor_pin: ^P1.26
control_pin: P1.23
x_offset: -32.4
y_offset: -34.9
z_offset: 3.050
speed: 8
[bed_mesh]
speed: 120
horizontal_move_z: 7
mesh_min: 10, 15
mesh_max: 200, 175
probe_count: 5, 5
[adxl345 extruder]
cs_pin: P1.16
spi_software_sclk_pin: P1.14
spi_software_mosi_pin: P1.15
spi_software_miso_pin: P1.17
axes_map: y, -x, z
[adxl345 bed]
cs_pin: P1.0
spi_software_sclk_pin: P1.4
spi_software_mosi_pin: P1.8
spi_software_miso_pin: P1.1
axes_map: x, -y, z
[resonance_tester]
accel_chip_x: adxl345 extruder
accel_chip_y: adxl345 bed
probe_points:
100, 100, 20
[idle_timeout]
timeout: 300
# Mini Viki2 LCD - this board does not work with Reprap LCDs
[display]
lcd_type: uc1701
cs_pin: P0.16
a0_pin: P2.6
encoder_pins: ^P3.26, ^!P3.25
click_pin: ^!P2.11
contrast: 40
# menu_root:
[virtual_sdcard]
path: ~/gcode
[static_digital_output external_sd]
pins: P1.19,P1.20,P1.30,P1.31,P1.21,P2.12
# # pins: !P1.21,!P2.12
# # A comma separated list of pins to be set as GPIO output pins. The
# # pin will be set to a high level unless the pin name is prefaced
# # with "!". This parameter must be provided.
[display_status]
[pause_resume]
[gcode_macro HOME_FORWARD]
description: Home, then sling bed forward
gcode:
G28 X0 ; home X axis
G1 X0 Y160 ; sling bed forward
M84 ; disable motors
[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
##### 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 - 10.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 10.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 - 2.0) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
PAUSE_BASE
G91
{% if printer.extruder.can_extrude|lower == 'true' %}
G1 E-{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
{% if "xyz" in printer.toolhead.homed_axes %}
G1 Z{z_safe} F900
G90
G1 X{x_park} Y{y_park} F6000
{% else %}
{action_respond_info("Printer not homed")}
{% endif %}
[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
##### read E from pause macro #####
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
#### 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' %}
G91
G1 E{E} F2100
{% else %}
{action_respond_info("Extruder not hot enough")}
{% endif %}
RESUME_BASE {get_params}
[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
CANCEL_PRINT_BASE
[gcode_macro START_PRINT]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
# Start bed heating
M140 S{BED_TEMP}
# Use absolute coordinates
G90
# Reset the G-Code Z offset (adjust Z offset if needed)
SET_GCODE_OFFSET Z=0.0
# Home the printer
G28
# Move the nozzle near the bed
G1 Z5 F3000
# Move the nozzle very close to the bed
G1 Z0.15 F300
# Wait for bed to reach temperature
M190 S{BED_TEMP}
# Set and wait for nozzle to reach temperature
M109 S{EXTRUDER_TEMP}
[gcode_macro END_PRINT]
gcode:
# Turn off bed, extruder, and fan
M140 S0
M104 S0
M106 S0
# Move nozzle away from print while retracting
G91
G1 X-2 Y-2 E-3 F300
# Raise nozzle by 10mm
G1 Z10 F3000
G90
# Disable steppers
M84
# M600: Filament Change. This macro will pause the printer, move the
# tool to the change position, and retract the filament 50mm. Adjust
# the retraction settings for your own extruder. After filament has
# been changed, the print can be resumed from its previous position
# with the "RESUME" gcode.
[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
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# -1.222500, -1.032500, -1.050000, -1.185000, -1.407500
#*# -1.085000, -0.945000, -0.967500, -1.125000, -1.352500
#*# -0.980000, -0.872500, -0.907500, -1.085000, -1.365000
#*# -1.000000, -0.882500, -0.950000, -1.160000, -1.420000
#*# -1.077500, -0.945000, -0.965000, -1.192500, -1.500000
#*# tension = 0.2
#*# min_x = 10.0
#*# algo = lagrange
#*# y_count = 5
#*# mesh_y_pps = 2
#*# min_y = 15.0
#*# x_count = 5
#*# max_y = 175.01
#*# mesh_x_pps = 2
#*# max_x = 200.0