In this project, an ESP32-S3 Smart Display is combined with multiple sensors to create a compact weather station capable of measuring temperature, humidity, atmospheric pressure, altitude, rainfall conditions, and ambient light intensity.
Instead of relying on separate development boards and display modules, the design integrates sensing and visualization into a single platform. A graphical dashboard built with LVGL presents the measured values in an intuitive and visually appealing format.
How Does the Weather Monitoring System Work?The weather station continuously collects information from various sensors, processes the acquired measurements, and updates the display in real time. The entire operation can be divided into three stages: data acquisition, sensor processing, and graphical visualization.
Collecting Environmental DataMultiple sensors are used to monitor different weather parameters.
The BME280 environmental sensor measures temperature, relative humidity, and atmospheric pressure. Since pressure varies with elevation, altitude can also be estimated using the same sensor. Communication with the ESP32-S3 takes place over the I2C interface, which minimizes wiring complexity.
Rainfall detection is achieved using rain sensor. Water droplets modify the conductivity of the sensing plate, causing changes in the output voltage. By observing these variations, the controller determines whether rainfall is present.
Ambient light conditions are measured using an LDR module. Since the resistance of the photoresistor changes with illumination intensity, the system can distinguish between daytime and nighttime conditions.
Processing the Sensor DataThe ESP32-S3 integrated inside the smart display serves as the processing unit of the system.
Its responsibilities include:
- Reading sensor values continuously.
- Communicating with the BME280 sensor through I2C.
- Acquiring analog measurements from the rain sensor and LDR module.
- Estimating altitude from atmospheric pressure.
- Detecting rainfall conditions.
- Determining day and night status.
- Updating the graphical interface.
Real-time processing ensures that the dashboard always reflects current environmental conditions.
Displaying Real-Time Weather InformationOnce the sensor values have been processed, the ESP32-S3 updates the graphical dashboard displayed on the 2.8-inch TFT screen.
Instead of presenting plain text values, the interface organizes information using weather icons, labels, and status indicators. Temperature, humidity, pressure, altitude, rainfall information, and day/night conditions are refreshed continuously, providing an experience similar to a compact weather station.
Using LVGL for the DashboardThe graphical user interface is developed using LVGL (Light and Versatile Graphics Library).
LVGL is an open-source framework widely used in embedded systems for creating interactive displays. It provides support for labels, images, icons, buttons, and animations, making it possible to design professional-looking interfaces even on resource-constrained microcontrollers.
In this project, LVGL is responsible for creating the weather cards and dynamically updating the sensor values shown on the display.
Building the Weather Monitoring SystemAfter understanding the operating principle, the next step is interfacing the sensors with the ESP32-S3 Smart Display.
Hardware RequirementsThe system consists of a 2.8-inch ESP32-S3 Smart Display acting as the controller and display unit. Environmental measurements are obtained using a BME280 sensor, while rainfall and ambient light monitoring are performed using a rain sensor and an LDR module. Jumper wires and breadboards are used for prototyping, and a USB cable is required for programming the display.
Software RequirementsFirmware development is performed using Visual Studio Code together with the ESP-IDF extension.
The project is based on ESP-IDF v5.3.5 and uses the Bosch BME280 driver for environmental sensing. Graphical elements are implemented using LVGL v8 along with the display support libraries included with the project.
Installing the tools in their default locations helps avoid build and configuration issues.
Circuit Diagram for ESP32-Based Weather Monitoring SystemThe BME280 sensor communicates through the I2C interface. Its SDA and SCL pins are connected to GPIO9 and GPIO10 respectively, while the sensor is powered from the 3.3 V rail.
The rain sensor uses its analog output and is connected to GPIO7 configured as an ADC input. Variations in voltage indicate the presence or absence of water on the sensing plate.
The LDR module is connected to GPIO6 and is used for ambient light detection. By analyzing the analog voltage generated by the module, the ESP32-S3 determines whether surrounding conditions correspond to daytime or nighttime.
All sensors share the same 3.3 V supply and common ground connection, simplifying the hardware architecture and ensuring reliable operation.
Data Acquisition and ProcessingAfter power-up, the ESP32-S3 continuously gathers information from each sensor.
The BME280 provides temperature, humidity, pressure, and altitude values. The rain sensor reports rainfall conditions, while the LDR module supplies ambient light information.
These measurements are processed in real time and forwarded to the graphical dashboard, where they are displayed through icons, labels, and status indicators.
Software OverviewThe firmware follows a modular design that separates sensor acquisition from user interface management.
main.cppThis file acts as the primary application entry point. It initializes the ESP32-S3 Smart Display, configures LVGL, creates dashboard elements, and periodically updates the display with the latest measurements.
sensors.cThis module contains all sensor-related routines. It performs communication with the BME280, reads analog values from the rain sensor and LDR module, and provides processed measurements to the graphical interface.
ApplicationsThe same architecture can be extended for:
- Smart home systems
- Greenhouse monitoring
- IoT weather stations
- Environmental data logging
- Industrial monitoring
The complete implementation, including source code, ESP-IDF setup, firmware flashing procedure, and detailed circuit explanations, is available on Play with Circuit.





Comments