-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathklipper.txt
251 lines (223 loc) · 5.84 KB
/
klipper.txt
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
# This file contains pin mappings for the stock 2020 Creality Ender 3
# V2. To use this config, during "make menuconfig" select the
# STM32F103 with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
# communication.
# If you prefer a direct serial connection, in "make menuconfig"
# select "Enable extra low-level configuration options" and select
# serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
# cable used for the LCD module as follows:
# 3: Tx, 4: Rx, 9: GND, 10: VCC
# Flash this firmware by copying "out/klipper.bin" to a SD card and
# turning on the printer with the card inserted. The firmware
# filename must end in ".bin" and must not match the last filename
# that was flashed.
# See docs/Config_Reference.md for a description of parameters.
# Customized for My personal Ender 3 v2
# Micro-swiss extruder
# Smart filament sensor
# CR Touch
# Mainsail
[include mainsail.cfg]
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
[stepper_x]
step_pin: PC2
dir_pin: PB9
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA5
position_endstop: -8
position_min: -8
position_max: 255
homing_speed: 50
[stepper_y]
step_pin: PB8
dir_pin: PB7
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA6
position_endstop: -5
position_min: -5
position_max: 225
homing_speed: 50
[stepper_z]
step_pin: PB6
dir_pin: !PB5
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
#endstop_pin: ^PA7
endstop_pin: probe:z_virtual_endstop # Questionable, CB
#position_endstop: 0.0 # Disabled, BLTOUCH
position_max: 250
position_min: -3 # Include if problems during initial calibration
[extruder]
max_extrude_only_distance: 100.0
step_pin: PB4
dir_pin: PB3
enable_pin: !PC3
microsteps: 16
full_steps_per_rotation: 200
rotation_distance: 22.900 # Microswiss Extruder tuned by measurement method
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA1
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
#control: pid
# tuned for stock hardware with 200 degree Celsius target
#pid_Kp: 21.527
#pid_Ki: 1.063
#pid_Kd: 108.982
min_temp: 0
max_temp: 310 # Adjusted, microswiss and 300 degree thermistor
#step_distance: 0.007692307692308 # For Micro-swiss
[heater_bed]
heater_pin: PA2
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
#control: pid
# tuned for stock hardware with 50 degree Celsius target
#pid_Kp: 54.027
#pid_Ki: 0.770
#pid_Kd: 948.182
min_temp: 0
max_temp: 130
[fan]
pin: PA0
[mcu]
serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
[bltouch]
sensor_pin: ^PB1
control_pin: PB0
x_offset: -44 # Adjusted per marlin config and measured manually
y_offset: -7 # Adjusted per marlin config and measured manually
probe_with_touch_mode: True
stow_on_each_sample: False
[safe_z_home]
home_xy_position: 117.5,117.5 # Change coordinates to the center of your print bed
z_hop: 10 # Move up 10mm
z_hop_speed: 5
[bed_mesh]
speed: 120
horizontal_move_z: 5
mesh_min: 15, 15
mesh_max: 205, 205
#mesh_max: 190, 190
probe_count: 5,3
algorithm: bicubic
fade_start: 1
fade_end: 10
fade_target: 0
[screws_tilt_adjust]
screw1: 70.5,37.5
screw1_name: front left screw
screw2: 240,37.5
screw2_name: front right screw
screw3: 240,207.5
screw3_name: rear right screw
screw4: 70.5,207.5
screw4_name: rear left screw
horizontal_move_z: 10
speed: 50
screw_thread: CW-M4
[filament_motion_sensor btt_smartie]
detection_length: 7.0
extruder: extruder
switch_pin: PA4 # From Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
runout_gcode: FILAMENT_RUNOUT
[gcode_macro FILAMENT_RUNOUT]
gcode:
M300 S1 P10
M600
M300 S1 P10
[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 X0 Y0 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}
# Purge line
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
G92 E0 ; Reset Extruder
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish
[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
[gcode_macro DISABLE_STEPPER]
gcode:
M18
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*# -0.052500, -0.055000, -0.070000, -0.027500, -0.007500
#*# -0.010000, -0.005000, -0.015000, 0.025000, 0.035000
#*# -0.042500, -0.032500, -0.052500, -0.012500, 0.017500
#*# tension = 0.2
#*# min_x = 15.0
#*# algo = bicubic
#*# y_count = 3
#*# mesh_y_pps = 2
#*# min_y = 15.0
#*# x_count = 5
#*# max_y = 205.0
#*# mesh_x_pps = 2
#*# max_x = 205.0
#*#
#*# [bltouch]
#*# z_offset = 1.110
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 20.173
#*# pid_ki = 1.067
#*# pid_kd = 95.318
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 70.482
#*# pid_ki = 1.473
#*# pid_kd = 843.136