Water flow measurement using water flow sensor with Raspberry Pi

Call for Price

Water flow measurement using water flow sensor with Raspberry Pi

SKU: Water flow measurement using Raspberry Pi Category:

Description

ABSTRACT

Raspberry Pi beginner to learn about the interrupt, which this project is based on water flow measurement using Flow sensor, which is a pulse type of sensor, contains wheel inside the sensor, rotates on the flow of water, so that by counting the number of revolution of flow wheel we can able to measure the flow speed of the water. Here we interfaced the flow sensor with Raspberry Pi, which the reading obtaining is in the form of a pulse as an interrupt. So that count of the pulse gets increased based on the pulse, so if the count is large, it is identified that flow speed is faster. If it is less count, it is assumed that revolution is slow because the water flow is slow on passing across the flow sensor.

HARDWARE REQUIRED

  • Raspberry Pi
  • SD card
  • Power supply
  • VGA to HDMI converter (Optional)
  • Flow sensor

SOFTWARE REQUIRED

  • Raspbian Stretch OS      
  • SD card Formatter
  • Win32DiskImager (or) Etcher

PYTHON LIBRARIES USED

  • RPi.GPIO as GPIO (To access the GPIO Pins of Raspberry Pi)
  • Time library (For Time delay)
  • sys

CODE

import RPi.GPIO as GPIO
import time, sys
pulse_pin = 25
GPIO.setmode(GPIO.BCM)
GPIO.setup(pulse_pin, GPIO.IN, pull_up_down = GPIO.PUD_UP)
def countPulse1(channel):
        count+=1
        print("Number of revolution of wheel of flow sensor:")
        print(count)
GPIO.add_event_detect(pulse_pin, GPIO.RISING, callback=countPulse1)

try:
        while True:
                print("Inside while starting")
                time.sleep(10)
                print("Inside while ending")
                time.sleep(10)
except KeyboardInterrupt:
        print '\ncaught keyboard interrupt!, bye'
        GPIO.cleanup()
        sys.exit()

Additional information

Weight 0.000000 kg

Reviews

There are no reviews yet.

Be the first to review “Water flow measurement using water flow sensor with Raspberry Pi”

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.