cigarginger

Neptune 3 Pro Klipper Config

Jan 27th, 2025
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.29 KB | Software | 0 0
  1. # For the ZNP Robin Nano DW v2.2 board:
  2. # - Compile with the processor model STM32F401.
  3. # - Select the 32KiB bootloader,
  4. # - Select (Serial (on # USART1 PA10/PA9) for the communication interface.
  5. # - Select (Serial (on # USART2 PA3/PA2) if you want to use the serial UART pins on J17 (wifi section)
  6. # Note that the "make flash" command does not work with ZNP Robin boards. After running "make", run the following command:
  7. # cp out/klipper.bin out/ZNP_ROBIN_NANO.bin
  8. #
  9. # Copy the file out/ZNP_ROBIN_NANO.bin to an SD card and then restart the printer with that SD card.
  10. # See docs/Config_Reference.md for a description of parameters.
  11.  
  12. #[include timelapse.cfg]
  13.  
  14. [exclude_object]
  15. [virtual_sdcard]
  16. path: /home/biqu/printer_data/gcodes
  17.  
  18. [include accessibility.cfg]
  19.  
  20. [include main_macro.cfg]
  21.  
  22. [include testing.cfg]
  23.  
  24. [include pause_resume_cancel.cfg]
  25.  
  26. [gcode_macro LOAD_FILAMENT]
  27. variable_load_distance: 40 # Distance to load filament into the extruder
  28. variable_purge_distance: 50 # Distance to purge filament after loading
  29. variable_nozzle_preheat_temp: 195 # Default preheat temperature for the nozzle
  30. variable_turn_off_extruder: True # Option to turn off the extruder after loading (True/False)
  31. gcode:
  32. # Parameters and settings
  33. {% set load_speed = params.LOAD_SPEED|default(600) %} # Speed in mm/min for fast filament loading
  34. {% set purge_speed = params.PURGE_SPEED|default(300) %} # Speed in mm/min for purging filament
  35. {% set target_temp = params.TARGET_TEMP|default(nozzle_preheat_temp) %} # Target temperature for the nozzle
  36. {% set min_temp = params.MIN_TEMP|default(180) %} # Minimum safe temperature for extrusion
  37.  
  38. # Save current state of the printer
  39. SAVE_GCODE_STATE NAME=load_state
  40.  
  41. # Heat directly to the target temperature if it's above the minimum temperature
  42. {% if target_temp >= min_temp %}
  43. M104 S{target_temp} ; Set extruder to target temperature
  44. M109 S{target_temp} ; Wait for extruder to reach target temperature
  45. {% else %}
  46. # Heat to minimum temperature first if target is too low
  47. M104 S{min_temp} ; Set extruder to safe minimum temperature
  48. M109 S{min_temp} ; Wait for extruder to reach safe minimum temperature
  49. {% endif %}
  50.  
  51. # Begin filament loading process
  52. G91 ; Set relative positioning for extrusion
  53. G92 E0 ; Reset extruder position
  54. G1 E{load_distance} F{load_speed} ; Load filament at the specified loading speed
  55. G1 E{purge_distance} F{purge_speed} ; Purge filament at the slower purging speed
  56.  
  57. # Optionally turn off the extruder heater after loading
  58. {% if turn_off_extruder %}
  59. M104 S0 ; Turn off extruder heater
  60. {% endif %}
  61.  
  62. # Restore previous state of the printer
  63. G90 ; Restore absolute positioning
  64. RESTORE_GCODE_STATE NAME=load_state
  65.  
  66. # Completion message
  67. M117 Filament load complete
  68.  
  69. [gcode_macro UNLOAD_FILAMENT]
  70. variable_unload_distance: 100 # Distance to retract filament from the extruder
  71. variable_nozzle_preheat_temp: 195 # Default preheat temperature for unloading
  72. variable_turn_off_extruder: True # Option to turn off the extruder after unloading (True/False)
  73. gcode:
  74. # Parameters and settings
  75. {% set retract_speed = params.RETRACT_SPEED|default(600) %} # Speed for retracting filament
  76. {% set target_temp = params.TARGET_TEMP|default(nozzle_preheat_temp) %} # Target temperature for the nozzle
  77. {% set min_temp = params.MIN_TEMP|default(180) %} # Minimum safe temperature for extrusion
  78.  
  79. # Save current state of the printer
  80. SAVE_GCODE_STATE NAME=unload_state
  81.  
  82. # Heat the nozzle to the target temperature if required
  83. {% if printer.extruder.temperature < target_temp %}
  84. # Ensure the nozzle is heated to the target temperature or at least the minimum safe temperature
  85. {% if target_temp >= min_temp %}
  86. M104 S{target_temp} ; Set extruder to target temperature
  87. M109 S{target_temp} ; Wait for extruder to reach target temperature
  88. {% else %}
  89. M104 S{min_temp} ; Set extruder to safe minimum temperature
  90. M109 S{min_temp} ; Wait for extruder to reach safe minimum temperature
  91. {% endif %}
  92. {% endif %}
  93.  
  94. # Begin filament unloading process
  95. G91 ; Set relative positioning for extrusion
  96. G92 E0 ; Reset extruder position
  97. G1 E-{unload_distance} F{retract_speed} ; Retract filament at the specified speed
  98.  
  99. # Optionally turn off the extruder heater after unloading
  100. {% if turn_off_extruder %}
  101. M104 S0 ; Turn off extruder heater
  102. {% endif %}
  103.  
  104. # Restore previous state of the printer
  105. G90 ; Restore absolute positioning
  106. RESTORE_GCODE_STATE NAME=unload_state
  107.  
  108. # Completion message
  109. M117 Filament unload complete
  110. [pause_resume]
  111.  
  112. [display_status]
  113.  
  114. # [adxl345]
  115. # cs_pin: MCU:None
  116. # spi_Bus: sidev1.1
  117. # axes_ma: x,y,z
  118.  
  119. # [resonance_tester]
  120. # accel_chip: aadxl345
  121. # probe_points: 0,0,0
  122.  
  123. [gcode_macro CANCEL_PRINT]
  124. description: Cancel the actual running print
  125. rename_existing: CANCEL_PRINT_BASE
  126. gcode:
  127. TURN_OFF_HEATERS
  128. CANCEL_PRINT_BASE
  129.  
  130. [gcode_macro PAUSE]
  131. description: Pause the actual running print
  132. rename_existing: PAUSE_BASE
  133. # change this if you need more or less extrusion
  134. variable_extrude: 1.0
  135. gcode:
  136. ##### read E from pause macro #####
  137. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  138. ##### set park positon for x and y #####
  139. # default is your max posion from your printer.cfg
  140. {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
  141. {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
  142. ##### calculate save lift position #####
  143. {% set max_z = printer.toolhead.axis_maximum.z|float %}
  144. {% set act_z = printer.toolhead.position.z|float %}
  145. {% if act_z < (max_z - 2.0) %}
  146. {% set z_safe = 2.0 %}
  147. {% else %}
  148. {% set z_safe = max_z - act_z %}
  149. {% endif %}
  150. ##### end of definitions #####
  151. PAUSE_BASE
  152. G91
  153. {% if printer.extruder.can_extrude|lower == 'true' %}
  154. G1 E-{E} F2100
  155. {% else %}
  156. {action_respond_info("Extruder not hot enough")}
  157. {% endif %}
  158. {% if "xyz" in printer.toolhead.homed_axes %}
  159. G1 Z{z_safe} F900
  160. G90
  161. G1 X{x_park} Y{y_park} F6000
  162. {% else %}
  163. {action_respond_info("Printer not homed")}
  164. {% endif %}
  165.  
  166. [gcode_macro RESUME]
  167. description: Resume the actual running print
  168. rename_existing: RESUME_BASE
  169. gcode:
  170. ##### read E from pause macro #####
  171. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  172. #### get VELOCITY parameter if specified ####
  173. {% if 'VELOCITY' in params|upper %}
  174. {% set get_params = ('VELOCITY=' + params.VELOCITY) %}
  175. {%else %}
  176. {% set get_params = "" %}
  177. {% endif %}
  178. ##### end of definitions #####
  179. {% if printer.extruder.can_extrude|lower == 'true' %}
  180. G91
  181. G1 E{E} F2100
  182. {% else %}
  183. {action_respond_info("Extruder not hot enough")}
  184. {% endif %}
  185. RESUME_BASE {get_params}
  186.  
  187. [mcu]
  188. serial: /dev/ttyUSB0
  189. # serial: /tmp/klipper_host_mcu
  190. restart_method: command
  191.  
  192. [led LED_Light]
  193. white_pin: PB9
  194. initial_white: 1.0
  195.  
  196. #[output_pin LED_Light] #toggle for LED Light - use this instead of [LED] for sonic pad
  197. #Pin: PB9
  198. #cycle_time: 0.01
  199. #pwm: true
  200. #value: 1
  201.  
  202. [printer]
  203. kinematics: cartesian
  204. max_velocity: 500
  205. max_accel: 3000
  206. max_z_velocity: 15
  207. max_z_accel: 100
  208. square_corner_velocity: 5
  209. # Use those higher values just to configure Input Shaper
  210. #max_accel: 10000
  211. #max_accel_to_decel: 10000
  212.  
  213. [stepper_x]
  214. step_pin: !PC12
  215. dir_pin: PB3
  216. enable_pin: !PD2
  217. microsteps: 16
  218. rotation_distance: 40
  219. endstop_pin: PA13
  220. position_endstop: -6.0
  221. position_min: -6
  222. position_max: 235
  223. homing_speed: 50
  224.  
  225. [stepper_y]
  226. step_pin: PC11
  227. dir_pin: PA15
  228. enable_pin: !PC10
  229. microsteps: 16
  230. rotation_distance: 40
  231. endstop_pin: PB8
  232. position_endstop: 0
  233. position_max: 235
  234. homing_speed: 50
  235.  
  236. [stepper_z]
  237. step_pin: PC7
  238. dir_pin: !PC9
  239. enable_pin: !PC8
  240. rotation_distance: 8
  241. microsteps: 16
  242. position_min: -2
  243. position_max: 280
  244. endstop_pin: probe:z_virtual_endstop # Use Z- as endstop
  245. homing_speed: 5.0
  246.  
  247.  
  248. [extruder]
  249. max_extrude_only_distance: 100.0
  250. step_pin: PB10
  251. dir_pin: PB1
  252. enable_pin: !PC6
  253. microsteps: 16
  254. nozzle_diameter: 0.400
  255. filament_diameter: 1.750
  256. heater_pin: PA6
  257. sensor_type: EPCOS 100K B57560G104F
  258. sensor_pin: PC1
  259. min_temp: 0
  260. max_temp: 250
  261. # Calibrate E-Steps https://www.klipper3d.org/Rotation_Distance.html#calibrating-rotation_distance-on-extruders
  262. rotation_distance: 6.9
  263. # Calibrate PID: https://www.klipper3d.org/Config_checks.html#calibrate-pid-settings
  264. # - Example: PID_CALIBRATE HEATER=extruder TARGET=200
  265. control = pid
  266. pid_kp = 30.356
  267. pid_ki = 1.857
  268. pid_kd = 124.081
  269. # Calibrate PA: https://www.klipper3d.org/Pressure_Advance.html
  270. #pressure_advance = 0.600
  271.  
  272. [heater_bed]
  273. heater_pin: PA5
  274. sensor_type: EPCOS 100K B57560G104F
  275. sensor_pin: PC0
  276. pwm_cycle_time: 0.020 # set to 0.0166 if your grid runs on 60Hz to fix lights flickering
  277. max_temp: 110
  278. min_temp: 0
  279. # Calibrate PID: https://www.klipper3d.org/Config_checks.html#calibrate-pid-settings
  280. # - Example: PID_CALIBRATE HEATER=heater_bed TARGET=60
  281. control = pid
  282. pid_kp = 64.230
  283. pid_ki = 0.723
  284. pid_kd = 1425.905
  285.  
  286. [heater_fan hotend_fan]
  287. pin: PB0
  288. heater: extruder
  289. heater_temp: 50.0
  290.  
  291. [fan]
  292. pin: PA7
  293.  
  294. [force_move]
  295. enable_force_move: True
  296.  
  297. [safe_z_home]
  298. home_xy_position: 117.5, 117.5
  299. z_hop: 10
  300.  
  301. [probe]
  302. pin: ^PA8
  303. speed: 5
  304. lift_speed: 15
  305. samples: 1
  306. x_offset: -28
  307. y_offset: 20
  308. # Calibrate probe: https://www.klipper3d.org/Bed_Level.html
  309. # - Example: PROBE_CALIBRATE, then adjust with TESTZ Z=+/-X
  310. #z_offset = -0.010
  311.  
  312. [filament_switch_sensor filament_sensor]
  313. pause_on_runout: true
  314. switch_pin: PB4
  315.  
  316. [bed_mesh]
  317. speed: 300
  318. horizontal_move_z: 5.0
  319. mesh_min: 30,30
  320. mesh_max: 205,205
  321. probe_count: 6,6
  322. algorithm: bicubic
  323. fade_start: 1
  324. fade_end: 10
  325. fade_target: 0
  326.  
  327. [input_shaper]
  328. # Calibrate IS: https://www.klipper3d.org/Resonance_Compensation.html
  329. shaper_type_y = mzv
  330. shaper_freq_y = 38.2
  331. shaper_type_x = ei
  332. shaper_freq_x = 79.6
  333.  
  334. [temperature_sensor raspberry_pi]
  335. sensor_type: temperature_host
  336. #min_temp: 10
  337. #max_temp: 105
  338.  
  339. [temperature_sensor mcu_temp]
  340. sensor_type: temperature_mcu
  341. sensor_temperature1: 25
  342. sensor_adc1: 0.210317
  343. #min_temp: 0
  344. #max_temp: 105
  345.  
  346. [gcode_macro M420]
  347. description: Load the current mesh
  348. gcode:
  349. BED_MESH_PROFILE LOAD=default
  350.  
  351. [gcode_macro G29]
  352. description: creates automated homing and bed mesh
  353. gcode:
  354. G28
  355. BED_MESH_CALIBRATE
  356. DATA_SAVE
  357.  
  358. #*# <---------------------- SAVE_CONFIG ---------------------->
  359. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  360. #*#
  361. #*# [probe]
  362. #*# z_offset = 1.685
  363. #*#
  364. #*# [bed_mesh default]
  365. #*# version = 1
  366. #*# points =
  367. #*# 0.280000, 0.372500, 0.345000, 0.342500, 0.257500, 0.230000
  368. #*# 0.225000, 0.280000, 0.242500, 0.252500, 0.185000, 0.165000
  369. #*# 0.177500, 0.187500, 0.117500, 0.122500, 0.050000, 0.040000
  370. #*# 0.097500, 0.100000, 0.025000, 0.035000, -0.012500, 0.000000
  371. #*# -0.007500, -0.025000, -0.110000, -0.087500, -0.117500, -0.087500
  372. #*# -0.117500, -0.152500, -0.222500, -0.192500, -0.202500, -0.170000
  373. #*# tension = 0.2
  374. #*# min_x = 30.0
  375. #*# algo = bicubic
  376. #*# y_count = 6
  377. #*# mesh_y_pps = 2
  378. #*# min_y = 30.0
  379. #*# x_count = 6
  380. #*# max_y = 205.0
  381. #*# mesh_x_pps = 2
  382. #*# max_x = 205.0
  383.  
Tags: Neptune
Advertisement
Add Comment
Please, Sign In to add comment