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

    600 PPR 5v rotary encoder filament monitor help

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    4
    13
    510
    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.
    • CNCModellerundefined
      CNCModeller @alankilian
      last edited by

      @alankilian said in 600 PPR 5v rotary encoder filament monitor help:

      @cncmodeller Yes, you can try just turning on the built-in pullup by adding a '^' character when you define the pin used.

      Pin configuration documentation

      M591 D0 P7 C"^io4.in" S1 R1:1000 L0.0523 E0.1
      

      Thanks @alankilian, unfortunately no change after setting the pullup resistor as you suggested... bugger lol

      Not sure where to go from here...

      Will put my thinking cap on...

      Many thanks
      Barry M

      Polar Duet3 Mini + 1HCL
      https://youtube.com/playlist?list=PLWjZVEdMv1BY82izahK45qKh-hp3NFkix
      Wanhao D4S: Duet2
      https://forum.duet3d.com/post/296755
      K40 Laser, Duet2
      https://forum.duet3d.com/post/312082
      Wanhao D5S
      https://www.youtube.com/CNCModellerUK

      alankilianundefined 1 Reply Last reply Reply Quote 0
      • alankilianundefined
        alankilian @CNCModeller
        last edited by

        @cncmodeller

        5V_Ext - Enc Vcc
        

        5V_Ext is not a sourse of 5 Volts. It's an INPUT for external 5 Volt power supply. There's a diode in the way so you cannot power the encoder from that pin.

        Try a different source of 5 Volts.

        SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

        CNCModellerundefined 1 Reply Last reply Reply Quote 0
        • CNCModellerundefined
          CNCModeller @alankilian
          last edited by

          @alankilian

          There's definitely 5v on that pin, I've just checked with my multimeter.

          And the documentation says the IO 0 thru 4 supply 5v.

          Or am I missing something here?

          Polar Duet3 Mini + 1HCL
          https://youtube.com/playlist?list=PLWjZVEdMv1BY82izahK45qKh-hp3NFkix
          Wanhao D4S: Duet2
          https://forum.duet3d.com/post/296755
          K40 Laser, Duet2
          https://forum.duet3d.com/post/312082
          Wanhao D5S
          https://www.youtube.com/CNCModellerUK

          alankilianundefined 1 Reply Last reply Reply Quote 0
          • alankilianundefined
            alankilian @CNCModeller
            last edited by

            @cncmodeller Oh, I see, I was thinking you had connected to 5V_EXT_IN.

            Sorry.

            I'm out of ideas.

            Can you connect an LED or something to the encoder output and see if it blinks when you turn the encoder? That would verify it's getting power and producing a signal.

            SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

            CNCModellerundefined 1 Reply Last reply Reply Quote 0
            • CNCModellerundefined
              CNCModeller @alankilian
              last edited by

              @alankilian said in 600 PPR 5v rotary encoder filament monitor help:

              @cncmodeller Oh, I see, I was thinking you had connected to 5V_EXT_IN.

              Sorry.

              I'm out of ideas.

              Can you connect an LED or something to the encoder output and see if it blinks when you turn the encoder? That would verify it's getting power and producing a signal.

              Good idea, I'll give it a go tomorrow evening. 🙂

              Polar Duet3 Mini + 1HCL
              https://youtube.com/playlist?list=PLWjZVEdMv1BY82izahK45qKh-hp3NFkix
              Wanhao D4S: Duet2
              https://forum.duet3d.com/post/296755
              K40 Laser, Duet2
              https://forum.duet3d.com/post/312082
              Wanhao D5S
              https://www.youtube.com/CNCModellerUK

              Alex.crundefined 1 Reply Last reply Reply Quote 0
              • Alex.crundefined
                Alex.cr @CNCModeller
                last edited by

                @cncmodeller how did you perform your 200 mm extrusion to test the encoder? It sounds like you just commanded the extruder move manually.

                The filament monitor code only works when running a job through the SD card. If you haven’t, try running a print and when you are a few layers in check with M591 as you did before.

                Voron2.4/Duet3 SBC+6HC+3HC+1LC+1HCL(x2) - Delta/Duet2 Wifi - CubePro/Duet2 Wifi+Duex5 - Laser/Duet3 Mini5+ - Cel Robox - U̶p̶3̶0̶0̶+/D̶u̶e̶t̶3̶ ̶6̶H̶C̶+̶LC1̶ - F̶T̶-̶5̶/̶D̶u̶e̶t̶2̶ ̶W̶i̶f̶i̶ - S̶o̶l̶i̶d̶o̶o̶d̶l̶e̶

                CNCModellerundefined 2 Replies Last reply Reply Quote 1
                • CNCModellerundefined
                  CNCModeller @Alex.cr
                  last edited by

                  @alex-cr thanks, I'll check it out.

                  The monitor may have been working as I had a print pause last night, but unfortunately I don't know why as DWC stopped working too. I have another thread following that up.

                  Many thanks
                  Barry M

                  Polar Duet3 Mini + 1HCL
                  https://youtube.com/playlist?list=PLWjZVEdMv1BY82izahK45qKh-hp3NFkix
                  Wanhao D4S: Duet2
                  https://forum.duet3d.com/post/296755
                  K40 Laser, Duet2
                  https://forum.duet3d.com/post/312082
                  Wanhao D5S
                  https://www.youtube.com/CNCModellerUK

                  1 Reply Last reply Reply Quote 0
                  • o_lampeundefined
                    o_lampe @CNCModeller
                    last edited by o_lampe

                    @cncmodeller said in 600 PPR 5v rotary encoder filament monitor help:

                    M591 D0 P7 C"io4.in" S1 R1:1000 L0.0523 E0.1

                    The Wiki doesn't specify if it expects a positive or negative pulse for a P7 sensor?
                    Did you try to invert the pin with "!"?
                    The default value for 'E' is 3mm, are you sure it accepts 0.1mm? Maybe the polling frequency is too high then?
                    OTOH your R-values are pretty 'generous', this doesn't make sense with the fine E-polling.

                    Another thing I'm worried about is the L-value. It's already truncated to 0.052. How can you calibrate it, when the last digit is already cut off?

                    CNCModellerundefined 1 Reply Last reply Reply Quote 0
                    • CNCModellerundefined
                      CNCModeller @o_lampe
                      last edited by

                      @o_lampe said in 600 PPR 5v rotary encoder filament monitor help:

                      @cncmodeller said in 600 PPR 5v rotary encoder filament monitor help:

                      M591 D0 P7 C"io4.in" S1 R1:1000 L0.0523 E0.1

                      The Wiki doesn't specify if it expects a positive or negative pulse for a P7 sensor?
                      Did you try to invert the pin with "!"?
                      The default value for 'E' is 3mm, are you sure it accepts 0.1mm? Maybe the polling frequency is too high then?
                      OTOH your R-values are pretty 'generous', this doesn't make sense with the fine E-polling.

                      Another thing I'm worried about is the L-value. It's already truncated to 0.052. How can you calibrate it, when the last digit is already cut off?

                      @o_lampe I'm now getting the following response which is great:

                      24/05/2021, 13:15:01 m591 d0
                      Pulse-type filament monitor on pin io4.in, enabled, sensitivity 0.052mm/pulse, allowed movement 1% to 1000%, check every 0.1mm, measured sensitivity 0.058mm/pulse, measured minimum 63%, maximum 150% over 441.9mm

                      I get where you are coming from, a couple of more decimal places for the calibration value may be necessary given the resolution of the encoder.

                      I'm going to set the sensitivity to 0.058mm/pulse and see how far out it is on my next test print.

                      Many thanks folks, glad this is working now 🙂

                      All the best
                      Barry M

                      Polar Duet3 Mini + 1HCL
                      https://youtube.com/playlist?list=PLWjZVEdMv1BY82izahK45qKh-hp3NFkix
                      Wanhao D4S: Duet2
                      https://forum.duet3d.com/post/296755
                      K40 Laser, Duet2
                      https://forum.duet3d.com/post/312082
                      Wanhao D5S
                      https://www.youtube.com/CNCModellerUK

                      1 Reply Last reply Reply Quote 0
                      • CNCModellerundefined
                        CNCModeller @Alex.cr
                        last edited by

                        @alex-cr said in 600 PPR 5v rotary encoder filament monitor help:

                        @cncmodeller how did you perform your 200 mm extrusion to test the encoder? It sounds like you just commanded the extruder move manually.

                        The filament monitor code only works when running a job through the SD card. If you haven’t, try running a print and when you are a few layers in check with M591 as you did before.

                        @Alex-cr you were right... its responding now I've tried it during a test print. Thanks very much for your input, very helpful! 🙂

                        Barry M

                        Polar Duet3 Mini + 1HCL
                        https://youtube.com/playlist?list=PLWjZVEdMv1BY82izahK45qKh-hp3NFkix
                        Wanhao D4S: Duet2
                        https://forum.duet3d.com/post/296755
                        K40 Laser, Duet2
                        https://forum.duet3d.com/post/312082
                        Wanhao D5S
                        https://www.youtube.com/CNCModellerUK

                        alankilianundefined 1 Reply Last reply Reply Quote 1
                        • alankilianundefined
                          alankilian @CNCModeller
                          last edited by

                          @cncmodeller GREAT NEWS Barry!

                          I was stumped. It seemed like you had everything right (which you did) and I learned something new from this thread.

                          SeemeCNC Rostock Max V3 converted to V3.2 with a Duet2 Ethernet Firmware 3.2 and SE300

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