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: 

rise time problem with NI 9401 digital input

An NI 9401 was being used to log 0 to 5 volt frequency pulses from a flow meter that produces a square wave signal by means of an open collector output and a 2.2k resistor connected to a 5 volt source. Unsteady results when the controller of the flow meter was indicating a steady flow resulted in the input to the NI 9401 being viewed using a CRO. This showed a good quality signal present by also some intermittent impulsive spikes. The cable from the flow meter was around 50metres long. A simple capacitive filter at the input to the NI 9401 was tried starting with a 10nF capacitor connected to ground. The result was a much increased indicated flow rate by the output of the LabView application. However the view on the CRO showed all but no difference to the waveform with the impulsive spikes much less evident. A much larger capacitor was then tried with a result that the rise time of the square wave was now clearly rounded off when viewed on the CRO and yet the output frequency indictated on the LabView application increased almost by an order of magnitude.

 

It was felt that a hardware solution would be to add a filter followed by a Schmitt trigger ( in fact a comparator with feedback)  so that the external noise spikes could be rejected but the rise time of the square wave signal into the NI9401 could be kept as low as possible ( i.e. 100ns or so) This arrangement worked well and the flow rates as indictated by the flow meter controller and by the LabView application were then the same.

 

Looking at the installation documentation on the NI 9401 (page 12) showed an example of a digital input from a switch to ground and a pull up resistor and so it is not understood why the pulse rise time into the NI 9401 was critical in any way ?

 

Not having access to the LabView application an external hardware interface of a filter followed by a Schmitt trigger provided a solution but is it possible that the software setup of the NI 9401 could provide a solution so making this external hardware interface redundant ?

       

0 Kudos
Message 1 of 3
(5,919 Views)

We have several filter VIs within labVIEW depending on the type of filtering you would like. You can use the Filter Express VI and configure it for a variety of different things to play around. There are also low level filter VIs that can be found in the Signal Processing >> Filters palette.

 

The following two forum posts discuss how to create a Schmitt Trigger in Software:

 

http://208.74.204.114/t5/LabVIEW/Can-I-implement-the-functionality-of-a-Schmitt-trigger-in/td-p/4701...

http://forums.ni.com/t5/LabVIEW/Schmitt-Trigger/td-p/300823

Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(5,892 Views)

HollyBerry,

 

Neither of the links you posted is relevant to a digital input. The OP is using the NI 9401 which has only digital inputs. The 500 ns rise/fall time limit is likely the problem with his system.

 

andrewMHL,

 

Your external low pass filter followed by a Schmitt trigger is the best solution. Some NI digital input and counter input devices have digital debounce or hystersis inputs but the 9401 specifications do not mention anything like that. The 500 ns specification also implies that it does not have such signal conditioning.  

 

It is conceivable that you could sample the digital input lines at a very high rate and then use some time domain processing of the data to reject the high frequency extraneous transitions.

 

As a general rule I find that using a bit of circuitry to clean up a signal before computerizing it is usually better than writing a complicated signal processing algorithm later to try to extract the information from the data.

 

Lynn

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