-
Notifications
You must be signed in to change notification settings - Fork 1
/
printer.cfg
321 lines (289 loc) · 7.91 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
# See docs/Config_Reference.md for a description of parameters.
#---------------------------------
[stepper_x]
step_pin: PF0
dir_pin: PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^PE5
position_endstop: -11
position_min: -11
position_max: 300
homing_speed: 50
#---------------------------------
[stepper_y]
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^PJ1
position_endstop: -4
position_min: -4
position_max: 310
homing_speed: 50
#---------------------------------
[stepper_z]
step_pin: PL3
dir_pin: !PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
position_min: 0
position_max: 400
#---------------------------------
[safe_z_home]
home_xy_position: 185,198.5 #bed = 310x320, centre 155,160, the use bltouch offsets to make that centre for z-home
speed: 125
z_hop: 10
z_hop_speed: 5
#---------------------------------
[bltouch]
sensor_pin: ^PD2
control_pin: PB5
x_offset: -30
y_offset: -38.5
#z_offset: 1.005 #Set using PROBE_CALIBRATE command
speed: 5
lift_speed: 40
samples: 3
sample_retract_dist: 2
samples_result: average
samples_tolerance: 0.025
samples_tolerance_retries: 5
#---------------------------------
[bed_mesh]
speed: 125
mesh_min: 32, 40
mesh_max: 268, 260
probe_count: 10
algorithm: bicubic
horizontal_move_z: 3
move_check_distance: 3.0
split_delta_z: .010
fade_start: 1.0
fade_end: 5.0
mesh_pps: 0
#---------------------------------
[extruder]
step_pin: PA4
dir_pin: !PA6
enable_pin: !PA2
microsteps: 16
rotation_distance: 8.209 # Calculated for the Hemera
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB4
sensor_type: ATC Semitec 104GT-2 # Set for Hemera, standard sensor_type is: EPCOS 100K B57560G104F
sensor_pin: PK5
min_temp: 0
max_temp: 280
pressure_advance: 0.0405
#---------------------------------
[heater_bed]
heater_pin: PH5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK6
min_temp: 0
max_temp: 120
#---------------------------------
[fan]
pin: PH6
#---------------------------------
[virtual_sdcard]
path: ~/gcode_files
#---------------------------------
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
#---------------------------------
[printer]
kinematics: cartesian
max_velocity: 300 # reliable max feedrate of 320. This means that a maximum reliable XY feedrate is 160 mm per second.
max_accel: 1500
max_z_velocity: 5
max_z_accel: 100
#---------------------------------
[display]
lcd_type: st7920
cs_pin: PH1
sclk_pin: PA1
sid_pin: PH0
encoder_pins: ^PC4, ^PC6
click_pin: ^!PC2
#---------------------------------
[idle_timeout]
# Added to stop the steppers from turning off after 10 mins. Leaving
# gcode config blank, ensures that nothing is executed.
gcode:
# A list of G-Code commands (one per line) to execute on an idle
# timeout. The default is to run "M84".
timeout: 60
# Idle time (in seconds) to wait before running the above G-Code
# commands. The default is 600 seconds.
#---------------------------------
[output_pin beeper]
pin: PC0
pwm: True
value: 0 # Silent at power on, set to 1 if active low.
shutdown_value: 0 # Disable at emergency shutdown (no PWM would be available anyway).
cycle_time: 0.001 # PWM frequency : 0.001 = 1ms will give a tone of 1kHz - although not pitch perfect.
#---------------------------------
# ADDED FOR THE INPUT SHAPER / ADXL345
[mcu rpi]
serial: /tmp/klipper_host_mcu
[adxl345]
cs_pin: rpi:None
[resonance_tester]
accel_chip: adxl345
probe_points:
150,150,30 # an example
#---------------------------------
# Allows for a manual bed leveling using the BLTouch
# Command is SCREWS_TILT_CALCULATE, can also run it before a print to see if it's fallen out of
# whack using a STANDARD DEVIATION argument.
[screws_tilt_adjust]
screw1: 70,78.5 # Actual location: 35,40
screw1_name: front left screw
screw2: 300,78.5 # Actual location: 275,40
screw2_name: front right screw
screw3: 300,301 # Actual location: 275,280
screw3_name: rear right screw
screw4: 70,301 # Actual location: 35,280
screw4_name: rear left screw
horizontal_move_z: 10.
speed: 125
screw_thread: CW-M3
#---------------------------------
# Timelapse custom component (related macros) (https://github.com/mainsail-crew/moonraker-timelapse)
[include timelapse.cfg]
#---------------------------------
# Custom Display settings
[include klipper_display.cfg]
#---------------------------------
# General macros
[include macro_general.cfg]
#---------------------------------
# Start / end code macros
[include macro_start-end.cfg]
#---------------------------------
# Beeper (in display controller) macros
[include macro_beeper.cfg]
######################################################################
# Controls
######################################################################
[pause_resume]
[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 - 5.0 %}
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.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
G91 ;Relative positioning
G1 E-2 F2700 ;Retract a bit
G1 E-2 Z0.2 F2400 ;Retract and raise Z
G1 X5 Y5 F3000 ;Wipe out
G1 Z10 ;Raise Z more
G90 ;Absolute positioning
G1 X300 Y300 ;Present print
M106 S0 ;Turn-off fan
#M104 S0 ;Turn-off hotend
#M140 S0 ;Turn-off bed
CANCEL_PRINT_BASE
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 29.278
#*# pid_ki = 1.537
#*# pid_kd = 139.439
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 67.707
#*# pid_ki = 0.825
#*# pid_kd = 1388.842
#*#
#*# [input_shaper]
#*# shaper_type_x = mzv
#*# shaper_freq_x = 64.6
#*# shaper_type_y = ei
#*# shaper_freq_y = 35.4
#*#
#*# [bltouch]
#*# z_offset = 0.396
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# 0.104167, 0.065000, 0.035833, 0.046667, -0.050833
#*# 0.074167, 0.040833, 0.015833, 0.024167, -0.070833
#*# 0.081667, 0.055000, 0.022500, 0.028333, -0.085833
#*# 0.100833, 0.050000, 0.011667, 0.007500, -0.109167
#*# 0.147500, 0.101667, 0.052500, 0.029167, -0.095000
#*# tension = 0.2
#*# min_x = 32.0
#*# algo = bicubic
#*# y_count = 5
#*# mesh_y_pps = 0
#*# min_y = 40.0
#*# x_count = 5
#*# max_y = 260.0
#*# mesh_x_pps = 0
#*# max_x = 268.0