This project is a weather station built on Arduino Mega 2560 with a built-in ESP8266 . It collects environmental data such as temperature, humidity, brightness and noise levels and displays this information on a web server. The weather station updates in real-time and provides historical data for the past three days.
- Real-Time Weather Data: Displays the current time, weather conditions (e.g., sunny, cloudy), temperature, humidity, brightness, and noise levels.
- Web Interface: Hosts a web server to show weather data in a user-friendly HTML interface.
- Historical Data: Displays environmental data for the last three days in a tabular format.
- Day/Night Mode: Automatically adjusts functionality, hiding sky-related data at nighttime.
- Arduino Mega 2560 + WiFi (ESP8266)
- DHT Sensor (for temperature and humidity)
- LDR (Light-Dependent Resistor) (for brightness measurement)
- Sound Sensor (for noise level measurement)
- RTC Module (Real-Time Clock for timekeeping)
- Breadboard and Connecting Wires
- Power Supply
- The Arduino collects data from the connected sensors.
- The ESP8266 module connects to a WiFi network and starts a web server.
- The data is formatted into an HTML page and served via the web server.
- Users can access the weather data by visiting the station's IP address on a browser.
- Connect the sensors to the Arduino Mega according to the schematic.
- Ensure the ESP8266 module is properly connected to Serial3.
- Connect the RTC module for accurate time tracking.
- Power the Arduino and sensors via USB or an external power source.
- Install the required libraries in the Arduino IDE:
- .
- Upload the
WeatherStation.ino
sketch to the Arduino Mega. - Modify the
ssid
andpass
variables in the code to match your WiFi network credentials.
- Power on the system.
- Wait for the ESP8266 to connect to the WiFi network.
- Open the Serial Monitor to view the assigned IP address.
- Enter the IP address in a web browser to access the weather station's data.
- Time: 12:30 PM
- Condition: Partly Cloudy
- Temperature: 25°C
- Humidity: 60%
- Brightness: 500 lux
- Noise Level: 30 dB
Date | Temperature (°C) | Humidity (%) | Brightness (lux) | Noise (dB) |
---|---|---|---|---|
01-Jan-25 | 23 | 55 | 450 | 35 |
02-Jan-25 | 24 | 60 | 500 | 30 |
03-Jan-25 | 25 | 58 | 520 | 33 |
- No WiFi Connection: Ensure the correct WiFi credentials are set and that the ESP8266 is properly wired.
- No Data on Web Page: Verify that the sensors are connected correctly and functioning.
- RTC Issues: Check that the RTC module has a working battery and is correctly initialized.
- Add support for additional sensors (e.g., pressure, CO2).
- Implement data logging to an SD card or cloud storage.
- Enhance the web interface with graphs and more customization options.
- Improve error handling and diagnostics.
This project is licensed under the MIT License. See the LICENSE file for details.