Skip to content

This project deals with development of IoT device for weather-forecasting

Notifications You must be signed in to change notification settings

karthikeyan1134/IoT-Based-Weather-Monitoring-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

IoT-Based-Weather-Monitoring-System

Overview

This project is a IoT-Based-Weather-Monitoring-System designed to collect, process, and analyze weather data in real time. It integrates sensor data with geolocation information and uploads the data to an AWS RDS database and ThingSpeak for further processing and visualization. This platform is part of a larger system aimed at forecasting weather patterns and analyzing climate trends.

Features

  • Real-Time Data Collection: Collects temperature, humidity, and geolocation data from sensors.
  • Database Integration: Stores collected data into an AWS RDS MySQL database for persistent storage and future analysis.
  • ThingSpeak Integration: Uploads real-time weather data to ThingSpeak for visualization and monitoring.
  • Geolocation Services: Utilizes Google Geolocation API to obtain accurate coordinates based on nearby Wi-Fi access points.
  • Own GPS Sensor: This program does not require any GPS sensor. It uses geolocation and a custom header file, nearest_city.h, to replace the need for a GPS sensor.
  • Modular Design: Easily extendable and adaptable to different hardware setups and data processing needs.

Hardware Requirements

  • ESP8266 or ESP32 Microcontroller
  • DHT11 Temperature and Humidity Sensor
  • Wi-Fi Access
  • AWS RDS Instance (MySQL Database)
  • Google Cloud Account for Geolocation API
  • ThingSpeak Account

Software Requirements

  • Arduino IDE
  • MySQL Connector for Arduino
  • ArduinoJson Library
  • ESP8266WiFi Library (or WiFi Library for ESP32)
  • ESP8266HTTPClient Library (or HTTPClient Library for ESP32)

Setup Instructions

  1. Clone the Repository:
    git clone https://github.com/karthikeyan1134/IoT-Based-Weather-Monitoring-System.git
    cd IoT-Based-Weather-Monitoring-System
  2. Configure the Project:
    • Open the project in Arduino IDE.
    • Replace the placeholders in the code with your actual credentials:
      • Wi-Fi SSID and Password
      • Google Geolocation API Key
      • AWS RDS MySQL database endpoint, username, and password
      • ThingSpeak API Key
  3. Upload the Code:
    • Connect your ESP8266/ESP32 microcontroller to your computer.
    • Select the correct board and port in Arduino IDE.
    • Upload the code to the microcontroller.
  4. Run the System:
    • Once the code is uploaded, the system will start collecting data from the DHT11 sensor.
    • The geolocation data will be fetched using the Google Geolocation API.
    • The collected data will be uploaded to the AWS RDS database and ThingSpeak for storage and visualization.

Code Structure

  • geolocation.h: Handles the Wi-Fi connection and geolocation data fetching using Google Geolocation API.
  • nearest_city.h This header file defines structures and functions for geographic computations, including finding the nearest city to a given location using the Haversine formula and CSV data.
  • IN.csv This file includes over 6,56,678 places with their latitudes & longitudes accross all over indian (*Reference from GeoNames)
  • main.c++: The main file that integrates all components, collects sensor data, and manages data uploads to the database and ThingSpeak.
  • config.h: Contains configuration parameters like API keys, database credentials, etc. (Optional, depending on your setup).

AWS RDS Database Schema

  • Table: weather
    • device_id: VARCHAR, ID of the device collecting data
    • temperature: FLOAT, temperature reading
    • humidity: FLOAT, humidity reading
    • latitude: FLOAT, latitude of the data point
    • longitude: FLOAT, longitude of the data point
    • nearest_place: VARCHAR, nearest place of the data point
    • timestamp: TIMESTAMP, the time the data was recorded

Future Enhancements

  • Integration of additional sensors (e.g., wind speed, pressure).
  • Implementation of predictive analytics and weather forecasting models.
  • Development of a web-based dashboard for real-time monitoring and data visualization.
  • Expansion of the system to support multiple devices and locations.

Releases

No releases published

Packages

No packages published

Languages