How to Wire A NPN Inductive Sensor

1,102 views
Skip to first unread message

sgibbers17

unread,
Oct 25, 2016, 9:07:04 PM10/25/16
to Smoothieware Support
I have a LJ2A3-4-Z/BX which is a NPN NO 6-36V 300mA Inductive proximity sensor.  I have been able to find plenty of information about PNP NO sensors and how to wire them to the smoothieboard but I have not been able to find munch on NPN NO sensors.

I did find this forum post from last year http://smoothieware.org/forum/t-1489868 and this forum post for another board http://forums.reprap.org/read.php?219,533688,539308

Which make me believe that resistors are not required for NPN sensors but are for PNP.  Do I just hook up the blue wire to ground and the black wire to signal on the zmin stop and the brown wire to 12V+ from my power supply?  Here is my diagram.  I also read that I could possibly use the 5V off the zmin stop but would have to have the sensor closer to the bed.

Can someone please let me know if me wiring diagram is correct.


smoothieboard wiring diagram NPN 12V.png

wolfmanjm

unread,
Oct 26, 2016, 12:17:44 AM10/26/16
to Smoothieware Support
if you connect 12v to a smoothie pin you will fry the pin and possibly the board

Arthur Wolf

unread,
Oct 26, 2016, 4:37:35 AM10/26/16
to Smoothieware Support
You need to add a voltage divider to the circuit to bring the signal down to at most 5v.

--
You received this message because you are subscribed to the Google Groups "Smoothieware Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-support+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Courage et bonne humeur.

sgibbers17

unread,
Oct 26, 2016, 7:01:58 AM10/26/16
to Smoothieware Support
I read this in the reprap forum that I referenced in my original post.

"For ANY NPN sensor resistors are not needed. A NPN resistor acts like a switch grounding the microcontroller's pin. It's already at a safe voltage since it's coming FROM the microcontroller.

If it was a PNP sensor, the sensor would be sending whatever voltage it was operating at TO the microcontroller, so you'd have the possibility of sending more than 5V to the microcontroller, likely frying the pin if not more in the process. With a PNP sensor, you must use a voltage divider to lower the voltage if the sensor operates at greater than 12V."

Is this true?

David Crocker

unread,
Oct 27, 2016, 4:18:08 PM10/27/16
to Smoothieware Support
I can't speak for Smoothieboard in particular, but it's true that in principle you can connect the output of an NPN-output sensor directly to an endstop input on 3D printer electronics. However, if the ground connection on the sensor breaks then you are likely to get a substantial proportion of the supply voltage on the output pin, and this may damage the printer electronics. So in the duet3d wiki we recommend that you connect a diode between the sensor output and the endstop input, cathode to the sensor output.

sgibbers17

unread,
Oct 28, 2016, 8:35:26 PM10/28/16
to Smoothieware Support
Thanks David, can someone post a wiring diagram for wirering a npn sensor to the smoothieboard? I would like to do it in a way that won't fry my board but the only wiring diagrams I have been able to find is for a pnp sensor and not a npn.

Bryce Kelsey

unread,
Oct 29, 2017, 8:24:50 AM10/29/17
to Smoothieware Support
Reply all
Reply to author
Forward
0 new messages