sbfitzgerald
Posts: 3
Joined: Mon Mar 21, 2016 6:22 pm

Connecting a NPN Photoelectric light sensor

Mon Mar 21, 2016 6:33 pm

I'd like to use a 10-30V SSP-ON-4A photoelectric sensor as an input to make a counter.
4 wire, NPN, 10-30V operating

The specs are at http://www.automationdirect.com/static/ ... 18mmss.pdf

From what I can tell, the four wires are :

Brown : L+ ( 10-30VDC )
Black : GND
White : signal ?
Blue : L- (Gnd?)

I'm thinking that I would connect L+ to 10V external supply, L- & Gnd to RPi ground, and the white wire to a GPIO, but I'm not sure exactly how to set it up, and don't want to fry the Pi.

Can anyone offer some help to an electronic newbie?

Thanks,

Stephen

mjtessmer
Posts: 27
Joined: Sun Nov 20, 2011 12:50 am

Re: Connecting a NPN Photoelectric light sensor

Tue Mar 22, 2016 6:33 pm

Brown is the Positive Power Input
Blue is the Negative Power Input(GND)
White is the Light-on/Dark-on Select Input
Black is a Open Collector Output to a Relay Coil; the other side of the Relay Coil going to Positive Power Input.
Alternatively you could use and opto-isolator (with current limiting resistor) to replace the relay.

sbfitzgerald
Posts: 3
Joined: Mon Mar 21, 2016 6:22 pm

Re: Connecting a NPN Photoelectric light sensor

Tue Mar 22, 2016 9:18 pm

So, if I understand this correctly, I need to get a relay with a coil voltage that works with the 10-30V power input of the sensor, and then connect the 3.3V supply of the RPi to a GPIO pin through the contacts of the relay?

sbfitzgerald
Posts: 3
Joined: Mon Mar 21, 2016 6:22 pm

Re: Connecting a NPN Photoelectric light sensor

Tue Mar 22, 2016 9:19 pm

Oh, and thanks for the reply!

mjtessmer
Posts: 27
Joined: Sun Nov 20, 2011 12:50 am

Re: Connecting a NPN Photoelectric light sensor

Wed Mar 23, 2016 10:17 pm

sbfitzgerald wrote:So, if I understand this correctly, I need to get a relay with a coil voltage that works with the 10-30V power input of the sensor, and then connect the 3.3V supply of the RPi to a GPIO pin through the contacts of the relay?
Yes that is one alternative; common relay coil voltage is 12V, so you could use a 12V power source for your sensor.

The second alternative would be to use an opto-isolator (4n37) with a current limiting resistor in series with the
the input diode. Tie the emitter of output transistor to GND on the Pi and the collector to your input pin with a pull-up
resistor.

Return to “Off topic discussion”