-
Notifications
You must be signed in to change notification settings - Fork 9
/
printer.cfg
197 lines (174 loc) · 4.71 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
# For the ZNP Robin Nano DW v2.1 board:
# - Compile with the processor model STM32F401.
# - Select the 32KiB bootloader,
# - Select (Serial (on # USART1 PA10/PA9) for the communication interface.
# Note that the "make flash" command does not work with ZNP Robin boards. After
# running "make", run the following command:
# cp out/klipper.bin out/ZNP_ROBIN_NANO.bin
#
# Copy the file out/ZNP_ROBIN_NANO.bin to an SD card and then restart the printer with
# that SD card.
# See docs/Config_Reference.md for a description of parameters.
[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
[duplicate_pin_override]
pins: PC7, PC8, PC9, PC14 #Reuse Z-Stepper pins to drive the stepper manually and Z-Max Sensor pin
[stepper_x]
step_pin: !PC12
dir_pin: PB3
enable_pin: !PD2
microsteps: 16
rotation_distance: 40
endstop_pin: PA13
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_y]
step_pin: PC11
dir_pin: PA15
enable_pin: !PC10
microsteps: 16
rotation_distance: 40
endstop_pin: PB8
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_z]
step_pin: PC7
dir_pin: !PC9
enable_pin: !PC8
rotation_distance: 8
microsteps: 16
endstop_pin: probe:z_virtual_endstop # Use Z- as endstop
#Alternative homing config is available at @bsas fork https://github.com/bsas/Neptune-Elegoo3-Klipper
position_min: -1
position_max: 285
homing_speed: 0.1
second_homing_speed: 0.1
homing_retract_dist: 1.0
#Redefine Z-stepper so it can be driven independently using Klipper's Manual Stepper Gcode and Z-Max sensor can be used to stop the movement
[manual_stepper z-max]
step_pin: PC7
dir_pin: !PC9
enable_pin: !PC8
rotation_distance: 8
microsteps: 16
endstop_pin: !PC14
#Workaround to get the status of Z-Max optical sensor
[filament_switch_sensor z-max]
pause_on_runout: False
switch_pin: !PC14
[homing_override]
axes: xyz
set_position_z: 0 #Temporary set Z as 0 so X and Y can be moved after XY homing
gcode:
{% if printer["filament_switch_sensor z-max"].filament_detected == True %} #If Z-Max sensor is triggered, move Z up to advoid scratching Bed
MANUAL_STEPPER STEPPER=z-max SET_POSITION=0 SPEED=10 MOVE=5 STOP_ON_ENDSTOP=0 SYNC=0 #Move Z-Stepper using [manual_stepper] Gcode
MANUAL_STEPPER STEPPER=z-max ENABLE=0
G28 X0 Y0 #Home XY
G0 X110 Y110 F5000 #Move XY to the middle
G28 Z0 #Home Z
G0 Z10 F100 #Move Z Up
{% else %}
#As above
G28 X0 Y0
G0 X110 Y110 F5000
#At speed of 250mm/s, this movement will take ~12 seconds regardless of Z-Max Sensor status. (E.g. When sensor is triggered, Z will stop, however it will wait till the code is complete which is ~12s)
#The movement is quite loud at this speed, you can reduce the speed thus increase waiting time.
MANUAL_STEPPER STEPPER=z-max ENABLE=1 SET_POSITION=285 SPEED=25 MOVE=0 STOP_ON_ENDSTOP=1 SYNC=0
MANUAL_STEPPER STEPPER=z-max ENABLE=0
G28 Z0
G0 Z10 F100
{% endif %}
[extruder]
max_extrude_only_distance: 100.0
step_pin: PB10
dir_pin: PB1
enable_pin: !PC6
microsteps: 16
rotation_distance: 24 # Calibrate E-Steps https://www.klipper3d.org/Rotation_Distance.html#calibrating-rotation_distance-on-extruders
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA6
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC1
# Calibrate PID: https://www.klipper3d.org/Config_checks.html#calibrate-pid-settings
control: pid
pid_kp = 28.631
pid_ki = 1.853
pid_kd = 110.589
min_temp: 0
max_temp: 250
[heater_bed]
heater_pin: PA5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC0
max_temp: 110
min_temp: 0
control: watermark
[heater_fan hotend_fan]
pin: PA7
heater: extruder
heater_temp: 50.0
[fan]
pin: PB0
[force_move]
enable_force_move: True
# Safe Z Home doesn't work with homing overide, the config below are implemented in homing_overide section
#[safe_z_home]
#home_xy_position: 110,110
#z_hop: 10
[probe]
pin: !PC13 # Use Z- as endstop
speed: 0.1
lift_speed: 0.5
samples_tolerance: 0.09
samples_tolerance_retries: 2
samples: 4
samples_result: median
z_offset = 0
activate_gcode:
TARE_PROBE
[gcode_macro TARE_PROBE]
gcode:
{action_respond_info("Wait")}
G4 P1000
{action_respond_info("Start")}
[bed_mesh]
speed: 20
horizontal_move_z: 1
algorithm: bicubic
mesh_min: 20,20
mesh_max: 200,200
probe_count: 4,4
fade_start: 1
fade_end: 50
fade_target: 0
#relative_reference_index: 6
#mesh_pps: 1
bicubic_tension: 0.15
[filament_motion_sensor filament_sensor]
extruder: extruder
pause_on_runout: true
switch_pin: PB4
#Input Sharper Setup
#[mcu rpi]
#serial: /tmp/klipper_host_mcu
#[adxl345]
#cs_pin: rpi:None
#[resonance_tester]
#accel_chip: adxl345
#probe_points:
110, 110, 20 # an example
#[input_shaper]
#shaper_freq_x:
#shaper_type_x:
#shaper_freq_y:
#shaper_type_y: