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

NPN sensor problem

Scheduled Pinned Locked Moved
Firmware installation
5
26
1.6k
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
    dc42 administrators @Petr K
    last edited by 27 Aug 2021, 15:08

    @petr-k if it's definitely a NPN NO sensor, then this command should work:

    M558 P5 C"^!zprobe.in" H5 F120 T6000

    unless the senor has high leakage current. If that's the case then you might need to add a pullup resistor (e.g. 10K) between the sensor output and +3.3V or +5V. But I've not heard of this happening before.

    Are you certain that it isn't a PNP output sensor?

    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 2 Replies Last reply 27 Aug 2021, 15:39 Reply Quote 1
    • undefined
      Petr K @dc42
      last edited by 27 Aug 2021, 15:39

      @dc42 This is writes on sensor LJ20A3-10-Z/BX. Ok I will try pull-up, thanks.

      1 Reply Last reply Reply Quote 0
      • undefined
        Petr K @dc42
        last edited by 27 Aug 2021, 16:02

        @dc42 pullup did nothing

        1 Reply Last reply Reply Quote 0
        • undefined
          Petr K @fcwilt
          last edited by 27 Aug 2021, 16:07

          @fcwilt said in NPN sensor problem:

          M558 P5 C"^!zprobe.in" H5 F120 T6000

          Z probe value 1000, when triggered value is 0

          undefined 1 Reply Last reply 27 Aug 2021, 16:12 Reply Quote 0
          • undefined
            fcwilt @Petr K
            last edited by 27 Aug 2021, 16:12

            @petr-k said in NPN sensor problem:

            @fcwilt said in NPN sensor problem:

            M558 P5 C"^!zprobe.in" H5 F120 T6000

            Z probe value 1000, when triggered value is 0

            Was that with the ! character or without?

            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

            undefined 1 Reply Last reply 27 Aug 2021, 16:25 Reply Quote 0
            • undefined
              Petr K @fcwilt
              last edited by 27 Aug 2021, 16:25

              @fcwilt M558 P5 C"^zprobe.in" H5 F120 T6000

              undefined 1 Reply Last reply 27 Aug 2021, 16:54 Reply Quote 0
              • undefined
                fcwilt @Petr K
                last edited by 27 Aug 2021, 16:54

                @petr-k said in NPN sensor problem:

                @fcwilt M558 P5 C"^zprobe.in" H5 F120 T6000

                Well then it should work with the ! unless the the output voltage of the sensor simply isn't meeting the logic levels needed of the input.

                What is the forward voltage drop of that diode?

                Did you try it without the diode?

                As I recall the logic 0 voltage level for the input is appx 0.8 volts. It's possible the combination of the drop across the NPN transistor in the sensor and the diode fails to meet that logic 0 level.

                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

                undefined 1 Reply Last reply 27 Aug 2021, 19:34 Reply Quote 1
                • undefined
                  Petr K @fcwilt
                  last edited by 27 Aug 2021, 19:34

                  @fcwilt I try it without diode too, but it was the same, nothing changed.

                  undefined undefined 2 Replies Last reply 27 Aug 2021, 19:36 Reply Quote 0
                  • undefined
                    fcwilt @Petr K
                    last edited by 27 Aug 2021, 19:36

                    @petr-k said in NPN sensor problem:

                    @fcwilt I try it without diode too, but it was the same, nothing changed.

                    Do you have a way to measure the voltage at the input to the board to verify the low (sensor triggered) and high (sensor not triggered) voltage levels

                    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

                    undefined 1 Reply Last reply 28 Aug 2021, 08:15 Reply Quote 0
                    • undefined
                      Phaedrux Moderator @Petr K
                      last edited by 27 Aug 2021, 20:09

                      @petr-k said in NPN sensor problem:

                      M584 M584 X0 Y1 Z2:4 E3 ; set drive mapping

                      You have M584 twice on that line.

                      Z-Bot CoreXY Build | Thingiverse Profile

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        Petr K @fcwilt
                        last edited by 28 Aug 2021, 08:15

                        @fcwilt
                        IMG_20210828_094804_New.jpg

                        IMG_20210828_094840_New.jpg

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          dc42 administrators @Petr K
                          last edited by dc42 28 Aug 2021, 09:22

                          @petr-k if you have a multimeter then as @fcwilt suggested, you should measure the voltage between the IN pin and GND pins of the Z Probe connector. You should get:

                          • With the sensor not connected: nearly 3.3V (and DWC should report the Z probe reading as 0). If you don't read 3.3V then most likely your M558 command is wrong.
                          • With the sensor connected but not triggered: same (except that if the sensor includes a pullup resistor, you may get a higher voltage than 3.3V)
                          • With the sensor connected and triggered: about 0.2V if you don't use the diode, or 0.5V if you do.

                          Edit: in your photo it looks as though you may be using 2 diodes connected in series.

                          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 28 Aug 2021, 12:50 Reply Quote 0
                          • undefined
                            Petr K @dc42
                            last edited by 28 Aug 2021, 12:50

                            @dc42

                            sensor connected, not triggered - 3.0V
                            sensor connected, triggered - 0V
                            sensor disconnected, not triggered - 0V
                            sensor disconnected, triggered - 1,5 V

                            All with diode.

                            My soldering looks like a second diode šŸ˜„

                            undefined 1 Reply Last reply 28 Aug 2021, 14:39 Reply Quote 0
                            • undefined
                              Petr K @Petr K
                              last edited by 28 Aug 2021, 14:39

                              G31 X35 Y-4 Z0 P500 was the problem, I had two parameters P (P0 and P500), now works great

                              undefined 1 Reply Last reply 29 Aug 2021, 08:07 Reply Quote 2
                              • undefined
                                Petr K @Petr K
                                last edited by 29 Aug 2021, 08:07

                                @petr-k And P≠0

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