wrong power supply for my application?

I am trying to use a retro reflective photo eye to provide sensing into the arduino.

Since the photo eye is 10-30vdc, of course I need an external relay. In my case, with a normally open contact and a 12vdc coil.

Also I would need a power supply that converts 120vac to 12vdc to power the photo eye. It plugs directly into a wall outlet, and has no ground pin.

The photo eye, when it goes high, pulls in the relay. The relay, when it "makes", it allows 5vdc leaving the arduino, to route back to the arduino, into an input pin.

make sense so far?

my problem is, when the photo eye goes low, it only drops to 9vdc, which is not enough to drop out the external relay.

think I require a different power supply?

any help would be appreciated

make sense so far?

No. Can you provide a link to the data sheet or product page of the photo-eye?

I would suspect that the sensor would have 3 leads, positive (10-30v), ground and output. It probably has an open collector transistor output. If the output is a NPN transistor, you can use it as a switch to ground with a pull up resistor.

Test before connecting to the Arduino. Connect a 1k resistor from the supply to the output. The output should have supply voltage measured. Activate the sensor and see if the voltage drops to nearly ground.

If this happens, you can connect the output to the Arduino input with a pull-up resistor to 5v. Remember also to connect the ground of the sensor to ground of the Arduino. The sensor power input can be connected to 12v.

Weedpharma

This problem should be simple to troubleshoot with a meter.

1-What is the relay coil resistance ?
2- Have you done a continuity test of the relay contacts when the relay turns on to verify the N.C. contacts are actually closing ?
3- Why are you using 5V on the contacts to the arduino instead of 0V (direct short to arduino GND on input side of N.C. contact) ?
4- Where are you measuring the 9V ?
5- What power supply are you using ?
6- What are the power supply specs ?

Something doesn't add up here. This should be very straight forward.

Why not use a photodiode or phototransistor? A bit more information about
what you are trying to achieve would be useful.