LJ12A3-4-Z/BX Proximity Sensor and 24V Relay with Optocoupler.
-
Hello.
I purchased the LJ12A3-4-Z/BX 6V-36V Inductive Proximity Sensor and a 24V 1-Channel Relay Module Board with Optocoupler (HIGH/LOW) for swapping the mechanical switches on my Duet-controlled CNC. Is anyone using a similar setup with Duet 2 who can assist me with the wiring, please? -
-
@DigitalElf can you provide a bit more information on how you want to wire the inductive sensor and links to data sheets for those of us who don't know those products. Also which Duet mainboard are you using and how is the existing mechanical switch you want to replace wired.
-
Hello digital elf,
In general it is best to used normally closed (NC) sensors. That way if there is an issue with the sensor the machine will refuse to home. I think the sensors you are using are normally open.
Should still work fine, but I would suggest something like this: LJ12A3-4-Z/AX on this amazon page.
Either way, the wiring should be nearly the same. Might have to switch the relay from high to low. Just test to see what works. Hold up something iron to the sensor and you should get the relay to switch on to off or opposite depending on how you wired it up.
Hope that helps.
-
@SDJ using a relay board is overkill. NPN sensors can be connected directly to the Duet. See https://docs.duet3d.com/en/User_manual/Connecting_hardware/Z_probe_connecting#npn-output-normally-open-inductive-or-capacitive-sensor. If using a normally-closed sensor then you need to invert the pin name in the M558 or M574 command.
-
@DigitalElf
I realize this post is 3 months old but thought for other CNC users looking to isolate their NPN Axis End Stop switches this might be of use , protoboard and opto isolators cost $15 , this is for a duet2 wifiopto isolator x 4 on my Delta , allows you to use what ever voltage the sensor works best with ( in my case 24volts) , isolates the high voltage from the low , decouples any kind of line noise from steppers etc and doesn't toast the board if you plug it in backwards
in config file use
M574 X2 S1 P"!xstop" ; configure active low endstop for high end on X via pin xstop !prefix