Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #####################################################################################
- # Klipper Printer.cfg
- # This file contains common pin mappings for the BigTreeTech Octopus.
- # To use this config, the firmware should be compiled for the
- # STM32F446 with a "32KiB bootloader" and a "12MHz crystal" clock reference.
- #
- # Author: Luke Quinn
- # Date: 8/12/2021
- # Version: 2.0
- # Ender3 Pro, BTT Octopus v1.1, TMC2209 v1.2, BLTouch v3, Microswiss DD Linear ver, Stock Display
- #####################################################################################
- #####################################################################################
- # Printer Configuration
- #####################################################################################
- ## [X in MOTOR0]
- ## [Y in MOTOR1]
- ## [Z_0 in MOTOR2]
- ## [Z_1 in MOTOR3]
- ## [E in MOTOR4]
- ## Obtain definition by "ls -l /dev/serial/by-id/" then unplug to verify
- [mcu]
- #Primary MCU BTT Octopus V1.1 in usb mode
- serial: /dev/serial/by-id/usb-Klipper_lpc1769_0C500015871C4AAFD8577C5DC12000F5-if00
- [mcu rpi]
- #Secondary MCU to run ADXL345
- serial: /tmp/klipper_host_mcu
- [printer]
- #Ender 3 Pro with Linear Rails and MicroSwiss DD kit
- kinematics: cartesian
- max_velocity: 3000
- #max_accel: 7000 ;Normally commented out. Uncomment for resonance testing/calibrating.
- #max_accel_to_decel: 7000 ;Normally commented out. Uncomment for resonance testing/calibrating.
- max_accel: 2000
- max_z_velocity: 25
- max_z_accel: 100
- [force_move]
- enable_force_move: True
- [respond]
- default_type: echo
- [pause_resume]
- [gcode_arcs]
- resolution: 1.0
- #####################################################################################
- # Fan Configuration
- #####################################################################################
- [fan]
- pin: PA8
- #[heater_fan fan1]
- #pin: PE5
- #[heater_fan fan2]
- #pin: PD12
- #[heater_fan fan3]
- #pin: PD13
- #[heater_fan fan4]
- #pin: PD14
- #[controller_fan fan5]
- #pin: PD15
- #####################################################################################
- # Heated Bed Configuration
- #####################################################################################
- [heater_bed]
- heater_pin: PA1
- sensor_type: ATC Semitec 104GT-2
- sensor_pin: PF3
- min_temp: 0
- max_temp: 130
- #####################################################################################
- # BedMesh-ZProbe Configuration
- #####################################################################################
- [bltouch]
- sensor_pin: PB7 ;Now uses BlTouch header instead of Z endstop header.
- control_pin: PB6
- pin_up_reports_not_triggered: True
- pin_up_touch_mode_reports_triggered: True
- x_offset: -67
- y_offset: -28.5
- pin_move_time: 1
- [safe_z_home]
- home_xy_position: 184.5,117.5
- speed: 150.0
- z_hop: 10.0
- z_hop_speed: 60.0
- [bed_mesh]
- speed: 150
- horizontal_move_z: 5
- mesh_min: 30, 30
- mesh_max: 180, 180
- probe_count: 5,5
- #fade_start: 1.0
- mesh_pps: 0,0
- [screws_tilt_adjust]
- screw1: 31,37
- screw1_name: Front left screw
- screw2: 31,208
- screw2_name: Rear left screw
- screw3: 201,208
- screw3_name: Rear right screw
- screw4: 201,37
- screw4_name: Front right screw
- horizontal_move_z: 10
- speed: 250
- screw_thread: CW-M3
- #####################################################################################
- # Stepper Motor Configuration
- #####################################################################################
- [stepper_x]
- step_pin: PF13
- dir_pin: PF12
- enable_pin: !PF14
- step_distance: .0125
- endstop_pin: PG6
- position_min: -6
- position_endstop: -5
- position_max: 250
- homing_speed: 50
- [stepper_y]
- step_pin: PG0
- dir_pin: PG1
- enable_pin: !PF15
- step_distance: .0125
- endstop_pin: PG9
- position_min: -11
- position_endstop: -10
- position_max: 250
- homing_speed: 50
- [stepper_z]
- step_pin: PF11
- dir_pin: PG3
- enable_pin: !PG5
- step_distance: .0025
- endstop_pin: probe:z_virtual_endstop
- #position_endstop: 0
- position_max: 250
- position_min: -10
- #[stepper_Z1]
- #step_pin: PG4
- #dir_pin: PC1
- #enable_pin: !PA0
- #endstop_pin: PG11
- #step_distance: .0025
- #endstop_pin: probe:z_virtual_endstop
- #position_endstop: 0
- #position_max: 250
- #position_min: -10
- #####################################################################################
- # Extruder
- #####################################################################################
- [extruder]
- step_pin: PF9
- dir_pin: PF10
- enable_pin: !PG2
- step_distance: 0.007213
- nozzle_diameter: 0.400
- filament_diameter: 1.750
- heater_pin: PA2
- sensor_type: EPCOS 100K B57560G104F
- sensor_pin: PF4
- pressure_advance: 0.13906125
- pressure_advance_smooth_time: 0.010
- #pressure_advance: 0 ;Use for Testing/Calibrating
- min_temp: 0
- max_temp: 300
- #####################################################################################
- # TMC2209 configuration
- #####################################################################################
- [tmc2209 stepper_x]
- uart_pin: PC4
- microsteps: 16
- interpolate: True
- run_current: 0.52
- hold_current: 0.500
- stealthchop_threshold: 250
- [tmc2209 stepper_y]
- uart_pin: PD11
- microsteps: 16
- interpolate: True
- run_current: 0.52
- hold_current: 0.500
- stealthchop_threshold: 250
- [tmc2209 stepper_z]
- uart_pin: PC6
- microsteps: 16
- interpolate: True
- run_current: 1.1
- hold_current: 0.500
- stealthchop_threshold: 50
- #[tmc2209 stepper_Z1]
- #uart_pin: PC7
- ##diag_pin: PG11
- #run_current: 0.650
- #hold_current: 0.450
- #stealthchop_threshold: 50
- [tmc2209 extruder]
- uart_pin: PF2
- microsteps: 16
- interpolate: False
- run_current: 0.800
- hold_current: 0.500
- stealthchop_threshold: 5
- #####################################################################################
- # Resonance Testing Configurartion
- #####################################################################################
- [adxl345 hotend]
- # Assuming `hotend` chip is connected to an RPi
- cs_pin: rpi:None
- [adxl345 bed]
- # Assuming `bed` chip is connected to a printer MCU board
- cs_pin: PA15 ; Printer board SPI chip select (CS) pin
- spi_software_sclk_pin: PB3
- spi_software_mosi_pin: PB5
- spi_software_miso_pin: PB4
- [resonance_tester]
- # Assuming the typical setup of the bed slinger printer
- accel_chip_x: adxl345 hotend
- accel_chip_y: adxl345 bed
- probe_points: 184.5,117.5,20
- [input_shaper]
- shaper_freq_x: 64.6
- shaper_type_x: ei
- #shaper_freq_y: 34.6
- #shaper_type_y: mzv
- #####################################################################################
- # EXP1 / EXP2 (display) pins
- #####################################################################################
- [board_pins]
- aliases:
- # EXP1 header
- EXP1_1=PE8, EXP1_2=PE7,
- EXP1_3=PE9, EXP1_4=PE10,
- EXP1_5=PE12, EXP1_6=PE13, ; Slot in the socket on this side
- EXP1_7=PE14, EXP1_8=PE15,
- EXP1_9=<GND>, EXP1_10=<5V>,
- # EXP2 header
- EXP2_1=PA6, EXP2_2=PA5,
- EXP2_3=PB1, EXP2_4=PA4,
- EXP2_5=PB2, EXP2_6=PA7, ; Slot in the socket on this side
- EXP2_7=PC15, EXP2_8=<RST>,
- EXP2_9=<GND>, EXP2_10=<5V>
- [display]
- lcd_type: st7920
- cs_pin: EXP1_7
- sclk_pin: EXP1_6
- sid_pin: EXP1_8
- encoder_pins: ^EXP1_5, ^EXP1_3
- click_pin: ^!EXP1_2
- #kill_pin: ^!EXP2_8
- [output_pin beeper]
- pin: EXP1_1
- pwm: True
- value: 0
- shutdown_value: 0
- cycle_time: 0.001
- scale: 1000
- #####################################################################################
- # LED configuration
- #####################################################################################
- [neopixel my_neopixel]
- pin: PB0
- chain_count: 8
- color_order: GRB
- initial_RED: 1.0
- initial_GREEN: 1.0
- initial_BLUE: 1.0
- #[output_pin caselight]
- # Chamber Lighting - HE1 Connector (Optional)
- #pin: PA3
- #pwm:true
- #shutdown_value: 0
- #value:1
- #cycle_time: 0.01
- #####################################################################################
- # Saved Macros
- #####################################################################################
- [gcode_macro PRINT_START]
- # Use PRINT_START for the slicer starting script - please customise for your slicer of choice
- gcode:
- ; Ender 3 Custom Start G-code
- G92 E0 ; Reset Extruder
- BED_MESH_PROFILE LOAD=Ender3Pro1; Load Bed Mesh from EEPROM location 1
- G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
- G1 X5 Y20 Z0.3 F5000.0 ; Move to start position
- G1 X5 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line
- G1 X5.4 Y200.0 Z0.3 F5000.0 ; Move to side a little
- G1 X5.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line
- G92 E0 ; Reset Extruder
- G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
- G1 X10 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish
- [gcode_macro PRINT_END]
- # Use PRINT_END for the slicer ending script - please customise for your slicer of choice
- gcode:
- M400 ; wait for buffer to clear
- G92 E0 ; zero the extruder
- G1 E-10.0 F3600 ; retract filament
- G91 ; relative positioning
- G0 Z1.00 X20.0 Y20.0 F20000 ; move nozzle to remove stringing
- TURN_OFF_HEATERS
- M107 ; turn off fan
- G1 Z2 F3000 ; move nozzle up 2mm
- G90 ; absolute positioning
- G0 X125 Y250 F3600 ; park nozzle at rear
- #BED_MESH_CLEAR
- [gcode_macro G29]
- gcode:
- G28
- BED_MESH_CALIBRATE
- BED_MESH_PROFILE SAVE=Ender3Pro1
- @BEDLEVELVISUALIZER ; instruct plugin to start recording responses from printer.
- BED_MESH_OUTPUT ; output calibration Data
- SAVE_CONFIG
- [gcode_macro M420]
- gcode:
- BED_MESH_PROFILE LOAD=Ender3Pro1
- [gcode_macro M600]
- gcode:
- PAUSE
- CHANGE_FILAMENT_START
- [gcode_macro CHANGE_FILAMENT_START]
- gcode:
- SAVE_GCODE_STATE NAME=M600_state
- G91
- G1 E-.8 F2700
- G1 Z10
- G90
- G1 X50 Y0 F3000
- G91
- G1 E-5 F300
- [gcode_macro CHANGE_FILAMENT_END]
- gcode:
- G91
- RESTORE_GCODE_STATE NAME=M600_state
- RESUME
- [gcode_macro M300]
- default_parameter_S: 1000
- default_parameter_P: 100
- gcode:
- SET_PIN PIN=beeper VALUE={S}
- G4 P{P}
- SET_PIN PIN=beeper VALUE=0
- [gcode_macro M108]
- gcode:
- TURN_OFF_HEATERS
- [gcode_macro REPORT_FILAMENT_WIDTH]
- variable_last_width: 0
- gcode:
- {% set current_width = printer['hall_filament_width_sensor'].Diameter|float|round(2) %}
- {% if current_width != last_width|float|round(2) %}
- RESPOND TYPE=command MSG={"FlowMultiply:%d" % (printer['gcode_move'].extrude_factor * 100.0,)}
- M117 {"Filament:%4.2fmm" % (printer['hall_filament_width_sensor'].Diameter,)}
- {% endif %}
- SET_GCODE_VARIABLE MACRO=REPORT_FILAMENT_WIDTH VARIABLE=last_width VALUE={current_width}
- [delayed_gcode PERIODIC_FILAMENT_WIDTH]
- gcode:
- REPORT_FILAMENT_WIDTH
- UPDATE_DELAYED_GCODE ID=PERIODIC_FILAMENT_WIDTH DURATION=2
- #####################################################################################
- # Customize Menu
- #####################################################################################
- #Removed customized menus until I can dive deaper on the new format for menu.cfg. 12/20/2020 LQ
- #*# <---------------------- SAVE_CONFIG ---------------------->
- #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
- #*#
- #*# [bed_mesh default]
- #*# version = 1
- #*# points =
- #*# 0.045000, 0.042500, 0.032500, 0.022500, 0.032500
- #*# 0.035000, 0.030000, 0.020000, 0.005000, 0.022500
- #*# -0.012500, -0.010000, -0.002500, 0.005000, 0.025000
- #*# -0.090000, -0.072500, -0.052500, -0.037500, -0.012500
- #*# -0.172500, -0.132500, -0.090000, -0.057500, -0.025000
- #*# tension = 0.2
- #*# min_x = 30.0
- #*# algo = lagrange
- #*# y_count = 5
- #*# mesh_y_pps = 0
- #*# min_y = 30.0
- #*# x_count = 5
- #*# max_y = 180.0
- #*# mesh_x_pps = 0
- #*# max_x = 180.0
- #*#
- #*# [extruder]
- #*# control = pid
- #*# pid_kp = 31.276
- #*# pid_ki = 2.317
- #*# pid_kd = 105.558
- #*#
- #*# [heater_bed]
- #*# control = pid
- #*# pid_kp = 73.076
- #*# pid_ki = 1.572
- #*# pid_kd = 849.504
- #*#
- #*# [bltouch]
- #*# z_offset = 4.715
- #*#
- #*# [bed_mesh Ender3Pro1]
- #*# version = 1
- #*# points =
- #*# 0.045000, 0.042500, 0.032500, 0.022500, 0.032500
- #*# 0.035000, 0.030000, 0.020000, 0.005000, 0.022500
- #*# -0.012500, -0.010000, -0.002500, 0.005000, 0.025000
- #*# -0.090000, -0.072500, -0.052500, -0.037500, -0.012500
- #*# -0.172500, -0.132500, -0.090000, -0.057500, -0.025000
- #*# tension = 0.2
- #*# min_x = 30.0
- #*# algo = lagrange
- #*# y_count = 5
- #*# mesh_y_pps = 0
- #*# min_y = 30.0
- #*# x_count = 5
- #*# max_y = 180.0
- #*# mesh_x_pps = 0
- #*# max_x = 180.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement