From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Incorrect flow rate readings at a start-up with a NI9401 module

Solved!
Go to solution

Hello, lovely community,

 

The board is a cRIO 9068. I am trying to measure flow rate by using a Webtec LT300 flow meter with the following characteristics:

Frequency output 20 – 2000 Hz;

Voltage output 30 mV – 10 V (I am using a Schmidt trigger circuit with a gain, to get the voltage signal of at least 2V all the time);

Inductance at 1 kHz - 1.55 H;

Impedance – 3700 Ohm;

The housing in grounded. Frequency outputs plus and minus go to the Schmidt trigger, and after that the output from it is connected to the NI 9401 module. Output to the pin 16, 0V to the pin 17 (not sure that I even need but still).

I read that since I am measuring frequency lower than 4 kHz, I should use the period counter mode, and then take the frequency from it. After that I convert the frequency to the flow rate, since 20 Hz – 3 lpm, 2000 Hz – 300 lpm. That what I was implementing in the code.

 

The code is designed in the scan mode with the scan engine sample time of 5ms (don’t need it faster than that since I have other sensors in the system). The problem is a spike in the frequency/flow rate when the flow meter cranks up. It goes straight to the maximum value, then decreases and show the real flow rate (labview flow rate file).

By investigating the possible causes we have noticed on the oscilloscope that the first impulse from the Schmidt trigger gives us this problem (scope_response file). As it can be seen from the picture, the frequency of the first output goes to 1.2 kHz and higher, and only after that the trigger output starts to behave normally.

But in my case it is imperative to actually see a real spike, because I am checking dynamic characteristics of the tested valve. So the question is, it is possible to eliminate the observed effect in order to get a decent start up plot?

 

Thank you in advance for your help.

0 Kudos
Message 1 of 9
(3,762 Views)

What is the Schmidt trigger circuit doing for you? I only ask out of curiosity, not questioning your method or proposing a solution. I deal with pulse output flow meters in many applications at work.

 

 


Corey Rotunno

0 Kudos
Message 2 of 9
(3,692 Views)
Solution
Accepted by topic author ESturov

I suspect that the pulse you're seeing is related to several things.

A) Some combination of the inductance from the coil and the Schmidt trigger circuit. 

B) You say you are holding the voltage above 2 V at all times. The DI card wants transitions between 0.8 V and 2 V to register correctly.

C) The DI card has a max voltage of 5.25 V, you say something about 10 V. This is saturating the DIs input.

 

There are commercial Pulse Amplifier that are specifically designed to help interface turbine flow meters with other devices. 

Here's one by Daniel: http://www.emerson.com/catalog/en-us/daniel-preamplifiers

Here's a generic one: http://www.nixonflowmeters.co.uk/ProductsServices/DisplayInstrumentation/SP3PulseAmplifier.aspx

 

—Ben

—Ben
Prevent your computer from sleeping programmatically!
Use Power Requests
Download from GitHub

Message 3 of 9
(3,686 Views)

Just as a general note.  You can avoid all the fumbling and gyrating of the Data Buffer by setting the Data Layout into Write to TDMS to "Interleaved"Smiley Wink  And the reciprocal of Counter Period * 1M will be the same Both times!

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 9
(3,678 Views)

@Corey.Rotunno wrote:

What is the Schmidt trigger circuit doing for you? I only ask out of curiosity, not questioning your method or proposing a solution. I deal with pulse output flow meters in many applications at work.

 

 


Corey, as our colleague Ben_Manthey noticed "You say you are holding the voltage above 2 V at all times. The DI card wants transitions between 0.8 V and 2 V to register correctly.", this is the main reason why we decided to go with the trigger with some amplification. We need to gain the flowmeter output to at least 0.8V in order to measure the signal via the NI9401 module. 

Plus the output is not a perfect sin wave, so to be sure that we will pick up the measurement correctly (can be double checked with the use of a signal generator with a square wave), the trigger was the most feasible solution for us at that moment.

Thank you for your comment!

0 Kudos
Message 5 of 9
(3,661 Views)

Thank you Ben for the comment:

A. What I was thinking as well. But in this case, don't see any solutions what can be done to solve it.

B and C. Technically yes. Just checked again with a signal generator - the module works correctly even with a 10V signal. I did this test already, running this system with the generator for 4 hours at variable voltage from 2-10V, did not have any issues at all.

Thank you for the links. But again, since the voltage might not be the biggest issue here, don't think that it will work out. Because they are basically the same trigger+amplification circuits. But maybe the behaviour will be different with a new circuit. In any case, thank you very much for you time! Have a good one.

0 Kudos
Message 6 of 9
(3,658 Views)

Thank you Jeff, will try this out as well!

0 Kudos
Message 7 of 9
(3,656 Views)

@ESturov wrote:

@Corey.Rotunno wrote:

What is the Schmidt trigger circuit doing for you? I only ask out of curiosity, not questioning your method or proposing a solution. I deal with pulse output flow meters in many applications at work.

 

 


Corey, as our colleague Ben_Manthey noticed "You say you are holding the voltage above 2 V at all times. The DI card wants transitions between 0.8 V and 2 V to register correctly.", this is the main reason why we decided to go with the trigger with some amplification. We need to gain the flowmeter output to at least 0.8V in order to measure the signal via the NI9401 module. 

Plus the output is not a perfect sin wave, so to be sure that we will pick up the measurement correctly (can be double checked with the use of a signal generator with a square wave), the trigger was the most feasible solution for us at that moment.

Thank you for your comment!


I think you've misunderstood slightly (or not so slightly) here. I had the same thought when I first read this thread but assumed I'd misunderstood.

 

Ben is saying that for a Digital Input (DI), the input is low if the voltage is below 0.8V, and high if it is above 2V. If you want to trigger transitions, in order to measure frequency, you need it to be low at a voltage less than 0.8V and high between 2V and ~5V (although as you said, a higher voltage might still be fine due to the protection circuitry)

 

Some further description can be found here: What Is the Definition of a TTL (Transistor-Transistor Logic) Compatible Signal?


GCentral
0 Kudos
Message 8 of 9
(3,625 Views)

@cbutcher wrote:

 Ben is saying that for a Digital Input (DI), the input is low if the voltage is below 0.8V, and high if it is above 2V. If you want to trigger transitions, in order to measure frequency, you need it to be low at a voltage less than 0.8V and high between 2V and ~5V (although as you said, a higher voltage might still be fine due to the protection circuitry)

 


Hi there. Nope, I understood correctly, just wrote incorrectly. In any case, will try to use the above suggested pre-amplifiers. Thank you for your participation.

0 Kudos
Message 9 of 9
(3,591 Views)