Inductive sensor NPN NO not working
-
Hi all, and apologies if this has already been answered. I believe i did a thorough search but may have missed something.
I connected an inductive sensor to my Duet Wifi, revision 1.04C running firmware 3.3, VIN 24V. The sensor is a NPN NO with 6-36V. I connected the wires according to the wiki, brown and black to VIN / Ground, respectively, and blue to the Z probe input pin in the Z Probe terminal.Here are my FW settings:
; Endstops
M574 X1 S1 P"xstop" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin xstop
M574 Y1 S1 P"ystop" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin ystop
M574 Z1 S2 ;P"zstop" ; configure Z-probe endstop for low end on Z; Z-Probe
M558 P1 C"!zprobe.in" H5 F300 T6000
G31 P7 X100 Y100 Z-0I tried M558 with P5 as described in the wiki but that just shows '0' in the Z Probe field no matter if the probe LED is on or not. If i use P1 i at least get something, the Z Probe indictor show 6-7 when warm (?) so i can trigger on 7 and that works. The issue is that the 6-7 value is not reliable, on startup it show 30-50 and then slowly wanders down to 6, sometimes 7 even when there is no proximity to the bed.
My Z-Probe output is connected directly, no diode or resistors since i have 1.04C they should not be required.I measured the Z-Probe output with a multimeter and it has 0V when there is no proximity to the bed and 0.5V when the bed is near and the probe LED is on.
Any help with this would be appreciated!
-
Try adding a ^ character to the C parameter of the M558.
0.5 volts isn't high enough to give a solid logic high.
I think the ^ character will enable the pullup on the input.
Check the voltage readings to see if it made a difference.
Frederick
-
@fcwilt Thanks, i tried that, unfortunately it made no difference. I am starting to think my sensor is faulty. I'll order another one and try that.
-
@jlimburg said in Inductive sensor NPN NO not working:
@fcwilt Thanks, i tried that, unfortunately it made no difference. I am starting to think my sensor is faulty. I'll order another one and try that.
It could be. I had a cheap Chinese inductive unit that worked fine at first but failed in the same way.
I since have been getting my sensors from this place. They have actual specs for their products.
Frederick
-
@fcwilt Thanks for sharing the link! I'll order a couple from them
-
@jlimburg Well, here goes, i am wearing my silly hat! I had the wires switched on the sensor, switching output and ground. Interesting that the sensor LED still lit up. Fixed it, sensor works, Z-Probe now show 0 when the bed is away and 798 when the sensor LED comes on. Sorry for wasting people's time
-
@jlimburg said in Inductive sensor NPN NO not working:
@jlimburg Well, here goes, i am wearing my silly hat! I had the wires switched on the sensor, switching output and ground. Interesting that the sensor LED still lit up. Fixed it, sensor works, Z-Probe now show 0 when the bed is away and 798 when the sensor LED comes on. Sorry for wasting people's time
Glad to hear it is working.
Frederick
-
-