Sie sind auf Seite 1von 18

SENSITIVE CANS AND SAFE STORAGE

SYSTEM
PROJECT REPORT
TAGORE INTERNATIONAL SCHOOL
EAST OF KAILASH
(IOT BASED PROJECT)
INDEX

 INTRODDUCTION
 HARDWARE REQUIREMENT
 SOFTWARE REQUIREMENT
 WORKING OF MODEL
 PROJECT CODING
 BIBLIOGRAPHY
IOT ITEM MONITORINGSYSTEM
Introduction
This project IOT ITEM MONITORING
system is a very innovative system
which will help people to know about
the amount of items in their home.
This system monitors the cans and
informs about the level of items left in
the can through a web server.
HARDWARE REQUIREMENT
 ARDUNIO UNO BOARD
 WIFI MODULE-esp8266
 ULTRASONIC SENSORS
 POWER SUPPLY
 LAPTOP
 MOBILE
 CANS

SOFTWARE REQUIREMENT
 ARDUINO SOFTWARE
 WEBSERVER
 PHP
WORKING OF THE MODEL
For this the system uses ultrasonic sensors
placed over the CANS to detect the ITEMS
level and compare it with the CANS depth.
The system makes use of Arduino UNO
microcontroller ANDWi-Fi modem for sending
data. The LCD screen/Mobile Screen is used to
display the status of the level of items in the
CANS. Whereas a web page is built to show
the status to the user monitoring it.
The web page gives a graphical view of the
CANS and highlights the ITEMS collected in
color in order to show the level of items in the
CANS.
The LCD screen/Mobile shows the status of
the garbage level. The system puts on the
buzzer when the level of items collected is
below the set limit. Thus this system helps
people to know the quantity of items in their
home
Block Diagram
CODING
#include <SoftwareSerial.h>
constinttrigPin = 13;
constintechoPin = 12;
//long duration;
int distance;
String ssid = "ahadlakshit";
String password= "ahadnadeem";
String data;
String server = "www.kitchenking.co.nf";
// www.example.com
String uri = "/update.php";
charmsg;
SoftwareSerialmySerial(2, 3);
SoftwareSerialesp(2,3); // RX, TX

void setup(){
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(buzzer,OUTPUT);
esp.begin(115200);
Serial.begin(115200);
mySerial.begin(9600);
Serial.println("GSM SIM900A BEGIN");
reset();
connectWifi();}

void loop(){
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10
micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound
wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
// Calculating the distance
distance = duration*0.034/2;
if(distance<4){
data = "level=2";
tone(buzzer, 2000); // Send 1KHz sound
signal...
delay(2000); // ...for 1 sec
noTone(buzzer); // Stop sound...
SendMessage();
if (mySerial.available()>0)
Serial.write(mySerial.read());
delay(1000);
}else if(distance>4&&distance<=8){
data = "level=1";
tone(buzzer, 2000); // Send 1KHz sound
signal...
delay(2000); // ...for 1 sec
noTone(buzzer); // Stop sound...
delay(1000);
}else{
data = "level=0";
delay(1000);
}
senddata();
delay(3000);
}

void reset(){
esp.println("AT+RST");
delay(1000);
if(esp.find("OK") ) Serial.println("Module
Reset");
}

voidconnectWifi(){
String cmd = "AT+CWJAP=\""
+ssid+"\",\"" + password + "\"";
esp.println(cmd);
delay(4000);
if(esp.find("OK")) {
Serial.println("Connected!");
}else{
connectWifi();
Serial.println("Cannot connect to wifi");
}
}
voidsenddata(){
esp.println("AT+CIPSTART=\"TCP\",\"" +
server + "\",80");//start a TCP connection.
if(esp.find("OK")) {
Serial.println("TCP connection ready");
}
delay(1000);
String postRequest = "POST " + uri + "
HTTP/1.0\r\n" + "Host: " + server + "\r\n"
+ "Accept: *" + "/" + "*\r\n" + "Content-
Length: " + data.length() + "\r\n" +
"Content-Type: application/x-www-form-
urlencoded\r\n" + "\r\n" + data;
String sendCmd = "AT+CIPSEND=";
//determine the number of cracters to be
sent.
esp.print(sendCmd);
esp.println(postRequest.length() );
delay(500);
if(esp.find(">")){
Serial.println("Sending..");
esp.print(postRequest);
if(esp.find("SEND OK")){
Serial.println("Packet sent");
while (esp.available()) {
String tmpResp = esp.readString();
Serial.println(tmpResp);
}
esp.println("AT+CIPCLOSE");
}
}
}
voidSendMessage(){
mySerial.println("AT+CMGF=1"); //Sets
the GSM Module in Text Mode
delay(1000); // Delay of 1000 milli seconds
or 1 second
mySerial.println("AT+CMGS=\"+918130891
766\"\r");
delay(1000);
mySerial.println("I am full please vacate
me");
delay(100);
mySerial.println((char)26);// ASCII code of
CTRL+Z
delay(1000);
}
BIBLIOGRAPHY
https://i.ytimg.com/vi/lCf-
Mbis48I/maxresdefault.jpg

Das könnte Ihnen auch gefallen