photo electric sensor computer interface

Hi I have recently got a conveyor belt that has a photoelectric sensor on it. I am wondering if an Arduino Uno board is good enough to receive the signal from the sensor and pass it onto a PC computer through USB.

I have virtually no electronic experience, but I am a computer programmer.

The spec for the photoelectric sensor is

Supply voltage: 10 V DC ... 30 V DC 1)
Ripple: ± 5 Vpp
Current consumption: 30 2)
Output type: PNP, open collector 3)
Switching mode: Light/dark switching 4)
Switching mode selector: Selectable via L/D control wire
Signal voltage PNP HIGH / LOW: Approx. VS - 1.0 V / 0 V
Output current Imax.: ? 100 mA
Response time: ? 1.5 ms 5)
Switching frequency: 333 Hz 6)
Connection type: Connector M12, 4-pin
Circuit protection: A, C, D 7) 8) 9)
Protection class: III
Weight: 65 g
Housing material: Nickel-plated brass, PBT/PC, Metal
Optics material: PMMA
Enclosure rating: IP 66
Items supplied: Fastening nuts (2 x), Reflector P250
Ambient operating temperature: -25 °C ... 55 °C
Ambient storage temperature: -40 °C ... 70 °C
UL File No.: NRNT2.E128350 & NRNT8.E128350

thanks,
Dave

That sensor will work fine with an Arduino digital input. However, you need a voltage divider on the output to reduce the output voltage to 5V or less (if using a 5V Arduino) or to 3.3 V or less for a 3.3V Arduino.

For the 5V Arduino and a 10V sensor power supply, the attached divide-by-two circuit will work. If the sensor power supply is 30V, R1 should be about 50K ohms to make a divide-by-six circuit. Make sure that the sensor power supply ground is connected to the Arduino power supply ground.

Thanks so much for that jremington. I think R1 will need to be the 50K Ohms.

cheers,
Dave