I have a beam sensor providing NPN and also PNP output. It as 4 wires and works on 24V. I hooked the brown(+) and blue(-) to a small 24V power supply and the sensor is working!!! Yeah!
Now I would like to recieve the signal in my arduino. I dont know where to plug the black and white and I dont want to frie everything. I know I need to have an NPN configuration but I dont know how to achieve that.
This is the sensor in question: https://literature.rockwellautomation.com/idc/groups/literature/documents/in/42ef-in005_-en-p.pdf
If someone could help me. Thanks, Nicolas