Introduction
Weather monitoring is essential for numerous sectors including agriculture, transportation, disaster management, and urban planning. Accurate and timely weather data can significantly improve decision-making processes in these fields. However, traditional weather monitoring systems often fall short due to high costs, limited coverage, and inability to provide real-time data.
The "IoT Weather Reporting System using Raspberry Pi 5" harnesses IoT technology to develop a cost-effective, efficient weather reporting system. It monitors environmental parameters such as temperature, humidity, and atmospheric pressure — collecting data from sensors, processing it via Raspberry Pi, and transmitting it to a cloud server for real-time access through a web interface or mobile application.
Key Features
- Real-time collection of temperature, humidity, atmospheric pressure, wind speed, and rainfall data.
- Raspberry Pi 5 as the central processing unit interfaced with multiple environmental sensors.
- Data transmission to cloud via MQTT protocol for lightweight, reliable IoT communication.
- InfluxDB time-series database for efficient data storage and retrieval.
- Grafana dashboard for interactive real-time data visualization and alerts.
- Web interface (Flask/Django) and mobile app (React Native) for remote monitoring from anywhere.
Tools & Technologies
- Hardware: Raspberry Pi 5, DHT22 (Temp/Humidity), BMP280 (Pressure), Anemometer, Rain Gauge
- OS: Raspberry Pi OS (Debian-based)
- Programming: Python (RPi.GPIO, Adafruit_DHT, smbus2, paho-mqtt)
- Protocol: MQTT (Message Queuing Telemetry Transport)
- Database: InfluxDB (time-series), Grafana (visualization)
- Backend: Flask / Django (Web Framework)
- Frontend: HTML, CSS, JavaScript
- Mobile: React Native / Flutter
- Cloud: AWS / Azure / Google Cloud
- Version Control: Git / GitHub
System Design
The system is designed with a modular architecture ensuring flexibility and scalability. Data flows from physical sensors → Raspberry Pi → MQTT Broker → Cloud Server → InfluxDB → Grafana / Web Interface / Mobile App.
Block Diagram: Sensors → Microcontroller (Raspberry Pi) → GSM Modem → Display / Cloud
Implementations
- Hardware Setup — DHT22, BMP280, Anemometer, Rain Gauge connected to Raspberry Pi 5 GPIO pins. Assembled inside weatherproof enclosure.
- Sensor Scripts (Python) — Individual Python scripts for each sensor using Adafruit_DHT, smbus2/bme280, and RPi.GPIO libraries for data acquisition.
- Data Transmission (MQTT) — Processed sensor data published to Mosquitto MQTT broker every 60 seconds and forwarded to cloud server.
- Cloud Infrastructure — InfluxDB for time-series storage; Grafana for real-time dashboard and alerting; hosted on AWS/Azure/GCloud.
- Web Interface (Flask) — REST API endpoints exposing weather data; HTML/CSS/JS frontend for real-time data display.
- Mobile Application (React Native) — Cross-platform app fetching data from Flask API; displays live temperature, humidity, pressure readings.
Results & Discussion
The system was deployed and tested over a continuous 24-hour monitoring period. All sensors performed reliably with data successfully transmitted, stored, and visualized in real time. The system maintained high uptime with minimal data anomalies.
Sensor Readings — 24-Hour Sample Data
| Parameter | Sensor Used | Min Value | Max Value | Accuracy |
| Temperature | DHT22 | 20°C | 35°C | ±0.5°C |
| Humidity | DHT22 | 30% | 80% | ±2–5% |
| Atm. Pressure | BMP280 | 1000 hPa | 1020 hPa | ±1 hPa |
| Wind Speed | Anemometer | 0 m/s | 10 m/s | ±0.33 m/s |
| Wind Direction | Wind Vane | — | 16 directions | Analog |
| Rainfall | Rain Gauge | 0 mm | Moderate | Tipping bucket |
Graph: Temperature & Humidity over 24 Hours (Sample)
Graph: Atmospheric Pressure Variation (Sample)
Hardware Components List
| Component | Specification | Role |
| Raspberry Pi 5 | Quad-core ARM Cortex-A76 @ 1.8GHz, 4GB/8GB RAM | Central Processing Unit |
| DHT22 | Temp: −40 to +80°C; Humidity: 0–100% | Temperature & Humidity Sensing |
| BMP280 | Pressure: 300–1100 hPa; I2C/SPI interface | Atmospheric Pressure Sensing |
| Anemometer | Reed switch output, 0.33 m/s sensitivity | Wind Speed Measurement |
| Wind Vane | Analog output, 16 directions | Wind Direction Measurement |
| Rain Gauge | Tipping bucket, digital pulse output | Rainfall Measurement |
| Power Supply | 100–240V AC input; 5V DC 3A output | System Power |
| SD Card | 16GB+ microSDHC/SDXC | OS & Data Storage |
| Enclosure | Weatherproof, UV resistant, dustproof | Hardware Protection |
Software Tools Summary
| Tool / Language | Role in Project |
| Raspberry Pi OS | Primary OS; manages hardware and system resources |
| Python | Sensor data acquisition, processing, and MQTT publishing |
| MQTT (Mosquitto) | Lightweight data transmission from Pi to cloud broker |
| InfluxDB | Time-series database for high-volume sensor data storage |
| Grafana | Real-time dashboards, data visualization, and alerts |
| Flask / Django | Backend web framework and REST API for weather data |
| HTML / CSS / JavaScript | Front-end web interface design and interactivity |
| React Native | Cross-platform mobile application (Android & iOS) |
| AWS / Azure / GCloud | Cloud hosting for server, database, and visualization |
| Git / GitHub | Version control and collaborative development |
Graph: Wind Speed over 24 Hours (Sample)
Screenshots & Images
Place your hardware setup and Grafana dashboard screenshots in images/ folder.
Future Scope
- Integrate machine learning algorithms for weather pattern prediction and early warning systems.
- Add air quality sensors (CO2, PM2.5) and UV sensors for comprehensive environmental monitoring.
- Implement solar-powered operation for remote or off-grid deployment locations.
- Expand to a distributed sensor network for wider geographic coverage.
- Enhance mobile app with offline access, push notifications, and custom weather alerts.
- Collaborate with meteorological agencies for external data validation and improved forecasting.
Conclusion & Next Steps
The "IoT Weather Reporting System using Raspberry Pi 5" successfully achieved its objectives of creating a comprehensive, real-time, and cost-effective environmental monitoring system. The Raspberry Pi 5 coupled with DHT22, BMP280, anemometer, and rain gauge sensors demonstrated reliable performance with minimal downtime throughout the monitoring period.
With future enhancements including ML-based forecasting, expanded sensor arrays, and cloud-based distributed architecture, this system can evolve into a scalable smart environmental monitoring platform applicable to agriculture, smart cities, and disaster management.