-1

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: Senseor setup

If someone could help me. Thanks, Nicolas

1

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.

schematic

simulate this circuit – Schematic created using CircuitLab

  • It worked without smoke and bad smell! Thanks again! – Nicolas Foisy Feb 5 at 17:15
  • 1
    is 100r enough? 5v/100r = 50ma; that's pushing it for an AVR isn't it? – dandavis Feb 5 at 18:09
  • The resistor is internal to the Arduino, ignore that value. It's more like a 30K to 50K resistor. – CrossRoads Feb 5 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.