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.
    • Phaedruxundefined
      Phaedrux Moderator
      last edited by

      If it thinks it's triggered when it isn't, either it's picking up noise, or the trigger signal needs to be inverted/reverted.

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

      The ! means invert the signal. If you remove that what does it report? Does it detect a trigger still?

      The ^ on the pin name would enable the pullup resistor.

      How exactly do you have the probe wired?

      Can you confirm for us what your firmware version is? Post the results of sending M122 and M98 P"config.g"

      Z-Bot CoreXY Build | Thingiverse Profile

      Petr Kundefined 2 Replies Last reply Reply Quote 0
      • Petr Kundefined
        Petr K @tecno
        last edited by

        @tecno I will try it this afternoon, thanks.

        1 Reply Last reply Reply Quote 0
        • Petr Kundefined
          Petr K @Phaedrux
          last edited by Petr K

          @phaedrux ogA64gS3SXCmPhsQ.jpeg
          I use Shottky diode BAT43 too and code I wil send this afternoon, thank you.

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

            @petr-k

            I recently tested a number of inductive sensors and capacitive sensors.

            Do you know the switching frequency of your device?

            The response time of such a sensor is related to it's switching frequency. The higher the frequency the faster the response.

            The best inductive sensors I tested had a switching frequency 3 kHz.

            The switching frequency of the two capacitive sensors I tested was 50 Hz which gave them a slow response time, so slow that I found them unsatisfactory.

            It's not that they don't work, it's just that you have to use a rather slow probing speed which makes creating high density height maps (20 x 20) a very slow and tedious experience.

            The advantage of capacitive sensors is that they can work with the various flexible plate build surface systems that use magnets.

            Inductive sensors can have problems with such systems.

            Frederick

            Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

            Petr Kundefined 1 Reply Last reply Reply Quote 0
            • Petr Kundefined
              Petr K @fcwilt
              last edited by

              @fcwilt https://www.aliexpress.com/item/4000259928467.html?spm=a2g0s.9042311.0.0.27424c4dCecg3g I have this M20 NPN NO

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

                @petr-k said in NPN sensor problem:

                @fcwilt https://www.aliexpress.com/item/4000259928467.html?spm=a2g0s.9042311.0.0.27424c4dCecg3g I have this M20 NPN NO

                Well that indicates it is a inductive sensor but your previously posted image mentions a capacitive sensor.

                And it seems to show that the switching frequency is 500 Hz - which should be fine.

                Thanks.

                Frederick

                Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                1 Reply Last reply Reply Quote 0
                • Petr Kundefined
                  Petr K @Phaedrux
                  last edited by

                  @phaedrux said in NPN sensor problem:

                  M122

                  M122
                  === Diagnostics ===
                  RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3 (2021-06-15 21:44:54) running on Duet WiFi 1.02 or later
                  Board ID: 0JD0M-9P6M2-NWNS4-7J9DL-3SN6Q-TT2ZK
                  Used output buffers: 3 of 24 (11 max)
                  === RTOS ===
                  Static ram: 23876
                  Dynamic ram: 75028 of which 24 recycled
                  Never used RAM 15488, free system stack 184 words
                  Tasks: NETWORK(ready,13.4%,231) HEAT(delaying,0.0%,314) Move(notifyWait,0.1%,364) MAIN(running,86.2%,443) IDLE(ready,0.3%,29), total 100.0%
                  Owned mutexes: WiFi(NETWORK)
                  === Platform ===
                  Last reset 00:05:12 ago, cause: power up
                  Last software reset at 2021-08-26 17:54, reason: User, GCodes spinning, available RAM 15488, slot 2
                  Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a
                  Error status: 0x00
                  Step timer max interval 0
                  MCU temperature: min 12.6, current 20.6, max 21.0
                  Supply voltage: min 24.2, current 24.3, max 24.5, under voltage events: 0, over voltage events: 0, power good: yes
                  Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0
                  Driver 0: position 0, standstill, SG min/max not available
                  Driver 1: position 0, standstill, SG min/max not available
                  Driver 2: position 0, standstill, SG min/max not available
                  Driver 3: position 0, standstill, SG min/max not available
                  Driver 4: position 0, standstill, SG min/max not available
                  Driver 5: position 0
                  Driver 6: position 0
                  Driver 7: position 0
                  Driver 8: position 0
                  Driver 9: position 0
                  Driver 10: position 0
                  Driver 11: position 0
                  Date/time: 2021-08-27 16:46:06
                  Cache data hit count 4294967295
                  Slowest loop: 2.88ms; fastest: 0.17ms
                  I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0
                  === Storage ===
                  Free file entries: 10
                  SD card 0 detected, interface speed: 20.0MBytes/sec
                  SD card longest read time 2.6ms, write time 0.0ms, max retries 0
                  === Move ===
                  DMs created 83, maxWait 0ms, bed compensation in use: none, comp offset 0.000
                  === MainDDARing ===
                  Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
                  === AuxDDARing ===
                  Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1
                  === Heat ===
                  Bed heaters = 0 -1 -1 -1, chamberHeaters = -1 -1 -1 -1
                  === GCodes ===
                  Segments left: 0
                  Movement lock held by null
                  HTTP is idle in state(s) 0
                  Telnet is idle in state(s) 0
                  File is idle in state(s) 0
                  USB is idle in state(s) 0
                  Aux is idle in state(s) 0
                  Trigger is idle in state(s) 0
                  Queue is idle in state(s) 0
                  LCD is idle in state(s) 0
                  Daemon is idle in state(s) 0
                  Autopause is idle in state(s) 0
                  Code queue is empty.
                  === Network ===
                  Slowest loop: 15.79ms; fastest: 0.00ms
                  Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions
                  HTTP sessions: 1 of 8
                  - WiFi -
                  Network state is active
                  WiFi module is connected to access point 
                  Failed messages: pending 0, notready 0, noresp 0
                  WiFi firmware version 1.23
                  WiFi MAC address e8:db:84:92:3c:57
                  WiFi Vcc 3.40, reset reason Turned on by main processor
                  WiFi flash size 4194304, free heap 24456
                  WiFi IP address 192.168.1.112
                  WiFi signal strength -66dBm, mode none, reconnections 0, sleep mode modem
                  Clock register ffffffff
                  Socket states: 0 4 0 0 0 0 0 0
                  
                  M98 P"config.g"
                  HTTP is enabled on port 80
                  FTP is disabled
                  TELNET is disabled
                  Driver assignments: X0 Y1 Z2:4 E3, 3 axes visible
                  Warning: Macro file config-override.g not found
                  
                  1 Reply Last reply Reply Quote 0
                  • Petr Kundefined
                    Petr K @tecno
                    last edited by

                    @tecno said in NPN sensor problem:

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

                    M119
                    Endstops - X: not stopped, Y: not stopped, Z: at min stop, Z probe: at min stop

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

                      @petr-k said in NPN sensor problem:

                      @tecno said in NPN sensor problem:

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

                      M119
                      Endstops - X: not stopped, Y: not stopped, Z: at min stop, Z probe: at min stop

                      Well if the sensor was not actually triggered remove the ! character from the M558 and test again.

                      Frederick

                      Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                      Petr Kundefined 1 Reply Last reply Reply Quote 0
                      • dc42undefined
                        dc42 administrators @Petr K
                        last edited by

                        @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

                        Petr Kundefined 2 Replies Last reply Reply Quote 1
                        • Petr Kundefined
                          Petr K @dc42
                          last edited by

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

                          1 Reply Last reply Reply Quote 0
                          • Petr Kundefined
                            Petr K @dc42
                            last edited by

                            @dc42 pullup did nothing

                            1 Reply Last reply Reply Quote 0
                            • Petr Kundefined
                              Petr K @fcwilt
                              last edited by

                              @fcwilt said in NPN sensor problem:

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

                              Z probe value 1000, when triggered value is 0

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

                                @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 E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                                Petr Kundefined 1 Reply Last reply Reply Quote 0
                                • Petr Kundefined
                                  Petr K @fcwilt
                                  last edited by

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

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

                                    @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 E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                                    Petr Kundefined 1 Reply Last reply Reply Quote 1
                                    • Petr Kundefined
                                      Petr K @fcwilt
                                      last edited by

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

                                      fcwiltundefined dc42undefined 2 Replies Last reply Reply Quote 0
                                      • fcwiltundefined
                                        fcwilt @Petr K
                                        last edited by

                                        @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 E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

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

                                          @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
                                          • Petr Kundefined
                                            Petr K @fcwilt
                                            last edited by

                                            @fcwilt
                                            IMG_20210828_094804_New.jpg

                                            IMG_20210828_094840_New.jpg

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