GithubHelp home page GithubHelp logo

talhatallat / water-quantity-measurement Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 2.56 MB

Measures the water level in the tank using an ultrasonic sensor

C++ 100.00%
ultrasonic-sensor water-level water-monitoring arduino-nano capacity distance water-tank height-of-the-tank radius-of-the-tank speed-of-sound

water-quantity-measurement's Introduction

Water Quantity Measurement using Ultrasonic Sensor View Project

Project Details:

This project measures the water level in the tank using ultrasonic sensor

20201124_112849

Device

image

Ultrasonic Water measurement system measures the distance of the water in cm & inches.

Arduino Nano is programmed to read Ultrasonic values and calculates the distance in cm and volume in litres. LCD displays the volume and distance of the water level in the container without using the serial monitor

What is Ultrasonic?

Ultrasonic sensor HC-SR04 is a sensor that can measure distance. It emits ultrasound at 40kHz which travels through the air and if there is an object or obstacle on its path it will bounce back to the module. We can calculate the distance if we know the travel time and speed of the sound.

image

The HC-SR04 Ultrasonic Module has 4 pins, VCC, Trig, Echo and Ground. The Ground and the VCC pins of the module needs to be connected to the Ground and the 5 volts pins on the Arduino Board respectively and the trig and echo pins to any Digital I/O in the Arduino Board.

HC-SR04-PINOUT

Pictorial Circuit Diagram

The LCD display is added to the system which displays distance and volume of the tank in Litres.

UltraSonic

Specifications

image

To generate the ultrasound, the Trig is set on a High State for 10 µs. That will send out an 8 cycle sonic burst which will travel at the speed sound and it will be received in the Echo pin. The Echo pin will output the time in microseconds the sound wave travelled.

image

If the object is 20.5 cm away from the sensor, and the speed of the sound is 340 m/s or 0.034 cm/µs the sound wave will need to travel about 602.9 u seconds. But what you will get from the Echo pin will be double that number because the sound wave needs to travel forward and bounce backwards. So in order to get the distance in cm, multiply the received travel time value from the echo pin by 0.034 and divide it by 2.

Calculations

image

Capturee

height (h) = 20.5cm

radious (r) = 5.45cm

distance(d) = t * 0.034/2

Water level height (wlh) = h - d

Volume (v) = pair^2 wlh

Capacity in litre = v/1000

	Enter height of the tank =	20.5	cm		
	Enter radius of the tank =	5.45	cm		
					
	speed of sound =	0.034	cm/us		
					
	if (t)	d (cm)	wl h	volume (cm^3)	Capacity 
	0	0	20.5	1912.92	1.91
	100	1.7	18.8	1754.29	1.75
	200	3.4	17.1	1595.65	1.60
	300	5.1	15.4	1437.02	1.44
	400	6.8	13.7	1278.39	1.28
	500	8.5	12	1119.76	1.12
	600	10.2	10.3	961.13	0.96
	700	11.9	8.6	802.49	0.80
	800	13.6	6.9	643.86	0.64
	900	15.3	5.2	485.23	0.49
	1000	17	3.5	326.60	0.33
	1100	18.7	1.8	167.96	0.17
	1200	20.4	0.1	9.33	0.01

image

water-quantity-measurement's People

Contributors

talhatallat avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.