2
$\begingroup$

As discussed previously on a post, Tevo tarantula Z- port burnt, I've burnt one of my Z endstops ports (I solved this issue and I'm using the Z+ port, normally). I did that trying to install an auto bed leveling sensor. I don't want to mess up again...

I have a LJ18A3-8-Z/BX NPN sensor.

Brown wire is connected to the N (+) of the power supply, blue and black wire connected as shown in the picture (pay attention to the red markings on the white wire):

enter image description here

enter image description here

enter image description here

Any advice about the wiring is welcome. But I hope it's right, I've read in several places1 that this type of sensor doesn't require any kind of resistor.

I'm using the last version of Jim Brown firmware.

Here it is what I've changed so far:

//#define BLTOUCH       // ANTClabs BLTouch sensor (might also work with clones)
//#define BLTOUCH_V3    // ANTCLabs BLTouch sensor version 3
//#define SN04          // Green sensor
#define INDUCTIVE_NO  // Normally open inductive sensor
//#define INDUCTIVE_NC  // Normally closed inductive sensor
//#define SERVO_PROBE   // Endstop switch on rotating arm. Set servo angles!
//#define NOZZLE_PROBE  // Nozzle wired up to contact metal on bed

//#define TRIPOINT
//#define LINEAR
//#define BILINEAR
#define UBL
//#define MANUAL

Let's go to my issues:

  1. Before flashing this configs, the sensor's LED would go on near metal and off far from metal. With this new config the LED remains off until I place the sensor near metal... But after it goes on, it remains on, even when far from metal.

  2. When I home the axis, I try to simulate the position of the Z axis, holding the sensor close to a metal plate. But the Z axis moves up... up... up... Doesn't matter what I do with the sensor (hold close or distant from metal). Until some point and it stops.

So far nothing is fried and I'm trying to make it work right now. It seems to me (based on what I read) that a NPN sensor really doesn't need anything. Just plug on the power supply and board.

So... basically, as you can see, I have no idea of what I'm doing. I hope someone can help me... I've tried to find answers and figure it out by myself. I'm not being lazy here...


BTW I'm wondering if Jim Brown is still better than the official Marlin Firmware... So I'm willing to change it if that is the opinion of the pros!


Footnote

1 For example, in the second post to How do I wire my lj18A3-8-Z/BX to my prusa? going insane

$\endgroup$
1
$\begingroup$

An NPN sensor is wired differently from a PNP sensor. The signal wire is the black wire, blue is the ground wire.

According to this posting, Don’t trust the internet (and how to add an Inductive Proximity Sensor to your 3D printer the proper and easiest way, you need to insert a 6.8 kΩ resistor in between the black and the blue wire, I quote:

...Indeed, all we need to do is add a single 6.8 kΩ resistor between BLACK and BLUE and all should work fine.

NPN inductive sensor using voltage divider resistor

Alternatively, a diode in the black wire would also work, I quote:

... So I did test using a diode and that also works perfectly fine, simply because the direction in which the 12 V current would like to flow when the sensor is open will be blocked by the diode. The internal (or hardware) pull-up still pulls the Atmega’s sensor pin to HIGH however.

NPN inductive sensor using diode, high output to printer board


... But as soon as the sensor is closed, the diode would allow the 5 V current to flow in the opposite direction towards ground, which pulls the Atmega’s sensor pin to LOW.

NPN inductive sensor using diode, low output to printer board

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ Good catch! Hopefully that is the answer :-) $\endgroup$ – Greenonline Jul 4 '19 at 6:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.