Shubham Rai
Shubham Rai
JODHPUR INSTITUTE OF
ENGINEERING & TECHNOLOGY
Guided by
1
Title of the Project:- Weather Monitoring
Signature of Approver:
Date:
For Office Use Only
Ms. Anamika Banerjee
2
Project Proposal Evaluator
DECLARATION
We hereby declare that the project work being presented in the proposal
entitled “Weather monitoring ” in partial fulfilment of the requirements for
the award of the degree of Bachelor of Technology at Ardent Computech
Pvt. Ltd, Salt lake, Kolkata, West Bengal is an authentic work carried out
under the guidance of Ms. Anamika Banerjee. The matter embodied in this
project work has not been submitted elsewhere for the award of any degree of
our knowledge and belief.
3
CERTIFICATE
This is to certify that this proposal of minor project entitled “WEATHER
MONITORING ” is a record of bonafide work, carried out by SHUBHAM
KUMAR RAI under my guidance at ARDENT COMPUTECH PVT LTD.
In my opinion, the report in its present form is in partial fulfilment of the
requirements for the award of the degree of
BACHELOR OF TECHNOLOGY and as per regulations of the
ARDENT®. To the best of my knowledge, the results embodied in this report,
are original in nature and worthy of incorporation in the present version of the
report.
Guide / Supervisor
-------------------------------
Ms. Anamika Banerjee
4
ACKNOWLEDGEMENT
Success of any project depends largely on the encouragement and guidelines
of many others. I take this sincere opportunity to express my gratitude to the
people who have been instrumental in the successful completion of this project
work.
Words are inadequate in offering our thanks to the other trainees, project
assistants and other members at Ardent Computech Pvt. Ltd. for their
encouragement and cooperation in carrying out this project work. The
guidance and support received from all the members and who are contributing
to this project, was vital for the success of this project.
5
07
1.
08
2.
09-22
3.
DTH sensor
23
4.
Code 24-25
5.
26-28
6.
Future Scope 29
7.
8. Reference
9. Conclusion
6
INTRODUCTION
7
COMPONENTS USING IN WEATHER MONITORING
1. NODEMCU (ESP8266)
2. DHT SENSOR
3. BREADBOARD
4. JUMPER WIRES
8
9
10
11
12
13
14
15
SERIAL COMMUNICATION:-
The ESP8266 supports serial communication, which allows it to communicate with a devices
using the UART (Universal Asynchronous Receiver/Transmitter interface. Here’s other brief
overview of how serial communication works with ESP8266:
UART PINS:- The ESP8266 has several GPIO pins that can be used for serial communication.
These pins are typically labeled TX (transmit) and RX (receive).
Serial Library:- To use serial communication with the ESP8266, you can use the Serial library
in the Arduino IDE of other development environments. This library provides functions for
sending and receiving serial data.
Baud Rate:- When using serial communication , you need to specify the baud rate, which
determines the speed of communication. The ESP8266 supports baud rates ranging from 300 to
115200 baud.
Serial Begin:- To initialize serial communication, you use the Serial.begin() function ,
specifying the desired baud rate. For example – Serial.begin(9600): initializes serial
communication at a baud rate of 9600.
Serial.print() and Serial.println():- These functions are used to send data over the serial
connection. Serial,print() sends data as is, while Serial.println() adds a newline character at the
end of the data.
Serial.read():- This function reads incoming serial data. It returns the next byte of incoming
data, or -1 if no data is available.
Serial.available():- This function returns the number of bytes available for reading from the
serial buffer.
16
Here’s the basic example of how to use serial communication with the ESP8266:-
cpp
void setup() { Serial.begin(9600);
} void loop()
{
if (Serial.available()>0) { char
incomingByte = Serial.read();
Serial.print()(“Received:”);
Serial.println(incomingByte);
}
}
17
18
Thingspeak IoT: ThingSpeak is an IoT analytics platform service that allows you to
aggregate, visualize, and analyze live data streams in the cloud. You can send data to
ThingSpeak from your devices, create instant visualization of live data, and send alerts.
19
20
Set up a Weather Monitoring System
This project is useful where you have to find the temperature and humidity in the air. If
you understand the concept of this project then you can modify the code and make other
different projects out of it.
This project can print the values of the temperature and humidity on the
serial monitor screen.
When to provide the power to the nodemcu then the sensor starts working
and continuously print the values on the serial monitor.
dht11 sensor with esp8266 is a good combination for IOT Project.
The temperature values are in degrees Celsius and the humidity values are
in percentage.
We use the read temperature function for taking the readings of the
temperature and read humidity function for taking the values of the
humidity.
The thing about this sensor is that it is easy to use and small in size also. It
can calculate the humidity and temperature with the help of electrodes
present inside its plastic casing.
Check the IOT Weather Monitoring project made by us using a nodemcu
board.
Components:
NodeMcu
DHT Sensor
Breadboard (optional)
Jumper Wire
21
CIRCUIT DIAGRAM:
22
CODE:-
##define BLYNK_TEMPLATE_ID "TMPL3p3SjvEee"
#define BLYNK_TEMPLATE_NAME "weather monitoring"
#define BLYNK_AUTH_TOKEN "MJMSH-vJFZZV2cEf11UVqtVLj_J1hZFq"
#include <Servo.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <DHT.h>
void setup() {
// Debug console
Serial.begin(115200);
dht.begin();
Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
}
void loop() {
Blynk.run();
if (isnan(humidity) || isnan(temperature)) {
Serial.println("Failed to read from DHT sensor!");
23
return;
}
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
Serial.print("Humidity: ");
Serial.print(humidity);
Serial.println(" %");
Blynk.virtualWrite(V3, humidity);
Blynk.virtualWrite(V4, temperature);
24
How this Flood Monitoring System Works?
We have used ESP8266 NodeMCU to build many IoT projects before. The block
diagram above shows the working of this IoT based flood monitoring system
using the NodeMCU and IoT Platform. Here, the Ultrasonic sensor is used to
detect river water levels. The raw data from the ultrasonic sensor is fed to the
NodeMCU, where it is processed and sent to ThingSpeack for graphical
monitoring and critical alerts. Here, the red LED and Buzzer is used to send an
alert in a flooded condition. While Green LED is used for indicating Normal
condition. are used to be alert in severe flood conditions, and green LEDs are
used to indicate normal conditions.
25
Future Scope of this Project:-
• Increased Accessibility and Affordability:-
Cost-Effective Solutions: NodeMCU, being a low-cost microcontroller, makes it affordable for
more users to implement home automation.
DIY Enthusiasts: The simplicity of setting up NodeMCU with Blynk encourages hobbyists and
DIY enthusiasts to create their own smart home solutions.
IoT Ecosystem Integration: NodeMCU can easily integrate with various IoT platforms and
devices, providing seamless connectivity within the smart home ecosystem.
Support for Multiple Protocols: The ability to support multiple communication protocols
(WiFi, MQTT, HTTP) ensures compatibility with a wide range of devices.
Real-Time Alerts: Home security systems can send real-time notifications to homeowners in
case of unauthorized access or anomalies.
Remote Monitoring: DTH sensors integrated with NodeMCU and Blynk can provide remote
surveillance capabilities.
26
REFERENCES:-
An early warning system for flood detection using critical slowing down.
How to Interface the GSM Module with Arduino-Send and Receive SMS.
A Real Time Solution to Flood Monitoring System using thingspeak and Wireless
Sensor Networks
In this we took help from Google and also took help from our mentor Anamika Ma'am
and this project has become successful.
27
CONCLUSION
28