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

Help with filament sensor

Scheduled Pinned Locked Moved Solved
Third-party add-ons
3
9
776
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.
  • undefined
    Jman3
    last edited by 30 Jul 2024, 18:05

    Hello, I am trying to install a BTT SFS v2.0 to my Duet 3 mini 5+ but I am not getting any errors or pausing when the filament runs out. The sensor looks like its working properly as the lights are pulsing or changing color when they should (blinks as filament moves through and turns red when no filament is present). I only want the pulse signal as it can catch a jam and if filament runs out it should produce the same error. So I have attached the signal from that pin to io0.in and configured my firmware according to the instructions (https://docs.duet3d.com/User_manual/Connecting_hardware/Sensors_filament).

    I'm sure I'm missing something silly but after reading through the other threads related to the BTT SFS V1.0 I didn't get any answers. Does anyone have ideas on what the issue is or how to troubleshoot it?

    note from changlog on firemware 3.5.1: "Filament monitors can now be activated even when not printing from SD card, by using S2 in the M591 command instead of S1; but in this case a filament-error event macro must be defined because the default action (pause the print) won't work unless printing from SD card"

    Because of this i made filament-error.g and copied over the gcode from pause.g

    Filament Sensor Details: https://github.com/bigtreetech/smart-filament-detection-module

    28e77afe-b708-4180-857e-278cd6f0fb35-image.png

    io pin connection:
    b0b1fb0d-4fca-4b07-b6d3-2cab08eca030-image.png

    345b86a1-b40b-4035-9d50-3add7573ef18-image.png

    Firmware version: 3.5.2

    filament-error.g

    ; filament-error.g
    ; called when runout sensor is tripped
    ;
    ; generated on Mon Jul 29 2024
    ; copy of pause.g
    
    M83            ; relative extruder moves
    G1 E-10 F3600  ; retract 10mm of filament
    G91            ; relative positioning
    G1 Z5 F360     ; lift Z by 5mm
    G90            ; absolute positioning
    G1 X0 Y0 F6000 ; go to X=0 Y=0
    
    

    Config.g:

    ; Configuration file for Duet 3 Mini 5+ (firmware version 3.5.2)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v3.3.16 on Tue Nov 14 2023 20:04:52 GMT-0600 (Central Standard Time)
    ; Updated after the sprite pro extruder install v3.5.2 on Sunday Jul 28 2024 9:21pm
    
    ; General preferences
    G90                                                ; send absolute coordinates...
    M83                                                ; ...but relative extruder moves
    M550 P"My Printer"                                 ; set printer name
    
    ; Network
    M552 P0.0.0.0 S1                                   ; enable network and acquire dynamic address via DHCP
    M586 P0 S1                                         ; enable HTTP
    M586 P1 S0                                         ; disable FTP
    M586 P2 S0                                         ; disable Telnet
    
    ; Drives
    M569 P0.0 S0 D3 V0                                 ; physical drive 0.0 goes backwards, D3 = stealthchop (this works well with low motor torques)
    M569 P0.1 S0 D3 V0                                 ; physical drive 0.1 goes backwards, D3 = stealthchop (this works well with low motor torques)
    M569 P0.2 S1 D3 V0                                 ; physical drive 0.2 goes forwards, D3 = stealthchop (this works well with low motor torques)
    M569 P0.4 S0 D3 V0                                 ; physical drive 0.4 goes backwards, D3 = stealthchop (this works well with low motor torques)
    M584 X0.0 Y0.1 Z0.2 E0.4                           ; set drive mapping
    M350 X16 Y16 Z16 E16 I1                            ; configure microstepping with interpolation
    M92 X80.00 Y80.00 Z400.00 E423.2                  ; set steps per mm
    M566 X900.00 Y900.00 Z60.00 E300.00                ; set maximum instantaneous speed changes (mm/min)
    M203 X6000.00 Y6000.00 Z600.00 E3600.00            ; set maximum speeds (mm/min)
    M201 X500.00 Y500.00 Z200.00 E2500.00              ; set accelerations (mm/s^2)
    M906 X600 Y600 Z600 E900 I30                       ; set motor currents (mA) and motor idle factor in per cent
    M84 S30                                            ; Set idle timeout
    
    ; Axis Limits
    M208 X0 Y0 Z0 S1                                   ; set axis minima
    M208 X215 Y235 Z250 S0                             ; set axis maxima
    
    ; Endstops
    M574 X1 S1 P"io5.in"                               ; configure switch-type (e.g. microswitch) endstop for low end on X via pin io5.in
    M574 Y1 S1 P"io6.in"                               ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin io6.in
    M574 Z1 S2                                         ; configure Z-probe endstop for low end on Z
    
    ;  Filament Monitor (Filament Runout Sensor, Big Tree Tech - Smart Filament Sensor V2)
    M591 D4 P7 C"io0.in" L2.88 R75:125 E9 S2           ; filament monitor M591: configure filament sensor, D4: extruder4, P7: type pulse, C"io0.in" (pinout),L2.88: filament per pulse (mm), R75:125: sensitivity 25% of length, E9: sampled 9mm, S2 activated even when not printing from SD card, by using S2 in the M591 command instead of S1
    
    ; Z-Probe
    M950 S0 C"io3.out"                                 ; create servo pin 0 for BLTouch
    M558 P9 C"io3.in" H5 F120 T6000                    ; set Z probe type to bltouch and the dive height + speeds
    G31 P25 X-48 Y0 Z2.10                           ; set Z probe trigger value, offset and trigger height
    M557 X0:165 Y10:225 S41.25                           ; define mesh grid
    
    ; Heaters
    M308 S0 P"temp0" Y"thermistor" T98801 B4185        ; configure sensor 0 as thermistor on pin temp0
    M950 H0 C"out0" T0                                 ; create bed heater output on out0 and map it to sensor 0
    M307 H1 R3.120 K0.662:0.254 D5.36 E1.35 S1.00 B0 V23.7     ; disable bang-bang mode for the bed heater and set PWM limit, added Tuning here Tuned Jul/28/2024 (Sprite Pro)
    M140 H0                                            ; map heated bed to heater 0
    M143 H0 S120                                       ; set temperature limit for heater 0 to 120C
    M308 S1 P"temp1" Y"thermistor" T98801 B4185        ; configure sensor 1 as thermistor on pin temp1
    M950 H1 C"out1" T1                                 ; create nozzle heater output on out1 and map it to sensor 1
    M307 H0 R0.314 K0.257:0.000 D4.50 E1.35 S1.00 B0           ; disable bang-bang mode for heater  and set PWM limit, added Tuning here
    M143 H1 S310                                       ; set temperature limit for heater 1 to 310C
    
    ; Fans
    M950 F0 C"out5" Q500                               ; create fan 0 on pin out5 and set its frequency
    M106 P0 C"Part Cooling" S0 H-1                     ; set fan 0 name and value. Thermostatic control is turned off
    M950 F1 C"out3" Q500                               ; create fan 1 on pin out3 and set its frequency
    M106 P1 C"Heat Block HotEnd" S1 H1 T45             ; set fan 1 name and value. Thermostatic control is turned on
    
    ; Tools
    M563 P0 S"HotEnd" D0 H1 F0                         ; define tool 0
    G10 P0 X0 Y0 Z0                                    ; set tool 0 axis offsets
    G10 P0 R0 S0                                       ; set initial tool 0 active and standby temperatures to 0C
    
    ; Custom settings
    M204 P600 T2000				                                ; Set accelerations (mm/s^2) for print and travel moves
    M912 P0 S-13 				                                  ; CPU Temperature calibration
    M572 D0 S0.35				                                  ; Pressure advance
    M207 S6.5 R0.0 F2800 T4800 z0.0                    ; Retraction
    M280 P0 S160				                                   ; Clear any alarms
    M402						                                         ; Retract Pin
    
    ; Miscellaneous
    M501                                               ; load saved parameters from non-volatile memory
    M911 S21 R23 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
    T0                                                 ; select first tool
    
    
    
    undefined 1 Reply Last reply 30 Jul 2024, 18:46 Reply Quote 0
    • undefined
      jay_s_uk @Jman3
      last edited by 30 Jul 2024, 18:46

      @Jman3 you have it set to the wrong type. You need to use D7 in M591 and not D4

      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

      undefined 1 Reply Last reply 30 Jul 2024, 19:14 Reply Quote 0
      • undefined
        Jman3 @jay_s_uk
        last edited by 30 Jul 2024, 19:14

        @jay_s_uk so in my config.g it should be "M591 D7 P7..."?

        https://docs.duet3d.com/User_manual/Reference/Gcodes#m591-configure-filament-sensing

        Shows that D is the extruder setting and I have mine set to driver 4. Why should it be 7 instead of 4?

        undefined 1 Reply Last reply 30 Jul 2024, 20:09 Reply Quote 0
        • undefined
          jay_s_uk @Jman3
          last edited by 30 Jul 2024, 20:09

          @Jman3 sorry, you're right, I misread.
          You should have M591 P7 D0
          As the D number is number of the extruder, not the driver used for the extruder. The numbering for the extruder starts at 0 and you have only one.
          I confused D for P before

          Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

          undefined 1 Reply Last reply 31 Jul 2024, 11:21 Reply Quote 0
          • undefined
            Jman3 @jay_s_uk
            last edited by 31 Jul 2024, 11:21

            @jay_s_uk So I updated accordingly but I'm still getting no calibration data out of "M590 D0"

            All I get is: "Pulse-type filament monitor on pin io0.in, enabled always, 2.880mm/pulse, allowed movement 75% to 125%, check every 9.0mm, no calibration data"

            I am also getting a strange problem during my print where it looks like it hits a filament error but it just runs my filament-monitor.g without stopping it tries to go right back to printing without going back to its z position. Do i need to change my filament-monitor.g?

            undefined 1 Reply Last reply 31 Jul 2024, 21:33 Reply Quote 0
            • undefined
              Phaedrux Moderator @Jman3
              last edited by 31 Jul 2024, 21:33

              @Jman3 said in Help with filament sensor:

              filament-monitor.g

              what do you have in that macro?

              Or did you mean filament-error.g?

              Z-Bot CoreXY Build | Thingiverse Profile

              undefined 1 Reply Last reply 1 Aug 2024, 02:02 Reply Quote 0
              • undefined
                Jman3 @Phaedrux
                last edited by Jman3 8 Jan 2024, 02:02 1 Aug 2024, 02:02

                @Phaedrux Sorry you are correct it should be filament-error.g. My filament-error.g is listed in the original post.

                I looked over the documentation again and it looks like I forgot to include M25 to pause the print. I'm going to play around with it tonight.

                undefined 1 Reply Last reply 1 Aug 2024, 03:32 Reply Quote 0
                • undefined
                  Jman3 @Jman3
                  last edited by 1 Aug 2024, 03:32

                  So adding M25 caused it to stop like I wanted but it seems like it's trying to run pause.g and filament-error.g consecutively because it raises up 5mm 2X. I'll see about troubleshooting more tomorrow or this weekend.

                  undefined 1 Reply Last reply 21 Aug 2024, 12:49 Reply Quote 0
                  • undefined
                    Jman3 @Jman3
                    last edited by Jman3 21 Aug 2024, 12:49

                    Sorry for the late update I ran into some other issues I needed to take care of.

                    So it looks like I got this working after I fixed a few issues. I managed to print a temp tower without issue, maybe I'll have problems in the future with other prints.

                    1. Installed a mount close by the extruder (around 1" of distance between the sprite pro extruder
                    2. Removed my filament-error.g (it was trying to pause then run filament-error.g)
                    3. Used the BTT recomended g-code but adjusted E value to 22
                    4. Changed my retraction speed to 60mm/s

                    Here is the g-code I'm using

                    ;  Filament Monitor (Filament Runout Sensor, Big Tree Tech - Smart Filament Sensor V2)
                    M591 D0 P7 C"io0.in" L2.88 R75:125 S2 E22   
                    
                    1 Reply Last reply Reply Quote 1
                    • undefined Phaedrux marked this topic as a question 22 Aug 2024, 17:43
                    • undefined Phaedrux has marked this topic as solved 22 Aug 2024, 17:43
                    • First post
                      Last post
                    Unless otherwise noted, all forum content is licensed under CC-BY-SA