knutwurst / Marlin-2-0-x-Anycubic-i3-MEGA-S

Marlin 2.0.x Version for Anycubic i3 MEGA M/S/P/X/CHIRON and 4MAX with Anycubic TFT or the "new" DGUS Clone TFT - Now also with BLTouch!
GNU General Public License v3.0
782 stars 183 forks source link

[BUG] Filament Runout Sensor - Random False Positives #501

Closed spaelectronics closed 8 months ago

spaelectronics commented 9 months ago

I keep getting random false positives on the Filament Runout Sensor.

I thought it was the switch went bad, so I replaced the switch, but I'm still having the same issue.

Tested with version MEGA_X_DGUS_v1.5.2

fatalyzm commented 9 months ago

Same here, the filament sensor runs me crazy. Unfortunately i have to disable it statically.

I'm now on v1.5.2 - problem still there.

Anycubic Mega X DGUS TMC Trigorilla 0.0.2

NoClue11 commented 9 months ago

Same problem here. Anycubic Mega X with Mega X TMC BLT10 1.5.2

elodur commented 8 months ago

Same problem, but I'm not Sure if it's a software bug. When I bridge the switch with a wire there is no problem any more. Maybe it just is the cheap switch.

stklcode commented 8 months ago

I can also confirm this, printing occasionally stops with runout warning. Unfortunately, I didn’t investigate yet, but I would also suspect the hardware.

One idea would be tweaking the runout settings, e.g. enable soft-pullup/down, if there is no hardware equivalent or extended the debounce logic programmatically.

Configuring FILAMENT_RUNOUT_DISTANCE_MM could also make sense, there are at least 50-100mm that can safely be ignored, before the extruder fails in default setup. I didn’t check the internal logic, if the state is re-checked in the loop, even a small value may sufficient to debounce a faulty switch.

I will definitely try to tweak the config on next print, but this could probably take a couple of weeks. Workaround is disabling the feature temporarily with a M412 S0 command (if there is enough filament)

spaelectronics commented 8 months ago

I can also confirm this, printing occasionally stops with runout warning. Unfortunately, I didn’t investigate yet, but I would also suspect the hardware.

I thought it was a faulty switch too, so I replaced the switch with a new one, however I still have the same issue.

One idea would be tweaking the runout settings, e.g. enable soft-pullup/down, if there is no hardware equivalent or extended the debounce logic programmatically.

I too was thinking it could be a pullup/down issue. I haven't tried it yet, as I can't compile it myself as I don't know the proper configuration settings for the Mega X.

stklcode commented 8 months ago

Just compiled a FW with #define FIL_RUNOUT_PULLUP.

Doesn't seem to make much of a difference, 2 false positives before leveling started and one in the second layer... Disabled the sensor for the current print job. :disappointed:

Next I will try to extend the default debounce threshold from 5 to something higher like ... maybe 10 or 20.

#define FILAMENT_RUNOUT_THRESHOLD 5

If that also does not help, I'll switch from debounced to delayed trigger by setting the distance to something >0, like

#define FILAMENT_RUNOUT_DISTANCE_MM 25
stklcode commented 8 months ago

I did a second test with

#define FILAMENT_RUNOUT_THRESHOLD 20

No false-positive runout trigger during a 3h print job :tada:

When I pull he sensor cable, it claims runout. Little sluggish, but the feature still works and we have at least 100mm buffer, before the extruder runs empy on default setup, so I'd say that's fine.