Guest User

Untitled

a guest
Feb 8th, 2026
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.18 KB | None | 0 0
  1. #----------------------------------------------------------------------------
  2. # ____ _ __ __ ____
  3. # / __ \___ ___ ___ / |/ /__ ___ / /_/ / /__ _____ ___
  4. # / /_/ / _ \/ -_) _ \/ / -_) _ \/ __/_ _/ // / _ \/ -_)
  5. # \____/ .__/\__/_//_/_/|_/\__/ .__/\__/ /_/ \_,_/_//_/\__/
  6. # /_/ /_/
  7. #----------------------------------------------------------------------------
  8. ; Neptune 4 Series Custom Image by (OpenNeptune3D/OpenNept4une):
  9. #----------------------------------------------------------------------------
  10. ; Wiki : https://github.com/OpenNeptune3D/OpenNept4une/wiki
  11. ; Discord : https://discord.com/invite/X6kwchT6WM
  12.  
  13. #############################################################################
  14. # External Config Includes
  15. #############################################################################
  16. [include mainsail.cfg] ; mainsail runs on port 81 (http://IP_ADDRESS:81)
  17. [include fluidd.cfg]
  18. [include KAMP_Settings.cfg]
  19. [include ./KAMP/Smart_Park.cfg]
  20. [include ./KAMP/Line_Purge.cfg]
  21. #[include klipper_debug.cfg]
  22. #[include adxl.cfg] ; Comment this out when you disconnect the Pico/MellowFly
  23.  
  24. #############################################################################
  25. # Base Config
  26. #############################################################################
  27.  
  28. [mcu]
  29. serial: /dev/ttyS0 ; The hardware use USART1 PA10/PA9 connect to RK3328
  30. baud: 250000
  31. restart_method: command
  32.  
  33. [printer]
  34. kinematics:cartesian
  35. max_velocity: 250
  36. max_accel: 3000
  37. max_z_velocity: 8
  38. max_z_accel: 120
  39. square_corner_velocity: 5.0
  40. minimum_cruise_ratio: 0.0
  41.  
  42. [respond]
  43. [gcode_arcs]
  44. [pause_resume]
  45. [display_status]
  46. [exclude_object]
  47. [firmware_retraction]
  48. [virtual_sdcard]
  49. path: ~/printer_data/gcodes
  50. [force_move]
  51. enable_force_move : True
  52. [idle_timeout]
  53. timeout: 2100 ; 35min idle timeout (when not paused or printing)
  54.  
  55. #############################################################################
  56. # Print Start & End Macros
  57. #############################################################################
  58.  
  59. [gcode_macro PRINT_START]
  60.  
  61. gcode:
  62. Frame_Light_ON
  63. Part_Light_ON
  64. G92 E0
  65. G90 ; Use absolute coordinates
  66. BED_MESH_CLEAR
  67.  
  68. {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
  69. {% set BED_HEAT_SOAK_MINUTES = params.BED_HEAT_SOAK_MINUTES|default(0)|float %}
  70. {% set BED_MESH = params.BED_MESH|default('adaptive')|string %} ; One of: adaptive (default), full, default (or any other value as the bed mesh profile name), none
  71. {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(200)|float %}
  72.  
  73.  
  74. SET_BED_TEMPERATURE TARGET={BED_TEMP} ; Heat Bed to target temp
  75. BED_TEMPERATURE_WAIT MINIMUM={BED_TEMP-2} MAXIMUM={BED_TEMP+4} ; Waits until the bed reaches close to target
  76. {% if BED_HEAT_SOAK_MINUTES > 0 %}
  77. RESPOND MSG="Waiting {BED_HEAT_SOAK_MINUTES} minutes for the bed to settle."
  78. G4 P{BED_HEAT_SOAK_MINUTES * 60000}
  79. {% endif %}
  80.  
  81. CG28
  82.  
  83. {% if BED_MESH == 'full' %}
  84. BED_MESH_CALIBRATE
  85. {% elif BED_MESH == 'adaptive' %}
  86. BED_MESH_CALIBRATE ADAPTIVE=1
  87. {% elif BED_MESH != 'none' %}
  88. BED_MESH_PROFILE LOAD={BED_MESH}
  89. {% endif %}
  90. Smart_Park
  91. SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=1
  92. SET_HEATER_TEMPERATURE HEATER=extruder TARGET={EXTRUDER_TEMP} ; Set and heat the final extruder temperature
  93. TEMPERATURE_WAIT SENSOR=extruder MINIMUM={EXTRUDER_TEMP-4} MAXIMUM={EXTRUDER_TEMP+10} ; Wait for extruder to reach near target temperature
  94. LINE_PURGE ; KAMP Line Purge near print
  95. G92 E0 ; Reset Extruder
  96. G1 Z2.0 F3000 ; Move Z Axis up
  97. M117 Printing
  98.  
  99. [gcode_macro PRINT_END]
  100. gcode:
  101. Frame_Light_OFF
  102. Part_Light_OFF
  103. M400 ; wait for buffer to clear
  104. TURN_OFF_HEATERS
  105. G92 E0 ; zero the extruder
  106. G91 ; Relative positioning
  107. G1 E-2 F2700 ; Retract a bit
  108. G1 X5 Y5 F3000 ; Wipe out
  109. G1 E-2 Z0.2 F1600 ; Retract and raise Z
  110. G1 Z4 F3000 ; Raise Z more
  111. G90 ; Absolute positioning
  112. G1 X0 Y315 ; Present print
  113. M107 ; turn off fan
  114. M84 ; turn off steppers
  115. SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=0
  116. M117
  117. END_TUNE ; Print End Beeper Jingle
  118.  
  119. #############################################################################
  120. # Pause, Resume & Cancel Macros
  121. #############################################################################
  122.  
  123. [gcode_macro PAUSE]
  124. rename_existing: BASE_PAUSE
  125. gcode:
  126. PAUSE_TUNE
  127. {% set z = params.Z|default(30)|int %} ; z hop amount 30mm
  128. {% if printer['pause_resume'].is_paused|int == 0 %}
  129. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE={z} ; set z hop variable for reference in resume macro
  130. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=etemp VALUE={printer['extruder'].target} ; set hotend temp variable for reference in resume macro
  131. SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=0 ; disable filament sensor
  132. SAVE_GCODE_STATE NAME=PAUSE ; save the current print position for resume, before z-hop
  133. BASE_PAUSE ; pause print
  134. G91
  135. {% if (printer.gcode_move.position.z + z) < printer.toolhead.axis_maximum.z %} ; check that zhop doesn't exceed z max
  136. G1 E-2 F2700 ; Retract 2mm
  137. G1 X3 Y3 F3000 ; Wipe out
  138. G1 E-2 Z{z} F1600 ; Retract 2mm more & raise z by z hop amount
  139. SAVE_GCODE_STATE NAME=ZLIFT ; save the current print position for resume, after z-hop
  140. {% else %}
  141. { action_respond_info("Pause zhop exceeds maximum Z height.") } ; if z max is exceeded, show message and set zhop value for resume to 0
  142. SET_GCODE_VARIABLE MACRO=RESUME VARIABLE=zhop VALUE=0
  143. G1 E-2 F2700 ; Retract 2mm
  144. G1 X3 Y3 F3000 ; Wipe out
  145. G1 E-2 F1600 ; Retract 2mm more
  146. SAVE_GCODE_STATE NAME=ZLIFT
  147. {% endif %}
  148. G90
  149. G1 X{printer.toolhead.axis_minimum.x+5} Y{printer.toolhead.axis_maximum.y-5} F6000 ; park toolhead at the rear left of the bed
  150. SAVE_GCODE_STATE NAME=PAUSEPARK ; save the parked position
  151. SET_HEATER_TEMPERATURE HEATER=extruder TARGET=160 ; cool down hotend to no-drip temp
  152. SET_IDLE_TIMEOUT TIMEOUT=43200 ; set idle timeout to 12 hours (in seconds)
  153. {% endif %}
  154.  
  155. [gcode_macro RESUME]
  156. rename_existing: BASE_RESUME
  157. variable_zhop: 0
  158. variable_etemp: 0
  159. gcode:
  160. {% if printer['pause_resume'].is_paused|int == 1 %}
  161. SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=1 ; enable filament sensor
  162. SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout} ; set timeout back to configured value
  163. {% if etemp > 0 %}
  164. SET_HEATER_TEMPERATURE HEATER=extruder TARGET={etemp|int}
  165. TEMPERATURE_WAIT SENSOR=extruder MINIMUM={etemp|int - 4} MAXIMUM={etemp|int + 10} ; wait for hotend to heat back up to print temp
  166. {% endif %}
  167. RESTORE_GCODE_STATE NAME=PAUSEPARK MOVE=1 MOVE_SPEED=100 ; go back to park position in case toolhead was moved during pause ; enable extruder stepper motor
  168. G91 ; relative positioning
  169. M83 ; set extruder to relative mode
  170. G1 E80 F200 ; extrude 80mm of filament to prime the nozzle
  171. G4 P2000 ; wait for 2 seconds to stabilise pressure
  172. G1 X20 F15000 ; wiggle movement to ensure free movement of purge
  173. G1 X-20
  174. G1 X20
  175. G1 X-20
  176. G1 X20
  177. G1 X-20
  178. RESTORE_GCODE_STATE NAME=ZLIFT MOVE=1 MOVE_SPEED=60 ; restore to the zlift position above the print
  179. G1 X-3 Y-3 F3000 ; Undo the pause Wipe out
  180. G1 Z{zhop * -1} F900
  181. RESTORE_GCODE_STATE NAME=PAUSE MOVE=1 MOVE_SPEED=60 ; restore to the paused position (lowers to final print location)
  182. M400 ; wait for all moves to complete
  183. BASE_RESUME ; resume print
  184. {% endif %}
  185.  
  186. [gcode_macro CANCEL_PRINT]
  187. rename_existing: BASE_CANCEL_PRINT
  188. gcode:
  189. SET_IDLE_TIMEOUT TIMEOUT={printer.configfile.settings.idle_timeout.timeout} ; set timeout back to configured value
  190. CLEAR_PAUSE
  191. SDCARD_RESET_FILE
  192. PRINT_END
  193. BASE_CANCEL_PRINT
  194.  
  195. #############################################################################
  196. # Filament Sensor & Change Macros
  197. #############################################################################
  198.  
  199. [filament_switch_sensor filament_sensor]
  200. pause_on_runout: True
  201. insert_gcode:
  202. M117 Insert Detected
  203. runout_gcode:
  204. M117 Runout Detected
  205. UNLOAD_FILAMENT
  206. event_delay: 3.0
  207. pause_delay: 1.0
  208. switch_pin: PA12
  209.  
  210. [delayed_gcode DISABLE_FILAMENT_SENSOR]
  211. initial_duration: 1
  212. gcode:
  213. SET_FILAMENT_SENSOR SENSOR=filament_sensor ENABLE=0
  214.  
  215. [gcode_macro M600]
  216. description: Pause for colour change
  217. gcode:
  218. PAUSE
  219. UNLOAD_FILAMENT
  220.  
  221. [gcode_macro LOAD_FILAMENT]
  222. variable_load_distance: 25
  223. variable_purge_distance: 30
  224. gcode:
  225. SET_HEATER_TEMPERATURE HEATER=extruder TARGET=200
  226. TEMPERATURE_WAIT SENSOR=extruder MINIMUM={200-4} MAXIMUM={200+40}
  227. {% set speed = params.SPEED|default(300) %}
  228. {% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity * 30 %}
  229. SAVE_GCODE_STATE NAME=load_state
  230. G91
  231. G92 E0
  232. G1 E{load_distance} F{max_velocity} ; fast-load
  233. G1 E{purge_distance} F{speed} ; purge
  234. RESTORE_GCODE_STATE NAME=load_state
  235.  
  236. [gcode_macro UNLOAD_FILAMENT]
  237. variable_unload_distance: 55
  238. variable_purge_distance: 15
  239. gcode:
  240. SET_HEATER_TEMPERATURE HEATER=extruder TARGET=200
  241. TEMPERATURE_WAIT SENSOR=extruder MINIMUM={200-4} MAXIMUM={200+40}
  242. {% set speed = params.SPEED|default(300) %}
  243. {% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity * 30 %}
  244. SAVE_GCODE_STATE NAME=unload_state
  245. G91
  246. G92 E0
  247. G1 E{purge_distance} F{speed} ; purge
  248. G1 E-{unload_distance} F{max_velocity} ; fast-unload
  249. RESTORE_GCODE_STATE NAME=unload_state
  250.  
  251. #############################################################################
  252. # X/Y/Z Stepper Config
  253. #############################################################################
  254.  
  255. [stepper_x]
  256. step_pin: PC14
  257. dir_pin: PC13
  258. enable_pin: !PC15
  259. microsteps: 16
  260. rotation_distance: 40
  261. full_steps_per_rotation:200 ; set to 400 for 0.9 degree stepper
  262. endstop_pin: tmc2209_stepper_x:virtual_endstop
  263. position_min: -12
  264. position_endstop: -10
  265. position_max: 330
  266. homing_speed: 50
  267. homing_retract_dist: 0
  268. homing_positive_dir: false
  269.  
  270. [stepper_y]
  271. step_pin: PB4
  272. dir_pin: !PB3
  273. enable_pin: !PC15
  274. microsteps: 16
  275. rotation_distance: 40
  276. full_steps_per_rotation:200 ; set to 400 for 0.9 degree stepper
  277. endstop_pin: tmc2209_stepper_y:virtual_endstop
  278. position_min: -2
  279. position_endstop: 0
  280. position_max: 330
  281. homing_speed:50
  282. homing_retract_dist: 0
  283. homing_positive_dir:false
  284.  
  285. [stepper_z]
  286. step_pin: PC10
  287. dir_pin: !PA13
  288. enable_pin: !PC11
  289. microsteps: 16
  290. rotation_distance: 8
  291. full_steps_per_rotation: 200
  292. endstop_pin: probe:z_virtual_endstop
  293. position_max: 405
  294. position_min: -5
  295. homing_speed: 8
  296. second_homing_speed: 3
  297. homing_retract_dist: 0
  298.  
  299.  
  300. [mcu cartographer] # See https://www.klipper3d.org/Config_Reference.html#mcu
  301. # Remove either the serial or canbus_uuid line dependant on your setup.
  302. serial: /dev/serial/by-id/usb-Cartographer_stm32g431xx_68005E000650303448383620-if00
  303. restart_method: command # Not needed for probes using CAN.
  304.  
  305. [cartographer]
  306. mcu: cartographer
  307. x_offset: 0 # This is the offset of your probe from the nozzle tip, to the centre of the coil.
  308. y_offset: 20.7 # This is the offset of your probe from the nozzle tip, to the centre of the coil.
  309.  
  310.  
  311.  
  312. [bed_mesh]
  313. zero_reference_position: 160, 160 # The centre of your bed.
  314. speed: 300
  315. horizontal_move_z: 3
  316. mesh_min: 10, 21 # The first probed coordinate, nearest to the origin. This coordinate is relative to the probe's location.
  317. mesh_max: 300.75, 315.45 # The probed coordinate farthest from the origin. This is not necessarily the last point probed, as the probing process occurs in a zig-zag fashion. As with mesh_min, this coordinate is relative to the probe's location.
  318. probe_count: 20, 20
  319. adaptive_margin: 10
  320. mesh_pps: 0,0 # Disable interpolation - mesh is probably dense enough
  321.  
  322. [temperature_sensor cartographer]
  323. sensor_type: temperature_mcu
  324. sensor_mcu: cartographer
  325. min_temp: 5
  326. max_temp: 105
  327.  
  328. [adxl345]
  329. # Select 1 of the cs_pin below depending on the probe you have.
  330. # Having the wrong one selected will cause an Endless Bootloop
  331. # Cartographer V4 has int2 connected to the probes PA1 pin
  332.  
  333. cs_pin: cartographer:PA0 # For Cartographer V4
  334. spi_bus: spi1
  335.  
  336.  
  337. #############################################################################
  338. # TMC Stepper-driver UART Config
  339. #############################################################################
  340.  
  341. [tmc2209 stepper_x]
  342. uart_pin: PB9
  343. run_current: 1.0
  344. interpolate: True
  345. stealthchop_threshold: 999999
  346. driver_SGTHRS: 90
  347. diag_pin: ^PC0
  348.  
  349. [tmc2209 stepper_y]
  350. uart_pin: PD2
  351. run_current: 1.1
  352. interpolate: True
  353. stealthchop_threshold: 999999
  354. driver_SGTHRS: 80
  355. diag_pin: ^PB8
  356.  
  357. [tmc2209 stepper_z]
  358. uart_pin: PC5
  359. run_current: 0.8
  360. interpolate: True
  361.  
  362. [tmc2209 extruder]
  363. uart_pin: PC4
  364. run_current: 0.8
  365. interpolate: false
  366.  
  367. #############################################################################
  368. # Extruder Config
  369. #############################################################################
  370.  
  371. [extruder]
  372. step_pin:PA5
  373. dir_pin:!PA6
  374. enable_pin:!PA4
  375. microsteps: 16
  376. rotation_distance: 29.812 ; 31.4 Bondtech 5mm Drive Gears
  377. gear_ratio: 52:10
  378. full_steps_per_rotation: 200 ; 200 for 1.8 degree, 400 for 0.9 degree
  379. nozzle_diameter: 0.400
  380. filament_diameter: 1.750
  381. min_temp: 0
  382. max_temp: 330
  383. heater_pin: PA7
  384. sensor_type:NTC 100K MGB18-104F39050L32
  385. sensor_pin: PA1
  386. max_power: 1
  387. #control: pid
  388. #pid_Kp: 35.144
  389. #pid_Ki: 9.762
  390. #pid_Kd: 31.630
  391. pressure_advance: 0.02725
  392. pressure_advance_smooth_time: 0.02
  393. max_extrude_cross_section: 5 ; standard klipper default 4* (NozzleDiam^2)
  394. instantaneous_corner_velocity: 5.0
  395. max_extrude_only_distance: 100
  396. max_extrude_only_velocity:45
  397. max_extrude_only_accel:2000
  398. step_pulse_duration:0.000002
  399.  
  400. [verify_heater extruder]
  401. max_error: 30
  402. check_gain_time: 10
  403. hysteresis: 10
  404. heating_gain: 2
  405.  
  406. #############################################################################
  407. # Bed Heater Config
  408. #############################################################################
  409.  
  410. [heater_bed]
  411. heater_pin:PB10
  412. sensor_type: NTC 100K MGB18-104F39050L32
  413. sensor_pin: PA0
  414. max_power: 1.0
  415. control: pid
  416. pid_Kp: 75.397
  417. pid_Ki: 0.823
  418. pid_Kd: 1727.531
  419. min_temp: 0
  420. max_temp: 120
  421. pwm_cycle_time: 0.3
  422.  
  423. [verify_heater heater_bed]
  424. max_error: 120
  425. check_gain_time: 120
  426. hysteresis: 10
  427. heating_gain: 2
  428.  
  429. [gcode_macro SET_BED_TEMPERATURE]
  430. gcode:
  431. SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET={params.TARGET}
  432.  
  433. [gcode_macro BED_TEMPERATURE_WAIT]
  434. gcode:
  435. {% if params.MINIMUM is defined and params.MAXIMUM is defined %}
  436. TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={params.MINIMUM} MAXIMUM={params.MAXIMUM}
  437. {% elif params.MINIMUM is defined %}
  438. TEMPERATURE_WAIT SENSOR=heater_bed MINIMUM={params.MINIMUM}
  439. {% elif params.MAXIMUM is defined %}
  440. TEMPERATURE_WAIT SENSOR=heater_bed MAXIMUM={params.MAXIMUM}
  441. {% else %}
  442. RESPOND TYPE=error MSG="Error on 'BED_TEMPERATURE_WAIT': missing MINIMUM or MAXIMUM."
  443. {% endif %}
  444.  
  445. #############################################################################
  446. # Probe Config
  447. #############################################################################
  448.  
  449. #[probe]
  450. #pin:^PA11
  451. #x_offset: -24.25
  452. #y_offset: 20.45
  453. ##z_offset = 0.0
  454. #speed: 6.0
  455. #samples: 3
  456. #samples_result: median
  457. #sample_retract_dist: 3.0
  458. #samples_tolerance: 0.025
  459. #samples_tolerance_retries: 3
  460.  
  461. #[bed_mesh]
  462. #speed:150
  463. #horizontal_move_z:5
  464. #mesh_min: 10,21
  465. #mesh_max: 300.75,315.45
  466. #probe_count:11,11
  467. #algorithm:bicubic
  468. #bicubic_tension:0.2
  469. #mesh_pps: 4, 4
  470. #fade_start: 1.0
  471. #fade_end: 10.0
  472.  
  473. #############################################################################
  474. # LED Config
  475. #############################################################################
  476.  
  477. [output_pin Frame_Light]
  478. pin: rpi:gpiochip2/gpio2
  479.  
  480. [output_pin Part_Light]
  481. pin: rpi:gpiochip2/gpio15
  482.  
  483. [gcode_macro Frame_Light_ON]
  484. gcode:
  485. SET_PIN PIN=Frame_Light VALUE=1
  486.  
  487. [gcode_macro Frame_Light_OFF]
  488. gcode:
  489. SET_PIN PIN=Frame_Light VALUE=0
  490.  
  491. [gcode_macro Part_Light_ON]
  492. gcode:
  493. SET_PIN PIN=Part_Light VALUE=1
  494.  
  495. [gcode_macro Part_Light_OFF]
  496. gcode:
  497. SET_PIN PIN=Part_Light VALUE=0
  498.  
  499. #############################################################################
  500. # Beeper Config
  501. #############################################################################
  502.  
  503. [pwm_cycle_time beeper]
  504. pin: PA2
  505. value: 0
  506. shutdown_value: 0
  507. cycle_time: 0.0005 ; Default PWM frequency: 2 kHz
  508.  
  509. [gcode_macro M300]
  510. gcode:
  511. {% set S = params.S|default(2000)|int %} ; Set frequency (S), default to 2 kHz if omitted or invalid
  512. {% set P = params.P|default(100)|int %} ; Set duration (P), default to 100ms if omitted or invalid
  513. SET_PIN PIN=beeper VALUE=0.8 CYCLE_TIME={ 1.0/S if S > 0 else 1 } ; Activate the beeper at a 80% duty cycle
  514. G4 P{P} ; Hold the beep for the specified duration
  515. SET_PIN PIN=beeper VALUE=0 ; Turn off the beeper
  516.  
  517. [gcode_macro PAUSE_TUNE]
  518. gcode:
  519. M300 S784 P300
  520. M300 S587 P600
  521.  
  522. [gcode_macro END_TUNE]
  523. gcode:
  524. M300 S392 P250
  525. M300 S494 P250
  526. M300 S587 P250
  527. M300 S523 P300
  528.  
  529. #############################################################################
  530. # Fan & Temp Monitoring Config
  531. #############################################################################
  532.  
  533. [controller_fan heatbreak+mainboard_fan]
  534. pin: PC7
  535. fan_speed: 1.0
  536. idle_speed: 0.5
  537. idle_timeout: 43200 ; 50% speed for 12h then OFF
  538. shutdown_speed: 1
  539. heater: extruder, heater_bed
  540. stepper: stepper_x, stepper_y, stepper_z, extruder
  541. [fan]
  542. pin: PB7
  543. [fan_generic fan3]
  544. pin: PC9
  545. [fan_generic fan4]
  546. pin: PA8
  547. [fan_generic fan5]
  548. pin: PA15
  549.  
  550. [delayed_gcode start_fan_at_idle_speed]
  551. initial_duration: 5. ; 5s wait after boot
  552. gcode:
  553. # Gcode Hack to trigger the mainboard fan from printer boot
  554. SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=1 ; bed heat to 1degC
  555. G4 P2000 ; wait 2s
  556. SET_HEATER_TEMPERATURE HEATER=heater_bed TARGET=0 ; bed heat off
  557.  
  558. [temperature_sensor RockchipHost]
  559. sensor_type: temperature_host
  560. min_temp: 10
  561. max_temp: 80
  562.  
  563. [temperature_sensor STM32MCU]
  564. sensor_type: temperature_mcu
  565. min_temp: 10
  566. max_temp: 85
  567.  
  568. #############################################################################
  569. # Homing & Levelling Config/Macros
  570. #############################################################################
  571.  
  572. [gcode_macro CG28]
  573. gcode:
  574. {% if "xyz" not in printer.toolhead.homed_axes %}
  575. G28
  576. {% else %}
  577. {% endif %}
  578.  
  579. [safe_z_home]
  580. home_xy_position: 160, 160
  581. speed: 100
  582. z_hop: 10
  583. z_hop_speed: 5
  584.  
  585. [axis_twist_compensation]
  586. calibrate_start_x: 25
  587. calibrate_end_x: 295
  588. calibrate_y: 160
  589.  
  590. [gcode_macro Axis_Twist_Comp_Tune]
  591. gcode:
  592. CG28
  593. AXIS_TWIST_COMPENSATION_CALIBRATE
  594.  
  595. [screws_tilt_adjust]
  596. screw1: 189.25,204.55
  597. screw1_name: middle-rear bed mount (shim adjust)
  598. screw2: 189.25,86.55
  599. screw2_name: middle-front bed mount (shim adjust)
  600. screw3: 59.75,277.05
  601. screw3_name: rear left screw
  602. screw4: 59.75,144.55
  603. screw4_name: center left screw
  604. screw5: 59.75,12.05
  605. screw5_name: front left screw
  606. screw6: 315.75,12.05
  607. screw6_name: front right screw
  608. screw7: 315.75,144.55
  609. screw7_name: center right screw
  610. screw8: 315.75,277.05
  611. screw8_name: rear right screw
  612. horizontal_move_z: 5
  613. speed: 150
  614. screw_thread: CW-M4
  615.  
  616. [gcode_macro Bed_Level_Screws_Tune]
  617. gcode:
  618. BED_MESH_CLEAR
  619. SET_BED_TEMPERATURE TARGET=60
  620. BED_TEMPERATURE_WAIT MINIMUM=58 MAXIMUM=65
  621. CG28
  622. SCREWS_TILT_CALCULATE
  623.  
  624. [gcode_macro Calibrate_Probe_Z_Offset]
  625. gcode:
  626. CG28
  627. PROBE_CALIBRATE
  628.  
  629. [gcode_macro Auto_Full_Bed_Level]
  630. gcode:
  631. RESPOND PREFIX="info" MSG="Running Custom Bed Leveling Macro"
  632. BED_MESH_CLEAR
  633. SET_BED_TEMPERATURE TARGET=60
  634. BED_TEMPERATURE_WAIT MINIMUM=58 MAXIMUM=65
  635. CG28
  636. BED_MESH_CALIBRATE
  637.  
  638. #############################################################################
  639. # PID Tuning Macros
  640. #############################################################################
  641.  
  642. [gcode_macro PID_Tune_EXTRUDER]
  643. gcode:
  644. {% set temperature = params.TEMPERATURE|default(210) %}
  645. CG28
  646. M106 S255
  647. PID_CALIBRATE HEATER=extruder TARGET={temperature}
  648. SAVE_CONFIG
  649.  
  650. [gcode_macro PID_Tune_BED]
  651. gcode:
  652. {% set temperature = params.TEMPERATURE|default(60) %}
  653. CG28
  654. M106 S255 ;Sets Print Fans to 100%
  655. PID_CALIBRATE HEATER=heater_bed TARGET={temperature}
  656. SAVE_CONFIG
  657.  
  658.  
  659. #############################################################################
  660. # SPI Accelerometer Config
  661. #############################################################################
  662.  
  663. [mcu rpi]
  664. serial: /tmp/klipper_host_mcu
  665.  
  666. [adxl345 x]
  667. cs_pin: rpi:gpiochip0/gpio25
  668. spi_bus: spidev0.0
  669. axes_map: x,z,-y
  670.  
  671. [adxl345 y]
  672. cs_pin: rpi:gpiochip0/gpio8
  673. spi_bus: spidev0.1
  674. axes_map: -x,-y,-z
  675.  
  676. [resonance_tester]
  677. accel_chip_x: adxl345 x
  678. accel_chip_y: adxl345 y
  679. max_smoothing: 0.15
  680. probe_points:
  681. 162.5, 162.5, 20
  682.  
  683. #############################################################################
  684. # Input Shaper Config
  685. #############################################################################
  686.  
  687. [input_shaper]
  688. #shaper_type_x: mzv
  689. #shaper_freq_x: 59.8
  690. #shaper_type_y: ei
  691. #shaper_freq_y: 30.0
  692.  
  693. #############################################################################
  694.  
  695. [include user_settings.cfg] ; Users custom macros
  696.  
  697.  
  698. #############################################################################
  699.  
  700. #*# <---------------------- SAVE_CONFIG ---------------------->
  701. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
  702. #*#
  703. #*# [cartographer scan_model default]
  704. #*# coefficients = 1.6389249226730482,2.328381433180167,0.7954633281821514,-0.657403547462265,0.2633212270993758,2.4395602395278955,0.03544490586156769,-2.360724960803905,0.06869895886300623,0.955052004953649
  705. #*# domain = 3.322908121986859e-07,3.423881694645284e-07
  706. #*# z_offset = -0.13
  707. #*# reference_temperature = 27.08
  708. #*# software_version = 1.4.0
  709. #*# mcu_version = Cartographer HT 5.1.0
  710. #*#
  711. #*# [cartographer touch_model default]
  712. #*# threshold = 500
  713. #*# speed = 2
  714. #*# z_offset = -0.05
  715. #*# software_version = 1.4.0
  716. #*# mcu_version = Cartographer HT 5.1.0
  717. #*#
  718. #*# [extruder]
  719. #*# control = pid
  720. #*# pid_kp = 25.478
  721. #*# pid_ki = 2.295
  722. #*# pid_kd = 70.701
  723. #*#
  724. #*# [input_shaper]
  725. #*# shaper_type_x = mzv
  726. #*# shaper_freq_x = 68.0
  727. #*# shaper_type_y = mzv
  728. #*# shaper_freq_y = 37.0
  729. #*#
  730. #*# [bed_mesh default]
  731. #*# version = 1
  732. #*# points =
  733. #*# -0.271781, 0.083368, 0.107279, 0.108561, 0.093677, 0.099589, 0.093677, 0.075610, 0.066255, 0.045896, 0.023256, 0.017161, 0.010536, 0.010536, 0.017966, 0.031968, 0.045896, 0.068854, 0.076632, 0.097532
  734. #*# -0.222925, 0.069637, 0.093677, 0.094961, 0.083878, 0.087237, 0.087235, 0.076122, 0.053229, 0.034599, 0.022736, 0.021131, 0.013188, 0.014513, 0.021935, 0.037233, 0.053229, 0.076904, 0.084658, 0.100097
  735. #*# -0.268264, 0.064957, 0.082078, 0.077416, 0.074826, 0.076120, 0.080784, 0.066255, 0.051921, 0.038546, 0.025898, 0.020611, 0.013188, 0.015837, 0.029851, 0.052437, 0.061053, 0.078197, 0.098307, 0.114444
  736. #*# -0.227299, 0.066255, 0.083874, 0.084658, 0.077416, 0.074826, 0.074317, 0.061053, 0.044587, 0.031969, 0.021935, 0.015837, 0.010536, 0.017966, 0.031969, 0.051129, 0.073531, 0.090594, 0.104212, 0.114444
  737. #*# -0.265337, 0.076120, 0.098308, 0.094456, 0.092389, 0.094456, 0.085440, 0.072233, 0.058447, 0.044076, 0.027732, 0.028534, 0.024057, 0.028534, 0.043278, 0.078197, 0.089817, 0.113165, 0.121582, 0.129975
  738. #*# -0.208410, 0.095740, 0.113165, 0.109333, 0.098815, 0.088526, 0.082078, 0.063657, 0.041169, 0.025898, 0.018772, 0.011861, 0.007065, 0.015319, 0.041169, 0.073531, 0.088526, 0.119545, 0.116488, 0.130480
  739. #*# -0.269748, 0.070937, 0.093168, 0.085947, 0.084657, 0.073018, 0.067554, 0.047208, 0.024576, -0.000919, -0.015103, -0.015103, -0.012424, -0.011087, 0.014513, 0.045899, 0.067043, 0.088526, 0.113165, 0.115214
  740. #*# -0.209513, 0.080784, 0.096516, 0.099589, 0.082078, 0.072233, 0.066255, 0.052434, 0.026701, 0.006546, -0.002773, -0.004401, -0.008411, -0.000397, 0.023775, 0.048515, 0.070937, 0.106771, 0.111886, 0.128707
  741. #*# -0.257044, 0.084658, 0.101652, 0.100874, 0.087235, 0.075610, 0.068854, 0.054537, 0.034599, 0.017966, 0.006546, 0.006546, 0.009209, 0.010536, 0.031685, 0.068854, 0.089817, 0.109839, 0.136311, 0.151716
  742. #*# -0.216229, 0.082074, 0.098307, 0.087235, 0.069637, 0.058959, 0.052434, 0.036433, 0.023256, 0.004407, -0.001439, -0.004401, -0.002251, 0.004927, 0.029851, 0.048515, 0.074041, 0.108561, 0.115718, 0.143397
  743. #*# -0.265302, 0.067554, 0.079489, 0.076120, 0.066255, 0.052434, 0.046411, 0.024057, 0.014513, -0.000397, -0.013763, -0.013763, -0.003585, -0.005441, 0.016643, 0.047204, 0.067554, 0.092389, 0.116488, 0.133016
  744. #*# -0.212405, 0.079220, 0.089817, 0.092389, 0.076122, 0.063657, 0.061053, 0.044587, 0.029851, 0.014513, 0.004927, 0.006546, 0.000414, 0.009209, 0.030653, 0.055841, 0.077416, 0.111886, 0.123624, 0.140108
  745. #*# -0.195077, 0.125400, 0.140108, 0.132511, 0.122088, 0.110610, 0.108052, 0.093677, 0.077416, 0.063143, 0.049308, 0.049030, 0.049823, 0.055046, 0.074041, 0.107279, 0.126163, 0.149200, 0.175538, 0.193944
  746. #*# -0.124557, 0.155492, 0.165530, 0.161772, 0.145160, 0.129975, 0.126669, 0.115214, 0.097024, 0.079489, 0.071450, 0.068341, 0.063657, 0.071450, 0.089817, 0.120310, 0.140868, 0.170536, 0.188238, 0.213221
  747. #*# -0.173820, 0.145919, 0.150960, 0.140868, 0.126163, 0.116992, 0.114444, 0.096516, 0.082585, 0.064957, 0.051921, 0.045896, 0.045099, 0.045899, 0.066255, 0.098308, 0.119038, 0.144658, 0.172538, 0.190721
  748. #*# -0.154429, 0.131242, 0.135046, 0.124126, 0.102932, 0.093677, 0.088016, 0.076904, 0.061842, 0.042480, 0.034599, 0.031969, 0.023775, 0.032483, 0.049030, 0.074825, 0.097024, 0.131242, 0.143900, 0.168037
  749. #*# -0.206618, 0.113936, 0.113165, 0.098307, 0.083368, 0.070154, 0.069127, 0.054537, 0.042480, 0.026413, 0.014513, 0.007877, 0.005217, 0.004407, 0.019806, 0.048510, 0.075337, 0.104212, 0.132511, 0.148945
  750. #*# -0.159589, 0.108561, 0.113165, 0.097799, 0.078709, 0.062358, 0.057144, 0.045896, 0.030366, 0.013188, 0.000414, -0.003585, -0.011085, -0.008411, 0.007877, 0.032487, 0.054537, 0.085168, 0.102159, 0.131242
  751. #*# -0.196174, 0.103439, 0.098307, 0.074826, 0.059749, 0.044587, 0.037233, 0.024057, 0.009209, -0.009748, -0.026146, -0.032892, -0.036944, -0.038296, -0.028846, -0.002773, 0.013188, 0.043790, 0.071450, 0.091880
  752. #*# -0.363998, -0.135213, -0.150176, -0.163814, -0.189870, -0.207517, -0.212405, -0.227295, -0.247233, -0.268258, -0.279583, -0.295449, -0.303515, -0.302014, -0.289464, -0.263811, -0.240451, -0.206620, -0.184681, -0.148762
  753. #*# min_x = 10.0
  754. #*# min_y = 21.0
  755. #*# max_x = 300.75
  756. #*# max_y = 315.45
  757. #*# x_count = 20
  758. #*# y_count = 20
  759. #*# mesh_x_pps = 0
  760. #*# mesh_y_pps = 0
  761. #*# algo = bicubic
  762. #*# tension = 0.2
  763.  
Advertisement
Add Comment
Please, Sign In to add comment