0% found this document useful (0 votes)
17 views9 pages

Iot Weather

The document describes an IoT weather monitoring system using the ESP8266 Wi-Fi module and DHT11 sensor for real-time meteorological data collection. It includes details on circuit diagrams, components, Arduino wiring, and source code for implementation. The system is positioned as a cost-effective solution with potential applications in smart homes, agriculture, and environmental monitoring, highlighting future advancements in AI and machine learning for improved weather predictions.

Uploaded by

Abhinav Gurijala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views9 pages

Iot Weather

The document describes an IoT weather monitoring system using the ESP8266 Wi-Fi module and DHT11 sensor for real-time meteorological data collection. It includes details on circuit diagrams, components, Arduino wiring, and source code for implementation. The system is positioned as a cost-effective solution with potential applications in smart homes, agriculture, and environmental monitoring, highlighting future advancements in AI and machine learning for improved weather predictions.

Uploaded by

Abhinav Gurijala
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

CHAPTER 5

IOT WEATHER MONITORING SYSTEM

An IoT weather monitoring system utilizing the ESP8266 Wi-Fi module


enables real-time collection and remote access of meteorological data. The ESP8266, a low-
cost Wi-Fi chip with full TCP/IP stack capabilities, serves as the system's backbone,
facilitating seamless data transmission over the internet.

CIRCUIT DIAGRAM

COMPONENTS AND SUPPLIES

SL.N NAME OF THE COMPONENT QUANTITY


O
1 ESP 8266 NODE MCU 01
2 16*2 LCD DISPLAY 01
3 DHT11 01
4 THINGSPEAK IOT PLATFORM 01

61
ARDUINO WIRING

DHT11 ESP 8266


VCC 3.3V
GND GND
DATA D2

16*2 LCD DISPLAY ESP 8266


Vcc VIN
GND GND
SCL SCL
SDA SDA

ARDUINO SOURCE CODE

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x3F for a 16 chars and 2 line
display

#include <DHT.h> // Including library for dht

#include <ESP8266WiFi.h>

String apiKey = "C3NJFQNUQYY5AGTZ"; // Enter your Write API key from


ThingSpeak

62
const char *ssid = "Mywifi"; // replace with your wifi ssid and wpa2 key

const char *pass = "66666666";

const char* server = "api.thingspeak.com";

#define DHTPIN 0 //pin where the dht11 is connected

DHT dht(DHTPIN, DHT11);

WiFiClient client;

void setup()

lcd.init();

lcd.clear();

lcd.backlight(); // Make sure backlight is on

lcd.setCursor(2,0); //Set cursor to character 2 on line 0

lcd.print("welcome");

Serial.begin(115200);

delay(10);

dht.begin();

Serial.println("Connecting to ");

Serial.println(ssid);

63
WiFi.begin(ssid, pass);

while (WiFi.status() != WL_CONNECTED)

delay(500);

Serial.print(".");

Serial.println("");

Serial.println("WiFi connected");

void loop()

float h = dht.readHumidity();

float t = dht.readTemperature();

lcd.clear();

lcd.setCursor(0,0); //Set cursor to character 2 on line 0

lcd.print("Temperature:");

lcd.print(t);

lcd.setCursor(0,1); //Set cursor to character 2 on line 0

lcd.print("Humidity:");

lcd.print(h);

64
if (isnan(h) || isnan(t))

Serial.println("Failed to read from DHT sensor!");

return;

if (client.connect(server,80)) // "184.106.153.149" or api.thingspeak.com

String postStr = apiKey;

postStr +="&field1=";

postStr += String(t);

postStr +="&field2=";

postStr += String(h);

postStr += "\r\n\r\n";

client.print("POST /update HTTP/1.1\n");

client.print("Host: api.thingspeak.com\n");

client.print("Connection: close\n");

client.print("X-THINGSPEAKAPIKEY: "+apiKey+"\n");

client.print("Content-Type: application/x-www-form-urlencoded\n");

client.print("Content-Length: ");

65
client.print(postStr.length());

client.print("\n\n");

client.print(postStr);

Serial.print("Temperature: ");

Serial.print(t);

Serial.print(" degrees Celcius, Humidity: ");

Serial.print(h);

Serial.println("%. Send to Thingspeak.");

client.stop();

Serial.println("Waiting...");

// thingspeak needs minimum 15 sec delay between updates

delay(1000);

66
RESULTS AND OUTPUT SCREENS

67
CHAPTER 6
CONCLUSION

The ESP8266 + DHT11 weather monitoring system provides an excellent


foundation for creating low-cost, scalable, and efficient IoT solutions. Its combination of Wi-
Fi connectivity (via ESP8266) and environmental sensing (via the DHT11 sensor) offers a
versatile platform for a wide range of applications, from smart home systems and agriculture
to industrial monitoring and personal weather stations.

The future scope of IoT weather monitoring systems is vast, with advancements in
AI and machine learning enhancing weather predictions and disaster management. These
systems will play a critical role in smart cities, agriculture, and environmental monitoring by
providing real-time, personalized weather data. IoT weather sensors will integrate with smart
homes, renewable energy, and autonomous systems for more accurate data collection. With
lower costs and greater accessibility, IoT-based weather systems will offer improved global
climate monitoring and better preparedness for natural disasters, benefiting industries and
communities alike.

68
REFERENCE:

 https://www.arduino.cc/en/software/

 https://docs.arduino.cc/language-reference/

 https://thingspeak.mathworks.com/login?skipSSOCheck=true

 https://www.electronicsforu.com/category/electronics-projects/hardware-diy

 https://www.wikipedia.org/

69

You might also like