Welcome! Log In Create A New Profile

Advanced

NPN NO Proximity sensor not working unless touched

Posted by Maany 
NPN NO Proximity sensor not working unless touched
September 27, 2019 09:12AM
Hello all,

I have recently installed below NPN NO Proximity for auto bed leveling, however, I noticed it doesn't detect anything unless I touch the little orange part at the bottom of it (video attached). Any idea why is it acting this way and how to fix this??


P.s.
When I touch it, it works normal, I.e. if I lift z axis light switches off, and if I lower it, light turns on, ofcourse as long as I'm touching it.

Using:
Ramps1.4+Arduino Mega 2560 v3
Marlin firmware

Proximity Sensor
Video of problem
Re: NPN NO Proximity sensor not working unless touched
September 27, 2019 09:48AM
This is a Capacitive sensor not inductive...

Just glass should be fine.. no need for alu tape.

I would guess your only powering it with 5v, when it really needs more (needs a small circuit to lower signal level back to 5v.)

You also need to disable the pullup resistor in firmware for the IO line the probe is on...

Edited 2 time(s). Last edit at 09/27/2019 09:57AM by Dust.
Re: NPN NO Proximity sensor not working unless touched
September 27, 2019 09:58AM
Thanks for replying, I'm actually powering it with 12v and using ams1117 on the signal output of it to change it back to 5v.

Edited 1 time(s). Last edit at 09/27/2019 11:24AM by Maany.
Re: NPN NO Proximity sensor not working unless touched
October 04, 2019 03:57PM
any help is highly appreciated guys
Re: NPN NO Proximity sensor not working unless touched
October 06, 2019 05:05PM
Seriously guys, any help is highly appreciated....

I'm using 12v to power the sensor and Z-min pin for signal through an ams1117 regulator to lower it to 5v
Disabled pullup on z min.

Same issue , what can I do to make the sensor detect the heatbed without me touching it????
Re: NPN NO Proximity sensor not working unless touched
October 07, 2019 01:44PM
I don't think using a voltage regulator for level conversion will work - these usually have a non-trivial startup time. This is definitely not a recommended use for a voltage regulator.

The easiest way to connect an NPN sensor is just to use a Schottky diode line a 1N5817 in reverse polarity:

MCU -------|>|------- Sensor

I.e. the band end of the diode is connected to the sensor, while the other end is connected to the controller board. The diode will make sure that when the sensor isn't triggered the high voltage is blocked from getting to the controller pin which will get pulled up by the controller's pullup, when the sensor triggers it will pull the pin down to ground.
Re: NPN NO Proximity sensor not working unless touched
October 08, 2019 12:19PM
Thanks MMcLure for the reply, right now i'm only concerned about the touching part of the problem, the sensor does not detect anything if i'm not touching it, how do I solve that ?!?!
Re: NPN NO Proximity sensor not working unless touched
October 08, 2019 10:08PM
The only way to increase sensitivity is to increase the supply voltage,

Or get a inductive sensor. Which is way better option

Capacitive sensors change their reading with changes in humidity
Re: NPN NO Proximity sensor not working unless touched
October 09, 2019 03:33AM
I don't believe the issue is related to sensitivity, there is a tiny screw on top of it to adjust sensitivity, I raised it to max. And now it detects bed from a further distance, but ONLY when touched, I believe it is somehow related to current or static elec., don't know I'm just spitballing here.
Re: NPN NO Proximity sensor not working unless touched
October 17, 2019 02:35AM
what is the pin out of the sensor? what do you have each pin going too? it may be possible you have input with pull up and vcc of sensor reversed. but i'm just guessing. something probably isn't wired up correctly.

do you have a volt meter, and is the sensor color wired to identify it. unplug machine and do a continuity test on volt meter. main gnd to sensor gnd pin.
Re: NPN NO Proximity sensor not working unless touched
October 17, 2019 03:16AM
Hi James and thanks for your reply,

yes sensor is color coded and wired correctly, vcc is connected directly to 12v 20A power source, GND connected to GND of power source as well, signal output of sensor is wired to the vin of AMS1117 (GND of ams1117 is connected to GND of power source too) and output of AMS1117 is connected directly to S of Z-Min pin on Ramps.

have even replaced the RAMPS and same issue, can't seem to locate the error here, it does NOT detect anything unless it's being touched
Attachments:
open | download - AMS1117.jpg (22.3 KB)
Re: NPN NO Proximity sensor not working unless touched
October 17, 2019 12:47PM
If I understand you correctly, the light on the sensor doesn't turn on unless you're touching the sensor? That light has nothing to do with the controller board or any connections, so it sounds like the sensor is bad. My guess is that the sensor ground wire is bad and when you touch the sensor you're making enough of a ground connection to trigger it.
Re: NPN NO Proximity sensor not working unless touched
October 17, 2019 01:12PM
MMcLure that actually makes sense and was my first guess, I just rolled out the bad sensor option because I didn't wanna buy a new one and wait 60 days for it to arrive sad smiley
Sorry, only registered users may post in this forum.

Click here to login