กลับไปหน้ารวมไฟล์
flowsense-alert-a57f94.md

The project utilizes a water flow sensor to monitor the flow rate of water through a pipe. The flow rate is displayed in real-time on a 4-digit 7-segment display. Additionally, a buzzer is activated if the flow rate exceeds a preset threshold, indicating the need to reduce the flow.

Functionalities :

Flow Sensing: The water flow sensor measures the rate of flow and sends this data to the microcontroller.

Display: The microcontroller processes the flow data and outputs it to the 7-segment display, where it is updated continuously.

Threshold Detection: A predefined threshold for the flow rate is set in the microcontroller. If the current flow rate exceeds this threshold, the microcontroller triggers the buzzer.

User Intervention: Upon hearing the buzzer, the user is alerted to reduce the flow manually. This can be achieved by adjusting a valve attached to the pipe.

The system is useful in environments where monitoring water flow rates is critical, such as industrial processes, irrigation systems, or water distribution systems. By providing real-time feedback and alerts, it helps in maintaining optimal flow rates and preventing potential damage or inefficiencies due to excessive flow.


🛠️ เจาะลึกเบื้องหลังการทำงาน (Deep Dive / Technical Analysis)

The FlowSense Alert moves beyond "Is it wet?" to "Exactly how many liters are spraying per minute?". A burst pipe in a server room or basement costs thousands. This system relies on high-speed hardware interrupts to actively measure water flow and automatically cut the main valve if a flood is imminent.

The YF-S201 Hall Effect Mathematics

The YF-S201 Water Flow Sensor is spliced directly inline with a PVC pipe. Inside it is a tiny plastic water wheel with a magnet.

  1. As water pushes the wheel, the magnet spins past a Hall Effect sensor.
  2. If the wheel spins 100 times, the sensor outputs 100 digital HIGH pulses (a square wave).
  3. The Interrupt Trap: The Arduino counts these pulses using an interrupt: attachInterrupt(digitalPinToInterrupt(2), pulseCounter, FALLING);
  4. The Formula: The datasheet states that a Flow Rate of 1 Liter per Minute = 7.5 Hz (pulses/second). The code counts how many pulses occur every 1,000 milliseconds and divides that number by 7.5 to print the EXACT flow rate in L/min!

The Dual Alert & Actuation Logic

The system is a watchdog. It expects standard usage (e.g., a toilet flushing uses x liters).

  • if (FlowRate > 15L/min for 30 seconds): It assumes a pipe has completely snapped!
  • The Shutoff: The Arduino clicks a high-power relay. The relay supplies 12V to a massive Motorized Ball Valve installed on the house's main water inlet, physically grinding the water supply shut in 5 seconds.
  • The Alert: An ESP8266 simultaneously shoots a Push Notification to your phone via the Pushbullet or IFTTT API!

Professional Assembly Hardware

  • Arduino Uno/Nano and an ESP8266 module.
  • YF-S201 Inline Water Flow Sensor (With standard G1/2 threaded pipe connections).
  • 12V DC Motorized Ball Valve (Not a solenoid! Solenoids require constant power to stay open; ball valves only use power while turning).
  • Heavy Duty Relay Module.

ข้อมูล Frontmatter ดั้งเดิม

title: "FlowSense Alert"
description: "Real-time Water Flow Monitoring System with Flow Rate Display and Threshold Alert"
author: "scienceactivitycentre"
category: "Sensors & Environment"
tags:
  - "Arduino User Group"
  - "Environmental Sensing"
  - "Internet Of Things"
views: 2466
likes: 0
price: 1120
difficulty: "Intermediate"
components:
  - "1x Soldering Gun Kit, Instant Heat"
  - "1x Water Flow Sensor"
  - "1x Arduino UNO"
  - "1x 12 volt Adapter"
  - "1x 7 segment 4 digit display"
  - "1x 9V Battery Clip"
  - "1x Solder Soldering Wire"
  - "1x jumper wires for arduino"
tools: []
apps:
  - "1x Arduino IDE 2.0 (beta)"
downloadableFiles:
  - "https://projects.arduinocontent.cc/74c39d58-adad-40a0-bce9-6a0ec566af1c.ino"
documentationLinks: []
passwordHash: "4d3371df2218d68efb88a4fc38af5bf153d45863c352d4eb73376f21f9269aa6"
encryptedPayload: "U2FsdGVkX1+5UwmBoTQfJKoOv1MQbcVCjyohDWzJch3L1U67X/rPwolPk8p3hbzXQSfzsEFy6aGh7QWt0Wj7gVQfj5LtCc+sJwuSco3qxwo="
seoDescription: "Real-time Water Flow Monitoring System with Flow Rate Display and Threshold Alert for Arduino."
videoLinks: []
heroImage: "https://cdn.jsdelivr.net/gh/bigboxthailand/arduino-assets@main/images/projects/flowsense-alert-a57f94_cover.jpg"
lang: "en"