Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting a digital optical rotary encoder to counter input of NI-USB6210

Solved!
Go to solution

Dear All,

 

I am trying to synchronize the shaft position with force data.

To achieve this am using the following hardware -

  • 1024PPR ABZ 3-Phase Incremental Optical Rotary Encoder. It says the output is NPN open collector output type and requires an internal pull-up resistor.
  • DAQ device is NI-USB 6210. Specification says http://ni.com/docs/en-US/bundle/usb-6210-specs/page/specs.html , it requires a pull-down resistor of 50 k ohm. 

I tried connecting encoder and daq referring to online youtube videos available (https://www.youtube.com/watch?v=W1rK3GhOjPQ) but am unable to get any pulses or reading in my front panel. 

 

I have searched for various sources and learnt what is pull-up and pull-down resistors but I am unable to implement it here in my case.

Can anyone please tell me how to work my way through in this situation?

0 Kudos
Message 1 of 3
(794 Views)
Solution
Accepted by topic author rakkiran

 

There are others more fluent than I in electrical interface specs, but I'll take a first shot to get things started.

 

Let's suppose you use a 5k pull-up for your open collector encoder signal.  That puts a 5k resistor between your output and the nominal 5V supply.

 

Then consult the specs for your DI which show that they have internal 47k pull-down resistors.  So again, a 47k resistor between the input pin and digital ground.

 

Now, what happens when you connect the encoder to the DI?   Well, in the case where the encoder "wants to" generate a high output, you'll have a voltage divider between the 5V supply and digital ground.  The voltage at the input pin will be at the fraction 47k / (47k + 5k) of the supply voltage, or around 4.5V with a 5V supply.  That's easily within the digital logic spec for high state.

 

And what if the encoder "wants to" generate a low output?  Well, that implies that the encoder is providing a very low impedance path from the encoder signal to digital ground.  The 5k pull-up limits current flow down this parallel path, virtually all of the voltage drop occurs across the 5k resistor, and the resulting encoder signal meets the digital logic spec for low state.

 

Try a 5k pull-up, measure the output voltages for both high and low states, and report back if further issues.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 3
(762 Views)

Hello,

I have attached a 5k ohm resistor in between outputs of encoder and Vcc and connected the outputs to counter inputs of DAQ.

The video has the simple program of encoder running and the waveform. So I hope this is sorted, if any discrepancies exist in the output do let me know. 

0 Kudos
Message 3 of 3
(723 Views)