forked from Lzhikai/siboor-voron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprinter.cfg
254 lines (217 loc) · 6.88 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
[include fly_macros.cfg]
########################################
# Motherboard model
# Please modify it based on your motherboard model
# 请根据您的主板型号修改
########################################
#[include boards/FLY_GEMINI_V1.cfg]
#[include boards/FLY_GEMINI_V1.1.cfg]
[include boards/FLY_GEMINI_V3.cfg]
[include V0Display.cfg]
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f405xx_JKYZ-if00
[mcu host]
serial: /tmp/klipper_host_mcu
[virtual_sdcard]
path: ~/gcode_files
[printer]
kinematics: corexy
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
########################################
# Temp
########################################
[temperature_sensor FLY-Gemini]
sensor_type: temperature_host
[temperature_fan mcu_fan] #Electrical bin cooling fan
pin: FAN1
kick_start_time: 0.500
sensor_type: temperature_mcu
control: watermark
target_temp: 45.0
min_temp: 0
max_temp: 90
max_speed: 1.0
min_speed: 0.8
########################################
# Drives
########################################
[stepper_x]
## Refer to https://docs.vorondesign.com/build/startup/#v0
step_pin: X_STEP
dir_pin: X_DIR
enable_pin: !X_EN
rotation_distance: 40
microsteps: 32
full_steps_per_rotation: 200 # Set to 400 for 0.9° degree stepper motor, 200 is for 1.8° stepper motors
endstop_pin: tmc2209_stepper_x:virtual_endstop
position_endstop: 120
position_max: 120
homing_speed: 30 # Can be increased after initial setup, Max 100
homing_retract_dist: 0
homing_positive_dir: true
step_pulse_duration: 0.000004
[stepper_y]
## Refer to https://docs.vorondesign.com/build/startup/#v0
step_pin: Y_STEP
dir_pin: Y_DIR # Check motor direction in link above. If inverted, add a ! before PC4
enable_pin: !Y_EN
rotation_distance: 40
microsteps: 32
full_steps_per_rotation: 200 # Set to 400 for 0.9° degree stepper motor, 200 is for 1.8° stepper motors
endstop_pin: tmc2209_stepper_y:virtual_endstop
position_endstop: 120
position_max: 120
homing_speed: 30 # Can be increased after initial setup, Max 100
homing_retract_dist: 0
homing_positive_dir: true
[stepper_z]
## Refer to https://docs.vorondesign.com/build/startup/#v0
step_pin: PC15
dir_pin: !PC5 # Check motor direction in link above. If inverted, remove a ! before PC4
enable_pin: !PC12
rotation_distance: 8 # For T8x8 integrated lead screw
microsteps: 32
endstop_pin: Z_STOP
position_endstop: 120
position_max: 120
position_min: -1.5
homing_speed: 120
second_homing_speed: 3.0
homing_retract_dist: 3.0
[extruder]
step_pin: E_STEP
dir_pin: !E_DIR
enable_pin: !E_EN
microsteps: 16
rotation_distance: 23
gear_ratio: 50:10
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: HEAT
sensor_pin: HEAT_TEMP
sensor_type: ATC Semitec 104GT-2
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 350
min_extrude_temp: 10
step_pulse_duration: 0.000004
########################################
# BED
########################################
[heater_bed]
heater_pin: BED_OUT
sensor_pin: BED_TEMP
sensor_type: ATC Semitec 104GT-2
control: watermark
min_temp: 0
max_temp: 110
max_power: 1.0
########################################
# FANs
########################################
[fan]
pin: FAN0
#cycle_time: 0.50
########################################
# TMC2208 configuration./2209/2225
########################################
[tmc2209 stepper_x]
uart_pin: X_CS
interpolate: False
run_current: 1.1
sense_resistor: 0.110
stealthchop_threshold: 200 # Set to 999999 to turn stealthchop on, and 0 to use spreadcycle
diag_pin: PA4 # YOU NEED TO JUMP THIS DIAG PIN ON YOUR BOARD FOR SENSORLESS HOMING TO WORK
driver_SGTHRS: 70 # 255 is most sensitive value, 0 is least sensitive
[tmc2209 stepper_y]
uart_pin: Y_CS
interpolate: False
run_current: 1.1
sense_resistor: 0.110
stealthchop_threshold: 200 # Set to 999999 to turn stealthchop on, and 0 to use spreadcycle
diag_pin: PA5 # YOU NEED TO JUMP THIS DIAG PIN ON YOUR BOARD FOR SENSORLESS HOMING TO WORK
driver_SGTHRS: 70 # 255 is most sensitive value, 0 is least sensitive
[tmc2209 stepper_z]
uart_pin: Z_CS
run_current: 0.5500
interpolate: False
[tmc2209 extruder]
uart_pin: E_CS
run_current: 0.5500
interpolate: False
[gcode_macro SENSORLESS_HOME_X]
gcode:
{% set HOME_CUR = 0.700 %}
{% set driver_config = printer.configfile.settings['tmc2209 stepper_x'] %}
{% set RUN_CUR = driver_config.run_current %}
# Set current for sensorless homing
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CUR}
# Pause to ensure driver stall flag is clear
G4 P2000
# Home
G28 X0
# Move away
G90
G1 X5 F1200
# Set current during print
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CUR}
#打印开始
[gcode_macro PRINT_START]
# Use PRINT_START for the slicer starting script - please customize for your slicer of choice
description: 开始打印
gcode:
G90
M107
M82
G28
G1 Z20 F3000
G92 E0
G1 X110 Y0.5 F2000
G1 Z0.28 F400
G1 X30 Y0.5 E18 F1000
G1 Z0.5 F200
G92 E0
#打印结束
[gcode_macro PRINT_END]
# Use PRINT_END for the slicer ending script - please customize for your slicer of choice
gcode:
M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-4.0 F3600 ; retract filament
G91 ; relative positioning
# 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 direction 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 %}
G0 Z{z_safe} F3600 ; move nozzle up
G0 X{x_safe} Y{y_safe} F20000 ; move nozzle to remove stringing
TURN_OFF_HEATERS
M107 ; turn off fan
G90 ; absolute positioning
G0 X60 Y{max_y} F3600 ; park nozzle at rear
SET_SKEW CLEAR=1
[safe_z_home]
home_xy_position: 60,115
speed: 120