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.

LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Flowmeter YF-S201 Read

Hi, guys

I'm using flowmeter sensors YF-S201 in a project and I wanna read the frequecy from this component.

Summarazing, this sensor is based on Hall effect: a frequency pulse varies while the internal rotor is moved by a liquid that pass inside passage. On Arduino, I can read this pulse in a digital pin using a interrupt in the programming.

How can I read a variable frequency to calculte the flow using Labview Interface for Arduino or another Labview function?

Thanks,

Sierra

0 Kudos
Message 1 of 6
(6,597 Views)

LIFA doesn't have any functionality to read a singal frequency.  LINX (the replacement for LIFA since LIFA is deprecated), however, provides access to the pulseIn() function which will give you the pulse width of a single pulse which you might be able to assume you can calculate the frequency from that (I say "might" because this method won't mitigate any random noise in teh signal but it really depends on how accurate you need to be in your application).

0 Kudos
Message 2 of 6
(5,947 Views)

Thanks for answer Nathan_B.!!

I was reading another discussions about this topic and ... Won't be easy kkk

I'm looking for use a LM2907 or 2917 to converte frequency to tension and read a analog signal from the flowmeters. OR try to use the pulseIn().

Anyway, thanks again Nathan_B.

0 Kudos
Message 3 of 6
(5,947 Views)

Hi GuiSierra,

did you solve your issue? I'm dealing with the same application for my thesis but I'm stuck. Could you please provide some guidelines? Thank you very much

0 Kudos
Message 4 of 6
(5,265 Views)

Hello everyone,

 

As I was dealing with the same issue (using Labview with a YF-201 Flowmeter), I came across a solution.

In my case, I had access to a NI9219 acquisition card to read voltages.

The principle goes like this :

  • Acquire your data with a DAQ Assistant
  • Get your signal to a Trigger and Gate Vi Express and set it up to "Rising" with 1 sample so you only detect one event
  • Use a Statistics VI Express to get the "Total Samples" and compare the output to 1 (Equal condition)
  • If the condition is true, you can increment a pulse counter and use a Timer to get current time.
  • Then, using Shift register, you can substract the time between to pulses and get back to an instantaneous frequency

I am not sure if this solution is 100% working and I highly doubt that it is optimized in any way.

 

I hope it will help you. I may share my VI if needed.

 

Regards,

0 Kudos
Message 5 of 6
(4,734 Views)

hello

 

I would like to do same as your project, to mesure the frequency of the pulse generated bu the flowmeter.

did you fine any solution.

please help me.

0 Kudos
Message 6 of 6
(4,347 Views)