Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Limit switch for filament runout

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    3
    5
    397
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • likevviiundefined
      likevvii
      last edited by

      I want to add a basic limit switch style filament sensor to my duet wifi 2.

      The switch is called "trianglelab filament sensor"
      This switch is OPEN when filament is not present, CLOSED when filament is loaded.

      I want to double check if my code is correct:

      ; Filament sensor
      M591 P2 C"e0stop" S1 D0
      

      Do I need to add code anywhere else? If it senses a filament out, will it enter into "pause" mode, similar to when I press the "pause print" button?

      Based on this guide:
      https://duet3d.dozuki.com/Wiki/Connecting_and_configuring_filament-out_sensors

      It says "S1" will enable filament sensing when printing from SD card. I normally print by uploading to the ip address on the browser "upload and print" button. Is this also considered as printing from SD card?

      I plan to put this above my heater parameters in config.g

      ; Heaters
      M308 S0 P"spi.cs2" Y"rtd-max31865"            ; configure sensor 0 as thermocouple via CS pin spi.cs2
      M950 H0 C"bedheat" T0                         ; create bed heater output on bedheat and map it to sensor 0
      M143 H0 S120                                  ; set temperature limit for heater 0 to 120C
      M307 H0 B0 S1.00                              ; disable bang-bang mode for the bed heater and set PWM limit
      M140 H0                                       ; map heated bed to heater 0
      M308 S1 P"e0temp" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin e0temp
      M950 H1 C"e0heat" T1                          ; create nozzle heater output on e0heat and map it to sensor 1
      M143 H1 S280                                  ; set temperature limit for heater 1 to 280C
      M307 H1 B0 S1.00                              ; disable bang-bang mode for heater  and set PWM limit
      
      

      Thank you

      Phaedruxundefined 1 Reply Last reply Reply Quote 0
      • likevviiundefined
        likevvii
        last edited by likevvii

        Update:
        When measuring GND and Sensor I get:
        NO filament = 3.3V
        Filament loaded = 1.3V

        When I set:
        M591 P2 C"e0stop" S1 D0
        I can start the print and correctly trigger the sensor when I remove filament from sensor. However, once I add the filament back, it will not detect a loaded filament anymore.

        I am guessing 1.3V is still too high for it to be considered as low?

        lord binkyundefined 1 Reply Last reply Reply Quote 0
        • Phaedruxundefined
          Phaedrux Moderator @likevvii
          last edited by

          @likevvii said in Limit switch for filament runout:

          It says "S1" will enable filament sensing when printing from SD card. I normally print by uploading to the ip address on the browser "upload and print" button. Is this also considered as printing from SD card?

          Yes that is printing from the internal SD card.

          Z-Bot CoreXY Build | Thingiverse Profile

          1 Reply Last reply Reply Quote 0
          • likevviiundefined
            likevvii
            last edited by likevvii

            Final Update:

            The only way I got it to work was to ignore the LED function of the limit switch PCB.

            Just treat it as a pure limit switch. No LED.
            Wire it in a way where the switch would connect GND and SIG.
            Where 3.3V is supposed to go in the limit switch is where ground would be.
            Disconnect the 3.3V wire from the Duet side.

            M591 P1 C"e0stop" S1 D0
            
            1 Reply Last reply Reply Quote 1
            • lord binkyundefined
              lord binky @likevvii
              last edited by

              "I am guessing 1.3V is still too high for it to be considered as low?"
              @likevvii

              This is true, I went through a process to hand select a protection diode out of a set for my induction probe to get the off down to 1.1V for a constant responsive low reading (Duet Wifi V1.2)

              1 Reply Last reply Reply Quote 1
              • First post
                Last post
              Unless otherwise noted, all forum content is licensed under CC-BY-SA