Interfacing Water Flow Sensor with Arduino

Interfacing Water Flow Sensor with Arduino

Interfacing Water Flow Sensor with Arduino

Water Flow Sensor is used to determine the amount of water flowing through a certain pipe/ area.

Interfacing Water Flow Sensor with Arduino

Connections with Arduino:

Sensor Wire color Arduino Pins
Black GND
Green/ Red 5V
Yellow/ Orange 2

 

Arduino Code:

This code uses interrupts, which changes with the type of Arduino board. The information regarding Arduino interrupts can be obtained from here.

Board Digital Pins Usable For Interrupts
Uno, Nano, Mini, other 328-based 2, 3
Mega, Mega2560, MegaADK 2, 3, 18, 19, 20, 21
Micro, Leonardo, other 32u4-based 0, 1, 2, 3, 7
Zero all digital pins, except 4
MKR1000 Rev.1 0, 1, 4, 5, 6, 7, 8, 9, A1, A2
Due all digital pins
101 all digital pins

 

Here, we have used Interrupt zero (0) on Arduino Uno/ Mega, means we need to connect signal pin to digital pin 2 of Arduino.

 

Results/ Output:

Interfacing Water Flow Sensor with Arduino

Related Links:

Leave a Reply

Your email address will not be published. Required fields are marked *