# This file contains pin mappings for the Creality "v4.2.2" board on Ender 5 Pro. To # use this config, during "make menuconfig" select the STM32F103 with # a "28KiB bootloader" and serial (on USART1 PA10/PA9) communication. # If you prefer a direct serial connection, in "make menuconfig" # select "Enable extra low-level configuration options" and select # serial (on USART3 PB11/PB10), which is broken out on the 10 pin IDC # cable used for the LCD module as follows: # 3: Tx, 4: Rx, 9: GND, 10: VCC # Flash this firmware by copying "out/klipper.bin" to a SD card and # turning on the printer with the card inserted. The firmware # filename must end in ".bin" and must not match the last filename # that was flashed. # See docs/Config_Reference.md for a description of parameters. [virtual_sdcard] path: ~/gcode_files [stepper_x] step_pin: PC2 dir_pin: !PB9 enable_pin: !PC3 microsteps: 16 rotation_distance: 40 endstop_pin: ^PA5 position_endstop: 0 position_max: 220 position_min: 0 homing_speed: 50 [stepper_y] step_pin: PB8 dir_pin: !PB7 enable_pin: !PC3 microsteps: 16 rotation_distance: 40 endstop_pin: ^PA6 position_endstop: 0 position_max: 220 position_min: 0 homing_speed: 50 [stepper_z] step_pin: PB6 dir_pin: PB5 enable_pin: !PC3 microsteps: 16 rotation_distance: 4 #Commented out Z endstop_pin as using CR Touch probe instead. Also commented out position_endstop. #endstop_pin: ^PA7 #position_endstop: 0.0 endstop_pin: probe:z_virtual_endstop position_max: 300 #Only need negative value during CR Touch calibration #position_min: -5.0 [extruder] max_extrude_only_distance: 100.0 step_pin: PB4 dir_pin: PB3 enable_pin: !PC3 microsteps: 16 rotation_distance: 33.019 nozzle_diameter: 0.400 filament_diameter: 1.750 heater_pin: PA1 sensor_type: EPCOS 100K B57560G104F sensor_pin: PC5 #control: pid #pid_Kp: 21.527 #pid_Ki: 1.063 #pid_Kd: 108.982 min_temp: 0 max_temp: 250 pressure_advance: 0.090 [heater_bed] heater_pin: PA2 sensor_type: EPCOS 100K B57560G104F sensor_pin: PC4 #control: pid #pid_Kp: 54.027 #pid_Ki: 0.770 #pid_Kd: 948.182 min_temp: 0 max_temp: 130 [fan] pin: PA0 [mcu] serial: /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 restart_method: command [printer] kinematics: cartesian max_velocity: 300 max_accel: 3500 max_z_velocity: 5 max_z_accel: 100 [input_shaper] shaper_freq_x: 58.1 shaper_freq_y: 38.7 shaper_type: ei [gcode_arcs] resolution: 1.0 [display] # RET6 12864 LCD lcd_type: st7920 cs_pin: PB12 sclk_pin: PB13 sid_pin: PB15 encoder_pins: ^PB14, ^PB10 click_pin: ^!PB2 [output_pin BEEPER_Pin] pin: PC6 pwm: True value: 0 shutdown_value: 0 cycle_time: 0.001 scale: 1 [bed_screws] screw1: 27,25 screw2: 27,195 screw3: 197,195 screw4: 197,25 [bltouch] sensor_pin: ^PB1 #z_offset configured automatically in section at bottom #z_offset: 0 control_pin: PB0 pin_up_touch_mode_reports_triggered: False probe_with_touch_mode: True # Nozzle_X - Probe_X, when both above same spot on the bed. x_offset: 46 # Nozzle_Y - Probe_Y, when both above same spot on the bed. y_offset: 6 # Time pin takes to move up/down. Default 0.680 seconds. #pin_move_time: 0.680 [safe_z_home] home_xy_position: 65,93 speed: 80 z_hop: 10 z_hop_speed: 5 [bed_mesh] speed: 80 #Speed tool moves between points. horizontal_move_z: 5 # mesh_min and mesh_max are the the actual probe position on the bed (e.g. nozzle_x + x_offest). # Be mindful of crashing the hotend into the frame. Good to figure out an equal border around # the bed where the probe can reach. mesh_min: 50, 10 mesh_max: 210, 210 probe_count: 5,3 mesh_pps: 0,0 ; Interpolated points. [gcode_macro START_PRINT] gcode: {% set BED_TEMP = params.BED_TEMP|default(60)|float %} {% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %} # Start bed heating M140 S{BED_TEMP} # Use absolute coordinates G90 # Reset the G-Code Z offset (adjust Z offset if needed) SET_GCODE_OFFSET Z=0.0 # Home the printer G28 # Move the nozzle near the bed G1 Z5 F3000 # Move the nozzle very close to the bed G1 Z0.15 F300 # Wait for bed to reach temperature M190 S{BED_TEMP} # Set and wait for nozzle to reach temperature M109 S{EXTRUDER_TEMP} [gcode_macro END_PRINT] gcode: # Turn off bed, extruder, and fan M140 S0 M104 S0 M106 S0 # Move nozzle away from print while retracting G91 G1 X-2 Y-2 E-3 F300 # Raise nozzle by 10mm G1 Z10 F3000 G90 # Disable steppers M84 [gcode_macro M300] gcode: {% set S = params.S|default(1000)|int %} ; S sets the tone frequency {% set P = params.P|default(100)|int %} ; P sets the tone duration {% set L = 0.5 %} ; L varies the PWM on time, close to 0 or 1 the tone gets a bit quieter. 0.5 is a symmetric waveform {% if S <= 0 %} ; dont divide through zero {% set F = 1 %} {% set L = 0 %} {% elif S >= 10000 %} ;max frequency set to 10kHz {% set F = 0 %} {% else %} {% set F = 1/S %} ;convert frequency to seconds {% endif %} SET_PIN PIN=BEEPER_Pin VALUE={L} CYCLE_TIME={F} ;Play tone G4 P{P} ;tone duration SET_PIN PIN=BEEPER_Pin VALUE=0 [pause_resume] # This section is required, even if empty, to enable PAUSE, RESUME, CLEAR_PAUSE, and CANCEL_PRINT commands. Used in M600 Macro and Start GCODE. [gcode_macro M600] gcode: SET_IDLE_TIMEOUT TIMEOUT=3600 PAUSE_MACRO UNLOAD_FILAMENT #SET_STEPPER_ENABLE STEPPER=extruder ENABLE=0 ;Disable Extruder Stepper to allow new filament to be inserted and purged manually. [gcode_macro PAUSE_MACRO] gcode: M300 ;Beep PAUSE ;This also saves GCODE state which is restored on RESUME. G10 ;Retract PARK_MACRO [gcode_macro BED_MESH_CALIBRATE_AND_SAVE] gcode: G28 ; Home. BED_MESH_CALIBRATE G90 ; Absolute positioning. G1 X0 Y0 Z5 F4000 ; Move to safe position. M400 ; Wait until finished. M300 ; Beep. SAVE_CONFIG [gcode_macro CANCEL_PRINT] description: Cancel the actual running print rename_existing: CANCEL_PRINT_BASE gcode: TURN_OFF_HEATERS CANCEL_PRINT_BASE #*# <---------------------- SAVE_CONFIG ----------------------> #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. #*# #*# [extruder] #*# control = pid #*# pid_kp = 25.459 #*# pid_ki = 1.463 #*# pid_kd = 110.748 #*# #*# [heater_bed] #*# control = pid #*# pid_kp = 70.235 #*# pid_ki = 1.185 #*# pid_kd = 1040.360 #*# #*# [bed_mesh default] #*# version = 1 #*# points = #*# 0.206250, 0.215000, 0.276250, 0.310000, 0.327500 #*# -0.093750, -0.095000, -0.012500, 0.016250, -0.008750 #*# -0.438750, -0.390000, -0.318750, -0.300000, -0.262500 #*# tension = 0.2 #*# min_x = 50.0 #*# algo = lagrange #*# y_count = 3 #*# mesh_y_pps = 0 #*# min_y = 10.0 #*# x_count = 5 #*# max_y = 210.0 #*# mesh_x_pps = 0 #*# max_x = 210.0 #*# #*# [bltouch] #*# z_offset = 1.140