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

Help with pulse-generating Filament Sensor

Scheduled Pinned Locked Moved
Filament Monitor
9
28
2.2k
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
    kordris
    last edited by 22 Nov 2019, 15:53

    *I have a Duet wifi 2, running 2.04 (2019-11-01b1) firmware.

    *Wifi Server 1.23,

    *Web Interface Version: 1.22.6.

    I have a bigtreetech filament sensor connected to E1 end stop. I can tell its sending info to the endstop because you can see the end stop red light flicker on and off as the filament is moving though the bowden tube. Problem that i'm having is that, I'm not getting any Data or line data. It keeps telling its at position 0.0. Or no data received.

    This is the line I have enabled in my config.g for the sensor. To start off with before I can calibrate the sensor. I can't do that yet since its not getting any data.

    ;Filament Sensor 
    M591 D0 C4 P7 R60:140 L0.037 E5 S0      ; pulse-generating sensor drive 0 Connected to C4 input, 40% to 130% tolerance, 7mm detection length
    M591 D0                                 ; display filament sensor parameters for extruder drive 0
    

    I have also connected a optical rotary filament sensor that I made to that same output and I get the same type of issue. I get no data, is there something simple I might be forgetting to enabling in my config.g file maybe. I have been over this and trying to work on this for last two days. Thanks for any help. If I have forgotten anything.

    1 Reply Last reply Reply Quote 0
    • undefined
      dc42 administrators
      last edited by 23 Nov 2019, 09:44

      Your M591 command is OK except that I find the L parameter suspiciously low. Do you really get 1 pulse per 0.037mm of filament motion through the sensor?

      What does M591 D0 return?

      Please note, you probably need to be printing from SD card for data to be collected.

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      1 Reply Last reply Reply Quote 0
      • undefined
        kordris
        last edited by kordris 23 Nov 2019, 16:15

        This is what im getting when put the M591 D0 in G-code command prompt. I can tell the endstop is getting a signal because its flashing on and off. I have also tried to pause and resume the print. But I still pretty much get the same thing except the minimum will change and maximum and the over MM will change. But the current position will never update. This is where I think its not updating.
        When i was watching the red light I could count about 3 to 4 secs between the pulses.
        Also I print from the internal SD card is that what you mean printing from the SD card. Or printing from the SD card from the touch screen?

        Pulse-type filament monitor on endstop input 4, disabled, sensitivity 0.500mm/pulse, allowed movement 60% to 140%, check every 5.0mm, current position 0.0, measured sensitivity 6.650mm/pulse, measured minimum 7%, maximum 8% over 2334.0mm
        
        1 Reply Last reply Reply Quote 0
        • undefined
          T3P3Tony administrators
          last edited by 23 Nov 2019, 16:44

          @kordris as dc42 said, you L value is way too low:

          measured sensitivity 6.650mm/pulse

          which may be correct or may be long between pulses. depends on the sensor. what does the sensor manual say about pulses per mm?

          anyway try setting the L parameter in M591 to 6.65

          www.duet3d.com

          1 Reply Last reply Reply Quote 0
          • undefined
            kordris
            last edited by 23 Nov 2019, 17:01

            This is the pdf on the filament sensor, it says use 7mm on marlin for the sensor. But I dont think thats for the pulse. It doenst give much info on what other info for setting for duet stuff. Im having to figure it out for my self.
            PDF File Github Link

            1 Reply Last reply Reply Quote 0
            • undefined
              T3P3Tony administrators
              last edited by 23 Nov 2019, 18:46

              certainly looks like 7 or 6.65 would be a good start point for the L parameter.

              www.duet3d.com

              1 Reply Last reply Reply Quote 0
              • undefined
                kordris
                last edited by 23 Nov 2019, 19:25

                Even if I use that, i still get no postion data. Which then leads to the printer stopping because it says theres to little movement. I dont think it's getting postion data correctly. Is there anything else should I enable in my config.g for the endstop on the extruder side. Since I'm using the extruder endstop E1. When I tried to get calibration data, it's the se way. Theres no postion point. So as soon as I go to enable the filament sensor it's going to error tell me there little or no movement.

                undefined 1 Reply Last reply 24 Nov 2019, 08:30 Reply Quote 0
                • undefined
                  T3P3Tony administrators @kordris
                  last edited by T3P3Tony 24 Nov 2019, 08:30

                  @kordris run the monitor disabled by using the M591 S0 switch for now so we can gather some data.

                  looking at our previous output 6.650mm/pulse, measured minimum 7%, maximum 8% over 2334.0mm that shows that is was sensing something as it measured some minimum and maximum. What does M591 D0 show now?

                  I have not tried it myself but I am not sure what position data is displayed for a pulse type sensor. it may just be movement as the pulse sensor does not send position.

                  www.duet3d.com

                  undefined 1 Reply Last reply 25 Nov 2019, 12:36 Reply Quote 0
                  • undefined
                    dc42 administrators
                    last edited by 24 Nov 2019, 10:00

                    A pulse generating sensor doesn't distinguish between forward and reverse motion, so position cannot be inferred. I'll check why the firmware prints a position.

                    Duet WiFi hardware designer and firmware engineer
                    Please do not ask me for Duet support via PM or email, use the forum
                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      dc42 administrators
                      last edited by 24 Nov 2019, 11:03

                      I've checked the code, and I confirm that the "current position" has no meaning for a pulsed filament monitor. I'll remove it from the report in the next firmware build.

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        kordris
                        last edited by 24 Nov 2019, 14:12

                        Ok, so when I try to run it with just those lines. I get little movement error. This is why I think that line postion has something to do with the error. Because it expecting to get the position data but its not. This is the last calibration data that I got. I guess until you fix it. I wont be able to use it.

                        Pulse-type filament monitor on endstop input 4, enabled, sensitivity 6.650mm/pulse, allowed movement 60% to 140%, check every 3.0mm, current position 0.0, measured sensitivity 12.004mm/pulse, measured minimum 0%, maximum 111% over 24.0mm
                        
                        1 Reply Last reply Reply Quote 0
                        • undefined
                          kordris
                          last edited by 24 Nov 2019, 14:27

                          When I change the E to 7mm distance I get a lot longer print time before it errors out before it wants to give me the problem with no little movement. So I guessing I might be close to the right settings maybe?

                          M591 D0 C4 P7 R60:140 A1 L6.65 E7 S1      ; pulse-generating sensor drive 0 Connected to C4 input, 40% to 130% tolerance, 7mm detection length
                          M591 D0                                   ; display filament sensor parameters for extruder drive 0
                          

                          This is the last one M591 D0

                          Pulse-type filament monitor on endstop input 4, enabled, sensitivity 6.650mm/pulse, allowed movement 60% to 140%, check every 7.0mm, current position 0.0, measured sensitivity 6.886mm/pulse, measured minimum 47%, maximum 104% over 185.9mm
                          
                          1 Reply Last reply Reply Quote 0
                          • undefined
                            kordris @T3P3Tony
                            last edited by 25 Nov 2019, 12:36

                            @T3P3Tony said in Help with pulse-generating Filament Sensor:

                            M591 S0

                            To get the Calibration data better do I just run M591 S0 ? I do I run the full M591 command with the S0 on the end like I had and then just check it with M591 D0 command.

                            undefined 1 Reply Last reply 25 Nov 2019, 12:46 Reply Quote 0
                            • undefined
                              dc42 administrators @kordris
                              last edited by 25 Nov 2019, 12:46

                              @kordris said in Help with pulse-generating Filament Sensor:

                              @T3P3Tony said in Help with pulse-generating Filament Sensor:

                              M591 S0

                              To get the Calibration data better do I just run M591 S0 ? I do I run the full M591 command with the S0 on the end like I had and then just check it with M591 D0 command.

                              See https://duet3d.dozuki.com/Wiki/Duet3dFilamentMonitor_LaserVersion#Section_Calibration. It's written for the laser filament monitor, but it's the same for your filament monitor.

                              As it appears that your sensor only generates 1 pulse per approx. 6mm of filament, you will need to set the measurement distance (E parameter) several times greater then 6mm in order to get consistent results.

                              Duet WiFi hardware designer and firmware engineer
                              Please do not ask me for Duet support via PM or email, use the forum
                              http://www.escher3d.com, https://miscsolutions.wordpress.com

                              undefined 1 Reply Last reply 25 Nov 2019, 15:06 Reply Quote 0
                              • undefined
                                kordris @dc42
                                last edited by 25 Nov 2019, 15:06

                                @dc42 Is the position data going to cause any problems or is that just going to just unrelated till you fix in the next firmware fix? I try to set the pulse to higher number. But I kept getting a error about every 5 mins telling little or no movement when I tried to enable the sensor with the S1. So Im guessing I still don't have something just right.

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  dc42 administrators
                                  last edited by 25 Nov 2019, 18:58

                                  No, the position data being reported as zero shouldn't cause any problems. However, I can't guarantee that the code is entirely correct, because it was adapted from the code for Duet3D laser and magnetic filament monitors, so it isn't well-suited to low-resolution sensors. With a window of 60 to 140%, my guess is that you will need at least 20mm measurement length, perhaps even 25mm. A wider window will allow a shorter length, but even then the measurement length should be more than twice the extrusion length per pulse.

                                  Duet WiFi hardware designer and firmware engineer
                                  Please do not ask me for Duet support via PM or email, use the forum
                                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    lifeform
                                    last edited by 7 Jan 2020, 16:58

                                    @kordris would you like to share with me how you plug the cable of the bigtreetech smart filament sensor with duet?

                                    undefined 1 Reply Last reply 24 Mar 2020, 13:20 Reply Quote 0
                                    • undefined
                                      keith89 @lifeform
                                      last edited by 24 Mar 2020, 13:20

                                      @lifeform not sure if you figured out the wiring but if you trace the wires to the sensor, there is a 4 pin connector with only 3 wires. the single wire on the end with no wire next to it is Vin. the middle wire is signal and the wire right next to that is ground.

                                      Back to the original topic, has anyone figured out the correct mm/pulse for this sensor?

                                      1 Reply Last reply Reply Quote 0
                                      • omniundefined
                                        omni
                                        last edited by 26 May 2020, 14:43

                                        Hi guys,

                                        Has anyone managed to properly set the Bigtreetech smart filament sensor to Duet meanwhile?

                                        I am just finishing my build with Duet 2, and I have connected the sensor - but still haven't done any configuring.

                                        Maybe the settings used in Marlin 2.0 can help?

                                        So if anyone of you managed to set it correctly - please help.

                                        Thanks!

                                        arhiundefined 1 Reply Last reply 2 Jun 2020, 23:08 Reply Quote 0
                                        • undefined
                                          dc42 administrators
                                          last edited by 26 May 2020, 20:09

                                          Start with https://duet3d.dozuki.com/Wiki/Gcode#Section_M591_Configure_filament_sensing.

                                          Duet WiFi hardware designer and firmware engineer
                                          Please do not ask me for Duet support via PM or email, use the forum
                                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                                          omniundefined 1 Reply Last reply 1 Jun 2020, 11:03 Reply Quote 0
                                          • First post
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA