PNP photoelectric NO Z-probe

Hi, I'm trying to use a photo electric proximity detector as my Z-probe. The photo electric proximity detector is a PNP, normally open. When triggered it goes HIGH.I have it connected to the Z min end stop, pin 18 and have Z min hardware end stop set to false. I can't get it to work, it does not stop the extruder from moving down.Any ideas?. Here's my Z-probe config's

Thanks in advance for any help.


// #################### Z-Probing #####################

#define Z_PROBE_Z_OFFSET 0
#define Z_PROBE_Z_OFFSET_MODE 0

#define UI_BED_COATING 0 
#define FEATURE_Z_PROBE true
#define Z_PROBE_BED_DISTANCE 195         //CHANGED 5 TO 196

#define Z_PROBE_PIN 18

#define Z_PROBE_PULLUP true               ////////////////////////////Jim

#define Z_PROBE_ON_HIGH 0           //Jim changed to 1

#define Z_PROBE_X_OFFSET 30           //JIM 
#define Z_PROBE_Y_OFFSET 10         //JIM
#define Z_PROBE_WAIT_BEFORE_TEST 0
#define Z_PROBE_SPEED 30
#define Z_PROBE_XY_SPEED 150
#define Z_PROBE_SWITCHING_DISTANCE 5   //changed to 10. This is the distance that it moves up between the 5 bed distance checks

#define Z_PROBE_REPETITIONS 3           //jim
#define Z_PROBE_HEIGHT 5             // jim CHANGED TO 5

#define Z_PROBE_START_SCRIPT ""
#define Z_PROBE_FINISHED_SCRIPT ""
#define Z_PROBE_REQUIRES_HEATING 0
#define Z_PROBE_MIN_TEMPERATURE 150

#define FEATURE_AUTOLEVEL 1

#define BED_LEVELING_METHOD 0
#define BED_CORRECTION_METHOD 0

#define BED_LEVELING_GRID_SIZE 5

#define BED_LEVELING_REPETITIONS 2

// ################ Endstop configuration #####################

#define ENDSTOP_PULLUP_X_MIN false
#define ENDSTOP_X_MIN_INVERTING false
#define MIN_HARDWARE_ENDSTOP_X false

#define ENDSTOP_PULLUP_Y_MIN false
#define ENDSTOP_Y_MIN_INVERTING false
#define MIN_HARDWARE_ENDSTOP_Y false



//Z PROBE connected to Z min endstop using PIN 18

#define ENDSTOP_PULLUP_Z_MIN false     //jim false to true
#define ENDSTOP_Z_MIN_INVERTING false  //jim true to false, photoelectric Z probe 12-10-16
#define MIN_HARDWARE_ENDSTOP_Z false

/* Added by Jim 
   this setup assumes the TOP is Max for all Axis
 
*/
 

#define ENDSTOP_PULLUP_X_MAX true
#define ENDSTOP_X_MAX_INVERTING false
#define MAX_HARDWARE_ENDSTOP_X true

#define ENDSTOP_PULLUP_Y_MAX true
#define ENDSTOP_Y_MAX_INVERTING false
#define MAX_HARDWARE_ENDSTOP_Y true

#define ENDSTOP_PULLUP_Z_MAX true          //jim changed 11-19-16
#define ENDSTOP_Z_MAX_INVERTING false
#define MAX_HARDWARE_ENDSTOP_Z true

#define max_software_endstop_r true

#define min_software_endstop_x false
#define min_software_endstop_y false
#define min_software_endstop_z false      //Jim

#define max_software_endstop_x false
#define max_software_endstop_y false
#define max_software_endstop_z false

#define ENDSTOP_X_BACK_MOVE 8
#define ENDSTOP_Y_BACK_MOVE 8
#define ENDSTOP_Z_BACK_MOVE 8                 //ENDSTOP BACKMOVE
#define ENDSTOP_X_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 3

#define ENDSTOP_X_BACK_ON_HOME 1              //Jim 11-10-2016 This setting helps control home final position.
#define ENDSTOP_Y_BACK_ON_HOME 1
#define ENDSTOP_Z_BACK_ON_HOME 1

#define ALWAYS_CHECK_ENDSTOPS 1

Comments

  • Use M119 to see if it functions in general before trying to probe.

    You have pullup enabled - could that be stronger then your signal? For electronic switches this is normally false.

    M119 must return H when triggered and L if not triggered.
  • edited December 2016
    Hi, Yes M119 reports H when triggered and L if not triggered. I tried changing Pullup to false but it still does not stop  when triggered. However, I used a voltmeter to check the output of the proximity detector. It outputs 3.5 volts when NOT triggered (H) and .08 volts(L) when triggered. I tried changing "Z probe on high" to 1, the M119 command reports H when not triggered and L when triggered but this change didn't help. I wonder if the 3.5 volts is not enough change for the Arduino board to see?
    Thanks, Jim
  • Can i ask what sensor type number is pls.
  • Yes, it's a E18-D80NK, DC-5V photoelectric
  • Nice looking probe, i may have to test one of these :)
    according to the data sheet for the type number above, this is a normally open NPN type with a intternall pullup resistor.

  • All that matters is that M119 returns the right signals. These are also used when moving down.

    So question should maybe be what command does not work. I would always start with simple G30 P3 to test if probe works. If possible even with fake bed so you can test in air.
Sign In or Register to comment.