Have a Fotek PS-05N sensor for auto-leveling.

Have a Fotek PS-05N sensor for auto-leveling. One question I have is, does anyone know how to wire it to an endstop connection? It has Black, Brown and Blue wires. Looking at this: http://www.fotek.com.tw/pdf/etc_221.pdf it is listed under NPN, but considering I’m not an electrical engineer, I have no understanding of the connection diagram on page 2. Any help would be greatly appreciated. Need to know which wires go to Ground, Signal and +5V.

Check out @Thomas_Sanladerer video. Different sensor but same idea for hookup.

cc:+Peter van der Walt (because I’m interested in this as well)

I spoke too soon… it says it right on the sensor in fine print lol.

Brown:+ V
Blue: OV
Black: Out

Don’t forget the resistors, or you will damage your board.

@Carlton_Dodd I’m no electrician, but, the fotek is rated for 10-30VDC from what I understand. I connected it to the +5V on the board. Is a resistor still needed? It seems to work, but the red light on it is fairly weak and the distance detection is about 2mm, less than the 5mm specified. Is this because it’s running on 5+ instead of 10+ ?

Note these produce different height readings depending on how close they are to the edge of the metal. In the middle they are pretty repeatable near the edge they are no good at all.

So, what I’m guessing is that these sensors need 12v in, and a voltage divider on the out/gnd lines to get down to a 5v logic level?

Hook it up to 12v and make a voltage divider with 2 resistors to get the signal down to around 5v or less. All covered in the video I posted.

@Shai_Schechter
Yeah, you’ll probably want to feed the sensor 12V so it functions properly, then add the resistors as a voltage divider so you don’t feed more than 5V to the input pin of your board (probably should test with a multimeter before attaching to the board).

They also seem to work quite well at 5v for some reason. I know several people who just provide 5v. I tested it and it did seem to work.

My PS-05n works well at 5V. Detection distance is less than 3mm but that is expected with an aluminium bed. I have tried using it at 24v and did not get a larger sensing distance.

For those looking for a variety of sensors, this is one one of the larger companies producing them http://www.inductive-proximity-sensors.com/products.html

Tried finding them on alibaba, but no luck.

@Shai_Schechter , uh: http://www.aliexpress.com/item/PS-05N-Inductive-Proximity-Sensor-NPN-3-wire-NO-6-36VDC-Detection-distance-5MM/1987705560.html - They’re about $3

@ThantiK I meant trying to find the original company, not distributor :slight_smile:

The blue ones with the slant I found to work much better at lower voltage and they have the led facing forward.

I’ve not tried the clone version, you’ll be lucky to find the Fotek part for less than $10.

I wire mine as so:
Brown - +12V
Blue - GND
Black - logic, connect to Z min endstop “s” pin via a diode, put the stripe (negative) pointing to the sensor, then enable endstop pull-up in firmware. I’m not a fan of the resistor ladder.