M12 vs M18 V5 inductive probe
The larger the diameter and the higher the voltage the larger the detection distance. You do not need to do much wire modification if you use an optocoupler, see this anwer.