Navigation

    Duet3D Logo

    Duet3D

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

    PNP Inductive Sensor and wiring

    Duet Hardware and wiring
    6
    28
    6216
    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.
    • ajcraig99
      ajcraig99 last edited by

      I've done a few searches but am still not too sure how to wire up and connect my LJ12A3-4-Z/BY 6-36v inductive probe as a replacement for the piezo I was using.

      From the wiki:

      PNP output normally-open inductive or capacitive sensor
      Duet 2 Maestro, or revision 1.04 or later of Duet WiFi or Duet Ethernet: you can connect the output of the sensor
      directly to the IN pin of the Z probe connector. You must also connect a pulldown resistor between IN and GND of
      the Z probe connector. 10Kohms is a suitable value.

      Can I simply do the below without damaging the Duet? I am running the Duet on 24v btw

      0_1536447507433_Untitled-2.jpg

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

        well shit.

        that was a $300 mistake.

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

          I'm an idiot and in hindsight have very clearly sent 24v to the Z PROBE_IN and fried my Duet, I should have waiting for some input on this post but wanted to get it working before heading to the airport so was inpatient.

          I think this part of the wiki could use more detail to hopefully prevent ID10T errors like this in the future 😞

          Hopefully someone can chime in with the correct wiring diagram by the time my new board arrives?

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

            I use a relay module and using the relay output, it works like a switch.

            The one I used: https://www.amazon.com/gp/product/B00MMW0XWY with a buck convertor to get 12v from 24v. There are 24v ones on there also.

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

              I have a spare buck converter that I could probably use, would the below work?

              0_1536454908485_2.jpg

              fcwilt 1 Reply Last reply Reply Quote 0
              • fcwilt
                fcwilt @ajcraig99 last edited by fcwilt

                @ajcraig99

                It seems unlikely a buck converter would work due to slow response time but that is just an educated guess.

                What is the voltage swing on the output of the sensor?

                You may be able to use a simple voltage divider made from a couple of resistors or maybe a resistor and 2 or 3 diodes.

                Frederick

                Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.1

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

                  I see, I have no idea about the voltage swing, will have to look into that when I'm back home next week.

                  It sounds like a relay is going to be the easiest option right?

                  fcwilt 1 Reply Last reply Reply Quote 0
                  • fcwilt
                    fcwilt @ajcraig99 last edited by

                    @ajcraig99 said in PNP Inductive Sensor and wiring:

                    I see, I have no idea about the voltage swing, will have to look into that when I'm back home next week.

                    It sounds like a relay is going to be the easiest option right?

                    Well a relay may introduce some additional error since it is a mechanical device that is not going to respond instantly.

                    If I were doing it I would try a voltage divider.

                    Once you know the voltage swing of the sensor it will be easy to determine if a voltage divider will work and what parts you would need.

                    Let us know what you find out about the sensor.

                    Frederick

                    Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.1

                    Stephen6309 1 Reply Last reply Reply Quote 0
                    • Stephen6309
                      Stephen6309 @fcwilt last edited by

                      @fcwilt A 3D printer doesn't move fast enough for the slight delay of engergizing a relay to affect the z probing or homing. I haven't had any problems.

                      fcwilt 1 Reply Last reply Reply Quote 0
                      • fcwilt
                        fcwilt @Stephen6309 last edited by

                        @stephen6309 said in PNP Inductive Sensor and wiring:

                        @fcwilt A 3D printer doesn't move fast enough for the slight delay of engergizing a relay to affect the z probing or homing. I haven't had any problems.

                        What was your reference probing device which you compared to the device that used the relay?

                        Thanks.

                        Frederick

                        Printers: A FT-5 with the 713 upgrade bits. A custom MarkForged style. A small Utilmaker style and a CoreXY from kits. Various hotends. Using Duets (2 and 3) running 3.4.1

                        Stephen6309 1 Reply Last reply Reply Quote 0
                        • Stephen6309
                          Stephen6309 @fcwilt last edited by

                          @fcwilt I used to use dc42's ir sensor. Changed to a proximity sensor to see if the bed was really bumpy. The bumpiness smoothed out a bit, so the BuildTak on the 1/4" MIC6 appears to be unevenly transparent to ir.

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

                            Sorry it's taken a while to reply. In your wiring diagram, you have the brown and black wires swapped. The brown wire is the power feed to the sensor, so it should be connected to V_FAN. The black wire is the output from the sensor, so it should be connected to the 10K pulldown and the Z probe input.

                            Also I suggest you connect the blue wire to the ground pin of the always-on fan connector instead of the ground pin of the Z probe connector, because the fan connector is designed to take more current.

                            What damage is evident on the Duet? I'm surprised that it has failed, other than perhaps blowing the fan fuse. The sensor may be toast though. Are you certain that you don't have another wiring issue as well?

                            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

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

                              I just spotted another problem. You are using the wrong wiring diagram - the one for "Prototype V2" instead of the one for production boards. The prototype V2 had the Z probe connector pins in the reverse order. So you fed +24V into the +3.3V pin instead of into the Z probe IN pin.

                              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

                              ajcraig99 1 Reply Last reply Reply Quote 0
                              • ajcraig99
                                ajcraig99 @dc42 last edited by

                                @dc42

                                Hey no worries, I've been away anyway.

                                Thanks for the heads up re the sensor wire.

                                regarding damage, all the leds on the board are now lit and the hotend and heated bed start heating up as soon as it gets power. no wifi or usb connection works.

                                Are you able to link to the correct wiring diagram?

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

                                  It's the big wiring diagram at https://duet3d.dozuki.com/Wiki/Duet_Wiring_Diagrams.

                                  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
                                  • ajcraig99
                                    ajcraig99 @dc42 last edited by

                                    @dc42 based on my wonky wiring and feeding 24v into the 3.3v connection, is it likely to be repairable or is the board dead do you think?

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

                                      Can someone please confirm if the below wiring diagram is correct before I fry another board?

                                      0_1537176328503_Untitled3.jpg

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

                                        @ajcraig99 said in PNP Inductive Sensor and wiring:

                                        @dc42 based on my wonky wiring and feeding 24v into the 3.3v connection, is it likely to be repairable or is the board dead do you think?

                                        I'm sorry to say that it's almost certainly dead.

                                        Your wiring diagram looks OK, but personally I'd connect the blue sensor wire to the GND pin of the always-on fan connector instead of the Z probe connector, so that in the unlikely event that you get a short inside the sensor, the current will be restricted to the fan circuit. The ground side of the 10K resistor can still connect to the ground pin of the Z probe connector if you find that more convenient.

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

                                          The above wiring didn't work, I took the sensor to work and had one of the electrical guys test it and it only changes about 0.3v when triggered so It seems to be a dud sensor.

                                          I picked up an NPN sensor and tested it on the bench with a 9v battery and it goes from 0v to virtually -7v when triggered so have tried to use this one.
                                          Unfortunately I am still unable to get this one working and I can't work out what I am doing wrong.
                                          It seems to work perfectly (judging by the LED and voltage measurements) until the probe output is connected to z_probe_in or ground, then it just stays triggered.

                                          Sensor: LJ12A3-4-Z/BX

                                          It was listed as normally open.

                                          I have tried to illustrate what I've tried below.

                                          0_1537436588467_wtf.jpg

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

                                            Your NPN sensor is most likely open collector. That means you need a pull-up resistor to V+ from its output. Then, to protect the Duet add a diode when connecting the signal wire.

                                            https://mertarauh.com/2017/01/18/dont-trust-the-internet-and-how-to-add-an-inductive-proximity-sensor-to-your-3d-printer-the-proper-and-easiest-way/

                                            ajcraig99 1 Reply Last reply Reply Quote 0
                                            • ajcraig99
                                              ajcraig99 @sigxcpu last edited by

                                              @sigxcpu

                                              Thanks,

                                              So I read through that page and measured the resistance between each wire.
                                              results in the image below, If I use the 10k value as R1, should I be wiring it up like the bottom diagram?

                                              0_1537576403841_wiring2.jpg

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

                                                See the wiki page on connecting Z probes. You don't normally need the pull-up resistor.

                                                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

                                                ajcraig99 1 Reply Last reply Reply Quote 0
                                                • ajcraig99
                                                  ajcraig99 @dc42 last edited by

                                                  @dc42

                                                  I have read the wiki countless times. I should be able to plug it straight in with a reversed diode on the signal wire for protection.
                                                  I don't know why sigxcpu suggest I install a pull-up resistor, I don't know what an open collector is but I have read through the link he/she posted and am still none the wiser but am willing to try anything.

                                                  I have the new NPN sensor wired up currently as per the wiki and my image below.

                                                  With the Z_PROBE_IN disconnected, The LED is on when not sensing and turns off when near a metallic object. Indicating I have a NC sensor.
                                                  with the Z_PROBE_IN connected, The LED is on regardless of it sensing or not, It dims very slightly when near a metallic object. The duet does not sense a change when using M558 P1 or P4

                                                  0_1537607725908_current.jpg

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

                                                    Maybe @dc42 says that pull-up is not required because Duet already has one. Basically, you connect brown (+) to V+ (do more than 5V because those senors like more), blue (-) to GND just like in your schematics. The black (output) wire is connected through a diode (put the line of the diode towards your sensor).

                                                    When the sensor is not activated the signal line of the Duet stays at Duet's 3V3 because of the internal pull-up. When sensor is triggered, the last NPN transistor shorts the signal (its collector) to ground (its emitter).

                                                    In theory, no diode will be required, but if the sensor has also an internal pull-up (not open collector) it will push its V+ with higher voltage towards Duet's signal and nasty things can happen.

                                                    Measure the voltage on Duet's signal pin when triggered and not triggered in your last schematic. Untriggered should be ~3.3V and triggered should be ~0V.

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

                                                      Update:

                                                      I spent way to long thinking I was more stupid than I am trying to get this to work.
                                                      Ordered another sensor, exact same model number and it works perfectly. I think I might be using the wrong diode though because it reads 715 when triggered instead of 1000 but it still seams to work so I'm happy.

                                                      Thanks for everybodys patience. 🙂

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