Advertisement
odd_squirrel

cr-10 v3 with bltouch klipper cfg

Mar 20th, 2023
2,553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 15.72 KB | Source Code | 0 0
  1. # !CR-10 V3
  2. # printer_size: 300x300x400
  3. # version: 3.4
  4. # This file contains common pin mappings for the 2020 Creality CR-10 V3.
  5. # The mainboard is a Creality 3D v2.5.2 (8-bit mainboard with
  6. # ATMega2560). To use this config, the firmware should be compiled for
  7. # the AVR atmega2560.
  8.  
  9. # See docs/Config_Reference.md for a description of parameters.
  10.  
  11.  
  12. ###fluidd set
  13. [virtual_sdcard]
  14. path: ~/gcode_files
  15.  
  16. [display_status]
  17.  
  18. [pause_resume]
  19.  
  20. [gcode_macro PAUSE]
  21. description: Pause the actual running print
  22. rename_existing: PAUSE_BASE
  23. # change this if you need more or less extrusion
  24. variable_extrude: 1.0
  25. gcode:
  26.   ##### read E from pause macro #####
  27.   {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  28.   ##### set park positon for x and y #####
  29.   # default is your max posion from your printer.cfg
  30.   {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
  31.   {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
  32.   ##### calculate save lift position #####
  33.   {% set max_z = printer.toolhead.axis_maximum.z|float %}
  34.   {% set act_z = printer.toolhead.position.z|float %}
  35.   {% if act_z < (max_z - 2.0) %}
  36.       {% set z_safe = 2.0 %}
  37.   {% else %}
  38.       {% set z_safe = max_z - act_z %}
  39.   {% endif %}
  40.   ##### end of definitions #####
  41.   PAUSE_BASE
  42.   G91
  43.   {% if printer.extruder.can_extrude|lower == 'true' %}
  44.     G1 E-{E} F2100
  45.   {% else %}
  46.     {action_respond_info("Extruder not hot enough")}
  47.   {% endif %}
  48.   {% if "xyz" in printer.toolhead.homed_axes %}
  49.     G1 Z{z_safe} F900
  50.     G90
  51.     G1 X{x_park} Y{y_park} F6000
  52.   {% else %}
  53.     {action_respond_info("Printer not homed")}
  54.   {% endif %}
  55.  
  56. [gcode_macro RESUME]
  57. description: Resume the actual running print
  58. rename_existing: RESUME_BASE
  59. gcode:
  60.   ##### read E from pause macro #####
  61.   {% set E = printer["gcode_macro PAUSE"].extrude|float %}
  62.   #### get VELOCITY parameter if specified ####
  63.   {% if 'VELOCITY' in params|upper %}
  64.     {% set get_params = ('VELOCITY=' + params.VELOCITY)  %}
  65.   {%else %}
  66.     {% set get_params = "" %}
  67.   {% endif %}
  68.   ##### end of definitions #####
  69.   {% if printer.extruder.can_extrude|lower == 'true' %}
  70.     G91
  71.     G1 E{E} F2100
  72.   {% else %}
  73.     {action_respond_info("Extruder not hot enough")}
  74.   {% endif %}  
  75.   RESUME_BASE {get_params}
  76.  
  77. [gcode_macro CANCEL_PRINT]
  78. description: Cancel the actual running print
  79. rename_existing: CANCEL_PRINT_BASE
  80. gcode:
  81.   TURN_OFF_HEATERS
  82.   {% if "xyz" in printer.toolhead.homed_axes %}
  83.     G91
  84.     G1 Z4.5 F300
  85.     G90
  86.   {% else %}
  87.     {action_respond_info("Printer not homed")}
  88.   {% endif %}
  89.     G28 X Y
  90.   {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
  91.     G1 Y{y_park} F2000
  92.     M84
  93.   CANCEL_PRINT_BASE
  94.  
  95. [stepper_x]
  96. step_pin: PF0 #ar54
  97. dir_pin: PF1 #ar55
  98. enable_pin: !PD7 #!ar38
  99. microsteps: 16
  100. rotation_distance: 40
  101. endstop_pin: ^PE5 #^ar3
  102. position_endstop: 0
  103. position_max: 300
  104. homing_speed: 50
  105.  
  106. [stepper_y]
  107. step_pin: PF6 #ar60
  108. dir_pin: PF7 #ar61
  109. enable_pin: !PF2 #!ar56
  110. microsteps: 16
  111. rotation_distance: 40
  112. endstop_pin: ^PJ1 #^ar14
  113. position_endstop: 0
  114. position_max: 300
  115. homing_speed: 50
  116.  
  117. [stepper_z]
  118. step_pin: PL3 #ar46
  119. dir_pin: !PL1 #!ar48
  120. enable_pin: !PK0 #!ar62
  121. microsteps: 16
  122. rotation_distance: 8
  123. position_max: 400
  124. #Uncomment if you have a BL-Touch:
  125. position_min: -5
  126. endstop_pin: probe:z_virtual_endstop
  127. #and comment the follwing lines:
  128. #position_endstop: 0.0
  129. #endstop_pin: ^PD3 #ar18
  130. homing_speed: 30.0
  131.  
  132. [safe_z_home]
  133. home_xy_position: 150, 150 # Change coordinates to the center of your print bed
  134. speed: 50
  135. z_hop: 10                 # Move up 10mm
  136. z_hop_speed: 5
  137.  
  138. [bltouch]
  139. sensor_pin: PD2        #Default: ^PD3  OtherAttempts: PA7, PB7 (wwne), PB1, PA5, !PB2 (wwne), PD2 (wwne)
  140. #   Pin connected to the BLTouch sensor pin. Most BLTouch devices
  141. #   require a pullup on the sensor pin (prefix the pin name with "^").
  142. #   This parameter must be provided.
  143. control_pin: PB5        #Default: PB5   OtherAttempts: PB0
  144. #   Pin connected to the BLTouch control pin. This parameter must be
  145. #   provided.
  146. pin_move_time: 0.680    #Default 0.400  OtherAttempts: 2.00
  147. #   The amount of time (in seconds) to wait for the BLTouch pin to
  148. #   move up or down. The default is 0.680 seconds.
  149. stow_on_each_sample: False
  150. #   This determines if Klipper should command the pin to move up
  151. #   between each probe attempt when performing a multiple probe
  152. #   sequence. Read the directions in docs/BLTouch.md before setting
  153. #   this to False. The default is True.
  154. probe_with_touch_mode: True
  155. #   If this is set to True then Klipper will probe with the device in
  156. #   "touch_mode". The default is False (probing in "pin_down" mode).
  157. pin_up_reports_not_triggered: True
  158. #   Set if the BLTouch consistently reports the probe in a "not
  159. #   triggered" state after a successful "pin_up" command. This should
  160. #   be True for all genuine BLTouch devices. Read the directions in
  161. #   docs/BLTouch.md before setting this to False. The default is True.
  162. pin_up_touch_mode_reports_triggered: True
  163. #   Set if the BLTouch consistently reports a "triggered" state after
  164. #   the commands "pin_up" followed by "touch_mode". This should be
  165. #   True for all genuine BLTouch devices. Read the directions in
  166. #   docs/BLTouch.md before setting this to False. The default is True.
  167. set_output_mode: OD
  168. #   Request a specific sensor pin output mode on the BLTouch V3.0 (and
  169. #   later). This setting should not be used on other types of probes.
  170. #   Set to "5V" to request a sensor pin output of 5 Volts (only use if
  171. #   the controller board needs 5V mode and is 5V tolerant on its input
  172. #   signal line). Set to "OD" to request the sensor pin output use
  173. #   open drain mode. The default is to not request an output mode.
  174. x_offset: 46
  175. #   The distance (in mm) between the probe and the nozzle along the
  176. #   x-axis. The default is 0.
  177. y_offset: -2
  178. #   The distance (in mm) between the probe and the nozzle along the
  179. #   y-axis. The default is 0.
  180. #z_offset: 3.72
  181. #   The distance (in mm) between the bed and the nozzle when the probe
  182. #   triggers. This parameter must be provided.
  183. speed: 5.0
  184. #   Speed (in mm/s) of the Z axis when probing. The default is 5mm/s.
  185. lift_speed: 70
  186. #   Speed (in mm/s) of the Z axis when lifting the probe between
  187. #   samples. The default is to use the same value as the 'speed'
  188. #   parameter.
  189. samples: 5
  190. #   The number of times to probe each point. The probed z-values will
  191. #   be averaged. The default is to probe 1 time.
  192. sample_retract_dist: 6.0
  193. #   The distance (in mm) to lift the toolhead between each sample (if
  194. #   sampling more than once). The default is 2mm.
  195. samples_result: average
  196. #   The calculation method when sampling more than once - either
  197. #   "median" or "average". The default is average.
  198. samples_tolerance: 0.050
  199. #   The maximum Z distance (in mm) that a sample may differ from other
  200. #   samples. If this tolerance is exceeded then either an error is
  201. #   reported or the attempt is restarted (see
  202. #   samples_tolerance_retries). The default is 0.100mm.
  203. samples_tolerance_retries: 4
  204. #   The number of times to retry if a sample is found that exceeds
  205. #   samples_tolerance. On a retry, all current samples are discarded
  206. #   and the probe attempt is restarted. If a valid set of samples are
  207. #   not obtained in the given number of retries then an error is
  208. #   reported. The default is zero which causes an error to be reported
  209. #   on the first sample that exceeds samples_tolerance.
  210.  
  211. # Mesh Bed Leveling. One may define a [bed_mesh] config section
  212. # to enable move transformations that offset the z axis based
  213. # on a mesh generated from probed points. Note that bed_mesh
  214. # and bed_tilt are incompatible, both cannot be defined.  When
  215. # using a probe to home the z-axis, it is recommended to define
  216. # a [homing_override] section in printer.cfg to home toward the
  217. # center of the print area.
  218. #
  219. #  Visual Examples:
  220. #   rectangular bed, probe_count = 3,3:
  221. #               x---x---x (max_point)
  222. #               |
  223. #               x---x---x
  224. #                       |
  225. #   (min_point) x---x---x
  226. #
  227. #   round bed, round_probe_count = 5, bed_radius = r:
  228. #                  x (0,r) end
  229. #                /
  230. #              x---x---x
  231. #                        \
  232. #   (-r,0) x---x---x---x---x (r,0)
  233. #            \
  234. #              x---x---x
  235. #                    /
  236. #                  x  (0,-r) start
  237. #
  238. [bed_mesh]
  239. speed: 50
  240. #   The speed (in mm/s) of non-probing moves during the calibration.
  241. #   The default is 50.
  242. horizontal_move_z: 10
  243. #   The height (in mm) that the head should be commanded to move to
  244. #   just prior to starting a probe operation. The default is 5.
  245. #mesh_radius:
  246. #   Defines the radius of the mesh to probe for round beds. Note that
  247. #   the radius is relative to the coordinate specified by the
  248. #   mesh_origin option. This parameter must be provided for round beds
  249. #   and omitted for rectangular beds.
  250. #mesh_origin:
  251. #   Defines the center X, Y coordinate of the mesh for round beds. This
  252. #   coordinate is relative to the probe's location. It may be useful
  253. #   to adjust the mesh_origin in an effort to maximize the size of the
  254. #   mesh radius. Default is 0, 0. This parameter must be omitted for
  255. #   rectangular beds.
  256. mesh_min: 52,6
  257. #   Defines the minimum X, Y coordinate of the mesh for rectangular
  258. #   beds. This coordinate is relative to the probe's location. This
  259. #   will be the first point probed, nearest to the origin. This
  260. #   parameter must be provided for rectangular beds.
  261. mesh_max: 260,294
  262. #   Defines the maximum X, Y coordinate of the mesh for rectangular
  263. #   beds. Adheres to the same principle as mesh_min, however this will
  264. #   be the furthest point probed from the bed's origin. This parameter
  265. #   must be provided for rectangular beds.
  266. probe_count: 9,11
  267. #   For rectangular beds, this is a comma separate pair of integer
  268. #   values X, Y defining the number of points to probe along each
  269. #   axis. A single value is also valid, in which case that value will
  270. #   be applied to both axes. Default is 3, 3.
  271. #round_probe_count: 5
  272. #   For round beds, this integer value defines the maximum number of
  273. #   points to probe along each axis. This value must be an odd number.
  274. #   Default is 5.
  275. #fade_start: 1.0
  276. #   The gcode z position in which to start phasing out z-adjustment
  277. #   when fade is enabled. Default is 1.0.
  278. #fade_end: 0.0
  279. #   The gcode z position in which phasing out completes. When set to a
  280. #   value below fade_start, fade is disabled. It should be noted that
  281. #   fade may add unwanted scaling along the z-axis of a print. If a
  282. #   user wishes to enable fade, a value of 10.0 is recommended.
  283. #   Default is 0.0, which disables fade.
  284. #fade_target:
  285. #   The z position in which fade should converge. When this value is
  286. #   set to a non-zero value it must be within the range of z-values in
  287. #   the mesh. Users that wish to converge to the z homing position
  288. #   should set this to 0. Default is the average z value of the mesh.
  289. #split_delta_z: .025
  290. #   The amount of Z difference (in mm) along a move that will trigger
  291. #   a split. Default is .025.
  292. #move_check_distance: 5.0
  293. #   The distance (in mm) along a move to check for split_delta_z.
  294. #   This is also the minimum length that a move can be split. Default
  295. #   is 5.0.
  296. mesh_pps: 2, 2
  297. #   A comma separated pair of integers X, Y defining the number of
  298. #   points per segment to interpolate in the mesh along each axis. A
  299. #   "segment" can be defined as the space between each probed point.
  300. #   The user may enter a single value which will be applied to both
  301. #   axes. Default is 2, 2.
  302. algorithm: bicubic
  303. #   The interpolation algorithm to use. May be either "lagrange" or
  304. #   "bicubic". This option will not affect 3x3 grids, which are forced
  305. #   to use lagrange sampling. Default is lagrange.
  306. bicubic_tension: .2
  307. #   When using the bicubic algorithm the tension parameter above may
  308. #   be applied to change the amount of slope interpolated. Larger
  309. #   numbers will increase the amount of slope, which results in more
  310. #   curvature in the mesh. Default is .2.
  311. relative_reference_index: 24
  312. #   A point index in the mesh to reference all z values to. Enabling
  313. #   this parameter produces a mesh relative to the probed z position
  314. #   at the provided index.
  315. #faulty_region_1_min:
  316. #faulty_region_1_max:
  317. #   Optional points that define a faulty region.  See docs/Bed_Mesh.md
  318. #   for details on faulty regions.  Up to 99 faulty regions may be added.
  319. #   By default no faulty regions are set.
  320.  
  321. [extruder]
  322. step_pin: PA4 # ar26
  323. dir_pin: !PA6 # !ar28
  324. enable_pin: !PA2 # !ar24
  325. microsteps: 16
  326. rotation_distance: 7.8548756 # 16 microsteps * 200 steps/rotation / steps/mm
  327. #Correction formula is new_rotation_distance = old_rotation_distance * mmsExtracted / 100.0
  328. #original 7.7201944
  329. nozzle_diameter: 0.400
  330. filament_diameter: 1.750
  331. heater_pin: PB4 #ar10
  332. sensor_type: EPCOS 100K B57560G104F
  333. sensor_pin: PK5 #analog13
  334. control: pid
  335. pid_kp: 22.107
  336. pid_ki: 1.170
  337. pid_kd: 104.458
  338. min_temp: 0
  339. max_temp: 265
  340.  
  341. [heater_bed]
  342. heater_pin: PH5 #ar8
  343. sensor_type: ATC Semitec 104GT-2
  344. sensor_pin: PK6 #analog14
  345. control: pid
  346. #Stock PID configuration taken from Marlin
  347. pid_Kp: 201.86
  348. pid_Ki: 10.67
  349. pid_Kd: 954.96
  350. min_temp: 0
  351. max_temp: 130
  352.  
  353. [fan]
  354. pin: PH6 #ar9
  355.  
  356. [mcu]
  357. serial: /dev/serial/by-id/usb_serial_1
  358. restart_method: command
  359.  
  360. # [mcu rpi]
  361. # serial: /tmp/klipper_host_mcu
  362.  
  363. # [adxl345]
  364. # cs_pin: rpi:None
  365. # spi_speed: 2000000
  366. # spi_bus: spidev2.0
  367.  
  368. # [resonance_tester]
  369. # accel_chip: adxl345
  370. # accel_per_hz: 70
  371. # probe_points:
  372. #        150,150,10
  373.  
  374. [input_shaper]
  375. #shaper_type_x = 2hump_ei
  376. #shaper_freq_x = 0.0
  377. #shaper_type_y = 2hump_ei
  378. #shaper_freq_y = 0.0
  379.  
  380. [printer]
  381. kinematics: cartesian
  382. max_velocity: 300
  383. max_accel: 10000
  384. max_accel_to_decel: 10000
  385. max_z_velocity: 10
  386. max_z_accel: 1000
  387. square_corner_velocity: 5.0
  388.  
  389. [include timelapse.cfg]
  390.  
  391. [filament_switch_sensor filament_sensor]
  392. pause_on_runout: True
  393. switch_pin: PE4 #ar2
  394.  
  395. [bed_screws]
  396. screw1: 33,29
  397. screw1_name: 1
  398. screw2: 273,29
  399. screw2_name: 2
  400. screw3: 273,269
  401. screw3_name: 3
  402. screw4: 33,269
  403. screw4_name: 4
  404.  
  405. [gcode_macro G29]                    # If moving from marlin to klipper uncomment to mimic G29
  406. gcode:
  407.  G28
  408.  BED_MESH_CALIBRATE
  409.  G1 X0 Y0 Z10 F4000
  410.  
  411. [gcode_arcs]
  412. #resolution: 1.0
  413.  
  414. #*# <---------------------- SAVE_CONFIG ---------------------->
  415. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  416. #*#
  417. #*# [bltouch]
  418. #*# z_offset = 3.595
  419. #*#
  420. #*# [bed_mesh default]
  421. #*# version = 1
  422. #*# points =
  423. #*#     -0.147500, -0.103000, -0.035000, -0.037500, 0.010000, 0.042500, 0.022000, 0.048500, 0.010500
  424. #*#     -0.107500, -0.082500, 0.002500, -0.045500, 0.024500, 0.055000, 0.029000, 0.072500, 0.039500
  425. #*#     -0.127500, -0.107000, -0.039000, -0.050000, -0.005500, 0.027500, 0.000000, 0.053000, 0.025000
  426. #*#     -0.040000, -0.047500, 0.014000, -0.017500, 0.017500, 0.048500, 0.010500, 0.042500, 0.007500
  427. #*#     -0.090000, -0.076000, -0.007500, -0.047500, 0.014500, 0.059500, 0.027000, 0.077000, 0.051000
  428. #*#     -0.022000, -0.035000, 0.025500, -0.026000, 0.017500, 0.045000, 0.000000, 0.033000, -0.015500
  429. #*#     -0.075000, -0.064500, -0.010000, -0.042500, -0.003000, 0.015500, -0.017500, 0.019000, -0.010500
  430. #*#     -0.068500, -0.079000, -0.031000, -0.062500, -0.041000, -0.007000, -0.054000, -0.023500, -0.055000
  431. #*#     -0.059000, -0.072500, -0.032000, -0.072500, -0.056500, -0.027000, -0.087000, -0.065500, -0.099000
  432. #*#     -0.086500, -0.098000, -0.043500, -0.079500, -0.047500, -0.016500, -0.064500, -0.030500, -0.075000
  433. #*#     -0.048500, -0.072000, -0.021500, -0.072000, -0.044000, -0.045500, -0.109500, -0.106000, -0.171500
  434. #*# tension = 0.2
  435. #*# min_x = 52.0
  436. #*# algo = bicubic
  437. #*# y_count = 11
  438. #*# mesh_y_pps = 2
  439. #*# min_y = 6.0
  440. #*# x_count = 9
  441. #*# max_y = 294.0
  442. #*# mesh_x_pps = 2
  443. #*# max_x = 260.0
  444. #*#
  445. #*# [input_shaper]
  446. #*# shaper_type_x = mzv
  447. #*# shaper_freq_x = 36.8
  448. #*# shaper_type_y = mzv
  449. #*# shaper_freq_y = 23.2
  450.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement