NPN - PNP Photoelectric Sensor

Hello.Previously to this post i have written about the connection between a photoelectric sensor and an Arduino uno board.I have used a sensor with a relay output but for the purpose of the project(people counter) it is better to use a NPN - PNP output sensor.The question is about the connection Arduino-Sensor to provide a counter.¿How could be possible?.
Thank you very much.

Can you provide some datasheets to the devices you are talking about?

I am using these elements:

-Photoelectric sensor:Page Not Found | Pepperl+Fuchs
-Arduino Uno R3:http://arduino.cc/en/Main/arduinoBoardUno

Thanks to respond so quickly.

That sensor must be powered by a 10V to 30V source, and it will output approximately the same voltage when activated. So, you will need a resistive voltage divider to bring the output down to the 0-5V range allowed for an Arduino input. Voltage Divider

I was thinking about this:
http://www.cooking-hacks.com/analog-voltage-divider
¿Could be a possible solution?

That won't work if you power the sensor with 30 V. Just use two appropriately chosen resistors, which will cost approximately 1/100 the price of the "analog voltage divider" (which contains two resistors). The resistors can be salvaged from discarded circuitry, too.

If you power the sensor with 10 V, use two 10K ohm resistors. With 30 V, use 51K and 10K.

Because of my basic knowledge of electronic, what would be the most convenient way to implement the elements mentioned above?Thank you very much for your information.

Study the data sheet carefully for the proper output connections and google "arduino voltage divider" for methods to interface with the Arduino.

patricio_74:
I was thinking about this.

Wow!

Now I've pretty much seen everything!

Thank you very much for your information.

Paul__B:

patricio_74:
I was thinking about this.

Wow!

Now I've pretty much seen everything!

Indeed! It is nicely made, with sturdy screw terminals. Should last a lifetime.