arduino water leak detection system

Hie. I'm a newbae trying to use Arduino in my water leak detection system project.I'm using two YF-S201 flow rate sensors, 16x2 lcds to show the readings and piezo buzzers. I intent to install them 4m apart for my display model. So the system should be able to ring the buzzer if the flow rate varies along the pipeline due to the induced leak. The lcds should display flow rate readings. I intent to use a 1hp dab booster pump with a discharge of 600-3000l/h and 2 us400 pop up sprinklers covering at most 1.8m radius, maximum pressure o 2.1m and flow of 4.5l/h at most discharging water. I dont have a background with programming , so how best can i code my sensors to detect variation in set threshold

hope its possible

regards

Annex

Hi! Welcome to the Arduino forum :3

The sensor you are using contains a little pinwheel that moves faster or slower depending on how much water is going through - and pushing the wheel - to measure if water is flowing or not. The faster the wheel moves, the higher reading it will give.

The page for the YF-S201s on HobbyTronics has some example Arduino code here.

Hope that helps! :)

thank you for responding. Well The approach taken in my project is based on trying to make a leak detection system that is able to be run real-time, meaning no external data calculations, and be able to ring a buzzer if there is an imbalance created from the reading at the base pipe and a lesser mass of fluids at the exit pipe. Due to cost and field instrumentation availability, only flow rate sensors would be used as the tool to measure the flow rate. Using flow meters only would mean a lack of redundancy but the project itself is not trying to prove a method but to simulate a type of system. Because of this, the type of system chosen is an internally based leak detection system that uses a combination flow monitoring and balancing methods. These methods in particular would mean that the project did not focus on finding an exact location of a leak on a pipe but instead figuring out if a system in a pipeline run could infer a leak and alarm the operator. The system itself would be an algorithm written to gather the data between the two points to help infer the leak.

i have tried using the code you posted but its working for one flow rate sensor whilst im trying to detect the leak using two sensors at the same time and also the buzzer.

If you are a beginner with Arduino, one step at a time!

First learn to read the flow sensor and how to interpret the numbers. The sensor readings will vary, even for perfectly constant flow, and you will need to take those variations into account.

The numbers will also give you some perspective on what you can realistically accomplish -- you probably won't be able to detect a pinhole leak.

I dont have a background with programming , so how best can i code my sensors to detect variation in set threshold

You can spend the time learning Arduino programming (base language is C) which if you're sharp you can get to the do many things at once stage in a couple-three months of 2 to 4 hours a day... or you can go to the Gigs and Collaborations section and find someone to do the writing for you.