Advertisement
khisanthax

ender3s1

Dec 16th, 2024
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.30 KB | Software | 0 0
  1. # This file contains pin mappings for the stock 2021 Creality Ender 3
  2. [include kpr-config/logger.cfg]
  3. [include kpr-config/edit_file.cfg]
  4. # S1 & S1 Pro. To use this config, check the STM32 Chip on the
  5. # Mainboard, during "make menuconfig" select accordingly either the
  6. # STM32F103 with "28KiB bootloader" or the STM32F401 with
  7. # "64KiB bootloader" and serial (on USART1 PA10/PA9) for both.
  8.  
  9. # For a direct serial connection, in "make menuconfig" select
  10. # "Enable extra low-level configuration options" and Serial
  11. # (on USART2 PA3/PA2), which is on the 10 pin IDC cable used
  12. # for the LCD module as follows: 3: Tx, 4: Rx, 9: GND, 10: VCC
  13.  
  14. # Flash this firmware by copying "out/klipper.bin" to a SD card and
  15. # turning on the printer with the card inserted. The filename
  16. # must be changed to "firmware.bin"
  17.  
  18. # With STM32F401, you might need to put "firmware.bin" in a
  19. # folder on the SD card called "STM32F4_UPDATE" in order to flash.
  20.  
  21. # See docs/Config_Reference.md for a description of parameters.
  22. [include mainsail.cfg]
  23. [include shell_command.cfg]
  24. #[include usbadxl345.cfg]
  25. [virtual_sdcard]
  26. path: /home/khisanthax/printer_Ender5Plus_data/gcodes
  27. on_error_gcode: CANCEL_PRINT
  28. [mcu]
  29. serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
  30. restart_method: command
  31. # !Ender-3 S1
  32. # printer_size: 220x220x270
  33. # version: 3.6
  34. # Motherboard (Late 2020/2021) as the heater pins changed.
  35. # To use this config, during "make menuconfig" select the STM32F401
  36. # with a "64KiB bootloader" and serial (on USART1 PA10/PA9)
  37. # communication.
  38.  
  39. # Flash this firmware by copying "out/klipper.bin" to a SD card and
  40. # turning on the printer with the card inserted. The firmware
  41. # filename must end in ".bin" and must not match the last filename
  42. # that was flashed.
  43.  
  44. # See docs/Config_Reference.md for a description of parameters.
  45.  
  46. ###fluidd set
  47.  
  48. [display_status]
  49.  
  50. [pause_resume]
  51.  
  52. [gcode_macro PAUSE]
  53. description: Pause the actual running print
  54. rename_existing: PAUSE_BASE
  55. # change this if you need more or less extrusion
  56. variable_extrude: 1.0
  57. gcode:
  58. ##### read E from pause macro #####
  59. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  60. ##### set park positon for x and y #####
  61. # default is your max posion from your printer.cfg
  62. {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
  63. {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
  64. ##### calculate save lift position #####
  65. {% set max_z = printer.toolhead.axis_maximum.z|float %}
  66. {% set act_z = printer.toolhead.position.z|float %}
  67. {% if act_z < (max_z - 2.0) %}
  68. {% set z_safe = 2.0 %}
  69. {% else %}
  70. {% set z_safe = max_z - act_z %}
  71. {% endif %}
  72. ##### end of definitions #####
  73. PAUSE_BASE
  74. G91
  75. {% if printer.extruder.can_extrude|lower == 'true' %}
  76. G1 E-{E} F2100
  77. {% else %}
  78. {action_respond_info("Extruder not hot enough")}
  79. {% endif %}
  80. {% if "xyz" in printer.toolhead.homed_axes %}
  81. G1 Z{z_safe} F900
  82. G90
  83. G1 X{x_park} Y{y_park} F6000
  84. {% else %}
  85. {action_respond_info("Printer not homed")}
  86. {% endif %}
  87.  
  88. [gcode_macro RESUME]
  89. description: Resume the actual running print
  90. rename_existing: RESUME_BASE
  91. gcode:
  92. ##### read E from pause macro #####
  93. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  94. #### get VELOCITY parameter if specified ####
  95. {% if 'VELOCITY' in params|upper %}
  96. {% set get_params = ('VELOCITY=' + params.VELOCITY) %}
  97. {%else %}
  98. {% set get_params = "" %}
  99. {% endif %}
  100. ##### end of definitions #####
  101. {% if printer.extruder.can_extrude|lower == 'true' %}
  102. G91
  103. G1 E{E} F2100
  104. {% else %}
  105. {action_respond_info("Extruder not hot enough")}
  106. {% endif %}
  107. RESUME_BASE {get_params}
  108.  
  109. [gcode_macro CANCEL_PRINT]
  110. description: Cancel the actual running print
  111. rename_existing: CANCEL_PRINT_BASE
  112. gcode:
  113. TURN_OFF_HEATERS
  114. {% if "xyz" in printer.toolhead.homed_axes %}
  115. G91
  116. G1 Z4.5 F300
  117. G90
  118. {% else %}
  119. {action_respond_info("Printer not homed")}
  120. {% endif %}
  121. G28 X Y
  122. {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
  123. G1 Y{y_park} F2000
  124. M84
  125. CANCEL_PRINT_BASE
  126.  
  127. [gcode_macro G29]
  128. gcode:
  129. g28
  130. bed_mesh_calibrate adaptive=1
  131. G1 X0 Y0 Z10 F4200
  132.  
  133. [gcode_macro M600]
  134. description: Starts process of Filament Change
  135. gcode:
  136. {% if printer.extruder.temperature < 180 %}
  137. {action_respond_info("Extruder temperature too low")}
  138. {% else %}
  139. PAUSE_MACRO
  140. _DISABLE_FS
  141. UNLOAD_FILAMENT
  142. {% endif %}
  143.  
  144. [gcode_macro PAUSE_MACRO]
  145. description: Pauses Print
  146. gcode:
  147. PAUSE
  148. SET_IDLE_TIMEOUT TIMEOUT={ 30 * 60 }
  149.  
  150. [gcode_macro FC_RESUME]
  151. description: Resume print after Filament Change
  152. gcode:
  153. ##### read E from pause macro #####
  154. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  155. SET_IDLE_TIMEOUT TIMEOUT={ 10 * 60 }
  156. G1 E-{ E }
  157. # Reset extruder position
  158. G92 E0
  159. RESUME
  160.  
  161. [gcode_macro UNLOAD_FILAMENT]
  162. description: Unloads Filament from extruder
  163. gcode:
  164. {% if printer.extruder.temperature < 180 %}
  165. {action_respond_info("Extruder temperature too low")}
  166. {% else %}
  167. SAVE_GCODE_STATE NAME=UNLOAD_state
  168. {% set z_lift = params.z_lift|default(50)|int %}
  169. {% set axis_max = printer.toolhead.axis_maximum %}
  170. {% set pos = printer.toolhead.position %}
  171.  
  172. {% set z_diff = axis_max.z - pos.z %}
  173. {% set z_safe_lift = [ z_lift, z_diff ] | min%}
  174.  
  175. G91 # relative positioning
  176. G0 Z{ z_safe_lift }
  177. # Reset extruder position
  178. G92 E0
  179. G1 E5.0 F300 # extrude a little
  180. G1 E-50 F{ 10 * 60 } # perform the unload
  181. G1 E-50 F{ 5 * 60 } # finish the unload
  182. RESTORE_GCODE_STATE NAME=UNLOAD_state
  183. {% endif %}
  184.  
  185. [gcode_macro PURGE]
  186. description: Extrudes filament, used to clean out previous filament
  187. gcode:
  188. {% if printer.extruder.temperature < 180 %}
  189. {action_respond_info("Extruder temperature too low")}
  190. {% else %}
  191. SAVE_GCODE_STATE NAME=PURGE_state
  192. G91 # relative coords
  193. G1 E45.0 F{ 5 * 60 } # purge
  194. RESTORE_GCODE_STATE NAME=PURGE_state
  195. {% endif %}
  196.  
  197. [gcode_macro LOAD_FILAMENT]
  198. description: Loads filament into the extruder
  199. gcode:
  200. {% if printer.extruder.temperature < 180 %}
  201. {action_respond_info("Extruder temperature too low")}
  202. {% else %}
  203. SAVE_GCODE_STATE NAME=LOAD_state
  204. G91 # Relative coords
  205. G1 E50 F{ 5 * 60 } # extrude
  206. G4 P{ 0.9 * 1000 } # dwell (ms)
  207. G1 E25.0 F{ 5 * 60 } # extrude a little more
  208. _ENABLE_FS
  209. RESTORE_GCODE_STATE NAME=LOAD_state
  210. {% endif %}
  211.  
  212. [gcode_macro _DISABLE_FS]
  213. description: placeholder, disables filament sensor that might trigger an M600 in the middle of a load/unload/M600...
  214. gcode:
  215. SET_FILAMENT_SENSOR SENSOR=RunoutSensor ENABLE=0
  216.  
  217. [gcode_macro _ENABLE_FS]
  218. description: placeholder, enables filament sensor
  219. gcode:
  220. SET_FILAMENT_SENSOR SENSOR=RunoutSensor ENABLE=1
  221.  
  222. [gcode_macro HEAT]
  223. description: Heats up the extruder to get ready for Filament Change
  224. gcode:
  225. SET_HEATER_TEMPERATURE HEATER=extruder TARGET=200
  226. HOME_CHECK
  227. G1 Z10 F3000
  228.  
  229. [gcode_macro COOL]
  230. description: Turns off all heaters
  231. gcode:
  232. TURN_OFF_HEATERS
  233.  
  234. [gcode_macro BED_TRAMMING_1]
  235. description: Heats bed and starts process to level the bed with the screws
  236. gcode:
  237. M140 S60
  238. HOME_CHECK
  239. M190 S60
  240. SCREWS_TILT_CALCULATE
  241.  
  242. [gcode_macro BED_TRAMMING_2]
  243. description: Continues the bed screw leveling process
  244. gcode:
  245. SCREWS_TILT_CALCULATE
  246.  
  247. [gcode_macro BED_MESH]
  248. description: Heats bed, makes a mesh and saves it
  249. gcode:
  250. M140 S60
  251. HOME_CHECK
  252. M190 S60
  253. BED_MESH_CLEAR
  254. BED_MESH_CALIBRATE
  255. TURN_OFF_HEATERS
  256. SAVE_CONFIG
  257.  
  258. [gcode_macro DISABLE_STEPPERS]
  259. description: Disables the printers stepper motors
  260. gcode:
  261. M84 X Y E
  262.  
  263. [gcode_macro PID_EXTRUDER]
  264. description: PID Tune for the Extruder
  265. gcode:
  266. PID_CALIBRATE HEATER=extruder TARGET=200
  267. TURN_OFF_HEATERS
  268. SAVE_CONFIG
  269.  
  270. [gcode_macro PID_BED]
  271. description: PID Tune for the Bed
  272. gcode:
  273. PID_CALIBRATE HEATER=heater_bed TARGET=60
  274. TURN_OFF_HEATERS
  275. SAVE_CONFIG
  276.  
  277. [gcode_macro NOZZLE_MID]
  278. description: Moves nozzle to the center of the bed
  279. gcode:
  280. HOME_CHECK
  281. G1 X110 Y110 Z10 F6000
  282.  
  283. [gcode_macro home_check]
  284. description: Checks if the printer is homed, it not it homes the printer
  285. gcode:
  286. {% if printer.toolhead.homed_axes != "xyz" %}
  287. G28
  288. {% endif %}
  289.  
  290. [gcode_macro SHOW_PRINT]
  291. description: Moves the extruder out of the way and bed forward
  292. gcode:
  293. HOME_CHECK
  294. {% set z_lift = params.z_lift|default(50)|int %}
  295. {% set axis_max = printer.toolhead.axis_maximum %}
  296. {% set pos = printer.toolhead.position %}
  297.  
  298. {% set z_diff = axis_max.z - pos.z %}
  299. {% set z_safe_lift = [ z_lift, z_diff ] | min%}
  300. G1 Z{ z_safe_lift }
  301. G1 X10 Y220 F4000
  302.  
  303. [gcode_macro ZOffset_Setup]
  304. description: Starts Z-Offset Calibration, under 30 degrees Celsius
  305. gcode:
  306. {% if printer.heater_bed.temperature > 30 %}
  307. {action_respond_info("Bed temperature too high")}
  308. {% elif printer.extruder.temperature > 30 %}
  309. {action_respond_info("Extruder temperature too High")}
  310. {% else %}
  311. G28
  312. PROBE_CALIBRATE
  313. {% endif %}
  314.  
  315. [gcode_macro Z_Down_01]
  316. description: Moves Z down by 0.1
  317. gcode:
  318. TESTZ Z=-.1
  319.  
  320. [gcode_macro Z_Up_01]
  321. description: Moves Z up by 0.1
  322. gcode:
  323. TESTZ Z=+.1
  324.  
  325. [gcode_macro Z_Low_Half]
  326. description: Sets Z between current value and previous lower value
  327. gcode:
  328. TESTZ Z=-
  329.  
  330. [gcode_macro Z_High_Half]
  331. description: Sets Z between current value and previous higher value
  332. gcode:
  333. TESTZ Z=+
  334.  
  335. [gcode_macro Accept_Save]
  336. description: Accepts the Z-Offset and saves the config
  337. gcode:
  338. ACCEPT
  339. SAVE_CONFIG
  340.  
  341. [gcode_macro Abort_Setup]
  342. description: Aborts the Z-Offset calibration
  343. gcode:
  344. ABORT
  345.  
  346. [screws_tilt_adjust]
  347. horizontal_move_z: 5
  348. screw1: 50,220
  349. screw1_name: Back left
  350. screw2: 228,220
  351. screw2_name: Back Right
  352. screw3: 50,74
  353. screw3_name: Front Left
  354. screw4: 228,74
  355. screw4_name: Front Right
  356.  
  357. [stepper_x]
  358. step_pin: PC2
  359. dir_pin: PB9
  360. enable_pin: !PC3
  361. rotation_distance: 40
  362. microsteps: 16
  363. endstop_pin: !PA5
  364. position_min: -5
  365. position_endstop: -5
  366. position_max: 245
  367. homing_speed: 80
  368.  
  369. [stepper_y]
  370. step_pin: PB8
  371. dir_pin: PB7
  372. enable_pin: !PC3
  373. rotation_distance: 40
  374. microsteps: 16
  375. endstop_pin: !PA6
  376. position_min: -2
  377. position_endstop: -2
  378. position_max: 230
  379. homing_speed: 80
  380.  
  381. [stepper_z]
  382. step_pin: PB6
  383. dir_pin: !PB5
  384. enable_pin: !PC3
  385. rotation_distance: 8
  386. microsteps: 16
  387. endstop_pin: probe:z_virtual_endstop #enable to use bltouch
  388. #endstop_pin: !PA15 #disable to use bltouch
  389. #position_endstop: -0.1
  390. position_min: -10
  391. position_max: 275
  392. homing_speed: 4
  393. second_homing_speed: 1
  394. homing_retract_dist: 2.0
  395.  
  396. [extruder]
  397. gear_ratio: 1:1
  398. max_extrude_only_distance: 1000.0
  399. step_pin: PB4
  400. dir_pin: PB3
  401. enable_pin: !PC3
  402. rotation_distance: 7.5
  403. microsteps: 16
  404. nozzle_diameter: 0.400
  405. filament_diameter: 1.750
  406. heater_pin: PA1
  407. sensor_type: EPCOS 100K B57560G104F
  408. sensor_pin: PC5
  409. control: pid
  410. # tuned for stock hardware with 200 degree Celsius target
  411. pid_Kp: 23.904
  412. pid_Ki: 1.476
  413. pid_Kd: 96.810
  414. min_temp: 0
  415. max_temp: 265
  416. pressure_advance_smooth_time: 0.04
  417. pressure_advance: 0.06
  418.  
  419. [heater_bed]
  420. heater_pin: PA7
  421. sensor_type: EPCOS 100K B57560G104F
  422. sensor_pin: PC4
  423. control: pid
  424. # tuned for stock hardware with 50 degree Celsius target
  425. pid_Kp: 74.000
  426. pid_Ki: 1.965
  427. pid_Kd: 696.525
  428. min_temp: 0
  429. max_temp: 125
  430.  
  431. [idle_timeout]
  432. timeout: 172800
  433.  
  434. [verify_heater extruder]
  435. check_gain_time: 200
  436. hysteresis: 5
  437.  
  438. [fan]
  439. pin: PA0
  440. kick_start_time: 0.5
  441.  
  442. #set heater fan runnig with temperature over 60;
  443. [heater_fan my_nozzle_fan]
  444. pin: PC0
  445. max_power: 0.8
  446. shutdown_speed : 0
  447. heater:extruder
  448. heater_temp : 60
  449. fan_speed : 1.0
  450.  
  451. # [mcu rpi]
  452. # serial: /tmp/klipper_host_mcu
  453.  
  454. # [adxl345]
  455. # cs_pin: rpi:None
  456. # spi_speed: 2000000
  457. # spi_bus: spidev2.0
  458.  
  459. # [resonance_tester]
  460. # accel_chip: adxl345
  461. # accel_per_hz: 70
  462. # probe_points:
  463. # 117.5,117.5,10
  464.  
  465.  
  466. [input_shaper]
  467. #shaper_type_x = mzv
  468. #shaper_freq_x = 56.4
  469. #shaper_type_y = mzv
  470. #shaper_freq_y = 36.2
  471.  
  472. [filament_switch_sensor filament_sensor]
  473. pause_on_runout: true
  474. switch_pin: ^!PC15
  475.  
  476. [bltouch]
  477. sensor_pin: ^PC14 #signal check port ^stand for pull up
  478. control_pin: PC13 #singal control prot
  479. x_offset: -30.0
  480. y_offset: -40.0
  481. #z_offset: 0 #z off_set configuration
  482. speed: 20
  483. stow_on_each_sample = false #high speed for bltoch,
  484. samples: 1
  485. #probe_with_touch_mode = true
  486.  
  487. [safe_z_home]
  488. home_xy_position:145,155
  489. speed: 200
  490. z_hop: 10
  491. z_hop_speed: 10
  492.  
  493. [bed_mesh]
  494. speed: 150
  495. mesh_min: 15,30 #need to handle head distance with bl_touch; default 15,30
  496. mesh_max: 210,190 #max probe range; default 210,190
  497. probe_count: 8,8
  498. mesh_pps: 2,2
  499. #fade_start: 1
  500. #fade_end: 10
  501. #fade_target: 0
  502. algorithm: bicubic
  503. bicubic_tension: 0.2
  504.  
  505. [bed_screws]
  506. screw1: 25, 33
  507. screw2: 202, 33
  508. screw3: 202, 202
  509. screw4: 25, 202
  510.  
  511.  
  512. [gcode_arcs]
  513. #resolution: 1.0
  514.  
  515. [printer]
  516. kinematics: cartesian
  517. max_velocity: 300
  518. max_accel: 8000
  519. max_z_velocity: 10
  520. max_z_accel: 1000
  521. square_corner_velocity: 5.0
  522.  
  523. [exclude_object]
  524.  
  525. [include timelapse.cfg]
  526. #[include cx_gmcro.cfg]
  527.  
  528. #*# <---------------------- SAVE_CONFIG ---------------------->
  529. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  530. #*#
  531. #*# [bltouch]
  532. #*# z_offset =.700
  533. #*#
  534. #*# [bed_mesh default]
  535. #*# version = 1
  536. #*# points =
  537. #*# 0.250000, 0.167500, 0.117500, 0.087500, 0.115000, 0.272500, 0.082500, 0.017500
  538. #*# 0.152500, 0.115000, 0.055000, 0.025000, 0.032500, 0.115000, 0.080000, -0.015000
  539. #*# 0.087500, 0.057500, -0.022500, -0.032500, -0.027500, 0.002500, 0.035000, -0.077500
  540. #*# 0.077500, 0.040000, 0.002500, -0.040000, -0.037500, 0.020000, 0.030000, -0.052500
  541. #*# 0.060000, 0.027500, -0.010000, -0.032500, -0.037500, 0.017500, 0.047500, -0.047500
  542. #*# 0.070000, 0.037500, -0.002500, -0.025000, -0.017500, 0.022500, 0.072500, -0.017500
  543. #*# 0.102500, 0.102500, 0.042500, 0.015000, 0.025000, 0.080000, 0.112500, -0.000000
  544. #*# 0.160000, 0.155000, 0.122500, 0.100000, 0.105000, 0.150000, 0.180000, 0.075000
  545. #*# x_count = 8
  546. #*# y_count = 8
  547. #*# mesh_x_pps = 2
  548. #*# mesh_y_pps = 2
  549. #*# algo = bicubic
  550. #*# tension = 0.2
  551. #*# min_x = 15.0
  552. #*# max_x = 209.95000000000002
  553. #*# min_y = 30.0
  554. #*# max_y = 189.95
  555. #*#
  556. #*# [input_shaper]
  557. #*# shaper_type_x = zv
  558. #*# shaper_freq_x = 60.4
  559. #*# shaper_type_y = ei
  560. #*# shaper_freq_y = 44.2
  561.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement