Klipper BL Touch Problem
-
I have the Duet WiFi and Duex5 boards. I've installed Klipper and everything works except the bl touch. The bl touch does its system check moving up and down and I have a solid red light. The debug pin down command doesn't move the pin down. Pushing the pin up or down the probe query shows it as open for both. Everything worked in RepRap2. I have the white wire connected to the z probe and the black to the ground right next to it. I have the servo wires (Brown, Red, Orange) connected to the PWM3 on the Duex5. I've found two examples on line with both using the same pins and claiming it worked. one used sensor_pin: PC1 and !PC3. The other used sensor pin: ^PC1 and control pin: !PA15. I have tried both. I have also tried moving the probe pins to the zstop and using sensor pin: PD29. That also didn't work. I unplugged the white and black wires from the zstop and jumped the two outer pins of the zstop. Did a probe query and got trigger when jumped, so I know the mapping was right. Seems that if I had the PWM3 configured right the probe would go down with the pin down command. Any help would be great, I've been stuck on this for days. I'm going to list the bltouch settings first, under that I will put the whole config list. Maybe there is a conflict somewhere.
[bltouch]
sensor_pin: PC1 # ^ = Activate pullup resistor to avoid floating input
control_pin: !PC3 # ! = Active low
x_offset: -16.88
y_offset: -18
#z_offset: 1.1
speed: 5
samples: 1Here's the whole config:
#__________________________ X ON DRIVE X ____________________________
[stepper_x]
step_pin: PD6
dir_pin: PD11
enable_pin: !PC6
microsteps: 16
rotation_distance: 32
full_steps_per_rotation: 200
endstop_pin: ^PC14
position_endstop: 0
position_max: 610
homing_speed: 50.0
homing_retract_dist: 5.0
#second_homing_speed: 10[tmc2660 stepper_x]
cs_pin: PD14 # X_SPI_EN Required for communication
spi_bus: usart1 # All TMC2660 drivers are connected to USART1
interpolate: True # 1/16 micro-steps interpolated to 1/256
run_current: 2.00
sense_resistor: 0.051
idle_current_percent: 20#__________________________ X1 ON DRIVE E1 ____________________________
[stepper_x1]
step_pin: PD4
dir_pin: PD9
enable_pin: !PC6
microsteps: 16
rotation_distance: 32
full_steps_per_rotation: 200[tmc2660 stepper_x1]
cs_pin: PC25 # X_SPI_EN Required for communication
spi_bus: usart1 # All TMC2660 drivers are connected to USART1
interpolate: True # 1/16 micro-steps interpolated to 1/256
run_current: 2.00
sense_resistor: 0.051
idle_current_percent: 20#__________________________ ON DRIVE Y ____________________________
[stepper_y]
step_pin: PD7
dir_pin: !PD12
enable_pin: !PC6
microsteps: 16
rotation_distance: 32
full_steps_per_rotation: 200
endstop_pin: ^PA2
position_endstop: 0
position_max: 610
homing_speed: 50.0
homing_retract_dist: 5.0
#second_homing_speed: 10[tmc2660 stepper_y]
cs_pin: PC9
spi_bus: usart1
interpolate: True
run_current: 2.00
sense_resistor: 0.051
idle_current_percent: 20####################################################################
############################ Z Axis ################################
#####################################################################__________________________ Z ON DRIVE E3 ____________________________
[stepper_z]
step_pin: PD1
dir_pin: !PD22
enable_pin: !PC6
microsteps: 16
rotation_distance: 4
full_steps_per_rotation: 200
gear_ratio: 16:40
endstop_pin: probe:z_virtual_endstop
position_max: 670
position_min: -0.5[tmc2660 stepper_z]
cs_pin: PD24
spi_bus: usart1
interpolate: True
run_current: 1.800
sense_resistor: 0.051
idle_current_percent: 20#_________________________ Z1 ON DRIVE E4 ___________________________
[stepper_z1]
step_pin: PD0
dir_pin: !PD16
enable_pin: !PC6
microsteps: 16
rotation_distance: 4
full_steps_per_rotation: 200
gear_ratio: 16:40[tmc2660 stepper_z1]
cs_pin: PD25
spi_bus: usart1
interpolate: True
run_current: 1.800
sense_resistor: 0.051
idle_current_percent: 20#_________________________ Z2 ON DRIVE E5 ___________________________
[stepper_z2]
step_pin: PD3
dir_pin: !PD17
enable_pin: !PC6
microsteps: 16
rotation_distance: 4
full_steps_per_rotation: 200
gear_ratio: 16:40[tmc2660 stepper_z2]
cs_pin: PD26
spi_bus: usart1
interpolate: True
run_current: 1.800
sense_resistor: 0.051
idle_current_percent: 20#_________________________ Z3 ON DRIVE E6 ___________________________
[stepper_z3]
step_pin: PD27
dir_pin: !PC0
enable_pin: !PC6
microsteps: 16
rotation_distance: 4
full_steps_per_rotation: 200
gear_ratio: 16:40[tmc2660 stepper_z3]
cs_pin: PB14
spi_bus: usart1
interpolate: True
run_current: 1.800
sense_resistor: 0.051
idle_current_percent: 20#__________________________ BLTouch ______________________________
[bltouch]
sensor_pin: PC1 # ^ = Activate pullup resistor to avoid floating input
control_pin: !PC3 # ! = Active low
x_offset: -16.88
y_offset: -18
#z_offset: 1.1
speed: 5
samples: 1
#sample_retract_dist: 5
#samples_tolerance: 0.010#__________________ SELF LEVELLING (Z_Tilt) _______________________
#[z_tilt]
#z_positions:-38.188,-20.717
138.021,307.493
314.23,-20.717
#points:
20,20
20,260
260,260
230,20
#speed: 50
#horizontal_move_z: 10#retries: 0
Number of times to retry if the probed points aren't within
tolerance.
#retry_tolerance: 0
If retries are enabled then retry if largest and smallest probed
points differ more than retry_tolerance. Note the smallest unit of
change here would be a single step. However if you are probing
more points than steppers then you will likely have a fixed
minimum value for the range of probed points which you can learn
by observing command output.
#_____________________ SAFE Z HOMING ________________________________
[safe_z_home]
home_xy_position: 20,20
z_hop: 10
z_hop_speed: 20.0##################################################################
########################## EXTRUDER ##############################
##################################################################
#On drive E0
[extruder]
step_pin: PD5
dir_pin: PA1
enable_pin: !PC6
microsteps: 16
full_steps_per_rotation: 400
rotation_distance: 7.97
nozzle_diameter: 0.600
filament_diameter: 1.750
#_______________________ HEATER NOZZLE ____________________________
heater_pin: !PA20
#_________________________NOZZLE TEMP _____________________________
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC15
control: pid
pid_Kp: 22.2
pid_Ki: 1.08
pid_Kd: 114
min_temp: 0
max_temp: 250
#pressure_advance = 0.010
#max_extrude_only_distance: 150.0[tmc2660 extruder]
cs_pin: PC17
spi_bus: usart1
interpolate: True
run_current: 1.0
sense_resistor: 0.051#[multi_pin hevacs]
#pins: sx1509_duex:PIN_15, sx1509_duex:PIN_4 #Fan7&8#[multi_pin my_fan]
#pins: PC23,PA0 #Fan 0 & 2Fan0
[fan]
pin: PC23Fan1 controlled by extruder
[heater_fan nozzle_cooling_fan]
pin: PC26
heater: extruder
heater_temp: 45
fan_speed: 1.0####################################################################
############################ BED ###################################
####################################################################
#[heater_bed]
#heater_pin: !PA19
#sensor_type: EPCOS 100K B57560G104F
#sensor_pin: PC13
#control: watermark
#min_temp: 0
#max_temp: 130####################################################################
############################ MCU ###################################
####################################################################
[mcu]
serial: /dev/serial/by-id/usb-Klipper_sam4e8e_00313753383436313230303637303433-if00[sx1509 duex]
i2c_address: 62 # Address is fixed on duex boards[static_digital_output onboard_led]
pins: !PC2[output_pin GPIO1] # General purpose pin broken out on the duex
pin: sx1509_duex:PIN_11
pwm: False
value: 1[virtual_sdcard]
path: ~/gcode_files[display_status]
####################################################################
############################ ACCELEROMETER #########################
#####################################################################[mcu rpi]
#serial: /tmp/klipper_host_mcu#[adxl345]
#cs_pin: rpi:None#[resonance_tester]
#accel_chip: adxl345
#probe_points:150,150,20 # an example
####################################################################
############################ PRINTER ###############################
####################################################################
[printer]
kinematics: cartesian
max_velocity: 150
max_accel: 1000
max_accel_to_decel: 500
max_z_velocity: 6
max_z_accel: 120
square_corner_velocity: 10.0[pause_resume]
recover_velocity: 150[input_shaper]
shaper_freq_x: 98.6 # per accelerometer
shaper_type_x: 2hump_ei
shaper_freq_y: 73.6 # per accelerometer
shaper_type_y: 3hump_ei####################################################################
############################ FANS ##################################
####################################################################
[output_pin FAN3]
pin: sx1509_duex:PIN_12
pwm: True
hardware_pwm: True # Only hardware PWM fans are supported[output_pin FAN4]
pin: sx1509_duex:PIN_7
pwm: True
hardware_pwm: True[output_pin FAN5]
pin: sx1509_duex:PIN_6
pwm: True
hardware_pwm: True[output_pin FAN6]
pin: sx1509_duex:PIN_5
pwm: True
hardware_pwm: True[output_pin FAN7]
pin: sx1509_duex:PIN_4
pwm: True
hardware_pwm: True#[output_pin FAN8]
#pin: sx1509_duex:PIN_15
#pwm: True
#hardware_pwm: True####################################################################
###################### FILAMENT SENSOR #############################
####################################################################
#[filament_switch_sensor sentinel]
#pause_on_runout: true
#switch_pin: PXXX # not mapped yet
#runout_gcode:G91
G1 E-6 F2500
G1 Z 10
#############OPTION GCODE#################
#[virtual_sdcard]
#path: ~/.octoprint/uploads/##############################################
################# MACROS #####################
##############################################
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
TURN_OFF_HEATERS
CLEAR_PAUSE
SDCARD_RESET_FILE
BASE_CANCEL_PRINT####################################################################
###################### END of manual config ########################
###################################################################### <---------------------- SAVE_CONFIG ---------------------->
## DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
##
## [bltouch]
## z_offset = 0.700
##
## [extruder]
## control = pid
## pid_kp = 12.516
## pid_ki = 0.765
#*# pid_kd = 51.158 -
Not many klipper users here. Might have better luck on the klipper discord.
-
@chickenwoman, I believe @Luke-sLaboratory did the initial port of Klipper to the Duet 3 Mini, so he may be able to help.
-
@phaedrux I'm trying both. I figured I would try here because the Klipper developers aren't familiar with the Duet Wifi pin numbers and setup. The first thing I need to know is the pin id of PWM3 on the Duex. I used this to get my pinout id's https://duet3d.dozuki.com/Wiki/Duet_2_Pinout_table and there's several different pin ids for PWM3. I'm not sure if it makes a difference on which one I use. The ^ in Klipper is to enable the pullup resister and the ! is to invert, I left that out in my original post.
-
@dc42 I see that he's done it with the Duet 3. The pin assignments would be different. I'm not really sure how the insides of the bltouch work. Seems like even if I had the PWM3 pin assignment wrong that with the white and black wire in the zprobe slots on the Duet that the open and trigger state would change by manually moving the pin. Maybe if I could understand this better it would help trouble shoot. I'll also try to reach out to @Luke-sLaboratory
-
Just had to rejoin the Klipper Discord server to get my Klipper BLTouch config, that I wrote last year.
Had to get a friend to re-invite me!TBH I got so fed up with the tramming under Klipper, sometimes it worked, most of the time it failed. When I reloaded RRF it all worked as it should.
Bought a Mini 5+ and a 1LC left it on RRF and never looked back.
Here is the config, hope it helps.
##################################################################### # BLTouch / Z Tilt and bits ##################################################################### [bltouch] sensor_pin: PC1 control_pin: !PC3 x_offset: 2 y_offset: 42 #z_offset: 5 samples: 3 samples_result: average samples_tolerance_retries: 3 samples_tolerance: 0.005 speed: 5.0 stow_on_each_sample: false probe_with_touch_mode:true [safe_z_home] home_xy_position: 150,150 # Change coordinates to the center of your print bed speed: 50 z_hop: 10 # Move up 10mm z_hop_speed: 5 [z_tilt] z_positions: -10, 22.5 #Left Front -10, 277.5 #Left Rear 333, 150 #Right points: 30, 45 30, 250 275, 250 275, 45 horizontal_move_z: 10 retries: 5 retry_tolerance: 0.02 speed: 100 #50
P.
-
@dc42 I solved it from one of your earlier post where you said heater 7 was associated with PWM 5. Even though I read that post over and over I thought you had misspoken on the PWM5. Instead I kept referring to the https://duet3d.dozuki.com/Wiki/Duet_2_Pinout_table which had Heater 7 associated with PWML3. I could use some help on how I misread the Duet Pin table. This is line
49: PA15 TIOA1 PWML3 WKUP14 HEATER7 15 HEATER7
Wouldn't this imply PA15 controls the PWM3 plug?
Also with the Duet do I need to activate pullup resistor to avoid floating input?Thanks, you're amazing.
It's amazing how one can spend days trouble shooting and not try something obvious lol.
For others having this issue my working arrangement is PWM5 which is control pin PA15.
[bltouch]
sensor_pin: PC1 # ^ = Activate pullup resistor to avoid floating input
control_pin: !PA15 # ! = Active low
x_offset: -16.88
y_offset: -18 -
@chickenwoman said in Klipper BL Touch Problem:
49: PA15 TIOA1 PWML3 WKUP14 HEATER7 15 HEATER7
Wouldn't this imply PA15 controls the PWM3 plug?Yes.
Also with the Duet do I need to activate pullup resistor to avoid floating input?
On the Z probe input and inputs on the expansion connector, yes. On the endstop inputs on the Duet, no.
-
@dc42 said in Klipper BL Touch Problem:
49: PA15 TIOA1 PWML3 WKUP14 HEATER7 15 HEATER7
Wouldn't this imply PA15 controls the PWM3 plug?Yes.
So since PA15 actually controls PWM5 and not PWM3 this must mean the pinout table at https://duet3d.dozuki.com/Wiki/Duet_2_Pinout_table is incorrect. Is there a place I can find a correct pinout table or am I just reading it wrong?
Thanks -
@chickenwoman PWML3 is a peripheral inside the MCU, whereas PWM5 is an output on the DueX. The PWML3 peripheral controls the PWM5 pin.
-
@chickenwoman @dc42 glad to hear that you got it figured out on the Duet2.
I did do the initial port to D3mini, and I believe there are others using it with a Bltouch.