sandmmakers / BedLeveler5000

Bed Leveler 5000
https://sandmmakers.com/Projects/BedLeveler5000
Other
70 stars 11 forks source link

Manual Probe Neptune 3 Max (Klipper) incorrect location #51

Closed Ctrl-Alt-Rage closed 8 months ago

Ctrl-Alt-Rage commented 8 months ago

When I try to level the bed and click "1". Instead of moving to the front left corner, it moves about 6 inches to the right from the center and probes it.

Then if I try to press "2" I get a movement out of range error.

It's likely I'm doing it incorrectly, but am I missing something?

sandmmakers commented 8 months ago

Please add your printer.cfg file. It sounds like your configuration might not be correct.

Ctrl-Alt-Rage commented 8 months ago

Thanks for getting back to me so quickly. This is the printer.cfg that I have.

[include mainsail.cfg]
[include area_bed_mesh.cfg]
[include KAMP_Settings.cfg]

# For the ZNP Robin Nano DW v2.2 board:
#   - Compile with the processor model STM32F401.
#   - Select the 32KiB bootloader,
#   - Select (Serial (on # USART1 PA10/PA9) for the communication interface.
#   - Select (Serial (on # USART2 PA3/PA2) if you want to use the serial UART pins on J17 (wifi section)
# Note that the "make flash" command does not work with ZNP Robin boards. After running "make", run the following command:
# cp out/klipper.bin out/ZNP_ROBIN_NANO.bin
#
# Copy the file out/ZNP_ROBIN_NANO.bin to an SD card and then restart the printer with that SD card.
# See docs/Config_Reference.md for a description of parameters.

#[include timelapse.cfg]

[exclude_object] #comment out for Sonic pad

[virtual_sdcard]
path: ~/printer_data/gcodes

[pause_resume]

[display_status]

