Hey, my fellow Freaks! Today I would like to bother some (or all) of you with a question that might seem simple to the hardenend embedded veteran but has proven to be extremely troublesome for me. I am trying to connect a capacitive NPN NO sensor to a microcontroller and, so far atleast, failing horribly. The controller and sensor I am using are an Atmega644PA-PU and LJC18A3-Z/BX respectively (wiring diagram for the sensor can be found as an attachement). Output voltage from the circuit provided is a whopping 12V, and I think you can see the problem with that.
Anyway if any of you guys could help me with this pesky little problem, I would be amazingly grateful!
Thank you in advance!