PROJECTREPORT Removed
PROJECTREPORT Removed
Motivation
The motivation behind developing a weather monitoring system
using the ESP8266 and Arduino UNO microcontrollers stems from the
increasing need for real-time environmental data. With climate
change and urbanization significantly affecting weather patterns,
accurate monitoring has become essential for agriculture, disaster
management, and public safety. This project aims to provide
accessible, remote data collection, enabling users to make informed
decisions based on current weather conditions. By integrating various
sensors, we can gather comprehensive information on temperature,
pressure, and light intensity, enhancing our understanding of real-
time weather dynamics. Additionally, this system fosters community
engagement by promoting awareness and proactive responses to
environmental changes. It empowers users to track local weather
trends, contributing to better resource management and
preparedness in the face of climate variability.
Applications
1. Agriculture:
- Optimize irrigation and fertilization schedules based on real-time
weather data.
- Monitor microclimate conditions to enhance crop yield and
quality.
2. Urban Planning:
- Assess environmental conditions for pollution control
5. Home Automation:
- Integrate with smart home systems to adjust heating, cooling, and
lighting based on weather conditions.
Methodology:
Components used:
Sr. Name of component Quantity
No.
1. ESP8266 1
2. Arduino UNO 1
3 LCD (16x2) 1
4. Temperature Sensor 1
5. Photoresistor 1
6. Pressure Sensor 1
7. Gas Sensor 1
8. Buzzer 1
9. RGB LED 1
10. Red LED 1
11. Blue LED 1
12. Potentiometer 2
13. Resistors (of different 9
value)
Description of Components:
➢ ESP8266: NodeMCU microcontroller is a major component of
the circuit. It is programmed to control the working of all the
sensors and relay the data hence collected to the mainframe
over Wi-Fi.
➢ Arduino UNO: It the major component of the circuit and
programable we use it to make other components work
accordingly.
➢ LCD (16x2): Its is used to show the stats of the weather
according to the reading of the different sensors. In the first
row we shows the temperature condition i.e., we display the
value of temperature sensor. In the second row we shows value
of photoresistor and gas sensors.
➢ Temperature Sensor: It is used to measure temperature and as
per the temperature value it will send data to Arduino board
and display it in the 1st row of lcd module.
➢ Photoresistor: It is used to detect the presence of light. Using
this sensor, we will be going to know whether it is day or night
or some cloudy surrounding.
➢ Pressure Sensor: It is used gauge the pressure of the
environment. here it does not have any important function in
this project.
➢ Gas Sensor: It is used to check the quality of the air and
accordingly it will display the result in the 2nd row of lcd
module.
➢ Buzzer: Used to alert about bad weather condition. That bad
weather condition includes variation of temperature, air quality.
➢ RGB LED: Used to know about the temperature condition.
• OFF – Normal Temperature
• Red – Hot Temperature
• Blue – Cold Temperature
➢ Red LED: Used as light source.
➢ Blue LED: Used as the indicator for abnormal pressure.
➢ Potentiometer: Used to control contrast of the LCD.
➢ Resistors (of different values): Used for providing resistance.
Code:
#include <LiquidCrystal.h>
int wLED = 9;
int rLED = 6;
int bLED = 7;
int gLED = 8;
int pLED = 13;
int piezo=10;
void setup()
{
Serial.begin(9600);
lcd.begin (16, 2);
pinMode(wLED, OUTPUT);
pinMode(rLED, OUTPUT);
pinMode(bLED, OUTPUT);
pinMode(gLED, OUTPUT);
pinMode(piezo, OUTPUT);
pinMode(pLED, OUTPUT);
void loop()
{
TsensorValue = analogRead(TMP);
if (temperatureC < 2)
{
digitalWrite(bLED, HIGH);
digitalWrite(rLED, LOW);
lcd.print("Cold temp");
tone(10, 300);
}
else
if (temperatureC >= 2 && temperatureC < 45 )
{
digitalWrite(bLED, LOW);
digitalWrite(rLED, LOW);
lcd.setCursor(0, 0);
lcd.print("Normal temp");
noTone(10);
}
else
{
digitalWrite(rLED, HIGH);
digitalWrite(bLED, LOW);
lcd.setCursor(0, 0);
lcd.print("Hot temp");
tone(10, 300);
}
LsensorValue = analogRead(LDR);
Serial.print("The light value is= ");
Serial.println(LsensorValue);
GsensorValue = analogRead(GAS);
Serial.print("Gas Sensor Value= ");
Serial.println(GsensorValue, DEC);
if (GsensorValue > 100)
{
tone(10,700);
lcd.setCursor(5,1);
lcd.print("& polluted");
}
PsensorValue = analogRead(PRS);
Serial.print("pressure Sensor Value= ");
Serial.println(PsensorValue, DEC);
if (PsensorValue > 100)
{
digitalWrite(pLED, HIGH);
Serial.println("air pressure is high");
}
else
{
digitalWrite(pLED, LOW);
}
Serial.println();
Serial.println();
Serial.println();
delay (5000);
Circuit diagram:
Result:
Simulation link:
https://www.tinkercad.com/things/5tV2FslGYll-weather-
monitoring-
system/editel?sharecode=cY4iPjAZDwAya_zn2m2ATeZQztDIz
Mu-iDx5vsa2lQQ
Conclusion: