Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How to connect opto sensor and limit switch to DI module?

Solved!
Go to solution

Hi, 

 

I have a opto sensor (OMRON EE-672) and a limit switch (OMRON V-156-1A5).
I'd like to use them to detect the limit triggering of my stepper motor.

However I have no idea how to connect them to my DI module.

The sensor of OMRON EE-672 is powered by 5V, and outputs high signal when it detects the light blocked.

I wonder if I can connect it as this way: 

20170920001.png

 

For limit switch of OMRON V-156-1A5, it is just a mechanical switch.

When it is pressed, two of the terminals are short, should I use a resistor to measure the voltage across it?

I wonder if I can connect it as this way:

20170921001.png

 

Do they works?

0 Kudos
Message 1 of 5
(3,425 Views)
Solution
Accepted by topic author William1225

William1225 wrote:

Do they works?


Something simple like this you should just try it and see what happens.  From what I can tell, your first circuit should work.  For the second: Many DAQs have built in pull up or pull down resistors for the DIO. Read the specification​ for your DAQ.  If it has a pull down, then have the switch connect the 5V to the DIO.  If it has a pull up, then have the switch connect GND to the DIO.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 5
(3,402 Views)

Hi crossrulz,

 

Very thanks to your suggestion.

You're right, the first circuit works.

As for the second circuit, I insert the limit switch between GND and DIO in the module, it works.

To make specific, I use the sbRIO 9602 to detect the OMRON EE672 and OMRON V-156-1A5.

It seems it has pull-up resistor in the board.

0 Kudos
Message 3 of 5
(3,386 Views)

Concerning the opto switch, most opto switch have an "open collector" output which means that they have an output transistor and the collector of the latter is connected to the output. When the output is active, the npn transistor is activated and the collector is (almost) connected to GND. When the output is inactive, the npn transistor is not activated and there is no connection between its collector and GND. If you have an interface with true TTL interface, you will need a pull-up resistor on the input (it probably will work without but this is not recommended). The pull-up resistor should be connected between the +5V supply of the interface and the output terminal of the opto switch. 

Message 4 of 5
(3,376 Views)

Hi, 

I am using Vexta motor with velmex Xslide. I have two limit switch at both end of sliding.

 

I have checked my DAQ specification. This has  pull down resistor. My question is, which wire of limit switch I would connect with DAQ DIO port? Is there any specific rule? It should not matter which wire is connected with DIO or 5v Port, right? Or it matters?

0 Kudos
Message 5 of 5
(2,595 Views)