Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Confirmation required for wiring end stop switch with led

    Duet Hardware and wiring
    3
    18
    1394
    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.
    • deckingman
      deckingman last edited by

      I've just taken delivery of a Metrol contact switch via Misumi EU for use with my proposed sliding mount (claimed repeatability 0.001mm at switch point of 0.3mm). I didn't particularly want an LED but that's how it came. There is no board or other components and as near as I can make out (the instructions are in Japanese), the LED is just in series with the switch contacts (normally open I'm afraid). So I'm guessing that I'd just connect the brown wire to 3.3v and the blue to Stp and set M574 to active low. Is that correct?

      Also, there are some Japanese characters that seem to indicate that a series resistor is needed but I think that's only for 24v systems and I'm safe to ignore that with 3.3v logic. Is that also a safe assumption?

      Thanks

      Ian

      Ian
      https://somei3deas.wordpress.com/
      https://www.youtube.com/@deckingman

      1 Reply Last reply Reply Quote 0
      • deckingman
        deckingman last edited by

        Quick update to this. I've got some English info from Misumi. The contact rating is 5 to 24v 10mA max (with LED) resistive load. Then a bit further on I have " For load within the switch rating or installation onto a PLC, current limiting resistors are not necessary
        as long as the current is about 7mA"

        So am I OK to connect this directly to the Duet as detailed above?

        Thanks

        Ian
        https://somei3deas.wordpress.com/
        https://www.youtube.com/@deckingman

        1 Reply Last reply Reply Quote 0
        • dc42
          dc42 administrators last edited by

          Can you bypass the LED? If so then you can just connect the contacts to the E0 endstop pins in the usual way. Otherwise, I suggest you connect it between the In and Gnd pins of the Z probe connector, with a pullup resistor of about 220 ohms to 1K between In and +3.3V, use Z probe type 1, use the I1 parameter in the M558 command, and set a suitable trigger level using G31.

          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
          • deckingman
            deckingman last edited by

            Thanks David. The LED is kind of moulded in to the lead so the only way to bypass it would be to cut it out which no doubt would invalidate any warrantee. I'm a bit reluctant to do that as it cost me 34 quid. I'll try your plan B. Ian

            Ian
            https://somei3deas.wordpress.com/
            https://www.youtube.com/@deckingman

            1 Reply Last reply Reply Quote 0
            • deckingman
              deckingman last edited by

              David,

              Sorry to be a pain again. I was rather hoping that I could retain your IR probe in case my sliding mount doesn't work out. What I had in mind was to leave that connected to the Z probe input but connect this switch to the E0 input and select mode 4. That is to say, it'd be cool if I could have them both wired and switch between them in my config. I'm assuming from you reply that this is not possible but can you just confirm that that is the case please.

              Thanks.

              Ian
              https://somei3deas.wordpress.com/
              https://www.youtube.com/@deckingman

              1 Reply Last reply Reply Quote 0
              • deckingman
                deckingman last edited by

                @dc42:

                Can you bypass the LED? If so then you can just connect the contacts to the E0 endstop pins in the usual way. Otherwise, I suggest you connect it between the In and Gnd pins of the Z probe connector, with a pullup resistor of about 220 ohms to 1K between In and +3.3V, use Z probe type 1, use the I1 parameter in the M558 command, and set a suitable trigger level using G31.

                David,

                Did you really mean probe type 1? Reading the Wiki instructions, it says that type 1 is for analogue inputs whereas type 5 is for a switch or digital output.

                Ian
                https://somei3deas.wordpress.com/
                https://www.youtube.com/@deckingman

                1 Reply Last reply Reply Quote 0
                • dc42
                  dc42 administrators last edited by

                  If there is a LED in series with the switch and you can't bypass it, then I do mean type 1.

                  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
                  • deckingman
                    deckingman last edited by

                    OK thanks David. With it wired and configured as you suggest, the led on the switch illuminates when the switch makes but I see no change in the state of any of the LEDS on the board. Is that expected behaviour? And one final question, I had set up E0 to be used as an emergency stop using a second micro switch and M581. I have temporarily disconnected and disabled this. Can I reinstate it as is or should I use one of the other estops on the Duex5 instead of E0? Thanks

                    Ian
                    https://somei3deas.wordpress.com/
                    https://www.youtube.com/@deckingman

                    1 Reply Last reply Reply Quote 0
                    • deckingman
                      deckingman last edited by

                      Update on this. If I try to home Z with the switch wired like this, when I trigger the switch, the bed rises slowly but continues to rise. Fortunately I had the bed well down which gave me enough time to kill the power before anything got mangled. What to do now?

                      Ian
                      https://somei3deas.wordpress.com/
                      https://www.youtube.com/@deckingman

                      1 Reply Last reply Reply Quote 0
                      • dc42
                        dc42 administrators last edited by

                        Endstops and Z probes should always be tested using M119 or the DWC machine properties page before relying on them.

                        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
                        • deckingman
                          deckingman last edited by

                          Yes OK but what can I try next to get this working? It sort of triggers because the in built LED illuminates and the bed rises at a slower rate. Like it does with your IR probe but the bed doesn't stop - it just carries on at a slower rate. For info I'm using a 550 ohm resistor because it is more or less in the middle of the 220 ohm to 1k ohm you suggested. Would a lower/higher value work?

                          What about my other questions? i.e. should the LED on the duet board change state with this configuration and can still use E0 as and emergency stop or should I reconfigure it?

                          I tried Misumi's site to see if I could buy a non LED version of this switch but it's been discontinued. The only version available is the LED version. It's a precision positioning switch, designed for homing machinery so I'd be disappointed if there is no way to get such a switch to work with the Duet.

                          Ian
                          https://somei3deas.wordpress.com/
                          https://www.youtube.com/@deckingman

                          1 Reply Last reply Reply Quote 0
                          • dc42
                            dc42 administrators last edited by

                            What is the Z probe value shown in DWC when the switch is/isn't closed?

                            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
                            • deckingman
                              deckingman last edited by

                              In it's "normal" state, the value is 0. When it is made (as in if the end stop limit was triggered), it is 474. According to the data sheet, it's a normally open switch.

                              Edit. Didn't know about the M119 command. Just tried it and with the switch triggered I get "Endstops - X: not stopped, Y: not stopped, Z: near min stop, Z probe: near min stop"

                              Ian
                              https://somei3deas.wordpress.com/
                              https://www.youtube.com/@deckingman

                              1 Reply Last reply Reply Quote 0
                              • deckingman
                                deckingman last edited by

                                Got impatient so I tried a 1.2k ohm resistor and the probe value went up to 484. Tried a 4k7 and it went up to 500 and M119 now reports Z at min end stop. So seems to work with that value resistor. Is it safe to leave it like that?

                                Further edit. Just realised that I can change the trigger value in G31, as well as the trigger height. I've only ever used the mini height sensor so always had it set to 500 and completely forget that it can be set to any other value. So back to the 500 ohm resistor and setting a trigger value of 450 works. Given that the value changes between O and 474, is 450 a reasonably safe number to use?

                                Ian
                                https://somei3deas.wordpress.com/
                                https://www.youtube.com/@deckingman

                                1 Reply Last reply Reply Quote 0
                                • iDevelo
                                  iDevelo last edited by

                                  So it was just the trigger level? You could in theory just lower that?

                                  Also I'm interested in the outcome of this. I've got issues with 3Dlac and the IR sensor.

                                  1 Reply Last reply Reply Quote 0
                                  • dc42
                                    dc42 administrators last edited by

                                    @deckingman:

                                    Got impatient so I tried a 1.2k ohm resistor and the probe value went up to 484. Tried a 4k7 and it went up to 500 and M119 now reports Z at min end stop. So seems to work with that value resistor. Is it safe to leave it like that?

                                    I suggest you lower the trigger level (G31 P parameter) to 250.

                                    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
                                    • deckingman
                                      deckingman last edited by

                                      Sorry guys, we were all typing at the same time. I've just edited my post having remembered that I can edit the trigger value. I've only ever used DCs probe so it's always been 500 and I've never changed it - completely forgot that it was editable.

                                      Ian
                                      https://somei3deas.wordpress.com/
                                      https://www.youtube.com/@deckingman

                                      1 Reply Last reply Reply Quote 0
                                      • deckingman
                                        deckingman last edited by

                                        @iDevelo:

                                        So it was just the trigger level? You could in theory just lower that?

                                        Also I'm interested in the outcome of this. I've got issues with 3Dlac and the IR sensor.

                                        Well I'm pretty confident that the switch will work - that's what it's designed to do. However, it is a contact switch so you can't use it directly on the bed unless you use some mechanism to deploy it. That is to say, you can't have it permanently lower than the nozzle because it will be scraping on the printed part, and you can't have it higher because the nozzle will touch the bed before the probe does. My plan is to use it above the hot end mount with the nozzle itself being the probe. Check my sliding mount thread to see what I mean.

                                        So it's the sliding mount part that could screw up the repeatability. I've nearly got a working prototype but I have to change the entire XY carriages to test it.

                                        Ian

                                        Ian
                                        https://somei3deas.wordpress.com/
                                        https://www.youtube.com/@deckingman

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