Proper way to wire up a Photoelectric Sensor, RightSight (42EF-D2MPAK-F4)

We got a couple of these from FIRST Choice:

I’m assuming that it would work with the DIO port on the RIO.

The DI port of the RIO is pulled high with an internal pull up resistor.

The sensor has both an NPN and PNP output. We used the NPN to try to pull the sense pin to ground and thus make the DI signal go low. But it would not pull it low enough to sense that it went low.

We wound up connecting the NPN line to the Analog input port on the RIO and triggering on a threshold value.

Is that the correct way to use this sensor? I figured that coming from FIRST choice, someone would have made sure it was compatible with the RIO. But it feels a little hacked getting it to work this way.

According to the linked product details those are PNP only:

We have some of these hanging around from an older KOP that we were going to use this year, but they are NPN only which is much easier to interface with the RIO.

The correct way to use the ones you have would probably involve using an external pull-down resistor and a voltage divider.

The one we have have 4 wires, 2 are for power and ground and one is NPN and the last one is PNP. I didn’t really want to mess around with extra electronics and figuring out the correct external pull down resistor to use.

I guess what I am really asking is that is connecting this to analog in likely to blow up my RIO. The sensor is 12V. The AI on the RIO is 5V but will tolerate up to 16V. So I think I’m ok. But I was hoping to get CD to confirm I am not doing something horrible.

So are they not the ones from FIRST Choice that you linked? Are they not the part number in the title of your post? Or is the table in Rockwell’s documentation wrong?

I was under the impression that when fed 12 volts on an input the RIO would go into a high voltage protection mode, but I am not sure if that also applies to the analog ports. I did find a reference to another team doing the same thing here though: Trouble with through-beam sensors - #7 by Brian_Selle

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.