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

    2-wire Mechanical N/O endstop switches

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    4
    15
    766
    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.
    • kroybalundefined
      kroybal
      last edited by kroybal

      Nearly through with installing my new Duet 3 control board to the AON-M1. Pre-installed by manufacturer to the printer are an X-min, X-max, Y-max, and redundant (2) Z-min switches. In total there are 5 switches, all are 2 wire, with red running to NO and black running to C.

      The goal here is to be able to home the machine, which has two independent carriages on the X-Axis. The left extruder (defined as X axis) should touch off to the X-min and the right extruder (defined as U axis) to touch off to the X-max switches. And the Y & Z to home as they normally do.

      According to supporting articles, this type of switch should be connected black and red wires to GND and 3.3V respectively on the IO_x pins.

      here is the code:

      ; ======={ Endstops } ================
      M574 X1 S0 P"io1.in"                     ;X-Min switch active-low
      M574 X2 S0 P"io2.in"                     ;X-Max switch active-low
      M574 Y2 S0 P"io3.in"                     ;Y-Max switch active-low
      M574 Z1 S0 P"io4.in"                     ;Z-Min switch active-low
      M574 Z1 S0 P"io5.in"                     ;Z-Min switch active-low
      

      I am still getting an error:
      "G28 X... Error: Failed to enable endstops"

      I feel that the problem here is either in wiring or in coding.

      Any common pitfalls or clever insights?

      jay_s_ukundefined 1 Reply Last reply Reply Quote 0
      • fcwiltundefined
        fcwilt
        last edited by

        Hi,

        From the documentation:

        Endstop type S0 (active low switch) is no longer supported in M574 commands. Instead, use type S1 and invert the input by prefixing the pin name with '!'. Ex: M574 X1 S1 P"!xstop". Invert the input when using an NPN output inductive or capacitive sensor, or using a NO switch (not recommended, use a NC switch instead).

        Frederick

        Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

        1 Reply Last reply Reply Quote 0
        • kroybalundefined
          kroybal
          last edited by

          @fcwilt said in 2-wire Mechanical N/O endstop switches:

          Hi,

          From the documentation:

          Endstop type S0 (active low switch) is no longer supported in M574 commands. Instead, use type S1 and invert the input by prefixing the pin name with '!'. Ex: M574 X1 S1 P"!xstop". Invert the input when using an NPN output inductive or capacitive sensor, or using a NO switch (not recommended, use a NC switch instead).

          Frederick

          I had the inverted:

          M574 X1 S0 P"!io1.in"
          

          at first and removed it to see if that would be a quick fix, I have yet to edit it back in.

          I am trying to work with what I got (switch: ss-3gl13pt NO & C connected), not necessarily trying to rewire the manufacturers work unless absolutely necessary.

          1 Reply Last reply Reply Quote 0
          • fcwiltundefined
            fcwilt
            last edited by

            Hi,

            When you had the ! did you also change the S0 to S1?

            Frederick

            Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

            1 Reply Last reply Reply Quote 1
            • kroybalundefined
              kroybal
              last edited by

              Some progress made.

              I swapped to S1 and now the DWC is registering 4 out of 5 endstops. Where 3 of the 4 registered read as being not triggered and the 4th registered being read as n/a.

              I tried tapping all of the endstops monitoring if DWC would see if they got triggered to which it did not.

              1 Reply Last reply Reply Quote 0
              • Phaedruxundefined
                Phaedrux Moderator
                last edited by Phaedrux

                @kroybal said in 2-wire Mechanical N/O endstop switches:

                M574 Z1 S0 P"io4.in" ;Z-Min switch active-low M574 Z1 S0 P"io5.in" ;Z-Min switch active-low

                This should be formatted as M574 Z2 S1 P"io4.in+io5.in"

                Plus inverting with ! if necessary.

                Z-Bot CoreXY Build | Thingiverse Profile

                kroybalundefined Phaedruxundefined 2 Replies Last reply Reply Quote 0
                • kroybalundefined
                  kroybal @Phaedrux
                  last edited by

                  @Phaedrux said in 2-wire Mechanical N/O endstop switches:

                  This should be formatted as M574 Z S1 P"io4.in+io5.in"

                  Formatting this way is to combine redundant switches?

                  After implementing this, my endstop status column on the DWC lists 4 out of 5 endstops (indexing 0-3) Keeping the inverted "!" indicator across all endstops results in index 0,1 & 2 as not triggered and index 3 as n/a.

                  1 Reply Last reply Reply Quote 0
                  • Phaedruxundefined
                    Phaedrux Moderator
                    last edited by

                    https://duet3d.dozuki.com/Wiki/Gcode#Section_M574_RepRapFirmware_Num_3

                    Do you have dual z motors? What is the reason for redundant switches?

                    Z-Bot CoreXY Build | Thingiverse Profile

                    kroybalundefined 1 Reply Last reply Reply Quote 0
                    • jay_s_ukundefined
                      jay_s_uk @kroybal
                      last edited by

                      @kroybal you should be wiring the endstops between ioX.in and ground, not 3.3v and ground.
                      Can you post a photo of your wiring of one of the plugs?

                      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

                      1 Reply Last reply Reply Quote 0
                      • kroybalundefined
                        kroybal @Phaedrux
                        last edited by

                        @Phaedrux The machine came with the switches pre-installed I do not see any obvious reasons for redundant Z switches. My lab manager did buy a modulated IR Z probe which will certainly effect the setup down the line once its installed.

                        1 Reply Last reply Reply Quote 0
                        • kroybalundefined
                          kroybal
                          last edited by

                          UPDATE:

                          @jay_s_uk & @Phaedrux

                          I got the switches running. I will probably just recognize only one of the redundant switches, since they seem to be coplanar and serve no obvious purpose. I am working with some juiced up motors for the z-axis and the only reason I can think of for redundant switches in to be safe not to damage the machine in the event of a signal failure.

                          I could post a photo if you are interested however, doesn't seem to be necessary at this point!

                          Thanks for your help.

                          fcwiltundefined 1 Reply Last reply Reply Quote 1
                          • fcwiltundefined
                            fcwilt @kroybal
                            last edited by

                            @kroybal said in 2-wire Mechanical N/O endstop switches:
                            ...the only reason I can think of for redundant switches in to be safe not to damage the machine in the event of a signal failure.

                            I could post a photo if you are interested however, doesn't seem to be necessary at this point!

                            I would like to see a picture of the two Z end stop switches.

                            I had two on a printer at one time when I was experimenting with homing Z at a very high speed until it triggered the first end stop switch. Then the homing continued at a safer speed until the second end stop switch triggered.

                            Thanks.

                            Frederick

                            Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                            1 Reply Last reply Reply Quote 0
                            • kroybalundefined
                              kroybal
                              last edited by

                              @fcwilt
                              AON_M1_CHAMBER.jpg

                              1 Reply Last reply Reply Quote 1
                              • fcwiltundefined
                                fcwilt
                                last edited by

                                It looks like they planned to have a endstop for each Z stepper so homing would also get the two steppers back in sync if they happened to get out of sync for some reason.

                                So you may want to implement that.

                                Frederick

                                Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                                1 Reply Last reply Reply Quote 0
                                • Phaedruxundefined
                                  Phaedrux Moderator @Phaedrux
                                  last edited by

                                  @Phaedrux said in 2-wire Mechanical N/O endstop switches:

                                  @kroybal said in 2-wire Mechanical N/O endstop switches:

                                  M574 Z1 S0 P"io4.in" ;Z-Min switch active-low M574 Z1 S0 P"io5.in" ;Z-Min switch active-low

                                  This should be formatted as M574 Z2 S1 P"io4.in+io5.in"

                                  Plus inverting with ! if necessary.

                                  This would get you the releveling with dual endstops.

                                  Z-Bot CoreXY Build | Thingiverse Profile

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