Flow Sensor Tutorial

How Flow Sensors Work (and How to Use One in an Irrigation System)

Learn the main types of flow sensors, how turbine flow sensors generate pulses, how to convert pulses to flow rate and volume, and how to connect a flow sensor to a WiFi data logger.

Flow sensors are one of the most useful tools for irrigation and hydroponic systems. In this article, I’ll explain how flow sensors work, why they’re so valuable for detecting problems, how to calculate flow rate and total volume from a pulse output, and how to connect a flow sensor to a WiFi data logger so you can monitor everything remotely.

What is a flow sensor?

A flow sensor measures the flow rate of fluid moving through a system. In irrigation and hydroponics, flow sensors are commonly used to detect leaks, identify bad valves that are stuck open or closed, and calculate the total volume of water being dispensed. They can also be used to detect changes in flowing-water pressure (because flow and pressure are related while water is moving through pipes and restrictions).

The main types of flow sensors

There are several kinds of flow sensors, each operating on a different physical principle. Here are three common categories:

1) Thermal flow sensors

Thermal flow sensors use an upstream heater and a downstream temperature sensor. As the flow of fluid increases, heat is carried downstream differently, and the temperature change can be correlated to flow rate. These sensors have no moving parts, but they tend to be expensive and often require calibration to account for ambient temperature and fluid type.

2) Ultrasonic flow sensors

Ultrasonic sensors measure the time or phase difference between a transmitted ultrasonic signal and a received signal. As the flow rate increases, the time-of-flight (or phase) changes in a way that can be used to infer flow.

3) Mechanical turbine flow sensors (the simplest and most affordable)

The simplest and least expensive type is mechanical. These sensors typically contain an internal turbine, a magnet, and a Hall-effect sensor. As water flows, it turns the turbine, which rotates a magnet. The Hall-effect sensor detects the rotation and outputs a pulse for each revolution. The faster the pulse train, the higher the flow rate.

In the rest of this article, we’ll focus on the turbine type because it’s the most affordable and commonly used in irrigation projects.

Understanding the pulse output

A typical turbine flow sensor outputs a digital pulse train. Many use an open-drain (open-collector) transistor output, which means you need a pull-up resistor to produce a voltage signal that your measurement device can read. When flow increases, the turbine spins faster, and the output pulses arrive more frequently.

If you watch the output on an oscilloscope, you’ll see pulse frequency increase as flow increases. That pulse frequency is the key measurement that you’ll convert into flow rate.

Converting pulse rate to flow rate

To convert a pulse train into a flow rate (like liters per minute), you first need to determine the pulse rate in pulses per second (hertz). This typically requires a microcontroller or a data logger that supports pulse inputs. Once you have the pulse frequency, the flow rate comes from a simple formula provided by the sensor manufacturer.

For the flow sensor described here, the flow rate in liters per minute is:

Flow (L/min) = Frequency (Hz) ÷ 6.6

Example: 6.6 pulses/second (6.6 Hz) ≈ 1 liter/minute

So if you measure 6.6 pulses per second, that corresponds to about 1 liter per minute.

Calculating volume dispensed

If your goal is to dispense an exact volume of water, you can use the flow rate to compute runtime, or use total pulses to compute total volume.

For example, if you want to dispense 0.5 liters at a flow rate of 1 liter/min, you’d run the system for 30 seconds. In that scenario, you’d see roughly 190 pulses from the sensor during that 30-second interval.

What if your data logger can’t read pulses?

Here’s the challenge: every data logger can read voltage, but not every data logger has a pulse-counting input. That’s why we created a device that converts a pulsed flow sensor output into a proportional voltage. With a pulse converter (sometimes called a pulse translator), you can connect a turbine flow sensor to nearly any data logger or controller that supports analog voltage measurement.

As flow increases, pulse frequency increases, and the converter’s voltage output rises accordingly—making it easy to log and trend flow using a standard analog input.

This pulse-to-voltage approach can also work with other rotary pulsed outputs—for example, anemometers (windmills) that produce a pulse signal proportional to wind speed.

Details on our Pulse to Voltage Converter can be found here ➤ Pulse to Voltage Converter

Real-world irrigation example: monitoring variable-pressure water

Here’s a real-world application: my property is connected to secondary irrigation water supplied by a central pump in my neighborhood during the summer. The pressure can vary widely depending on neighborhood usage. Since flowing water pressure is related to flow rate, I can monitor the overall “health” of the system while my irrigation is running using a single flow sensor.

In this setup, the flow sensor is installed using PVC couplings. The sensor’s pulse output feeds into a pulse translator housed in a waterproof enclosure. The translator’s voltage output is connected to a VegeHub WiFi logger (battery powered). The whole assembly mounts conveniently on a PVC mast and is installed inline with the irrigation system.

The sensor generates pulses, the translator converts those pulses to a voltage, the WiFi logger records the voltage, and the logger uploads the data to VegeCloud.com so I can monitor flow-rate trends remotely.

One drawback of turbine flow sensors (and how to mitigate it)

Turbine-based flow sensors have one important drawback: if your water is dirty, debris can clog the turbine. This can be a real issue in gray-water systems.

  • Use filtration: Install an appropriate water filter upstream to catch debris.
  • Consider over-sizing: A larger-diameter sensor (installed in an appropriate pipe section) often has a larger turbine that’s less likely to clog.

Vegetronix Flow Sensors

For reliable and accurate flow measurement in your irrigation or hydroponic system, we recommend Vegetronix flow sensors. Designed for rugged performance and ease of integration, these sensors deliver precise pulse outputs that make monitoring water usage, detecting leaks, and tracking system performance simple and effective. Whether you’re automating a backyard garden or managing a larger agricultural setup, Vegetronix flow sensors provide dependable data you can trust. Learn more here ➤ Vegetronix Flow Sensors

VG-METER-200