I am wiring up my new 3D printer motherboard. I am using a lj12a3-4-z\bx inductive proximity sensor for my bed sensing probe. In order for the probe to function at its best, I am running it on 24V from a spare fan header. Since it is NPN, it "sends" GND to the probe trigger pin so normally I would have nothing to be worried about. If the probe fails, could it send 24V into the microcontroller and zap the motherboard? My electronics knowledge is still growing.
Since I would really hate for a $2 probe to break my $75 motherboard, is there a simple way to protect the microcontroller from a high voltage spike? My first thought was a simple voltage divider. I have used one on a PNP probe to step 24V down to 5V. Is this the same case just as protection rather than supply voltage?
With the above case in mind since I am protecting a logic pin would I want to step down to 5V or 3.3V?
Any insight?

So to confirm, you are saying if an NPN sensor fails then the trigger pin will just get pulled to ground and will not release as it would if the sensor was functioning properly?
– AtomicPorkchop Apr 09 '23 at 09:08