I have a question regarding an inductive sensor of the type "LJ12A3-4-Z/BY", with an input range of 6-36 volts DC.
My build only has a 5VDC and 12VDC power supply, so I figured I'd most easily power to sensor from the 12V supply. However this causes the returning signal to be 12V as well, and the arduino that is supposed to read the signal runs at 5V, which I guess will cause problems.
I made a small schematic drawing of a part of the circuit for easier understanding.
My guess is that I will need something to reduce the voltage from 12V to 5V. I already tried making a voltage divider using resistors, but that arduino died from either that or something else, so I'd like to ask for advice before headlessly trying that again.
Thank you guys in advance, I hope I find the help I'm seeking.