What's new
VORON Design

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members!

Bed fan mod with 24V bed

Hi, I have installed klipper and octopring sucessfully to Pi4. and able to run printer with it basic functionalities.

But when I added BFP touch configuration. It start giving me erro 'OctoKlipper: Error: File contains parsing errors: /home/pi/printer.cfg'
here is my printer.cfg file given below. what I am doing wrong here?

# This file contains common pin mappings for the BigTreeTech SKR 2.
# To use this config, the firmware should be compiled for the
# STM32F407 with a "32KiB bootloader".

# In newer versions of this board shipped in late 2021 the STM32F429
# is used, if this is the case compile for this with a "32KiB bootloader"
# You will need to check the chip on your board to identify which you have.
#
# The "make flash" command does not work on the SKR 2. Instead,
# after running "make", copy the generated "out/klipper.bin" file to a
# file named "firmware.bin" on an SD card and then restart the SKR 2
# with that SD card.

# See docs/Config_Reference.md for a description of parameters.

# Note: The initial revision of this board has a flaw that can cause
# damage to itself and other boards. Be sure to verify the board is
# not impacted by this flaw before using it.

[stepper_x]
step_pin: PE2
dir_pin: PE1
enable_pin: !PE3
microsteps: 256
rotation_distance: 40
endstop_pin: ^PC1
position_endstop: 11
position_max: 300
homing_speed: 80

[stepper_y]
step_pin: PD5
dir_pin: !PD4
enable_pin: !PD6
microsteps: 256
rotation_distance: 40
endstop_pin: ^PC3
position_endstop: 0
position_max: 300
homing_speed: 80

[stepper_z]
step_pin: PA15
dir_pin: PA8
enable_pin: !PD1
microsteps: 256
rotation_distance: 8
endstop_pin: probe:z_virtual_endstop #use probe as Z endstop
#position_endstop: 1.8
position_max: 200
position_min: 0

[servo BFPTouch]
pin: PE5 #Set to your servo for the probe arm
initial_angle: 150
maximum_servo_angle = 105 #set you max angle (probe out), find via SET_SERVO SERVO=BFPTouch ANGLE=93
minimum_pulse_width = 0.001
maximum_pulse_width = 0.002

[bltouch]
sensor_pin: ^PC0 #Set to the pin activated by the optical sensor
control_pin: PE4 #pick an unused one, we aren't using it but it is required
#tap the head to painters tape on the bed, then move around till the BFPTouch hits the same spot
x_offset: -37.0
y_offset: -30.
z_offset: 0
pin_up_touch_mode_reports_triggered: False
pin_up_reports_not_triggered:False
stow_on_each_sample: False
probe_with_touch_mode: False
samples:1

[bed_screws]
#Adjust to your needs
screw1:20,20
screw2:280,20
screw3:280,280
screw4:20,280

[bed_mesh]
#adjust to your needs
speed: 200
horizontal_move_z: 5
mesh_min: 30, 15 #Set to the minimum area of your printer including the probe offset
mesh_max: 300, 300 #Set to the minimum area of your printer excluding the probe offset
probe_count: 5,5 #this is the number of probing points on X then Y axis so 25 points
mesh_pps: 2,2
fade_start: 1
fade_end: 10
fade_target: 0

[gcode_macro PROBE_OUT]
gcode:
SET_SERVO SERVO=BFPTouch ANGLE=105 ENABLE=1 #Set this to the angle where the probe is deployed
G4 P300

[gcode_macro PROBE_IN]
gcode:
SET_SERVO SERVO=BFPTouch ANGLE=150 #Set this to the angle where the probe is retracted
G4 P100

[gcode_macro PRINT_START]
gcode:
# Parameters
{% set BED_TEMP = params.BED|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER|float %}

#get heating started
M140 S{BED_TEMP}
M104 S{EXTRUDER_TEMP}

#get perfect first bed layer
G28 X Y Z
BED_MESH_CALIBRATE
G1 Z2

#wait till temps reach the correct temperature
M190 S{BED_TEMP} ; set and wait for bed to reach temp
M109 S{EXTRUDER_TEMP} ; set and wait for hot end to reach temp

