Marlin icon indicating copy to clipboard operation
Marlin copied to clipboard

[BUG] Default value of `Z_HYBRID_THRESHOLD` causes a mechanical crash when homing Z axis

Open yunline opened this issue 1 year ago • 1 comments

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

I was setting up my tmc2209 with sensorless_probing and hybrid_threshold enabled, When I tried to home the z axis, the nozzle crashed to the bed. I found the StallGuard is not working even though the motor is totally stall.

I read the datasheet of tmc2209 and found out why. According to TMC2209 DATASHEET (Rev. 1.09 / 2023-FEB-16) Page 59:

DIAG is pulsed by StallGuard when SG_RESULT falls below SGTHRS. It is only enabled in StealthChop mode, and when TCOOLTHRS ≥ TSTEP > TPWMTHRS

That means, Z_HYBRID_THRESHOLD should larger than the homing speed, or the StallGuard doesn't work. By default, Z_HYBRID_THRESHOLD is 3 mm/s, the homing speed of z axis is 4 mm/s. This is why the crash happened.

To fix this, I changed the Z_HYBRID_THRESHOLD to 5mm/s. It worked perfectly.

By the way, the default value of X/Y/Z_STALL_SENSITIVITY is 0. For tmc2209, this also turns the StallGuard off, causing crash when sensorless homing.

I think Marlin should change these default values to avoid crash and damage.

Bug Timeline

No response

Expected behavior

No response

Actual behavior

No response

Steps to Reproduce

No response

Version of Marlin Firmware

2.1.2.4

Printer model

No response

Electronics

No response

LCD/Controller

No response

Other add-ons

No response

Bed Leveling

None

Your Slicer

None

Host Software

None

Don't forget to include

  • [X] A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

config.ini.zip

yunline avatar Jul 25 '24 17:07 yunline

The documentation is also misleading. It says "StallGuard is only active when the driver is in spreadCycle mode."

However, according to the tmc2209 data sheet, "It is only enabled in StealthChop mode".

yunline avatar Jul 26 '24 01:07 yunline

Greetings from the Marlin AutoBot! This issue has had no activity for the last 90 days. Do you still see this issue with the latest bugfix-2.1.x code? Please add a reply within 14 days or this issue will be automatically closed. To keep a confirmed issue open we can also add a "Bug: Confirmed" tag.

Disclaimer: This is an open community project with lots of activity and limited resources. The main project contributors will do a bug sweep ahead of the next release, but any skilled member of the community may jump in at any time to fix this issue. That can take a while depending on our busy lives so please be patient, and take advantage of other resources such as the MarlinFirmware Discord to help solve the issue.

github-actions[bot] avatar Nov 21 '24 01:11 github-actions[bot]

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Feb 03 '25 14:02 github-actions[bot]