MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.28k stars 19.23k forks source link

[BUG] BTT Smart Filament Sensor triggers when starting a print except on the first print after startup #25066

Closed andilee7 closed 1 year ago

andilee7 commented 1 year ago

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

No, but I will test it now!

Bug Description

I have a weird issue I tried to troubleshoot from time to time since over a year but I'm out of ideas now.

When I start up the printer and start a print job the Filament Runout Sensor works as expected. When I finish my print and start the next print, a runout will be triggered almost every time

I can avoid this behavior either by resetting the printer before the next print job or if I cancel the previous print. So I thought it must have a relation to my end GCODE.

My previous end gcode included a part which switches to relative mode, raises the nozzle a few mm and then switches back to absolute mode again

G91 ; relative positioning
G1 Z25 ; raise head 25mm
G90 ; back to absolute positioning

This was triggering the runout on the next print job always. I got rid of switching to relative positioning with gcode macros in SuperSlicer. This has changed the behavior from "runout sensor is always triggering" to "runout sensor is very oft triggering" on the next print. So it does not happen every time since this change but still around 80% of the time.

After I "change" the filament and continue the print, the runout sensor works as It should.

I know there were a lot of issues for others that in the EEPROM a runout distance of 0mm was stored which causes a immediate runout. This is not the case here.

Bug Timeline

Since installation of BTT Smart Filament Sensor a year ago

Expected behavior

That the runout is not triggered after I start the next print

Actual behavior

A runout is triggered almost every time after another print finished

Steps to Reproduce

  1. Startup printer
  2. Start a print and let it finish
  3. Start the next (or same) print job

Version of Marlin Firmware

2.0.9.3

Printer model

Custom AM8

Electronics

SKR 1.4 Turbo

Add-ons

BTT Smart Filament Sensor

Bed Leveling

ABL Bilinear mesh

Your Slicer

Other (explain below)

Host Software

OctoPrint

Don't forget to include

Additional information & file uploads

I'm using SuperSlicer.

Attached are the configuration files, my start and end gcode and a terminal output while this was happening on a print start (in that case after a M109. I don't know if it is relevant, but the nozzle was already at temperature. If I don't heatup before starting, it triggers the filament change on the cold nozzle files.zip

thisiskeithb commented 1 year ago

#define CONFIGURATION_H_VERSION 02000903

Please download bugfix-2.1.x to test with the latest code and let us know if you're still having this issue.

andilee7 commented 1 year ago

Took me some time to migrate my config to the latest marlin bugfix 2.1.x version. Unfortunately the behavior is almost the same. It now also happens after I cancel the previous print. I've enabled FILAMENT_RUNOUT_SENSOR_DEBUG to get a few more details. Attached is the terminal output of starting a print after the previous was successful. Also another one where i cancelled this print and started the next one.

Interesting is here, that the last debug info before "Cancelling" is: Recv: Remaining mm: 10.00 And on the next print the remaining mm is -5.06

Send: N12 M190 S60*109 [...] Recv: Remaining mm: -5.06 Recv: Runout Sensors: 4948484848484848 -> 0 RUN OUT

terminal_output_after_cancelled_print.txt terminal_output_after_successful_print.txt

andilee7 commented 1 year ago

I do not consider this as a fix, but at least it solves my issue. I've modified my start gcode to disable the filament runout sensor at the beginning so it cannot be triggered by one of the none-extrude commands as described initialy

; disable filament runout sensor M412 S0

And after heating and bed leveling direct before the first extrude (in my case the purge line of the start gcode) I enable the filament runout sensor again

M412 S1

github-actions[bot] commented 1 year ago

This issue has had no activity in the last 60 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed within 10 days.

github-actions[bot] commented 1 year ago

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.