rafaeltuneca

Untitled

Jul 25th, 2023
799
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.17 KB | None | 0 0
  1. # !Ender-3 Pro
  2. # printer_size: 220x220x250
  3. # version: 3.5
  4. # This file contains pin mappings for the stock 2020 Creality Ender-3 V2
  5. # To use this config, during "make menuconfig" select the
  6. # STM32F103 with a "28KiB bootloader" and serial (on USART1 PA10/PA9)
  7. # communication.
  8.  
  9. # If you prefer a direct serial connection, in "make menuconfig"
  10. # select "Enable extra low-level configuration options" and select
  11. # serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC
  12. # cable used for the LCD module as follows:
  13. # 3: Tx, 4: Rx, 9: GND, 10: VCC
  14.  
  15. # Flash this firmware by copying "out/klipper.bin" to a SD card and
  16. # turning on the printer with the card inserted. The firmware
  17. # filename must end in ".bin" and must not match the last filename
  18. # that was flashed.
  19.  
  20. # See docs/Config_Reference.md for a description of parameters.
  21.  
  22. ###fluidd set
  23. [virtual_sdcard]
  24. path: ~/gcode_files
  25.  
  26. [display_status]
  27.  
  28. [pause_resume]
  29.  
  30. [gcode_macro START_PRINT]
  31. gcode:
  32. {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
  33. {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
  34. # Start bed heating
  35. M140 S{BED_TEMP}
  36. # Use absolute coordinates
  37. G90
  38. # Reset the G-Code Z offset (adjust Z offset if needed)
  39. SET_GCODE_OFFSET Z=0.0
  40. # Home the printer
  41. G28
  42. # Move the nozzle near the bed
  43. G1 Z5 F3000
  44. # Move the nozzle very close to the bed
  45. G1 Z0.15 F300
  46. # Wait for bed to reach temperature
  47. M190 S{BED_TEMP}
  48. # Set and wait for nozzle to reach temperature
  49. M109 S{EXTRUDER_TEMP}
  50.  
  51. [gcode_macro END_PRINT]
  52. gcode:
  53. # Turn off bed, extruder, and fan
  54. M140 S0
  55. M104 S0
  56. M106 S0
  57. # Move nozzle away from print while retracting
  58. G91
  59. G1 X-2 Y-2 E-3 F300
  60. # Raise nozzle by 10mm
  61. G1 Z10 F3000
  62. G90
  63. # Disable steppers
  64. M84
  65.  
  66. [gcode_macro PAUSE]
  67. description: Pause the actual running print
  68. rename_existing: PAUSE_BASE
  69. # change this if you need more or less extrusion
  70. variable_extrude: 1.0
  71. gcode:
  72. ##### read E from pause macro #####
  73. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  74. ##### set park positon for x and y #####
  75. # default is your max posion from your printer.cfg
  76. {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
  77. {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
  78. ##### calculate save lift position #####
  79. {% set max_z = printer.toolhead.axis_maximum.z|float %}
  80. {% set act_z = printer.toolhead.position.z|float %}
  81. {% if act_z < (max_z - 2.0) %}
  82. {% set z_safe = 2.0 %}
  83. {% else %}
  84. {% set z_safe = max_z - act_z %}
  85. {% endif %}
  86. ##### end of definitions #####
  87. PAUSE_BASE
  88. G91
  89. {% if printer.extruder.can_extrude|lower == 'true' %}
  90. G1 E-{E} F2100
  91. {% else %}
  92. {action_respond_info("Extruder not hot enough")}
  93. {% endif %}
  94. {% if "xyz" in printer.toolhead.homed_axes %}
  95. G1 Z{z_safe} F900
  96. G90
  97. G1 X{x_park} Y{y_park} F6000
  98. {% else %}
  99. {action_respond_info("Printer not homed")}
  100. {% endif %}
  101.  
  102.  
  103. [gcode_macro RESUME]
  104. description: Resume the actual running print
  105. rename_existing: RESUME_BASE
  106. gcode:
  107. ##### read E from pause macro #####
  108. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  109. #### get VELOCITY parameter if specified ####
  110. {% if 'VELOCITY' in params|upper %}
  111. {% set get_params = ('VELOCITY=' + params.VELOCITY) %}
  112. {%else %}
  113. {% set get_params = "" %}
  114. {% endif %}
  115. ##### end of definitions #####
  116. {% if printer.extruder.can_extrude|lower == 'true' %}
  117. G91
  118. G1 E{E} F2100
  119. {% else %}
  120. {action_respond_info("Extruder not hot enough")}
  121. {% endif %}
  122. RESUME_BASE {get_params}
  123.  
  124. [gcode_macro CANCEL_PRINT]
  125. description: Cancel the actual running print
  126. rename_existing: CANCEL_PRINT_BASE
  127. gcode:
  128. TURN_OFF_HEATERS
  129. {% if "xyz" in printer.toolhead.homed_axes %}
  130. G91
  131. G1 Z4.5 F300
  132. G90
  133. {% else %}
  134. {action_respond_info("Printer not homed")}
  135. {% endif %}
  136. G28 X Y
  137. {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
  138. G1 Y{y_park} F2000
  139. M84
  140. CANCEL_PRINT_BASE
  141.  
  142.  
  143. [stepper_x]
  144. step_pin: PB9
  145. dir_pin: PC2
  146. enable_pin: !PC3
  147. microsteps: 16
  148. rotation_distance: 40
  149. endstop_pin: ^PA5
  150. position_endstop: 0
  151. position_max: 225
  152. homing_speed: 80
  153.  
  154. [stepper_y]
  155. step_pin: PB7
  156. dir_pin: PB8
  157. enable_pin: !PC3
  158. microsteps: 16
  159. rotation_distance: 40
  160. endstop_pin: ^PA6
  161. position_min: -5
  162. position_endstop: -2
  163. position_max: 225
  164. homing_speed: 80
  165.  
  166. [stepper_z]
  167. step_pin: PB5
  168. dir_pin: !PB6
  169. enable_pin: !PC3
  170. microsteps: 16
  171. rotation_distance: 8
  172. # endstop_pin: probe:z_virtual_endstop #enable to use bltouch
  173. endstop_pin: ^PA7 #disable to use bltouch
  174. position_endstop: 0.0 #disable to use bltouch
  175. position_max: 255
  176.  
  177. [extruder]
  178. #step_pin: PB4
  179. #dir_pin: PB3
  180. step_pin: PB3
  181. dir_pin: PB4
  182. enable_pin: !PC3
  183. microsteps: 16
  184. gear_ratio: 42:12
  185. rotation_distance: 26.359
  186. nozzle_diameter: 0.400
  187. filament_diameter: 1.750
  188. heater_pin: PA1
  189. sensor_type: EPCOS 100K B57560G104F
  190. sensor_pin: PC5
  191. control: pid
  192. pid_Kp: 23.561
  193. pid_Ki: 1.208
  194. pid_Kd: 114.859
  195. min_temp: 0
  196. max_temp: 300
  197.  
  198. [idle_timeout]
  199. timeout: 172800
  200.  
  201. [verify_heater extruder]
  202. check_gain_time: 200
  203. hysteresis: 5
  204.  
  205. [heater_bed]
  206. heater_pin: PA2
  207. sensor_type: EPCOS 100K B57560G104F
  208. sensor_pin: PC4
  209. control: pid
  210. # tuned for stock hardware with 50 degree Celsius target
  211. pid_Kp: 67.104
  212. pid_Ki: 0.544
  213. pid_Kd: 2068.466
  214. min_temp: 0
  215. max_temp: 130
  216.  
  217. [fan]
  218. pin: PA0
  219.  
  220. [fan_generic extruder_partfan]
  221. # pin: PB15
  222. pin: PC6
  223. #max_power:
  224. #shutdown_speed:
  225. #cycle_time:
  226. #hardware_pwm:
  227. #kick_start_time:
  228. #off_below:
  229. #tachometer_pin:
  230. #tachometer_ppr:
  231. #tachometer_poll_interval:
  232. # See the "fan" section for a description of the above parameters.
  233. #heater: extruder
  234. # Name of the config section defining the heater that this fan is
  235. # associated with. If a comma separated list of heater names is
  236. # provided here, then the fan will be enabled when any of the given
  237. # heaters are enabled. The default is "extruder".
  238. #heater_temp: 50.0
  239. # A temperature (in Celsius) that the heater must drop below before
  240. # the fan is disabled. The default is 50 Celsius.
  241. #fan_speed: 1.0
  242. # The fan speed (expressed as a value from 0.0 to 1.0) that the fan
  243. # will be set to when its associated heater is enabled. The default
  244. # is 1.0
  245.  
  246.  
  247. [heater_fan heater_partfan]
  248. pin: PB14
  249. #max_power:
  250. #shutdown_speed:
  251. #cycle_time:
  252. #hardware_pwm:
  253. #kick_start_time:
  254. #off_below:
  255. #tachometer_pin:
  256. #tachometer_ppr:
  257. #tachometer_poll_interval:
  258. # See the "fan" section for a description of the above parameters.
  259. #heater: extruder
  260. # Name of the config section defining the heater that this fan is
  261. # associated with. If a comma separated list of heater names is
  262. # provided here, then the fan will be enabled when any of the given
  263. # heaters are enabled. The default is "extruder".
  264. #heater_temp: 50.0
  265. # A temperature (in Celsius) that the heater must drop below before
  266. # the fan is disabled. The default is 50 Celsius.
  267. #fan_speed: 1.0
  268. # The fan speed (expressed as a value from 0.0 to 1.0) that the fan
  269. # will be set to when its associated heater is enabled. The default
  270. # is 1.0
  271.  
  272. [mcu]
  273. serial: /dev/serial/by-id/usb_serial_1
  274. restart_method: command
  275.  
  276. [printer]
  277. kinematics: cartesian
  278. max_velocity: 300
  279. max_accel: 5000
  280. # max_accel_to_decel: 7000
  281. max_z_velocity: 5
  282. square_corner_velocity: 5.0
  283. max_z_accel: 100
  284.  
  285. [exclude_object]
  286.  
  287. # [mcu rpi]
  288. # serial: /tmp/klipper_host_mcu
  289.  
  290. # [adxl345]
  291. # cs_pin: rpi:None
  292. # spi_speed: 2000000
  293. # spi_bus: spidev2.0
  294.  
  295. # [resonance_tester]
  296. # accel_chip: adxl345
  297. # accel_per_hz: 70
  298. # probe_points:
  299. # 117.5,117.5,10
  300.  
  301. [input_shaper]
  302. shaper_type_x = mzv
  303. shaper_freq_x = 89.8
  304. shaper_type_y = mzv
  305. shaper_freq_y = 35.2
  306.  
  307. [bltouch]
  308. sensor_pin: ^PB1
  309. control_pin: PB0
  310. x_offset: -31.8
  311. y_offset: -40.5
  312. z_offset: 2.6
  313. probe_with_touch_mode: true
  314. stow_on_each_sample: false
  315.  
  316. # [safe_z_home]
  317. # home_xy_position: 100,100 # Change coordinates to the center of your print bed
  318. # speed: 80
  319. # z_hop: 10 # Move up 10mm
  320. # z_hop_speed: 10
  321.  
  322. # [bed_mesh]
  323. # speed:80
  324. # horizontal_move_z: 5
  325. # mesh_min: 83,30
  326. # mesh_max: 235,215
  327. # probe_count: 5,5
  328. # algorithm: bicubic
  329.  
  330. [bed_screws]
  331. screw1:30,25
  332. screw1_name:1
  333. screw2:200,25
  334. screw2_name:2
  335. screw3:200,195
  336. screw3_name:3
  337. screw4:30,195
  338. screw4_name:4
  339.  
  340.  
  341. [include timelapse.cfg]
  342.  
  343. [gcode_macro G29] #界面中增加G29指令
  344. gcode:
  345. G28
  346. bed_mesh_calibrate
  347. G1 X0 Y0 Z10 F4200
  348. # save_config
  349.  
  350. [gcode_arcs]
  351. resolution: 1.0
  352.  
  353.  
  354. [gcode_macro BED_LEVEL]
  355. gcode:
  356. G28
  357. BED_MESH_CALIBRATE
  358.  
  359.  
  360. [gcode_macro Z_AXI_CALIBRATE]
  361. gcode:
  362. G28
  363. PROBE_CALIBRATE
  364.  
  365. [gcode_macro SHAPER]
  366. gcode:
  367. G28
  368. SHAPER_CALIBRATE
  369.  
  370. [gcode_macro PID]
  371. gcode:
  372. G28
  373. PID_CALIBRATE HEATER=extruder TARGET=200
  374. PID_CALIBRATE HEATER=heater_bed TARGET=60
  375.  
  376. [gcode_macro Press_Advance_short]
  377. gcode:
  378. SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500
  379. TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.005
  380.  
  381. [gcode_macro Press_Advance_long]
  382. gcode:
  383. SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=1 ACCEL=500
  384. TUNING_TOWER COMMAND=SET_PRESSURE_ADVANCE PARAMETER=ADVANCE START=0 FACTOR=.020
  385.  
  386.  
  387.  
Tags: ender3pro
Advertisement
Add Comment
Please, Sign In to add comment