Water Flow Sensor Arduino
Connecting the water flow sensor to arduino requires minimal interconnection.
Water flow sensor arduino. Connect the vcc red and gnd black wires of the water flow sensor to the 5v and gnd of arduino and link pulse output yellow wire of the water flow sensor to arduino s digital pin 2. In this tutorial we will be hooking up a flow sensor to an arduino uno to measure liquid flow. The water flow sensor used in this project is shown in the image below. The water flow sensor consists of a plastic valve body a water rotor and a hall effect sensor.
The water flow sensor is integrated with a magnetic hall effect sensor which generates an electric pulse with every revolution. It has three wires namely 5v red gnd black and output yellow. Arduino have to count the number of pulses outputted by the water flow sensor. The picture of the yfs201 sensor module alone is shown below.
For this purpose using interrupts is a best choice. Lets begin and make circuit i will explain the code and circuit later. Its design is in such a way that the hall effect sensor is sealed off from the water and allows the sensor to stay safe and dry. So for the pulses counting we will be using the arduino s hardware interrupt 0.
People often use water flow sensor for automatic water heater control diy coffee machines water vending machines etc. In the above circuit i attached the pulse output pin of flow sensor to arduino digital pin 3. The hall effect sensor outputs the corresponding pulse signal. This type of flow sensor is designed to measure the volume of liquid traveling past a given point a great way to keep tabs on how much water your drip irrigation system is using or any other project were the flow of liquid needs to be tracked.
The water flow sensor 5v pin is connected with the arduino s 5 volts the ground pin of the water flow sensor is connected with the arduino s ground and the signal wire is connected with the arduino s pin number 2 which is the interrupt pin. When the water flows through the rotor rotor rolls and the speed of it changes with a different rate of flow. In this tutorial you will learn how to use one water flow sensor with an arduino board.