From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

help interfacing photosensor

I am currently using the PCI-6503 card. I am trying to use a photosensor as an input device. The sensor requires an external power source and 1 input line. In the test panel, I see a random flashing signal that is not correlated to breaking the sensor beam when I hook up it up. Does anyone know why this is happening? I want the input signal to result from breaking the sensor beam. 

0 Kudos
Message 1 of 8
(3,675 Views)

What is the make/model of the sensor and how do you have it wired up to the 6503? What voltage are you supplying to the sensor? Did you include a connection between the power supply gnd and the 6503 ground?

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 8
(3,673 Views)

Thank you for your reply. I am using a SB12 series photoelectric sensor from Banner Engineering (SB12RNR receiver). I am supplying 12VDC to the sensor. I have the +/- sensor wires connected to the power source and the third sensor wire connected to the 1st pin. I do not have a connection between the gnd wires. But I am not quite sure how to do it. When I connect the gnd wire to the power source ground, then the flashing stops but the button in the test panel is continuously depressed. 

0 Kudos
Message 3 of 8
(3,669 Views)

First, when using any external powered device to send signals to a system, both MUST have common GND. Usually you connect the DGND (digital ground) terminal/pin of your system to the GND line of the external device. If you do not the input is "floating" (i.e. has no reference value) and will show random values.

 

Also, there are several different variations of the SB12 sensor. Make sure that you have got one with an NPN transistor output, and that there is a pull-up resistor on the input connected to VCC of your DAQ device (on many boards with digital input lines this so-called "pull up resistor" is on board). As I have seen on the SB12 datasheet the sensor itself has a status display showing if it is activated or not, check this LED for proper operation of the sensor.

 

Sensors with PNP output transistors are somewhat difficult to connect to computer equipment and are rather designed to work with PLCs. Also, the output voltage of a PNP output may damage your DAQ device, since the output voltage may rise close to the suppy voltage of the sensor which is specified to 10...30V, some DAQ devices are protected against overvoltage up to 12V (sometimes 25V) only.

0 Kudos
Message 4 of 8
(3,626 Views)

You could use 2 resistors in series for your pull up to make a voltage divider, say a 3.3K and 4.7K, tie the 3.3K to ground end, the 4.7K high end. 12V * (3.3K/8K) yields a 4.95V signal across the 3.3K to your DAQ input, compatible with TTL logic.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 5 of 8
(3,617 Views)

This probably will work since most DAQ devices use CMOS circuitry which does not require a current path to GND to detect a LOW state. Anyhow the input will have high impedance and will be more sensitive to EMI. You also have to check whether there are pull-up resistors on board, any pull-up resistor will play its role in the input resistor network and shift voltage levels.

0 Kudos
Message 6 of 8
(3,604 Views)

Hi,

 

I need help with exact same thing but my photosensor is SB312DQDP. I'm attaching datasheet on that sensor. It says that the Output configuration is:

Biopolar: One current sourcing (PNP) and one current sinking (NPN) open-collector transistor. Does that mean I can still use your proposed voltage divider solution in previous posts. My power supply is going to be 12V. Thank you in advace for any help.

0 Kudos
Message 7 of 8
(3,223 Views)

As far as I know it should work since the both of you are using PNP output transistors. You may need to modify the resistor values to get the correct amount of voltage into your system. Once again you should be careful to avoid damage to you daq card as specified in the previous posts

Frank,
National Instruments
Software Group Manager
0 Kudos
Message 8 of 8
(3,207 Views)