Professional Documents
Culture Documents
Sensor Based Project To Detect Flood
Sensor Based Project To Detect Flood
1. ATMEGA16
2. ULTRASOUNDSENSOR(ONLY FOR PROTOTYPING)
3. TEMPERATURE SENSOR
4. WIFI-MODULE
5. THINGSPEAK CLOUD
6. MATHWORKS
7. ANDROID STUDIO
8. AVR STUDIO
COST INCURRED IN DEVELOPING
THE PROJECT
• AVR MICROCONTROLLER
KIT-900RS
• TEMPERATURE SENSOR-
200RS
• ULTRASOUND SENSOR-
100RS
CURRENT PROBLEM IN INDUSTRY
Sensors
❏ Pressure Sensor (for practical use) : A column of water of a specific
height will always exert the same amount of pressure on a transducer
and because weight is a force, and pressure is force applied over an
area, in this case the area of the transducer is known, we can take the
pressure reading from the transducer and translate it into a level.
Contd....
❏ Ultrasonic Sensor (or prototype purpose) : It is a contactless method of
measuring fluid level. We transmit short ultrasonic pulse and we
measure travel time of that pulse from the transceiver to liquid and
back to transceiver, ultrasonic pulse will bounce from liquid level
since because change of density of ultrasonic pulse travel medium
(ultrasonic pulse first travel through air and bounce of liquid with higher
density than air), because water has higher density, majority of pulse
will bounce off.
Contd….
❏ Temperature Sensor(resistor and transistor) : When there is increase
in temperature to th level where it crosses the threshold set by Pot,
then the collector current increase and LED starts illuminating. If we
keep voltage source constant, then the voltage across transistor
becomes function of the temperature.
Code Analysis
❏ This code is used to interface the temperature sensor and ultra
sound sensor to collect the data and send it to the cloud through
wifi module.
❏ Header Files used:
#include<avr/io.h>
#include<avr/interrupt.h>
#include<stdlib.h>
#include<stdio.h>
#include<util/delay.h>
#include<”uart.h”>
Functions Used
❏ request( ):
Requesting micro-controller to send a starting pulse to the
temperature sensor.
❏ response( ):
Receives response signal from the temperature sensor.
❏ ISR( ):
To increment timer overflow count.
Contd….
❏ distance( ):
To collect the data from ultrasound sensor(done by the function
Receive_data( )) and calculate the distance using mathematical
expressions.
Distance = (Speed of sound x time taken to receive the pulse)/2
❏ Recieve_data( ):
To collect the data from ultrasound sensor
❏ main( ):
We call all functions to do their work and send the data to the
cloud.
Contd….
❏ App Features: As the app is opened, the first screen contains two
options i.e the statistical report of water level from thingspeak and
the nearest high-level area locations. The data gets updated for every
5 minutes from AVR Atmel to thingspeak platform and that is
directed to the app. According the data , when the water level exceeds
certain height an alarm is triggered through the app and an
emergency message is send to the listed contacts.
Flow Chart representation
Ultrasonic sensor Temperature sensor
Micro
Controller(AVR
Atmel)
Wifi Module
Thingspeak
https://youtu.be/BkJLRbKRMAI