Filament out Sensor with octoprint on raspberry drives me crazy...

Charly3Charly3 Posts: 35🌟 Super Member 🌟
Printing with octoprint everything works fine - everything BUT filament out sensor couses trouble.

Tested "Filament Sensor" & "Filame nt Sensor reloaded" plugins without any succes. Only "Filament Sensor NG" works - at least sometimes.

After adding pull up circut to switch  (it´s a big switch with some spring that would do for a mouse trap) raspberry now is capable to sense switch state quite error free. The Problem if I do set  plugin option for "Event Confirmations" on less than 10 the Gcode defined for "Pause" is triggered twice by plugin. And cause gcode lifts the print head  relative 10 mm it ends up 20 mm lifted. So "Pause end" gcode with 10mm down won´t work as intended. And even with 10 Event confirmations it happens every now and then that Pause is triggered twice.

Any Idea how to prevent double triggering pause gcode? More confimations won´t work, for it causes too much filament beeing printed after leaving the sensor switch empty.

Another Idea would be not to lift the head, but park it on same level in leftmost back corner of printbed? Octolapse does something similar before taking a snapsnot. Could not find out how to go to corner and come back to last print position on same level. This only would work if the somehow stored last print position is not corrupted by a doubled back left command... but how to store the last printed position with gcode?

Any idea on any of those questions - or a reliable solution to get octoprint on raspberry handling filament out in a save way?

Reg. Charly





Comments

  • Charly3Charly3 Posts: 35🌟 Super Member 🌟
    OK and here comes the solution. Ignore all plugins  called "filament sensor whatsever xxx" only "OctoPrint-Enclosure" will do the job. It´s a multi purpose plugin that can assign a couple of different actions on GPIO triggers. Cause of that many settings here´s a short descriptions on the settings needed.

    First of all, you need a pull up circuit as layed out under "3." here:
    On my 3b+ pi I´m using 5V from pin 2 / GND from pin 39 / GPIO 26 from pin 37

    In octoprint settings you configure OctoPrint Enclosure Plugin like this:
    1. Define a pi output as "regular IO"
    2. Label it whatever you like
    3. Assing the GPIO PIN (my case 37)
    4. CheckMark "Active Low" & "Show button on navbar>"
    5. Define a Pi Input
    6. Label it - suggestion: same as before
    7. Input Type = GPIO
    8. Action Type = Printer
    9. Input IO Number (my case 37)
    10. Input Pull Resistor = Input Pullup
    11. Event Trigger = Fall
    12. Printer Action = Filament Change
    13. Checkmark "Enable and disable Filament Sensor"
    14. Filament detection timeout = 30 (for the gcode I suggest works fine)
    15. Open "Advanced Options"
    16. Change "Filament Change Gcode". The suggested Gcode didn´t work at all with my A5 printers.

    I do use:

    M104 S0 ; Extruder Temp 0
    M0 ; Pause
    M140 S60; Keep Bed at 60°Celsius not to loose stickyness of printed objects

    If you adapt those settings, make sure that in ocptorint settings / gcode scripts the gcode for Pause is:

    M104 S0 ; Extruder Temp 0
    G91; relative Position
    G0 Z10 ; 10 up
    G90 ; absolute Position

    And too make sure that in octoprint settings / gcode scripts the gcode for resume after Pause is:

    M109 S205 ; Extruder Temp and wait
    G91; relative Position
    G0 Z-10 ; 10 down
    G90 ; absolute Position

    If filament sensor detects a run out, the printhead is lifted for 10 mm, Hotend Temperatur is set to "0°", Hotbed is kept to 60°. This settings will allow coexisting of Filament out sensor reading as well as manual Pause function of octoprint.

    There is no fancy parking position and retraction in this code, cause all that stuff didn´t work - but it now works reliable with this cut down code -  even if I´ve to power up extruder heat manually before I can remove the old and insert some new filament.

    BE AWARE: There is one ISSUE with the Enclosure Plugin - whenever you change any gcode in plugin settings you must restart the octopi. Otherwise new code is not run and the plugin might not recognize any filament sensor state change.


    Thanked by 1Samuel Pinches
  • Samuel PinchesSamuel Pinches Posts: 2,840Administrator
    Thank you for the detailed description of your solution!
Sign In or Register to comment.