Welcome! Log In Create A New Profile

Advanced

Proximity Sensor problems

Posted by nick9one1 
Proximity Sensor problems
March 03, 2018 06:41PM
I've been struggling with this for a while....

I converted my wanhao duplicator i3 over to ramps and Marlin about 6 months ago. I used a proximity sensor and all was good.

I decided to upgrade to TMC2100 drivers. They were noisy on 12v so bought a 24v PSU and a MKS Gen 1.4 board.

I can get everything working except the prox sensor.

Its a LJ18A3-8-Z/BX NPN (NO I think).

I built a voltage divider that drops the 24v down to about 4.4v for the z-min pin (pic attached).

When I dont have the z-min lead connected I read about 4v when the sensor isn't detecting, and down in the millivolts when it does.

I've disabled the auto bed levelling for now. Hopefully this will make it simpler to test.

configuration_h attached.

Thanks in advance!!
//===========================================================================
//============================== Endstop Settings ===========================
//===========================================================================

// @section homing

// Specify here all the endstop connectors that are connected to any endstop or probe.
// Almost all printers will be using one per axis. Probes will use one or more of the
// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
#define USE_XMIN_PLUG
#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
//#define USE_XMAX_PLUG
//#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG
// coarse Endstop Settings
//#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors

#if DISABLED(ENDSTOPPULLUPS)
  // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
  //#define ENDSTOPPULLUP_XMAX
  //#define ENDSTOPPULLUP_YMAX
  //#define ENDSTOPPULLUP_ZMAX
  #define ENDSTOPPULLUP_XMIN
  #define ENDSTOPPULLUP_YMIN
  //#define ENDSTOPPULLUP_ZMIN
  //#define ENDSTOPPULLUP_ZMIN_PROBE
#endif

// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define X_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.

// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE


Attachments:
open | download - Untitled.png (341.3 KB)
open | download - Configuration.h (64.8 KB)
Re: Proximity Sensor problems
March 04, 2018 04:13AM
The problem with mks 1.4 boards is that they have a 'physical' pullup resistior (R"0 i think) mounted on the board(near the endstop connector) so disabeling pullups in te config.h has no effect.
You will likely need to remove this resistor for your sensor to work, or as i did, i replaced the resistor divider by a reverse biased diode.

Here is a u-tube link to the reistor fix.

[www.youtube.com]
Re: Proximity Sensor problems
March 04, 2018 04:55AM
Perfect! that worked a treat.

removed that r20 and it instantly started working.

Thank you
Sorry, only registered users may post in this forum.

Click here to login