[gcode_macro END_PRINT]
gcode:
M104 S0
M140 S0
G1 X0 Y200
M84 #disable motors

[homing_override]
axes: z
set_position_z:0 # Make printer think Z axis is at zero, so we can force a move upwards away from build plate
gcode:
G90
G1 Z5 F3000 ; move up to prevent accidentally scratching build plate
{% if "x" not in (printer.toolhead.homed_axes | lower) %}
G28 X
{% endif %}
{% if "y" not in (printer.toolhead.homed_axes | lower) %}
G28 Y #Will only home XY if they are not currently homed
{% endif %}
PROBE_OUT
G1 X120 Y145 F6000
G28 Z
PROBE_IN
#SET_GCODE_OFFSET Z=.7
#G1 Z2
#G92 Z0

[gcode_macro BED_MESH_CALIBRATE]
rename_existing: _BED_MESH_CALIBRATE
gcode:
#G28 #home it first
G1 Z5
PROBE_OUT
_BED_MESH_CALIBRATE
PROBE_IN

[gcode_macro PROBE]
rename_existing: _PROBE
gcode:
PROBE_OUT
_PROBE
PROBE_IN

[extruder]
step_pin: PD15
dir_pin: PD14
enable_pin: !PC7
microsteps: 256
rotation_distance: 33.21
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PB3
sensor_type: Generic 3950
sensor_pin: PA2
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 250

#[extruder1]
#step_pin: PD11
#dir_pin: PD10
#enable_pin: !PD13
#heater_pin: PB4
#sensor_pin: PA3
#...

[heater_bed]
heater_pin: PD7
sensor_type: Generic 3950
sensor_pin: PA1
control: watermark
min_temp: 0
max_temp: 110

[fan]
pin: PB7

[heater_fan fan1]
pin: PB6

[controller_fan fan2]
pin: PB5

# Due to BTT implementing a Marlin-specific safety feature,
# "anti-reversal stepper protection", this pin needs pulling
# high to pass power to stepper drivers and most FETs

[output_pin motor_power]
pin: PC13
value: 1

[mcu]
serial: /dev/serial/by-id/usb-Klipper_stm32f429xx_430045000251303330363837-if00

[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 3000
max_z_velocity: 150
max_z_accel: 50

########################################
# EXP1 / EXP2 (display) pins
########################################

[board_pins]
aliases:
# EXP1 header
EXP1_1=PC5, EXP1_3=PB1, EXP1_5=PE10, EXP1_7=PE12, EXP1_9=<GND>,
EXP1_2=PB0, EXP1_4=PE9, EXP1_6=PE11, EXP1_8=PE13, EXP1_10=<5V>,
# EXP2 header
EXP2_1=PA6, EXP2_3=PE7, EXP2_5=PB2, EXP2_7=PC4, EXP2_9=<GND>,
EXP2_2=PA5, EXP2_4=PA4, EXP2_6=PA7, EXP2_8=<RST>, EXP2_10=<NC>

# See the sample-lcd.cfg file for definitions of common LCD displays.

[display]
lcd_type: hd44780
rs_pin: EXP1_4
e_pin: EXP1_3
d4_pin: EXP1_5
d5_pin: EXP1_6
d6_pin: EXP1_7
d7_pin: EXP1_8
encoder_pins: ^EXP2_3, ^EXP2_5
click_pin: ^!EXP1_2
#kill_pin: ^!EXP2_8

[output_pin beeper]
pin: EXP1_1

########################################
# TMC2209 configuration
########################################

[tmc2209 stepper_x]
uart_pin: PE0
run_current: 0.9
hold_current: 0.6
stealthchop_threshold: 100
#diag_pin:

[tmc2209 stepper_y]
uart_pin: PD3
run_current: 0.9
hold_current: 0.6
stealthchop_threshold: 100
#diag_pin:

[tmc2209 stepper_z]
uart_pin: PD0
run_current: 0.9
hold_current: 0.6
stealthchop_threshold: 100
#diag_pin:

[tmc2209 extruder]
uart_pin: PC6
run_current: 0.96
hold_current: 0.5
#diag_pin:

#tmc2209 extruder1]
#art_pin: PD12
#un_current: 0.600
#diag_pin:
 
Top