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

Posible bug detected in filament monitoring

Scheduled Pinned Locked Moved
Filament Monitor
4
14
511
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
    Tinchus
    last edited by Tinchus 2 Jan 2023, 19:05 1 Feb 2023, 19:05

    Hello. I have another post related to this one. But while trying to solve that one, I have discovered a possible bug may be present here on the filament monitoring system, at least while using a rotary encoder as filament monitor
    My board is a duet 3, version 3.4.5, SBC mode.

    My configuration line is M591 D0 P7 C"io2.in" L0.291 S1 R65:140 E3

    Here comes the thing: the calibration data recovered is always growing for me. After some time my min and max measured error grows. It start with a 97% and max 104%, and from there they grow. After some hs of printing, min has gone down to 85% and max measured has growed up to 130%
    If print continues, they continue to grow/decrease till the confired limits are hit and print is paused, with a real filament problem being there.

    But today I discovered what I think it is a possible bug? my theoretical numer for mm/pulse is 0.292mm/pulse. Calibration data tells me that the measured mm/pulse is 0.290 mm... Ok, so later I configured my configuration command to have an L value of 0.290... But then the calibration data reports that the measured mm/pulse is 0.289... So change the L vlaue again to be 0.289mm/pulse... and then the reported calibration data tells me measured mm/pulse is 0.287 !

    So every time I change the L value, calibration data reports me a different value gainand again and seems to always be 0.02

    Can something be wrong with the filament monitoring system on version 3.4.5

    undefined 1 Reply Last reply 1 Feb 2023, 20:39 Reply Quote 0
    • undefined T3P3Tony moved this topic from General Discussion 1 Feb 2023, 20:37
    • undefined
      T3P3Tony administrators @Tinchus
      last edited by 1 Feb 2023, 20:39

      @Tinchus does the calibrated amount go down over longer prints as more data is collected, even when you don't change the calibrated amount in your M591 definition?

      www.duet3d.com

      undefined 1 Reply Last reply 2 Feb 2023, 11:25 Reply Quote 0
      • undefined
        Tinchus @T3P3Tony
        last edited by Tinchus 2 Feb 2023, 11:40 2 Feb 2023, 11:25

        @T3P3Tony Yes. As the print continues, the min measued % decreases, and the max measured % increases. I posted real data on the other post:

        https://forum.duet3d.com/topic/31286/question-about-filament-sensor

        (sorry is this is considered a duplicated post)
        For example, this is the last collected data, after 9 hs of print:

        M591 D0
        Pulse-type filament monitor on pin io2.in, enabled, sensitivity 0.291mm/pulse, allowed movement 65% to 140%, check every 3.0mm, measured sensitivity 0.289mm/pulse, measured minimum 82%, maximum 127% over 19468.3mm

        Those measued minimum and maximum values, 9 hs ago where: %96 and %104

        And if you were asking about the mm/pulse measure data: no, that value changes ONLY at the start, then it remains stable. I notice only once a change on it. But the value I posted above: 0.289, that is stable for at least the last 9 hs

        undefined 1 Reply Last reply 2 Feb 2023, 12:43 Reply Quote 0
        • undefined
          T3P3Tony administrators @Tinchus
          last edited by 2 Feb 2023, 12:43

          @Tinchus yes I was asking about the calibration pulses/mm.

          So to confirm, looking at that. If you set it to a lower value, it calibrated to that lower value (or a bit lower) and that is repeatable. Would be interesting to see if it follows you "up" if you set higher values.

          The measured min/max increasing over a print is to be expected, up untill the true minimum and maximum of the system is reached.

          www.duet3d.com

          undefined 1 Reply Last reply 3 Feb 2023, 12:01 Reply Quote 0
          • undefined
            Tinchus @T3P3Tony
            last edited by Tinchus 2 Mar 2023, 12:17 3 Feb 2023, 12:01

            @T3P3Tony To answer your question, this data is of right now:

            M591 D0
            Pulse-type filament monitor on pin io2.in, enabled, sensitivity 0.291mm/pulse, allowed movement 65% to 140%, check every 3.0mm, measured sensitivity 0.289mm/pulse, measured minimum 76%, maximum 136% over 84145.8mm
            (this data was the result of M591 D0 command after being reset, because I was afraid to hit limits overnight)

            No, I will execute command :
            M591 D0 P7 C"io2.in" L0.289 S1 R65:140 E3
            Notice that Im changing the L value to be the measured mm/pulse reported by calibration data.
            And I get after some printed mms:

            M591 D0
            Pulse-type filament monitor on pin io2.in, enabled, sensitivity 0.289mm/pulse, allowed movement 65% to 140%, check every 3.0mm, measured sensitivity 0.287mm/pulse, measured minimum 98%, maximum 104% over 28.5mm

            Noticed the measured mm/pulse? it has gone done 0.002 again. It s extremely repeatable the change.

            The problem now is: how do I now th REAL mm/pulse value. Original value was the one I got from the initial calibration run: 0.294 if I remember well. SO Now I executed again this:

            M591 D0 P7 C"io2.in" L0.294 S1 R65:140 E3

            And I get:
            Pulse-type filament monitor on pin io4.in, enabled, sensitivity 0.294mm/pulse, allowed movement 65% to 140%, check every 3.0mm, measured sensitivity 0.290mm/pulse, measured minimum 98%, maximum 112% over 255.0mm

            Again, mm/pulse is "reameasured" to a value around 0.002 and 0.004 mm smaller than my L set value

            undefined 1 Reply Last reply 3 Feb 2023, 12:24 Reply Quote 0
            • undefined
              T3P3Tony administrators @Tinchus
              last edited by 3 Feb 2023, 12:24

              @Tinchus ah interesting, so what about if you set 0.3, 0.35, 0.25,0.2 etc? you might want to set the monitor to S0 so it does not actually pause the print during this testing.

              www.duet3d.com

              undefined undefined 2 Replies Last reply 3 Feb 2023, 12:25 Reply Quote 0
              • undefined
                T3P3Tony administrators @T3P3Tony
                last edited by 3 Feb 2023, 12:25

                also you may want to let it run for more than a few mm with the quite different values - check a few times to confirm the calibration value has stabilised before recording that and then trying a new one.

                www.duet3d.com

                1 Reply Last reply Reply Quote 0
                • undefined
                  Tinchus @T3P3Tony
                  last edited by 3 Feb 2023, 12:36

                  @T3P3Tony I have set it now to 0.3 and I get:

                  M591 D0
                  Pulse-type filament monitor on pin io2.in, enabled, sensitivity 0.300mm/pulse, allowed movement 65% to 140%, check every 3.0mm, measured sensitivity 0.291mm/pulse, measured minimum 100%, maximum 108% over 105.2mm

                  I will let it run but so fay, on ce a measure mm/pulse is reported, that measurement is very very stable (the sensor is well inside it limit capabilities) so I initially discarded a possible error introduced by the sensor, still this is my guess, not saying the sensor can not be the problem as a fact. But this measured mm/pulse change is very repeatable

                  undefined 1 Reply Last reply 3 Feb 2023, 12:39 Reply Quote 0
                  • undefined
                    T3P3Tony administrators @Tinchus
                    last edited by 3 Feb 2023, 12:39

                    @Tinchus yes i am not blaming the sensor either - just wanting to see more about the sisue you are describing as it may help to point to a possible cause. If we can prove a trend across a large range that will help i think. As you only have <4 pulse per mm there is a wide range of movement that can happen between pulses ( 0.294mm of movement ofcourse) so with retractions across pulse boundaries there is significant potential error.

                    www.duet3d.com

                    undefined 1 Reply Last reply 6 Feb 2023, 11:04 Reply Quote 0
                    • undefined
                      Tinchus @T3P3Tony
                      last edited by Tinchus 2 Jun 2023, 11:23 6 Feb 2023, 11:04

                      @T3P3Tony Hello. Tis is the result I got from the weekend print. It was suposed to be a 72 hs print. It paused at 25hs and this is the result of the command M591 D0:

                      M591 D0
                      Pulse-type filament monitor on pin io2.in, enabled, sensitivity 0.300mm/pulse, allowed movement 65% to 170%, check every 3.0mm, measured sensitivity 0.286mm/pulse, measured minimum 88%, maximum 227% over 54956.8mm

                      Te reported values look very "wrong". 227% of max error would mean 1 of 2 things I think: or the sensor measured 227% extra movement (it can not be, the sensor is working really good. And still before lauching this print, I changed it to a new one just in case and calibration reported exactly the same values, so...) or something in the extruder made it move 227% more that the theoretical amouht expressed on gcode (that dodn not happened, the print paused and in terms of extrusion is perfect, 227% in overextrusion would have created a ball of plastic)

                      My guess is still the original and Im saying this without knowing the code in the formware so I can be really wrong: the formware looks like it is measuring the error over the entire used filament vs the sum of all error and not in the 3mm sample. If the firmware is taking a 3mm sample like in my config, error should be computed there and the reset to cero and start again in the next sample?

                      And more weird number" I cheged L to 0.35 and I get this:

                      M591 D0
                      Pulse-type filament monitor on pin io2.in, enabled, sensitivity 0.350mm/pulse, allowed movement 65% to 170%, check every 3.0mm, measured sensitivity 0.275mm/pulse, measured minimum 121%, maximum 147% over 25.0mm

                      Calibration mm/pulse went down again as expected, and max and min errors got crazy

                      dc42undefined 1 Reply Last reply 6 Feb 2023, 11:26 Reply Quote 0
                      • dc42undefined
                        dc42 administrators @Tinchus
                        last edited by 6 Feb 2023, 11:26

                        @Tinchus unfortunately your pulse-type filament monitor doesn't distinguish between forwards and backwards motion (unlike Duet3D filament monitors, which do). Additionally some of those monitors have very little hysteresis, so that if the filament stops at a point where a the sensor is on the cusp of changing state you may get spurious pulses from it.

                        I am fairly sure that your sensor is detecting occasional high sensitivity values for one or both of these reasons. I suggest you allow a high upper tolerance to allow for these, for example by allowing 65% to 300%. What's important is that the measured lower sensitivity doesn't drop too much. Your measured lower value of 88% looks good.

                        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 23 Feb 2023, 15:24 Reply Quote 0
                        • undefined
                          Tinchus @dc42
                          last edited by 23 Feb 2023, 15:24

                          @dc42 this sensor has the capability to detect forward and backward movements. I just didnt connect the cable that is suposed to be used for that, I only connected 1 of the cables so the sensor only detects movement. So have this extra cable, where should I connect in the duet?
                          My guess was: retraction should not be taken into account, the firmware knows that is doing a retraction, does it? so why take into account for calibration or for movement detection? Only extrusion should be taken into account I think

                          undefined 1 Reply Last reply 25 Apr 2023, 15:24 Reply Quote 0
                          • undefined
                            jp.douarvil 0 @Tinchus
                            last edited by 25 Apr 2023, 15:24

                            @Tinchus
                            RRF is a multipurpose firmware, it is supposed to be very tunable. Hence, depending on your specific hardware, sending negative E value does not necessarily equate to a retraction move (it could be just for unjamming, for backlash compensation, for a special tool change move or who knows what). So, unless you specifically indicate the firmware to retract/unretract filament (G11 command) the firmware will not assume by default that negative E value means a retraction which tracking value mustn't be taken into account.

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              jp.douarvil 0
                              last edited by 25 Apr 2023, 15:24

                              I don't know how to connect the second wire to the duet to take direction into account. A quick and dirty work-around might be to post-process your g-code so to deactivate filament tracking just before a retraction move and reactivate it immediately afterward.

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