Task
In order to measure the angle and calculate the angular velocity and acceleration of a large metal wheel with a rotational frequency \$f = 0.01 \ldots 1.00~Hz\$, I try to build a custom rotary encoder located on the axis of the wheel.
The basics to this task are described in this National Instruments Tutorial #7109. To be exact, I want to have three rotating metal discs (Data Channel A, Data Channel B, Reference Channel Z) with a radius of \$r_{Disc} = 114.592~mm\$, i.e. with a circumference of \$U_{Disc} = 720~mm\$.
For an 1° accuracy, I plan to cut \$4~mm\$ slits on the outside of the discs - 90 slits each for discs A and B and 4 slits on disc Z (0°, 89°, 182°, 271° references). The slits should then be detected with fork light barrier sensors.
I already have the following parts from National Instruments, which I would like to use for this task:
- Controller NI cRIO-9074 or Compact Chassis NI cDAQ-9171
- Bidirectional 5V/TTL Digital Input/Output Module NI 9401
- Input Voltages
\$2.00~V \leq V_{In,High} \leq 5.25~V\$
\$0.00~V \leq V_{In,Low} \leq 0.80~V\$ - Output Voltages
- Output High
Sourcing \$100~\mu A\$: \$V_{Out,High} \geq 4.7~V\$
Sourcing \$2~mA\$: \$V_{Out,High} \geq 4.3~V\$ - Output Low
Sinking \$100~\mu A\$: \$V_{Out,Low} \leq 0.1~V\$
Sinking \$2~mA\$: \$V_{Out,Low} \leq 0.4~V\$
- Output High
- Input Voltages
Questions
Now the question is which light barrier sensors I can use. The first idea is a Panasonic PM-T54 (NPN Open-Collector Transistor, datasheets here and here) or a PM-T54P (PNP Open-Collector Transistor, datasheets here and here).
They each require a supply voltage of \$5~V~DC \ldots 24~V~DC \pm 10\%\$
- Can I use both the NPN- and the PNP-Type or would one of those be more suited for the NI 9401?
If I understand correctly, the PNP-Type does need a sinking input (i.e. sinking output on the NI 9401) with a grounded connection to the load, whereas the NPN-Type needs a sourcing input (i.e. sourcing output from the NI 9401) with a voltage source to the load. - Does the NI 9401 provide enough current?
In the datasheets of the sensors, a maximal current consumption of \$50~mA\$ (circuit diagram in first datasheet or page 6 in second datasheet) or \$15~mA\$ (page 5 in second datasheet) is indicated.
(Side Question: What is the difference between the maximal current consumption and the maximal sink/source current on page 5 in the second datasheet?)
However, it seems that the NI 9401 is only capable of providing a maximum of \$2~mA\$. Is this correct? Does this mean that I need a different power source for the sensors, but that I can keep the NI 9401 as an input module?