-
Notifications
You must be signed in to change notification settings - Fork 137
/
Copy pathskr_mini_e3_v2_config.cfg
409 lines (364 loc) · 10.7 KB
/
skr_mini_e3_v2_config.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
## *** THINGS TO CHANGE/CHECK: ***
## MCU paths [mcu] section
## Thermistor types [extruder] and [heater_bed] sections - See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types
## PID tune [extruder] and [heater_bed] sections
## Fine tune E steps [extruder] section
## For wiring directions please see https://docs.vorondesign.com/build/electrical/sw_miniE3_v20_wiring.html
## Webclient config files. Uncomment one depending on UI being used.
#[include mainsail.cfg]
#[include fluidd.cfg]
[printer]
kinematics: corexz
max_velocity: 200
max_accel: 1000
max_z_velocity: 50
max_z_accel: 1000
square_corner_velocity: 4.0
[mcu]
###Change to device found by "ls -l /dev/serial/by-id/" with just one this MCU connected to Pi
serial: /dev/serial/by-id/usb-Klipper_lpc1768_XXXXXXXXXXXXXXXXXXXXX
[static_digital_output usb_pullup_enable]
pins: !PA14
#####################################################################
# X Stepper Settings
#####################################################################
######
# Motor -XM
# Endstop - X-STOP
###############
[stepper_x]
step_pin: PB13
dir_pin: PB12
enable_pin: !PB14
rotation_distance: 40
full_steps_per_rotation: 200
microsteps: 32
endstop_pin: ^PC0
position_endstop: 250
position_min: 0
position_max: 250
homing_speed: 70
homing_positive_dir: true
[tmc2209 stepper_x]
uart_pin: PC11
tx_pin: PC10
uart_address: 0
run_current: 0.5
interpolate: False
stealthchop_threshold: 0
#####################################################################
# Y Stepper Settings
#####################################################################
######
# Motor -YM
# Endstop - Y-STOP
###############
[stepper_y]
step_pin: PB10
dir_pin: PB2
enable_pin: !PB11
rotation_distance: 40
full_steps_per_rotation: 200
microsteps: 32
## Ucomment one of the following:
## Switch-based endstop for Y
#endstop_pin: ^PC1
## Sensorless endstop for Y
#endstop_pin: tmc2209_stepper_y:virtual_endstop
#homing_retract_dist: 0 # Uncomment this line too
#diag_pin: ^PC1 # Uncomment this line too
position_endstop: 250
position_min: 0
position_max: 250
homing_speed: 70
homing_positive_dir: true
[tmc2209 stepper_y]
uart_pin: PC11
tx_pin: PC10
uart_address: 2
run_current: 0.5
interpolate: False
stealthchop_threshold: 0
## Uncomment if using sensorless Y homing.
#driver_SGTHRS: 120 # tune this once it's working.
#####################################################################
# Z Stepper Settings
#####################################################################
######
# Motor -ZAM
# Endstop - Z-STOP
###############
[stepper_z]
step_pin: PB0
dir_pin: PC5
enable_pin: !PB1
rotation_distance: 40
full_steps_per_rotation: 200
microsteps: 32
endstop_pin: probe:z_virtual_endstop
position_max: 250
homing_speed: 40
position_min: -3.0
[tmc2209 stepper_z]
uart_pin: PC11
tx_pin: PC10
uart_address: 1
run_current: 0.5
interpolate: False
stealthchop_threshold: 0
#####################################################################
# Extruder Settings
#####################################################################
######
#Motor - EM
###############
[extruder]
# E0_STEP_PIN PB3
# E0_DIR_PIN PB4
# E0_ENABLE_PIN PB1
# E0_UART_RX PC11
# E0_UART_TX PC10
step_pin: PB3
dir_pin: PB4
enable_pin: !PD2
## Update value below when you perform extruder calibration
## If you ask for 100mm of filament, but in reality it is 98mm:
## rotation_distance = <previous_rotation_distance> * <actual_extrude_distance> / 100
## 22.6789511 is a good starting point
rotation_distance: 22.6789511 #Bondtech 5mm Drive Gears
## Update Gear Ratio depending on your Extruder Type
## Use 50:10 for Stealthburner/Clockwork 2
## Use 50:17 for Afterburner/Clockwork (BMG Gear Ratio)
## Use 80:20 for M4, M3.1
gear_ratio: 50:10
microsteps: 32
full_steps_per_rotation: 200
nozzle_diameter: 0.400
filament_diameter: 1.75
heater_pin: PC8
## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types.
## Use "Generic 3950" for NTC 100k 3950 thermistors
#sensor_type:
sensor_pin: PA0
min_temp: 10
max_temp: 270
max_power: 1.0
min_extrude_temp: 170
control = pid
pid_kp = 26.213
pid_ki = 1.304
pid_kd = 131.721
#Set appropriate once tuning your printer
#pressure_advance: .05
## Default is 0.040, leave stock
# pressure_advance_smooth_time: 0.040
max_extrude_only_distance: 100.0
[tmc2209 extruder]
uart_pin: PC11
tx_pin: PC10
uart_address: 3
run_current: 0.7
hold_current: 0.3
interpolate: False
#####################################################################
# Bed Heater
#####################################################################
######
# BED Connector
###############
[heater_bed]
heater_pin: PC9
## Check what thermistor type you have. See https://www.klipper3d.org/Config_Reference.html#common-thermistors for common thermistor types.
## Use "Generic 3950" for Keenovo heaters
#sensor_type:
sensor_pin: PC3
min_temp: 0
max_temp: 130
control: pid
pid_kp: 58.437
pid_ki: 2.347
pid_kd: 363.769
#####################################################################
# Probe
#####################################################################
######
#Z Max Connector on Z(main) Board
#Inductive Probe
###############
[probe]
## If your probe is NO instead of NC, add change pin to !z:P1.24
pin: ^PC2
x_offset: 0
y_offset: 25
z_offset: 0
samples: 3
samples_result: median
sample_retract_dist: 3
samples_tolerance: 0.006
samples_tolerance_retries: 3
#####################################################################
# Fan Control
#####################################################################
######
# Electronics Fan
# Z-PROBE Connector
###############
[controller_fan my_controller_fan]
pin: PA1
max_power: 1.00
kick_start_time: 0.200
heater: heater_bed
######
# Hot End Fan
# FAN1 Connector
###############
[heater_fan extruder_fan]
pin: PC7
heater: extruder
heater_temp: 50.0
## If you are experiencing back flow, you can reduce fan_speed
#fan_speed: 1.0
######
# Part Cooling Fan
# FAN0 Connector
###############
[fan]
pin: PC6 # "FAN0"
cycle_time: .08
## 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
kick_start_time: .25
#####################################################################
# Homing and Bed Mesh
#####################################################################
[homing_override]
axes: z
set_position_z: 0
gcode:
G90
G0 Z5 F500
G28 X0 Y0
G0 X125 Y100 F9000
G28 Z0
G0 Z5 F500
[bed_mesh]
speed: 150
horizontal_move_z: 5
mesh_min: 25,35.0
mesh_max: 225.0,220
probe_count: 6,6
algorithm: bicubic
fade_start: 1
fade_end: 10
fade_target: 0
#####################################################################
# Displays
#####################################################################
## For the mini12864 Display, the [display] and [neopixel] must be uncommented
# mini12864 LCD Display
# connected to exp1/2
#[display]
## mini12864 LCD Display
#lcd_type: uc1701
#cs_pin: PB8
#a0_pin: PB15
#rst_pin: PB9
#encoder_pins: ^PA9,^PA10
#click_pin: ^!PB5
#contrast: 63
#spi_software_sclk_pin: PA5
#spi_software_mosi_pin: PA7
#spi_software_miso_pin: PA6
#menu_reverse_navigation: True
#[neopixel fysetc_mini12864]
## To control Neopixel RGB in mini12864 display
## Remember with these ones, you'll need to remove the connector header on the LCD for EXT1 + 2
## (it slides off) and reverse it for it to work on your SKR (1.3 and 1.4) board
#pin: PA15
#chain_count: 3
#initial_RED: 1
#initial_GREEN: 1
#initial_BLUE: 1
#color_order: RGB
## Set RGB values on boot up for each Neopixel.
## Index 1 = display, Index 2 and 3 = Knob
#[delayed_gcode setdisplayneopixel]
#initial_duration: 1
#gcode:
# SET_LED LED=fysetc_mini12864 RED=1 GREEN=1 BLUE=1 INDEX=1 TRANSMIT=0 # Backlit Screen colour
# SET_LED LED=fysetc_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=2 TRANSMIT=0 # Top left Knob colour
# SET_LED LED=fysetc_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=3 # Bottom right knob colour
#####################################################################
# Case Lights
#####################################################################
[output_pin LIGHTS]
pin: PC12
value: 0
shutdown_value: 0
[gcode_macro lights_on]
gcode:
SET_PIN PIN=LIGHTS VALUE=1.0
[gcode_macro lights_off]
gcode:
SET_PIN PIN=LIGHTS VALUE=0.0
#####################################################################
# Macros
#####################################################################
[gcode_macro PRINT_START]
# Use PRINT_START for the slicer starting script - PLEASE CUSTOMISE THE SCRIPT
gcode:
M117 Homing... ; display message
G28 Y0 X0 Z0
##Purge Line Gcode
#G92 E0;
#G90
#G0 X5 Y5 F6000
#G0 Z0.4
#G91
#G1 X120 E30 F1200;
#G1 Y1
#G1 X-120 E30 F1200;
#G92 E0;
#G90
G1 Z15.0 F600 ;move the platform down 15mm
G1 X125 Y125 F3000
G92 E0 ;zero the extruded length again
G1 F9000
M117 Printing...
[gcode_macro PRINT_END]
# Use PRINT_END for the slicer ending script
gcode:
# Get Boundaries
{% set max_x = printer.configfile.config["stepper_x"]["position_max"]|float %}
{% set max_y = printer.configfile.config["stepper_y"]["position_max"]|float %}
{% set max_z = printer.configfile.config["stepper_z"]["position_max"]|float %}
# Check end position to determine safe directions to move
{% if printer.toolhead.position.x < (max_x - 20) %}
{% set x_safe = 20.0 %}
{% else %}
{% set x_safe = -20.0 %}
{% endif %}
{% if printer.toolhead.position.y < (max_y - 20) %}
{% set y_safe = 20.0 %}
{% else %}
{% set y_safe = -20.0 %}
{% endif %}
{% if printer.toolhead.position.z < (max_z - 2) %}
{% set z_safe = 2.0 %}
{% else %}
{% set z_safe = max_z - printer.toolhead.position.z %}
{% endif %}
# Commence PRINT_END
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-4.0 F3600 ; retract
G91 ; relative positioning
G0 Z{z_safe} F3600 ; move nozzle up
G0 X{x_safe} Y{y_safe} F20000 ; move nozzle to remove stringing
M104 S0 ; turn off hotend
M140 S0 ; turn off bed
M106 S0 ; turn off fan
G90 ; absolute positioning
G0 X{max_x / 2} Y{max_y} F3600 ; park nozzle at rear
M117 Finished!