Water Flow Meter Arduino
In this tutorial you will learn how to use one water flow sensor with an arduino board.
Water flow meter arduino. If you are using seeeduino grove base shield just plug the water flow sensor to the d2 connecter. Water flow sensor connect with arduino software code. In this project we are going to build a water flow sensor using arduino. For this particular project we are going to use the yf s201 water flow sensor which uses a hall effect to sense the flow rate of the liquid.
The water flow sensor for flow rate volume measurement using arduino works on the principle of the hall effect. The hall effect sensor outputs the corresponding pulse signal. In this tutorial i am going to teach you about how to use arduino flow meter to measure the amount of water passing through the water valve. This project is using arduino microcontroller with hall s effect based water flow sensor yf s201 and lcd is to display output.
Of course you can use digitalread in the loop function to read the output of the water flow sensor. This is used to read the pulses coming from the flow meter. Configures interrupt 0 pin 2 on the arduino uno to run the function flow void loop put your main code here to run repeatedly. Void setup put your setup code here to run once.
According to the hall effect a voltage difference is induced in a conductor transverse to the electric current and the magnetic field perpendicular to it. The code uses an external interrupt on the arduino s digital pin 2. Water flow sensor measure on 16x2 lcd display arduino project hub water flow sensor measure on 16x2 lcd display gpl3 in this project use the yf s201 1 2 inch water flow sensor to measure the water flow rate l min and display it on an lcd. Enables interrupts on the arduino delay 1000.
Flowmeter is an arduino library that provides calibrated flow and volume measurement with flow sensors. Flow meter is actually a valve. When the water flows through the rotor rotor rolls and the speed of it changes with a different rate of flow. One can control the valve manually and digitally in order to limit the flow of water through the pipe.
Arduino based digital water flow meter using yf s201 hall effect sensor diy water flow meter is an automatic system for measurement of water flow. When the water or air flows through the sensor the fans inside the sensor rotate and counts the fluid flow per minute. Sensor is using hall s effect. You can use it to count flow and volume of liquids and gases although the documentation focuses on applications using liquids and can support multiple flow sensors at the same time.
Uploading the flow meter code to the arduino and measuring water flow rate upload the flow meter code to your arduino. The water flow sensor consists of a plastic valve body a water rotor and a hall effect sensor. Reset the counter so we start counting from 0 again interrupts. If you are using other arduino board please use jumper cables to connect to the right pin.
Wait 1 second nointerrupts. Sets the pin as an input attachinterrupt 0 flow rising.