Proximity sensor for bed levelling

I would like to use a proximity sensor for helping me with bed levelling. It is a LJ18A3-5-Z/AX it is a normally closed NPN sensor.
I am driving it with the same 12 volt as the smoothie board. Can I tie the sense line directly to pin 43 (Y max) with a diode in between to prevent reverse current from harming the IC1, or do I have to do something else.
In the NC position I measure 0v (ground) on the sense line, that sounds right because it will be sinking to ground. When the sensor fires I measure 12v. I guess it must be floating to a high. What else may I have to do in the configuration file to make this work?

Imported from wikidot

I was thinking a little more on this and assume now that I could use a 3.3 v zener diode clamped to the sense line. That way it will never go over that amount. Am I thinking right?

If you apply 12v to an input pin you will destroy it and probably the chip.

I understand, so I wonder if a zener would add the necessary safety.

You can just use a voltage devider to safely connect a 12VDC NPN sensor to a 3.3V input.
See the wikipedia page for details.

Thanks, that will just do it of course. Nothing above some passive components. Not likely to fail very quickly. Never even thought of it.