user53686: 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 
And a little shema of my conections:

If someone could help me.
Thanks,
Nicolas 

user42539: I would connect the - from the supply and the sensor to Arduino Gnd.
Then the NPN output can pulldown an Arduino input with pullup resistor enabled.
Brown to 24V, Blue to Gnd, White to Arduino input.  No resistor to Brown. Black not used.

simulate this circuit – Schematic created using CircuitLab

53686: <p>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!</p>

<p>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.</p>

<p>This is the sensor in question: <a href="https://literature.rockwellautomation.com/idc/groups/literature/documents/in/42ef-in005_-en-p.pdf" rel="nofollow noreferrer">https://literature.rockwellautomation.com/idc/groups/literature/documents/in/42ef-in005_-en-p.pdf</a> </p>

<p>And a little shema of my conections:
<a href="https://i.stack.imgur.com/wKKhQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wKKhQ.jpg" alt="Senseor setup"></a></p>

<p>If someone could help me.
Thanks,
Nicolas </p>
 42539: <p>I would connect the - from the supply and the sensor to Arduino Gnd.</p>

<p>Then the NPN output can pulldown an Arduino input with pullup resistor enabled.</p>

<p>Brown to 24V, Blue to Gnd, White to Arduino input.  No resistor to Brown. Black not used.</p>



<p><img src="https://i.stack.imgur.com/UQnXJ.png" alt="schematic"></p>



<p><sup><a href="/plugins/schematics?image=http%3a%2f%2fi.stack.imgur.com%2fUQnXJ.png">simulate this circuit</a> &ndash; Schematic created using <a href="https://www.circuitlab.com/" rel="nofollow">CircuitLab</a></sup></p>
