Advertisement
Fuma83

cr-10s pro v2 config

Feb 17th, 2022
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.72 KB | None | 0 0
  1. # This file contains pin mappings for the Creality CR-10S Pro V2. To use
  2. # this config, the firmware should be compiled for the AVR atmega2560.
  3. [mcu rpi]
  4. serial: /tmp/klipper_host_mcu
  5.  
  6. [input_shaper]
  7. shaper_freq_x: 50
  8. shaper_freq_y: 21
  9. shaper_type: mzv
  10.  
  11. [temperature_sensor raspberry_pi]
  12. sensor_type: temperature_host
  13. min_temp: 10
  14. max_temp: 100
  15.  
  16. [adxl345]
  17. cs_pin: rpi:None
  18.  
  19. [resonance_tester]
  20. accel_chip: adxl345
  21. probe_points:
  22. 150,150,20 #an example
  23.  
  24.  
  25. [virtual_sdcard]
  26. path: ~/gcode_files
  27.  
  28. [display_status]
  29.  
  30. [stepper_x]
  31. step_pin: ar54
  32. dir_pin: ar55
  33. enable_pin: !ar38
  34. rotation_distance: 40
  35. microsteps: 16
  36. full_steps_per_rotation: 200
  37. endstop_pin: ^ar3
  38. position_endstop: -2.5
  39. position_min: -3.3
  40. position_max: 309
  41. homing_speed: 20
  42. homing_retract_dist: 5
  43.  
  44. [stepper_y]
  45. step_pin: ar60
  46. dir_pin: ar61
  47. enable_pin: !ar56
  48. rotation_distance: 40
  49. microsteps: 16
  50. full_steps_per_rotation: 200
  51. endstop_pin: ^ar14
  52. position_endstop: -19.5
  53. position_min: -19.5
  54. position_max: 295
  55. homing_speed: 20
  56. homing_retract_dist: 5
  57.  
  58. [stepper_z]
  59. step_pin: ar46
  60. dir_pin: !ar48
  61. enable_pin: !ar62
  62. rotation_distance: 8
  63. microsteps: 16
  64. full_steps_per_rotation: 200
  65. endstop_pin: probe:z_virtual_endstop
  66. position_min: -2
  67. position_max: 300
  68. # 368 with no rods
  69.  
  70. [extruder]
  71. # value for Petg sunlu
  72. #Petg:pressure_advance: 0.1225
  73. #PLA: pressure_advance: 0.078 new 0.057
  74. #ABS: pressure_advance: 0.077
  75. #ASA: pressure_advance: 0.0595
  76. pressure_advance_smooth_time: 0.040
  77. pressure_advance: 0.0595
  78. step_pin: ar26
  79. dir_pin: ar28
  80. enable_pin: !ar24
  81. rotation_distance: 22.6789511
  82. gear_ratio: 50:17
  83. microsteps: 16
  84. full_steps_per_rotation: 200
  85. nozzle_diameter: 0.400
  86. filament_diameter: 1.750
  87. max_extrude_only_distance: 500.0
  88. max_extrude_only_velocity: 70.0
  89. max_extrude_only_accel: 1000.0
  90. heater_pin: ar10
  91. sensor_type: EPCOS 100K B57560G104F
  92. sensor_pin: analog13
  93. #control: pid --PLA
  94. #pid_Kp: 33.827
  95. #pid_Ki: 2.301
  96. #pid_Kd: 124.313
  97. #control: pid --PETG
  98. # pid_kp = 31.981
  99. # pid_ki = 2.111
  100. # pid_kd = 121.126
  101. #control: pid --ABS/ASA
  102. # pid_kp = 34.906
  103. # pid_ki = 2.327
  104. # pid_kd = 130.899
  105. #control: pid --PC 285C MAX
  106. # pid_kp = 32.407
  107. # pid_ki = 2.182
  108. # pid_kd = 120.310
  109. min_extrude_temp: 10
  110. min_temp: 5
  111. max_temp: 300
  112.  
  113. [heater_bed]
  114. heater_pin: ar8
  115. sensor_type: EPCOS 100K B57560G104F
  116. sensor_pin: analog14
  117. #control: pid PLA/PET
  118. # control = pid
  119. # pid_kp = 73.992
  120. # pid_ki = 2.099
  121. # pid_kd = 652.053
  122. #control: pid ABS/ASA/PC
  123. # control = pid
  124. # pid_kp = 75.456
  125. # pid_ki = 2.079
  126. # pid_kd = 684.767
  127.  
  128. min_temp: 5
  129. max_temp: 140
  130.  
  131. [fan]
  132. pin: ar9
  133. max_power: 1.0
  134.  
  135. [mcu]
  136. serial: /dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AB0K51AK-if00-port0
  137. #pin_map: arduino
  138.  
  139. # Arduino aliases for atmega2560/1280 (Arduino mega) boards
  140. [board_pins arduino-mega]
  141. aliases:
  142. ar0=PE0, ar1=PE1, ar2=PE4, ar3=PE5, ar4=PG5,
  143. ar5=PE3, ar6=PH3, ar7=PH4, ar8=PH5, ar9=PH6,
  144. ar10=PB4, ar11=PB5, ar12=PB6, ar13=PB7, ar14=PJ1,
  145. ar15=PJ0, ar16=PH1, ar17=PH0, ar18=PD3, ar19=PD2,
  146. ar20=PD1, ar21=PD0, ar22=PA0, ar23=PA1, ar24=PA2,
  147. ar25=PA3, ar26=PA4, ar27=PA5, ar28=PA6, ar29=PA7,
  148. ar30=PC7, ar31=PC6, ar32=PC5, ar33=PC4, ar34=PC3,
  149. ar35=PC2, ar36=PC1, ar37=PC0, ar38=PD7, ar39=PG2,
  150. ar40=PG1, ar41=PG0, ar42=PL7, ar43=PL6, ar44=PL5,
  151. ar45=PL4, ar46=PL3, ar47=PL2, ar48=PL1, ar49=PL0,
  152. ar50=PB3, ar51=PB2, ar52=PB1, ar53=PB0, ar54=PF0,
  153. ar55=PF1, ar56=PF2, ar57=PF3, ar58=PF4, ar59=PF5,
  154. ar60=PF6, ar61=PF7, ar62=PK0, ar63=PK1, ar64=PK2,
  155. ar65=PK3, ar66=PK4, ar67=PK5, ar68=PK6, ar69=PK7,
  156. analog0=PF0, analog1=PF1, analog2=PF2, analog3=PF3, analog4=PF4,
  157. analog5=PF5, analog6=PF6, analog7=PF7, analog8=PK0, analog9=PK1,
  158. analog10=PK2, analog11=PK3, analog12=PK4, analog13=PK5, analog14=PK6,
  159. analog15=PK7,
  160. # Marlin adds these additional aliases
  161. ml70=PG4, ml71=PG3, ml72=PJ2, ml73=PJ3, ml74=PJ7,
  162. ml75=PJ4, ml76=PJ5, ml77=PJ6, ml78=PE2, ml79=PE6,
  163. ml80=PE7, ml81=PD4, ml82=PD5, ml83=PD6, ml84=PH2,
  164. ml85=PH7
  165.  
  166.  
  167. [printer]
  168. kinematics: cartesian
  169. max_velocity: 300
  170. #max_x_velocity:300
  171. #max_y_velocity:200
  172. max_accel: 1500
  173. #max_x_accel: 3000
  174. #Max_y_accel: 1500
  175. #scale_xy_accel: true
  176. square_corner_velocity: 5
  177. max_z_velocity: 10
  178. max_z_accel: 100
  179.  
  180. [bltouch]
  181. sensor_pin: ^ar19
  182. control_pin: ar11
  183. stow_on_each_sample: False
  184. probe_with_touch_mode: True
  185. x_offset: -35.5
  186. y_offset: -19.5
  187. #z_offset: 0
  188. speed: 4.0
  189. samples: 2
  190. sample_retract_dist: 3.0
  191.  
  192. [safe_z_home]
  193. home_xy_position: 177,155
  194. speed: 80.0
  195. z_hop: 10.0
  196. z_hop_speed: 5.0
  197.  
  198. [bed_mesh]
  199. speed: 60
  200. horizontal_move_z: 15
  201. mesh_min: 10, 10
  202. mesh_max: 272, 274
  203. probe_count: 5,5
  204. mesh_pps: 2,3
  205. algorithm: bicubic
  206. bicubic_tension: 0.2
  207. fade_start: 1
  208. fade_end: 10
  209. move_check_distance: 3
  210. split_delta_z: .025
  211.  
  212. [filament_switch_sensor e0_sensor]
  213. switch_pin: ar2
  214. pause_on_runout: True
  215. runout_gcode:
  216. PAUSE_PARK
  217.  
  218. [pause_resume]
  219.  
  220. [respond]
  221. default_type: echo
  222.  
  223.  
  224. [save_variables]
  225. filename: ~/klipper_config/variables.cfg ; variable storage file
  226.  
  227.  
  228. ; MAX_AGE is checked against the stored variable
  229. ; SAVE=1 can be used to force saving the mesh (restarts klipper, so
  230. ; only for manual usage)
  231. ; FORCE_LEVEL=1 forces a mesh probe even if MAX_AGE is not reached
  232. [gcode_macro LEVEL_BED_ADVANCED]
  233. description: Levels the bed if the last leveling was MAX_AGE runs ago. Force leveling by setting FORCE
  234. variable_save_at_end: 0
  235. gcode:
  236. {% set max_age = params.MAX_AGE|default(10)|int %}
  237. {% set force_level = params.FORCE|default(0)|int %}
  238. {% set save = params.SAVE|default(0)|int %}
  239.  
  240. ; load level_age from stored variables
  241. {% set svv = printer.save_variables.variables %}
  242. {% if "level_age" not in svv %} ; first run
  243. SAVE_VARIABLE VARIABLE=level_age VALUE={max_age}
  244. {% set level_age = 1 %}
  245. {% else %} ; load level_age and increment
  246. {% set level_age = svv.level_age %}
  247. SAVE_VARIABLE VARIABLE=level_age VALUE={level_age|int + 1}
  248. {% endif %}
  249. {action_respond_info("Bed mesh age is " + level_age|string) + "."}
  250.  
  251. ; Level eventually
  252. {% if force_level or (level_age >= max_age|int) %}
  253. {action_respond_info("Bed mesh exceeded max age. Leveling...")}
  254.  
  255. ; homing if not homed yet
  256. {% if 'xy' not in printer.toolhead.homed_axes %}
  257. G28
  258. {% endif %}
  259.  
  260. BED_MESH_CALIBRATE
  261. {% if save %}
  262. SAVE_VARIABLE VARIABLE=level_age VALUE=1 ; reset counter
  263. SAVE_CONFIG
  264. {% else %}
  265. SET_GCODE_VARIABLE MACRO=LEVEL_BED_ADVANCED VARIABLE=save_at_end VALUE=1
  266. {% endif %}
  267. {% else %}
  268. {action_respond_info("Loading old bed mesh.")}
  269. BED_MESH_PROFILE LOAD=default
  270. {% endif %}
  271.  
  272. # runs SAVE_CONFIG if the g-code variable was set in start gcode
  273. [gcode_macro SAVE_IF_SET]
  274. gcode:
  275. {% if printer["gcode_macro LEVEL_BED_ADVANCED"].save_at_end == 1 %}
  276. {action_respond_info("Saving was requested - saving and restarting now.")}
  277. SAVE_VARIABLE VARIABLE=level_age VALUE=1
  278. SAVE_CONFIG
  279. {% endif %}
  280.  
  281.  
  282. [gcode_macro PAUSE]
  283. description: Pause the actual running print
  284. rename_existing: PAUSE_BASE
  285. # change this if you need more or less extrusion
  286. variable_extrude: 1.0
  287. gcode:
  288. ##### read E from pause macro #####
  289. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  290. ##### set park positon for x and y #####
  291. # default is your max posion from your printer.cfg
  292. {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
  293. {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
  294. ##### calculate save lift position #####
  295. {% set max_z = printer.toolhead.axis_maximum.z|float %}
  296. {% set act_z = printer.toolhead.position.z|float %}
  297. {% if act_z < (max_z - 2.0) %}
  298. {% set z_safe = 2.0 %}
  299. {% else %}
  300. {% set z_safe = max_z - act_z %}
  301. {% endif %}
  302. ##### end of definitions #####
  303. PAUSE_BASE
  304. G91
  305. {% if printer.extruder.can_extrude|lower == 'true' %}
  306. G1 E-{E} F2100
  307. {% else %}
  308. {action_respond_info("Extruder not hot enough")}
  309. {% endif %}
  310. {% if "xyz" in printer.toolhead.homed_axes %}
  311. G1 Z{z_safe} F900
  312. G90
  313. G1 X{x_park} Y{y_park} F6000
  314. {% else %}
  315. {action_respond_info("Printer not homed")}
  316. {% endif %}
  317.  
  318. [gcode_macro RESUME]
  319. description: Resume the actual running print
  320. rename_existing: RESUME_BASE
  321. gcode:
  322. ##### read E from pause macro #####
  323. {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  324. #### get VELOCITY parameter if specified ####
  325. {% if 'VELOCITY' in params|upper %}
  326. {% set get_params = ('VELOCITY=' + params.VELOCITY) %}
  327. {%else %}
  328. {% set get_params = "" %}
  329. {% endif %}
  330. ##### end of definitions #####
  331. {% if printer.extruder.can_extrude|lower == 'true' %}
  332. G91
  333. G1 E{E} F2100
  334. {% else %}
  335. {action_respond_info("Extruder not hot enough")}
  336. {% endif %}
  337. RESUME_BASE {get_params}
  338.  
  339. [gcode_macro CANCEL_PRINT]
  340. description: Cancel the actual running print
  341. rename_existing: CANCEL_PRINT_BASE
  342. gcode:
  343. TURN_OFF_HEATERS
  344. CANCEL_PRINT_BASE
  345.  
  346.  
  347.  
  348. # https://github.com/Desuuuu/klipper-macros
  349. # If you want to use these macros, follow the instructions from the repository
  350. # and uncomment the following lines.
  351.  
  352. #[save_variables]
  353. #filename: ~/variables.cfg
  354. #
  355. #[delayed_gcode macros_initialize]
  356. #initial_duration: 1
  357. #gcode:
  358. # INITIALIZE_VARIABLE VARIABLE=park_x VALUE=20
  359. # INITIALIZE_VARIABLE VARIABLE=park_y VALUE=290
  360. # INITIALIZE_VARIABLE VARIABLE=bowden_len VALUE=400
  361. #
  362. #[include macros/*.cfg]
  363.  
  364. #*# <---------------------- SAVE_CONFIG ---------------------->
  365. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  366. #*#
  367. #*# [bltouch]
  368. #*# z_offset = 0.549
  369. #*#
  370. #*# [extruder]
  371. #*# control = pid
  372. #*# pid_kp = 31.981
  373. #*# pid_ki = 2.111
  374. #*# pid_kd = 121.126
  375. #*#
  376. #*# [heater_bed]
  377. #*# control = pid
  378. #*# pid_kp = 73.992
  379. #*# pid_ki = 2.099
  380. #*# pid_kd = 652.053
  381. #*#
  382. #*# [bed_mesh Cold]
  383. #*# version = 1
  384. #*# points =
  385. #*# -0.125000, -0.131250, -0.100000, -0.051250, 0.086250
  386. #*# -0.101250, -0.140000, -0.141250, -0.096250, 0.021250
  387. #*# -0.038750, -0.096250, -0.122500, -0.113750, -0.022500
  388. #*# 0.007500, -0.087500, -0.132500, -0.152500, -0.078750
  389. #*# 0.078750, -0.026250, -0.091250, -0.108750, -0.070000
  390. #*# tension = 0.2
  391. #*# min_x = 10.0
  392. #*# algo = bicubic
  393. #*# y_count = 5
  394. #*# mesh_y_pps = 3
  395. #*# min_y = 10.0
  396. #*# x_count = 5
  397. #*# max_y = 274.0
  398. #*# mesh_x_pps = 2
  399. #*# max_x = 272.0
  400. #*#
  401. #*# [bed_mesh default]
  402. #*# version = 1
  403. #*# points =
  404. #*# -0.203750, -0.116250, -0.032500, 0.021250, 0.081250
  405. #*# -0.062500, -0.038750, 0.001250, 0.016250, 0.052500
  406. #*# 0.038750, 0.003750, -0.007500, -0.020000, -0.005000
  407. #*# 0.026250, -0.030000, -0.087500, -0.142500, -0.137500
  408. #*# -0.025000, -0.106250, -0.175000, -0.258750, -0.286250
  409. #*# tension = 0.2
  410. #*# min_x = 10.0
  411. #*# algo = bicubic
  412. #*# y_count = 5
  413. #*# mesh_y_pps = 3
  414. #*# min_y = 10.0
  415. #*# x_count = 5
  416. #*# max_y = 274.0
  417. #*# mesh_x_pps = 2
  418. #*# max_x = 272.0
  419.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement