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

    Inconsistent results with optical encoder wheel filament sensor

    Scheduled Pinned Locked Moved Solved
    Filament Monitor
    9
    168
    11.0k
    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.
    • JohnOCFIIundefined
      JohnOCFII @arhi
      last edited by

      @arhi said in Inconsistent results with optical encoder wheel filament sensor:

      should work ok with the middle one, glue the tape over the back side, then cut the "windows" open with a scalpel knife, should work like a charm

      Thanks for the advice. I'll try a fresh blade and give that a shot -- likely tomorrow.

      1 Reply Last reply Reply Quote 0
      • JohnOCFIIundefined
        JohnOCFII @arhi
        last edited by

        @arhi said in Inconsistent results with optical encoder wheel filament sensor:

        should work ok with the middle one, glue the tape over the back side, then cut the "windows" open with a scalpel knife, should work like a charm

        That wasn't as tricky as I thought it'd be. I do think I'll try it again with a fresh X-Acto blade.

        IMG_2017.jpeg

        1 Reply Last reply Reply Quote 0
        • arhiundefined
          arhi
          last edited by

          that should work like a charm, no transparency there now. the only question now is, will it provide a better readout now - was this transparency a problem or there's something else in play here.

          JohnOCFIIundefined 1 Reply Last reply Reply Quote 0
          • JohnOCFIIundefined
            JohnOCFII @arhi
            last edited by

            @arhi said in Inconsistent results with optical encoder wheel filament sensor:

            that should work like a charm, no transparency there now. the only question now is, will it provide a better readout now - was this transparency a problem or there's something else in play here.

            I prepared the new axle and wheel with the copper tape. I used two coats of a black Sharpie to "paint" the shiny copper and installed the new axle. Sadly, the results are very similar. This is also from the vase mode print with no PA and no retraction.

            Pulse-type filament monitor on pin (connlcd.encb,connlcd.3), disabled, sensitivity 3.000mm/pulse, allowed movement 30% to 1500%, check every 10.0mm, measured sensitivity 0.581mm/pulse, measured minimum 70%, maximum 2543% over 1021.1mm
            

            Next test will be in a few days when the new Saleae logic analyzer shows up - or if I decide to try the BitScope logic analyzer in a VM.

            arhiundefined 1 Reply Last reply Reply Quote 0
            • arhiundefined
              arhi @JohnOCFII
              last edited by

              @JohnOCFII damn, so it was not transparency issue, damn, well, one idea out of the window 😞

              dunno how to test for filament slipping on the tpu wheel

              JohnOCFIIundefined 1 Reply Last reply Reply Quote 0
              • JohnOCFIIundefined
                JohnOCFII @arhi
                last edited by

                @arhi said in Inconsistent results with optical encoder wheel filament sensor:

                @JohnOCFII damn, so it was not transparency issue, damn, well, one idea out of the window 😞

                😖

                dunno how to test for filament slipping on the tpu wheel

                By removing the optical sensor, I can visually watch the wheel move during the test print I was using. As it was a vase mode cylinder, it was easy to confirm the wheel was moving continuously and (within the calibration of my MARK 1 EYEBALL) consistently. So, while it is possible during a "normal" print where I might have moves at 250mm/sec or other such changes in filament movement, I don't think that is an issue with this particular test.

                Next will be to try to get a sense of what data is coming out of that sensor.

                arhiundefined 1 Reply Last reply Reply Quote 0
                • arhiundefined
                  arhi @JohnOCFII
                  last edited by

                  @JohnOCFII I'd still do that test without hotend

                  • remove hotend so you have only extrder drive and sensor
                  • disable "heating" in the g-code
                  • allow "cold extrusion" in the firmware
                  • do a print of a simple long extrusion g-code
                  JohnOCFIIundefined 2 Replies Last reply Reply Quote 0
                  • JohnOCFIIundefined
                    JohnOCFII @arhi
                    last edited by

                    @arhi said in Inconsistent results with optical encoder wheel filament sensor:

                    @JohnOCFII I'd still do that test without hotend

                    • remove hotend so you have only extrder drive and sensor
                    • disable "heating" in the g-code
                    • allow "cold extrusion" in the firmware
                    • do a print of a simple long extrusion g-code

                    Yes -- good idea. I will do that tomorrow.

                    1 Reply Last reply Reply Quote 0
                    • JohnOCFIIundefined
                      JohnOCFII @arhi
                      last edited by

                      @arhi said in Inconsistent results with optical encoder wheel filament sensor:

                      @JohnOCFII I'd still do that test without hotend

                      • remove hotend so you have only extrder drive and sensor
                      • disable "heating" in the g-code
                      • allow "cold extrusion" in the firmware
                      • do a print of a simple long extrusion g-code

                      I disconnected the extruder from the hot-end and set up some GCode to run so I could measure filament. I started with a test at 100mm, but M591 D0 is showing no data. Curious if not having the printer homed is causing the data collection to be ignored. Maybe I missed something.

                      Here's my GCode:

                      ; Test Extrusion 
                      ;
                      M302 P1                                            ; Allow cold extrusion
                      G92 X0Y0Z0                                         ; duet now assume we are homed
                      M82                                                ; extruder absolute position
                      G92 E0                                             ; reset extruder to 0
                      M591 D0 P7 C"connlcd.encb" S0 R50:1500 L1.2 E5 A1  ; config filament sensor
                      ; G1 E1000 F120                                     ; extrude 1000mm at 2mm/sec, so will be extruding around 8 minutes
                      G1 E100 F120                                       ; extrude 100mm at 2mm/sec, so will be extruding around 1.2 minutes
                      M591 D0                                            ; query filament sensor
                      

                      Time for some yard work! Got to go rake leaves.

                      arhiundefined JohnOCFIIundefined 2 Replies Last reply Reply Quote 0
                      • arhiundefined
                        arhi @JohnOCFII
                        last edited by

                        @JohnOCFII you have to save that script as a file and make RRF print that file, you can't just execute the script as in that case filament monitor is disabled

                        1 Reply Last reply Reply Quote 0
                        • JohnOCFIIundefined
                          JohnOCFII @JohnOCFII
                          last edited by

                          @JohnOCFII said in Inconsistent results with optical encoder wheel filament sensor:

                          @arhi said in Inconsistent results with optical encoder wheel filament sensor:

                          @JohnOCFII I'd still do that test without hotend

                          • remove hotend so you have only extrder drive and sensor
                          • disable "heating" in the g-code
                          • allow "cold extrusion" in the firmware
                          • do a print of a simple long extrusion g-code

                          I disconnected the extruder from the hot-end and set up some GCode to run so I could measure filament. I started with a test at 100mm, but M591 D0 is showing no data. Curious if not having the printer homed is causing the data collection to be ignored. Maybe I missed something.

                          Here's my GCode:

                          ; Test Extrusion 
                          ;
                          M302 P1                                            ; Allow cold extrusion
                          G92 X0Y0Z0                                         ; duet now assume we are homed
                          M82                                                ; extruder absolute position
                          G92 E0                                             ; reset extruder to 0
                          M591 D0 P7 C"connlcd.encb" S0 R50:1500 L1.2 E5 A1  ; config filament sensor
                          ; G1 E1000 F120                                     ; extrude 1000mm at 2mm/sec, so will be extruding around 8 minutes
                          G1 E100 F120                                       ; extrude 100mm at 2mm/sec, so will be extruding around 1.2 minutes
                          M591 D0                                            ; query filament sensor
                          

                          Yes, I saved it as ColdExtrusioTest.g and "printed" it same as I would any other file.
                          There must be something else I'm missing. I'll have to think about it.

                          10/31/2020, 3:10:14 PM	M591 D0
                          Pulse-type filament monitor on pin (connlcd.encb,connlcd.3), disabled, sensitivity 1.200mm/pulse, allowed movement 50% to 1500%, check every 5.0mm, no calibration data
                          10/31/2020, 3:07:37 PM	Finished printing file 0:/gcodes/Calibration/ColdExtrusionTest.g, print time was 0h 0m
                          10/31/2020, 3:06:47 PM	M32 "0:/gcodes/Calibration/ColdExtrusionTest.g"
                          File 0:/gcodes/Calibration/ColdExtrusionTest.g selected for printing
                          Pulse-type filament monitor on pin (connlcd.encb,connlcd.3), disabled, sensitivity 1.200mm/pulse, allowed movement 50% to 1500%, check every 5.0mm, no data received
                          10/31/2020, 3:05:50 PM	M591 D0
                          Pulse-type filament monitor on pin (connlcd.encb,connlcd.3), disabled, sensitivity 1.200mm/pulse, allowed movement 50% to 1500%, check every 5.0mm, no calibration data
                          10/31/2020, 3:03:59 PM	Finished printing file 0:/gcodes/Calibration/ColdExtrusionTest.g, print time was 0h 0m
                          10/31/2020, 3:03:09 PM	M32 "0:/gcodes/Calibration/ColdExtrusionTest.g"
                          File 0:/gcodes/Calibration/ColdExtrusionTest.g selected for printing
                          Pulse-type filament monitor on pin (connlcd.encb,connlcd.3), disabled, sensitivity 1.200mm/pulse, allowed movement 50% to 1500%, check every 5.0mm, no data received
                          
                          1 Reply Last reply Reply Quote 0
                          • JohnOCFIIundefined
                            JohnOCFII
                            last edited by

                            I homed the printer, then ran this file while it was still homed - no change in output.

                            1 Reply Last reply Reply Quote 0
                            • arhiundefined
                              arhi
                              last edited by

                              @JohnOCFII and it passed those 100mm trough extruder and sensor and the wheel were rotating? that's rotating rather slow right, can you check the impulses with a multimeter maybe? analog one would work great?

                              JohnOCFIIundefined 1 Reply Last reply Reply Quote 0
                              • JohnOCFIIundefined
                                JohnOCFII @arhi
                                last edited by

                                @arhi said in Inconsistent results with optical encoder wheel filament sensor:

                                @JohnOCFII and it passed those 100mm trough extruder and sensor and the wheel were rotating? that's rotating rather slow right, can you check the impulses with a multimeter maybe? analog one would work great?

                                Yes. Also, the optical sensor board has an LED that was blinking at regular intervals.

                                Depending on the weather, I'm supposed to fly with a student tomorrow (weekend flight instructor). If not, I'll try this tomorrow.

                                Saleae LA should arrive Monday or Tuesday. 🙂

                                arhiundefined 1 Reply Last reply Reply Quote 0
                                • arhiundefined
                                  arhi @JohnOCFII
                                  last edited by

                                  @JohnOCFII I'm more interested to see the levels you see on the duet board so measuring voltage between the signal pin (connlcd.encb) and gnd using voltmeter while slowly moving the encoder so to see what you have there for 0 (when that signal led is off) and what you have there for 1 (when that signal led is on) .. as I don't see a reason why would RRF detect these impulses for me and not for you unless there's something fishy with the voltage levels there ... how the cable is crymped etc etc..

                                  JohnOCFIIundefined 1 Reply Last reply Reply Quote 0
                                  • JohnOCFIIundefined
                                    JohnOCFII
                                    last edited by JohnOCFII

                                    So I've re-assembled the hot-end/extruder, and added some wiring extensions to connect to the Logic Analyzer. I was seeing incredibly strange outputs -- like this:

                                    Pulse-type filament monitor on pin (connlcd.encb,connlcd.3), disabled, sensitivity 1.200mm/pulse, allowed movement 50% to 1500%, check every 5.0mm, measured sensitivity 0.000mm/pulse, measured minimum 0%, maximum 1052141% over 46.6mm
                                    

                                    So I pulled the optical sensor off the case, and confirmed the encoder wheel is still moving as expected.

                                    So while the print was running, I started using a flat print to interrupt the sensor on a sort of regular basis, and started to get "more normal" results again. And by normal -- I mean normal for my recent results...

                                    Pulse-type filament monitor on pin (connlcd.encb,connlcd.3), disabled, sensitivity 1.200mm/pulse, allowed movement 30% to 1500%, check every 10.0mm, measured sensitivity 0.386mm/pulse, measured minimum 0%, maximum 6059% over 372.6mm
                                    

                                    I'm starting to wonder about wiring issues, or something else more related to the DUET. One thing you suggested was to try a different port, as this CONNLCD might be treated differently than the other ports.

                                    (I've got more free time than expected today -- so will keep plugging at things today)

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

                                      @JohnOCFII Hey John, I've been trying to keep up with this thread and I have a question you may have answered already:

                                      How is the receiver part of your optical interruptor connected to your Duet?
                                      Do you have a pull-up or pull-down resistor on the signal that goes to the Duet?

                                      If you got the digital-only Saleae you won't be able to see if there's a level problem due to a missing or too-large pull-resistor.

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

                                      JohnOCFIIundefined 1 Reply Last reply Reply Quote 0
                                      • JohnOCFIIundefined
                                        JohnOCFII @alankilian
                                        last edited by

                                        @alankilian said in Inconsistent results with optical encoder wheel filament sensor:

                                        @JohnOCFII Hey John, I've been trying to keep up with this thread and I have a question you may have answered already:

                                        How is the receiver part of your optical interruptor connected to your Duet?
                                        Do you have a pull-up or pull-down resistor on the signal that goes to the Duet?

                                        If you got the digital-only Saleae you won't be able to see if there's a level problem due to a missing or too-large pull-resistor.

                                        The optical sensor is connected to pins 1,2,3 on the CONN_LCD connector. I'd previously used this connection for a basic physical endstop-type filament sensor. I've tried the optical sensor with, and without the pull-up as indicated by including the "^" in the configuration string, but didn't see a noticeable change in behavior.

                                        Screen Shot 2020-11-01 at 2.55.28 PM.png

                                        https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_Pin_names_for_Duet_2_WiFi_Ethernet

                                        I'm getting the Logic 8, which appears to have analog inputs. https://www.saleae.com

                                        Also - right now I've hooked up a BitScope Micro, which I ordered a few years ago, but never used. When I hook it up to GND and the signal pin, I see a bit of noise, but no change when I interrupt the optical sensor beam. On the sensor itself breaking the beam turns off an LED. Perhaps no data flows to the Duet when a print isn't running?

                                        I've never used a Logic Analyzer or O-Scope before, so this is all new to me.

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

                                          Both the LED-side and the receive-side of the interrupter need to be hooked up "in the right way"

                                          Can you post which connection on the Duet is connected to which connection on the optical interrupter?
                                          Also, can you post the name/number of the interrupter or a data sheet?

                                          It's pretty easy to get one side or the other backwards. AND it's pretty easy to fix!

                                          The new Logic 8 will be great.
                                          I have the very very old digital only Logic 8 as well as an old Logic 16 Pro that does both analog and Digital, so I can certainly help you setup and look at the signal when you get that.

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

                                          JohnOCFIIundefined 1 Reply Last reply Reply Quote 0
                                          • JohnOCFIIundefined
                                            JohnOCFII @alankilian
                                            last edited by

                                            @alankilian said in Inconsistent results with optical encoder wheel filament sensor:

                                            Can you post which connection on the Duet is connected to which connection on the optical interrupter?

                                            Duet Pin 1 (+3.3) <---> Pin labeled V on sensor
                                            Duet Pin 2 (GND) <--> Pin labeled G on sensor
                                            Duet Pin 3 (STOP 10 - ENC_B) <--> Pin labeled S on sensor

                                            Also, can you post the name/number of the interrupter or a data sheet?

                                            The markings on the unit are 70T2. These are sensors I bought: https://www.ebay.com/itm/4-Pieces-Optical-Endstop-Limit-Switch-RAMPS-1-4-Board-3D-Printer-3Pin-Cable-A27/254260205504

                                            It's pretty easy to get one side or the other backwards. AND it's pretty easy to fix!

                                            The new Logic 8 will be great.
                                            I have the very very old digital only Logic 8 as well as an old Logic 16 Pro that does both analog and Digital, so I can certainly help you setup and look at the signal when you get that.

                                            Excellent -- and thank you!

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