Sensor Data Help

I have an 3 wire Eaton iProx sensor that detects metal. Since it needs 6-48v to operate I am using a 9v battery to power it. Whenever it detects metal it outputs the input voltage through the signal wire. I am using a 7805 voltage regulator to bring it down to 5v so I can plug that into my Arduino. Would it be better to use a transistor instead since the Arduino and the sensor are both using different power sources? I have a schematic for it below I don't know if I drew it properly though.

I think it would be easier to just use a resistor and zener diode combination, like this:

http://ruggedcircuits.com/html/circuit__27.html

Do not enable the pullup resistor though.

--
The Rugged Motor Driver: two H-bridges, more power than an L298, fully protected

Where could I get one of those from?

This should work:

--
Beat707: MIDI drum machine / sequencer / groove-box for Arduino

Thanks for the help!