Stufin
Home Quick Cart Profile

2 Inch Water Flow Sensor YF - DN50

Buy Now

Component Name

2 Inch Water Flow Sensor YF - DN50

Description

The 2 Inch Water Flow Sensor YF - DN50 is a digital water flow sensor designed to measure the flow rate of water in pipes with a diameter of 2 inches (DN50). This sensor is a popular choice in the Internet of Things (IoT) and industrial automation applications where accurate and reliable water flow measurement is crucial.

Functionality

The 2 Inch Water Flow Sensor YF - DN50 measures the flow rate of water by using a magnetic mechanism to detect the movement of a paddle wheel, which is inserted into the flow stream. As the water flows through the pipe, the paddle wheel rotates, generating a magnetic field that is detected by the sensor's Hall effect sensor. The sensor then converts the detected magnetic field into an electrical signal, which is proportional to the flow rate of the water.

The sensor provides a digital output signal, making it easy to interface with microcontrollers, data loggers, and other IoT devices. The digital output signal is typically in the form of a pulse signal, where each pulse represents a specific volume of water flow.

Key Features

  • DN50 Pipe Size: The sensor is designed to fit 2-inch (DN50) pipes, making it suitable for a wide range of industrial and commercial applications.
  • High Accuracy: The sensor provides high accuracy measurements, with a typical error margin of 5% of the full scale.
  • Digital Output: The sensor provides a digital output signal, making it easy to interface with microcontrollers, data loggers, and other IoT devices.
  • Magnetic Mechanism: The sensor uses a magnetic mechanism to detect the movement of the paddle wheel, ensuring high reliability and long-term stability.
  • IP67 Rating: The sensor has an IP67 rating, making it suitable for use in wet environments and resistant to dust and water ingress.
  • Wide Operating Range: The sensor can operate in a wide range of temperatures (-25C to 80C) and pressures (up to 1.6 MPa).
  • Low Power Consumption: The sensor has low power consumption, making it suitable for battery-powered IoT devices.
  • Simple Installation: The sensor is easy to install, with a simple threaded connection that can be mounted directly to the pipe.

Applications

  • Industrial Automation: The sensor is suitable for use in industrial automation applications, such as monitoring water flow in manufacturing processes, chemical processing, and oil and gas industries.
  • Water Management: The sensor can be used in water management applications, such as monitoring water flow in irrigation systems, water treatment plants, and commercial buildings.
  • IoT Applications: The sensor can be used in IoT applications, such as smart home systems, urban infrastructure monitoring, and environmental monitoring.

Flow Rate Range

0.5-50 L/min

Accuracy

5% of the full scale

Digital Output

1-500 pulses per liter

Power Supply

5-24 VDC

Current Consumption

<20 mA

Operating Temperature

-25C to 80C

Operating Pressure

up to 1.6 MPa

IP Rating

IP67

Dimensions

120 mm x 60 mm x 40 mm

Weight

300 g

Certifications and Compliances

CE Certification

RoHS Compliance

FCC Compliance

Pin Configuration

  • 2 Inch Water Flow Sensor YF-DN50 Pinout Explanation
  • The 2 Inch Water Flow Sensor YF-DN50 is a digital water flow sensor designed to measure the flow rate of liquid fluids. It has a total of 5 pins, which are explained below:
  • Pinout Diagram:
  • | Pin Number | Pin Name | Description |
  • | --- | --- | --- |
  • | 1 | VCC | Power Supply (Positive) |
  • | 2 | GND | Ground (Negative) |
  • | 3 | OUT | Signal Output |
  • | 4 | NC | Not Connected (Reserved) |
  • | 5 | NC | Not Connected (Reserved) |
  • Pin-by-Pin Explanation:
  • 1. VCC (Power Supply - Positive)
  • Function: This pin provides the power supply to the sensor.
  • Voltage: Typically 5V DC (maybe 3.3V or 12V depending on the specific model or application).
  • Connection: Connect to the positive terminal of the power supply.
  • 2. GND (Ground - Negative)
  • Function: This pin provides the ground reference for the sensor.
  • Connection: Connect to the negative terminal of the power supply and the ground of the microcontroller or other circuit components.
  • 3. OUT (Signal Output)
  • Function: This pin provides the digital output signal indicating the flow rate of the liquid.
  • Signal Type: Digital pulse signal (TTL level).
  • Frequency: The frequency of the output signal is proportional to the flow rate of the liquid.
  • Connection: Connect to a digital input pin of a microcontroller, such as an Arduino or Raspberry Pi.
  • 4. NC (Not Connected - Reserved)
  • Function: This pin is reserved and not connected internally.
  • Connection: Leave this pin unconnected.
  • 5. NC (Not Connected - Reserved)
  • Function: This pin is reserved and not connected internally.
  • Connection: Leave this pin unconnected.
  • Connection Structure:
  • To connect the 2 Inch Water Flow Sensor YF-DN50 to a microcontroller, follow this structure:
  • Connect the VCC pin to the positive terminal of the power supply (e.g., 5V).
  • Connect the GND pin to the negative terminal of the power supply and the ground of the microcontroller.
  • Connect the OUT pin to a digital input pin of the microcontroller (e.g., D2 on Arduino Uno).
  • Important Notes:
  • Make sure to use a suitable power supply and follow the recommended voltage and current ratings for the sensor.
  • Use a suitable connector or wire to connect the sensor to the microcontroller and power supply.
  • Ensure proper insulation and protection of the sensor and wiring to prevent electrical shock or damage.
  • By following this pinout explanation and connection structure, you can successfully integrate the 2 Inch Water Flow Sensor YF-DN50 into your IoT project or application.

