This file is designed for the Ender 3 V2 Neo with the BTT M4P / CB1 control board combo.
I fixed an issue where the y axis was reversed, added the part cooling fan, and enabled the classic ender 3/cr10 display
[include mainsail.cfg]
[virtual_sdcard]
path: /home/biqu/printer_data/gcodes
on_error_gcode: CANCEL_PRINT
# This file contains common pin mappings for the BIGTREETECH Manta M4P
# To use this config, the firmware should be compiled for the
# STM32G0B1 with a "8KiB bootloader" and USB communication.
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PC6
dir_pin: PA14
enable_pin: !PC7
microsteps: 16
rotation_distance: 40
endstop_pin: ^PC0
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_y]
step_pin: PB10
dir_pin: PB2
enable_pin: !PB11
microsteps: 16
rotation_distance: 40
endstop_pin: ^PC1
position_endstop: 0
position_max: 235
homing_speed: 50
[stepper_z]
step_pin: PB0
dir_pin: !PC5
enable_pin: !PB1
microsteps: 16
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop
position_max: 270
position_min = -5
homing_speed = 8
second_homing_speed = 3
homing_retract_dist = 3
[extruder]
step_pin: PB3
dir_pin: PB4
enable_pin: !PD5
microsteps: 16
rotation_distance: 33.500
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PC8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PA0
control: pid
pid_Kp: 21.527
pid_Ki: 1.063
pid_Kd: 108.982
min_temp: 0
max_temp: 250
#[filament_switch_sensor filament_sensor]
#switch_pin: ^!PC15
[heater_bed]
heater_pin: PD8
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC4
control: pid
# tuned for stock hardware with 70 degree Celsius target
pid_kp: 70.405
pid_ki: 1.229
pid_kd: 1008.553
min_temp: 0
max_temp: 130
[verify_heater heater_bed]
check_gain_time: 90
########################################
# Fan configuration
########################################
[fan_generic extruder_partfan]
pin: PD2
[heater_fan heatbreak_cooling_fan]
pin: PD3
heater: extruder
heater_temp: 50.0
#[heater_fan fan2]
#pin: PD4
#[heater_fan SoC_fan]
#pin: CB1:gpio79
#pin: RPI:gpio26
[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32g0b1xx_280034000E50415833323520-if00
restart_method: command
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 5000
max_z_velocity: 5
square_corner_velocity: 5.0
max_z_accel: 100
########################################
# EXP1 / EXP2 (display) pins
########################################
[board_pins]
aliases:
# EXP1 header
EXP1_1=PD6, EXP1_3=PB9, EXP1_5=PA15, EXP1_7=PA9, EXP1_9=<GND>,
EXP1_2=PB8, EXP1_4=PC3, EXP1_6=PA10, EXP1_8=PB5, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PB14, EXP2_3=PC11, EXP2_5=PC12, EXP2_7=PC13, EXP2_9=<GND>,
EXP2_2=PB13, EXP2_4=PA8, EXP2_6=PB15, EXP2_8=<RST>, EXP2_10=<NC>
# See the sample-lcd.cfg file for definitions of common LCD displays.
########################################
# Display configuration
########################################
# Used a Ender 3/CR 10 display (the one thats just blue with white text)
# I connected EXP 1 on the M4P board to EXP 3 on the display
[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
########################################
# TMC2209 configuration
########################################
[tmc2209 stepper_x]
uart_pin: PB12
run_current: 0.800
diag_pin:
[tmc2209 stepper_y]
uart_pin: PC10
run_current: 0.800
diag_pin:
[tmc2209 stepper_z]
uart_pin: PC9
run_current: 0.800
diag_pin:
[tmc2209 extruder]
uart_pin: PA13
run_current: 0.600
diag_pin:
########################################
# Bed Leveling configuration
########################################
[bltouch]
sensor_pin: PC14
control_pin: PA1
x_offset: -45.0
y_offset: -10.0
z_offset: 0
speed: 20
samples: 1
sample_retract_dist: 8.0
[safe_z_home]
home_xy_position: 160,120
speed: 150
z_hop: 10
z_hop_speed: 10
[bed_mesh]
speed: 120
mesh_min: 30,30 # Need to handle head distance with cr-touch (bl_touch)
mesh_max: 189,189 # Max probe range
probe_count: 5,5
fade_start: 1
fade_end: 10
fade_target: 0
algorithm: bicubic
[bed_screws]
screw1:30,25
screw1_name:1
screw2:200,25
screw2_name:2
screw3:200,195
screw3_name:3
screw4:30,195
screw4_name:4
[screws_tilt_adjust]
screw1: 67, 42
screw1_name: front left screw
screw2: 237.60, 42
screw2_name: front right screw
screw3: 237.60, 212
screw3_name: rear right screw
screw4: 67.60, 212
screw4_name: rear left screw
horizontal_move_z: 10
speed: 200
screw_thread: CW-M4 # Use CW for Clockwise and CCW for Counter Clockwise
#[adxl345]
#cs_pin: PD9
#spi_bus: spi1
#axes_map: z,y,-x
#[neopixel rgb1]
#pin: PD0
#[neopixel rgb2]
#pin: PD1