[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
    TURN_OFF_HEATERS
    CANCEL_PRINT_BASE

[gcode_macro PAUSE]
description: Pause the actual running print
rename_existing: PAUSE_BASE
# change this if you need more or less extrusion
variable_extrude: 1.0
gcode:
    ##### read E from pause macro #####
    {% set E = printer["gcode_macro PAUSE"].extrude|float %}
    ##### set park positon for x and y #####
    # default is your max posion from your printer.cfg
    {% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
    {% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
    ##### calculate save lift position #####
    {% set max_z = printer.toolhead.axis_maximum.z|float %}
    {% set act_z = printer.toolhead.position.z|float %}
    {% if act_z < (max_z - 2.0) %}
        {% set z_safe = 2.0 %}
    {% else %}
        {% set z_safe = max_z - act_z %}
    {% endif %}
    ##### end of definitions #####
    PAUSE_BASE
    G91
    {% if printer.extruder.can_extrude|lower == 'true' %}
      G1 E-{E} F2100
    {% else %}
      {action_respond_info("Extruder not hot enough")}
    {% endif %}
    {% if "xyz" in printer.toolhead.homed_axes %}
      G1 Z{z_safe} F900
      G90
      G1 X{x_park} Y{y_park} F6000
    {% else %}
      {action_respond_info("Printer not homed")}
    {% endif %} 

[gcode_macro RESUME]
description: Resume the actual running print
rename_existing: RESUME_BASE
gcode:
    ##### read E from pause macro #####
    {% set E = printer["gcode_macro PAUSE"].extrude|float %}
    #### get VELOCITY parameter if specified ####
    {% if 'VELOCITY' in params|upper %}
      {% set get_params = ('VELOCITY=' + params.VELOCITY)  %}
    {%else %}
      {% set get_params = "" %}
    {% endif %}
    ##### end of definitions #####
    {% if printer.extruder.can_extrude|lower == 'true' %}
      G91
      G1 E{E} F2100
    {% else %}
      {action_respond_info("Extruder not hot enough")}
    {% endif %}  
    RESUME_BASE {get_params}

[gcode_macro MANUAL_LEVEL]
description: Home and measure for maunual leveling adjustments
gcode:
  G28
  SCREWS_TILT_CALCULATE
  G90
  G1 F3000 X213 Y213 Z25 

[mcu]
serial: /dev/ttyUSB0
restart_method: command

[led LED_Light]
white_pin: PB9
initial_white: 1.0

#[output_pin LED_Light] #toggle for LED Light - use this instead of [LED] for sonic pad
#Pin: PB9
#cycle_time: 0.01
#pwm: true
#value: 1

[printer]
kinematics: cartesian
max_velocity: 500
max_accel: 3700
max_z_velocity: 15
max_z_accel: 100
square_corner_velocity: 5
# Use those higher values just to configure Input Shaper 
#max_accel: 10000
#max_accel_to_decel: 10000

[stepper_x]
step_pin: !PC12
dir_pin: PB3
enable_pin: !PD2
microsteps: 16
rotation_distance: 40
endstop_pin: PA13
position_endstop: 0
position_max: 427
homing_speed: 100

[stepper_y]
step_pin: PC11
dir_pin: PA15
enable_pin: !PC10
microsteps: 16
rotation_distance: 40
endstop_pin: PB8
position_endstop: -7
position_min: -7
position_max: 427
homing_speed: 50

[stepper_z]
step_pin: PC7
dir_pin: !PC9
enable_pin: !PC8
rotation_distance: 8
microsteps: 16
position_min: -2
position_max: 510
endstop_pin: probe:z_virtual_endstop # Use Z- as endstop
homing_speed: 10
homing_retract_speed: 15

[extruder]
max_extrude_only_distance: 100.0
step_pin: PB10
dir_pin: PB1
enable_pin: !PC6
microsteps: 16
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PA6
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC1
min_temp: 0
max_temp: 250
# Calibrate E-Steps https://www.klipper3d.org/Rotation_Distance.html#calibrating-rotation_distance-on-extruders
rotation_distance: 7.867
# Calibrate PID: https://www.klipper3d.org/Config_checks.html#calibrate-pid-settings
#  - Example: PID_CALIBRATE HEATER=extruder TARGET=200
#control = pid
#pid_kp = 23.847
#pid_ki = 1.325
#pid_kd = 107.311
# Calibrate PA: https://www.klipper3d.org/Pressure_Advance.html
#pressure_advance = 0.600

[heater_bed]
heater_pin: PA5
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC0
pwm_cycle_time: 0.020 # set to 0.0166 if your grid runs on 60Hz to fix lights flickering
max_temp: 110
min_temp: 0
# Calibrate PID: https://www.klipper3d.org/Config_checks.html#calibrate-pid-settings
#  - Example: PID_CALIBRATE HEATER=heater_bed TARGET=60
#control = pid
#pid_kp = 71.562
#pid_ki = 0.778
#pid_kd = 1645.031

[heater_fan hotend_fan]
pin: PB0
heater: extruder
heater_temp: 50.0

[fan]
pin: PA7

[force_move]
enable_force_move: True

[safe_z_home]
speed: 100.0
home_xy_position: 241, 193
z_hop: 10

[probe]
pin: ^PA8
speed: 5
lift_speed: 15
samples: 3
x_offset: -28
y_offset: 20
# Calibrate probe: https://www.klipper3d.org/Bed_Level.html
# - Example: PROBE_CALIBRATE, then adjust with TESTZ Z=+/-X
#z_offset = 1.75

[filament_switch_sensor filament_sensor]
pause_on_runout: true
switch_pin: PB4

[bed_mesh]
probe_count = 10,10
algorithm = bicubic
speed: 200
horizontal_move_z: 10
mesh_min: 5, 13
mesh_max: 399, 421
fade_start: 1.0
fade_end: 10.0

[input_shaper]
# Calibrate IS: https://www.klipper3d.org/Resonance_Compensation.html
shaper_type_x = ei
shaper_freq_x = 62.0
shaper_type_y = zv
shaper_freq_y = 31.6
#Slower but slightly less vibration option (change max accel to 2800)
#shaper_type_y = mzv
#shaper_freq_y = 31.0

[temperature_sensor raspberry_pi]
sensor_type: temperature_host
#min_temp: 10
#max_temp: 105

[temperature_sensor mcu_temp]
sensor_type: temperature_mcu
sensor_temperature1: 25
sensor_adc1: 0.210317
#min_temp: 0
#max_temp: 105

[gcode_macro M420]
description: Load the current mesh
gcode:
  BED_MESH_PROFILE LOAD=default

[gcode_macro G29]
description: creates automated homing and bed mesh
gcode:
  G28
  BED_MESH_CALIBRATE
  DATA_SAVE

[screws_tilt_adjust]
screw_thread: CW-M3
speed: 200
screw1: 241, 193
screw1_name: center
screw2: 419, 371
screw2_name: right back screw
screw3: 419, 193
screw3_name: right middle screw
screw4: 419, 15
screw4_name: right front screw
screw5: 63, 15
screw5_name: left front screw
screw6: 63, 193
screw6_name: left middle screw
screw7: 63, 371
screw7_name: left back screw

#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [probe]
#*# z_offset = 2.276
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 27.160
#*# pid_ki = 1.561
#*# pid_kd = 118.145
#*#
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 72.306
#*# pid_ki = 0.844
#*# pid_kd = 1548.255
#*#
#*# [bed_mesh default]
#*# version = 1
#*# points =
#*#       0.025833, 0.005833, 0.015000
#*#       0.025000, 0.006667, 0.014167
#*#       0.002500, -0.026667, -0.016667
#*# x_count = 3
#*# y_count = 3
#*# mesh_x_pps = 2
#*# mesh_y_pps = 2
#*# algo = lagrange
#*# tension = 0.2
#*# min_x = 177.54
#*# max_x = 230.91000000000003
#*# min_y = 182.83
#*# max_y = 241.62
sandmmakers commented 8 months ago

I looked over your printer.cfg file, and while some of the numbers are a little odd, I didn't see anything that would cause major changes to BL5K functionality. When you were using BL5K, was anything else connected to the printer or did you do anything with the LCD controller. Also, did you try BL5K right after turning on the printer, or did you already use other programs with the printer or run any g-code files? The only thing I can think of, at the moment, is that somehow your printer was in relative movement mode instead of absolute movement mode. If this is the case, restarting the printer should allow BL5K to work properly, but it would also be a bug that I would like to fix in the next BL5K release.

Ctrl-Alt-Rage commented 8 months ago

1 - The LCD Controller has been unplugged since I installed Klipper due to some reported start up issues. That could have been fixed since then (I got the printer beginning of December). The only thing currently connected to the printer is the PI box to connect to it.

2 - I haven't tried restarting the printer or turning it off and on again.

I will report any findings later tonight or tomorrow. It's in the middle of a print job right now.

Thanks again!

sandmmakers commented 8 months ago

Thank you for the update. In the mean time, I will test in the simulator.

sandmmakers commented 8 months ago

I just confirmed that BL5K does not ensure the printer is in absolute positioning mode. While there is a chance there is something else causing the behavior you observed, my guess is that you ran something, or did something, that left the printer in relative positioning mode. I will fix this for the next release.

sandmmakers commented 8 months ago

I just pushed a fix. You can see the changes here: https://github.com/sandmmakers/BedLeveler5000/commit/148ea309f2807dce1ed8d4b67e00106f541b315c.

While it might be best to just restart your printer and test again with v0.4.0, you can test a preview build here: https://github.com/sandmmakers/BedLeveler5000/actions/runs/7809227483. This build has a lot of unrelated changes in it and is not fully tested yet.

Ctrl-Alt-Rage commented 8 months ago

I just wanted to let you know (prior to installing your update above) doing a firmware restart in Klipper fixed the issue.

Thank you!