Code Examples

2 Inch Water Flow Sensor YF - DN50 Documentation
Overview
The 2 Inch Water Flow Sensor YF - DN50 is a digital water flow sensor designed to measure the flow rate of liquids in industrial, commercial, and residential applications. This sensor uses a Y-shaped design to detect the flow of water and provides an accurate measurement of the flow rate. The sensor is compatible with pipes with a diameter of 2 inches (DN50) and operates on a 5V to 24V power supply.
Technical Specifications
Measuring range: 0.5-20 L/min
 Accuracy: 5% of full scale
 Power supply: 5V to 24V DC
 Output signal: Hall effect pulse output
 Interface: 3-pin connector (VCC, GND, OUT)
 Material: Brass body with 2-inch (DN50) pipe connection
 Operating temperature: -20C to 80C
Code Examples
### Example 1: Measuring Water Flow Rate using Arduino
This example demonstrates how to use the 2 Inch Water Flow Sensor YF - DN50 with an Arduino board to measure the water flow rate.
```c
const int flowSensorPin = 2;  // Pin connected to the flow sensor's OUT pin
volatile int count = 0;  // Variable to store the pulse count
float flowRate = 0.0;  // Variable to store the flow rate (L/min)
void setup() {
  pinMode(flowSensorPin, INPUT);
  attachInterrupt(digitalPinToInterrupt(flowSensorPin), flowSensorInterrupt, RISING);
  Serial.begin(9600);
}
void loop() {
  flowRate = count / 7.5;  // Calculate the flow rate (L/min)
  Serial.print("Flow Rate: ");
  Serial.print(flowRate);
  Serial.println(" L/min");
  count = 0;  // Reset the pulse count
  delay(1000);  // Measure flow rate every 1 second
}
void flowSensorInterrupt() {
  count++;  // Increment the pulse count
}
```
### Example 2: Measuring Water Flow Rate using Raspberry Pi (Python)
This example demonstrates how to use the 2 Inch Water Flow Sensor YF - DN50 with a Raspberry Pi board to measure the water flow rate using Python.
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
FLOW_SENSOR_PIN = 17  # Pin connected to the flow sensor's OUT pin
GPIO.setup(FLOW_SENSOR_PIN, GPIO.IN, pull_up_down=GPIO.PUD_UP)
pulse_count = 0
flow_rate = 0.0
def flow_sensor_interrupt(channel):
    global pulse_count
    pulse_count += 1
GPIO.add_event_detect(FLOW_SENSOR_PIN, GPIO.RISING, callback=flow_sensor_interrupt)
while True:
    flow_rate = pulse_count / 7.5  # Calculate the flow rate (L/min)
    print("Flow Rate: {:.2f} L/min".format(flow_rate))
    pulse_count = 0  # Reset the pulse count
    time.sleep(1)  # Measure flow rate every 1 second
```
Note: The examples provided assume that the flow sensor is properly connected to the Arduino or Raspberry Pi board, and the power supply is within the recommended range. The `flow_rate` calculation is based on the sensor's datasheet, which assumes 7.5 pulses per liter. You may need to adjust this value depending on your specific application.