@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 wifi
2a326ae3-a4cd-4006-a8d7-61d09892e791-1614318490217-opto-for-inductive-sens.jpg
opto 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
c120401b-de10-46f3-9777-d759519a5526-1614318937946-opto-isolate.jpg