Welcome! Log In Create A New Profile

Advanced

Inductive proximity sensor

Posted by lide 
Inductive proximity sensor
March 06, 2016 01:41PM
Hello. I use an inductive proximity sensor as a z endstop and z probe on my corexy. I've just finished wiring everything on to a duet 0.6 with firmware 1.09r-dc42. The inductive sensor gives a 5V signal when not triggered and grounds the signal when triggered. I've used a voltage divider to bring the signal down to 2.4V and feed it to the E0 end stop pin as described here [reprap.org] . My config.g has this line M558 P4 X0 Y0 Z1. On the board the E0 endstop light is normally off but when the sensor is triggered it comes on. This is different from the X and Y axis endstop LEDs which are normally on but when each microswitch is triggered, go off. M119 shows that z endstop and z probe are at minimum irrespective of whether the sensor is triggered or not. What am I doing wrong?

Movement, hotend and x and y end stops are working fine.
Re: Inductive proximity sensor
March 07, 2016 03:24AM
Two things:

1. If it shows always triggered, that means your sensor is not pulling the input voltage low enough when it is triggered, because of the current needed to drive the LED. Either use lower value resistors in your voltage divider, or use a 1N4148 diode instead of a voltage divider, wired cathode to sensor output and anode to endstop input.

2. You need to use a separate M574 command to tell it that the E0 input is active low. So you will have two M574 commands in config.g. If you have low end X and Y endstop switches, they will be:

M574 X1 Y1 Z0 S1
M574 E0 S0



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Inductive proximity sensor
March 07, 2016 10:08AM
Thanks dc42! I also found this thread [forums.reprap.org] that gives great information on these kind of sensors. Fortunately I have an NPN sensor so it plugs in directly. Added the second M574 command and it works fine now.

By the way I had a chance to go through some of the code for the firmware on Github. Everything is so elegant and easy to understand. Beautiful piece of code. My compliments to you and thanks for all your help.
Sorry, only registered users may post in this forum.

Click here to login