-
Notifications
You must be signed in to change notification settings - Fork 0
/
printer-Ender3_skr_mini_e3_v2.cfg
318 lines (283 loc) · 8.59 KB
/
printer-Ender3_skr_mini_e3_v2.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
## Configuration for Ender 3 by churneya
## Fork of skr mini e3 v2
## ------------------------------------------------------
[stepper_x]
step_pin: PB13
dir_pin: !PB12
enable_pin: !PB14
microsteps: 16
rotation_distance: 40
endstop_pin: ^PC0
position_endstop: 0
position_max: 235
homing_speed: 50
[tmc2209 stepper_x]
uart_pin: PC11
tx_pin: PC10
uart_address: 0
run_current: 0.580
stealthchop_threshold: 999999
## ------------------------------------------------------
[stepper_y]
step_pin: PB10
dir_pin: !PB2
enable_pin: !PB11
microsteps: 16
rotation_distance: 40
endstop_pin: ^PC1
position_endstop: -20
position_min: -20
position_max: 220
homing_speed: 50
[tmc2209 stepper_y]
uart_pin: PC11
tx_pin: PC10
uart_address: 2
run_current: 0.580
stealthchop_threshold: 999999
## ------------------------------------------------------
[stepper_z]
step_pin: PB0
dir_pin: PC5
enable_pin: !PB1
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
position_max: 250
[tmc2209 stepper_z]
uart_pin: PC11
tx_pin: PC10
uart_address: 1
run_current: 0.580
stealthchop_threshold: 999999
## ------------------------------------------------------
[extruder]
step_pin: PB3
dir_pin: !PB4
enable_pin: !PD2
microsteps: 16
rotation_distance: 7.95
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC8
sensor_type: ATC Semitec 104GT-2
sensor_pin: PA0
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 275
min_extrude_temp: 170
pressure_advance: 0.059
max_extrude_only_accel: 3000
max_extrude_only_velocity: 50
[tmc2209 extruder]
uart_pin: PC11
tx_pin: PC10
uart_address: 3
run_current: 0.650
stealthchop_threshold: 999999
## ------------------------------------------------------
[heater_bed]
heater_pin: PC9
sensor_type: ATC Semitec 104GT-2
sensor_pin: PC3
control: watermark
min_temp: 0
max_temp: 130
## ------------------------------------------------------
[controller_fan my_controller_fan]
pin: PC7
max_power: 0.6
[fan]
pin: PC6
## ------------------------------------------------------
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f103xe_32FFD3055359393508741843-if00
## ------------------------------------------------------
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_accel_to_decel: 1500
max_z_velocity: 5
max_z_accel: 100
square_corner_velocity: 3
## ------------------------------------------------------
[virtual_sdcard]
path: ~/gcode_files
[pause_resume]
[display_status]
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
TURN_OFF_HEATERS
M84
CLEAR_PAUSE
SDCARD_RESET_FILE
BASE_CANCEL_PRINT
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
gcode:
##### set defaults #####
{% set x = params.X|default(0) %} #edit to your park position
{% set y = params.Y|default(220) %} #edit to your park position
{% set z = params.Z|default(10)|float %} #edit to your park position
{% set e = params.E|default(1) %} #edit to your retract length
##### calculate save lift position #####
{% set max_z = printer.toolhead.axis_maximum.z|float %}
{% set act_z = printer.toolhead.position.z|float %}
{% set lift_z = z|abs %}
{% if act_z < (max_z - lift_z) %}
{% set z_safe = lift_z %}
{% else %}
{% set z_safe = max_z - act_z %}
{% endif %}
##### end of definitions #####
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-{e} F2100
G1 Z{z_safe}
G90
G1 X{x} Y{y} F6000
[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
##### set defaults #####
{% set e = params.E|default(1) %} #edit to your retract length
G91
G1 E{e} F2100
G90
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
[gcode_macro G29]
gcode:
G28
BED_MESH_CALIBRATE
[gcode_macro M900]
gcode:
{% if 'K' in params %}
SET_PRESSURE_ADVANCE ADVANCE={ params.K|float }
{% endif %}
[gcode_macro START_PRINT]
variable_retract: 0.4
gcode:
{% set extruder_temp = params.EXTRUDER_TEMP|default(220)|float %}
{% set bed_temp = params.BED_TEMP|default(70)|float %}
{% set E = printer["gcode_macro START_PRINT"].retract|float %}
SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={bed_temp} # set bed t℃
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={bed_temp * 0.75} # wait until bed is partially heated
SET_HEATER_TEMPERATURE HEATER=extruder TARGET={extruder_temp} # set nozzle t℃
G90 # absolute positioning
M82 # absolute extrusion mode
TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={bed_temp} # wait until
TEMPERATURE_WAIT SENSOR=extruder MINIMUM={extruder_temp} # wait until
G28 # home
#BED_MESH_CALIBRATE # autoleveling
G0 Z10 F1500 # raise Z
G92 E0 # reset extruder
G1 E{E} F1500 # prime
G92 E0
[gcode_macro END_PRINT]
gcode:
{% set E = printer["gcode_macro START_PRINT"].retract|float %}
TURN_OFF_HEATERS
M107 # turn off fan
G91 # relative positioning
G1 E-{E} F1500 # retract
G0 X5 Y5 Z0.2 F5000 # wipe
G0 Z2 F1500 # raise Z
G90 # absolute positioning
PARK
M84 # turn off all motors
BEEP P=200 S=250
[gcode_macro PARK]
gcode:
{% set x_park = params.X|default(0)|float %}
{% set y_park = params.Y|default(220)|float %}
{% set z_park = params.Z|default(10)|float + printer.toolhead.position.z|float %}
{% set x_max = printer.toolhead.axis_maximum.x|float %}
{% set y_max = printer.toolhead.axis_maximum.y|float %}
{% set z_max = printer.toolhead.axis_maximum.z|float %}
{% if x_park > x_max %}
{% set x_park = x_max %}
{% endif %}
{% if y_park > y_max %}
{% set y_park = y_max %}
{% endif %}
{% if z_park > z_max %}
{% set z_park = z_max %}
{% endif %}
SAVE_GCODE_STATE NAME=PARK_STATE
G90 # absolute positioning
G1 Z{z_park} F1500
G1 X{x_park} Y{y_park} F5000
RESTORE_GCODE_STATE name=PARK_STATE
[gcode_macro BEEP]
gcode:
# Use a default 1kHz tone if S is omitted.
{% set S = params.S|default(1000)|int %}
# Use a 10ms duration is P is omitted.
{% set P = params.P|default(100)|int %}
SET_PIN PIN=BEEPER_pin VALUE=0.5 CYCLE_TIME={ 1.0/S if S > 0 else 1 }
G4 P{P}
SET_PIN PIN=BEEPER_pin VALUE=0
## ------------------------------------------------------
[static_digital_output usb_pullup_enable]
pins: !PA14
## ------------------------------------------------------
[board_pins]
aliases:
# EXP1 header
EXP1_1=PB5, EXP1_3=PA9, EXP1_5=PA10, EXP1_7=PB8, EXP1_9=<GND>,
EXP1_2=PA15, EXP1_4=<RST>, EXP1_6=PB9, EXP1_8=PB15, EXP1_10=<5V>
[display]
lcd_type: st7920
cs_pin: EXP1_7
sclk_pin: EXP1_6
sid_pin: EXP1_8
encoder_pins: ^EXP1_5, ^EXP1_3
click_pin: ^!EXP1_2
[output_pin BEEPER_pin]
pin: EXP1_1
pwm: True
# A piezo beeper needs a PWM signal, a DC buzzer doesn't.
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
# Default PWM frequency : 0.001 = 1ms will give a tone of 1kHz
# Although not pitch perfect.
## ------------------------------------------------------
[bltouch]
#stow_on_each_sample: False
#probe_with_touch_mode: True
sensor_pin: ^PC14
control_pin: PA1
#pin_move_time: 0.5
#pin_up_touch_mode_reports_triggered: False
x_offset: -35
y_offset: -25
z_offset: 0.63
speed: 10
lift_speed: 20
samples: 2
[safe_z_home]
home_xy_position: 117,117
z_hop: 5
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 10, 10
mesh_max: 195, 180
probe_count: 3, 3
algorithm: bicubic
# ----
[input_shaper]
shaper_freq_x: 29.62
shaper_freq_Y: 34.78
shaper_type_x: mzv
shaper_type_Y: ei