ESP32-S3 IoT Digital Clock with Environmental and Weather Monitoring
A production digital clock with weather indication plus local room temperature and humidity sensing, built around the user's existing ESP32-S3 display platform.
Intermediate Project
— This is an intermediate production design because it combines WiFi networking, I2C sensing, display integration, power-rail design, and enclosure/thermal considerations, even though the core MCU ecosystem is already chosen.
Assumptions:
- The weather indicator means a simple icon/state derived from online weather data, not a full local weather station.
- The existing Waveshare ESP32-S3 board and 2 inch capacitive display will be reused in the final product, even though production would normally move to a custom PCB/module.
- The clock will use WiFi to fetch time and weather data from an internet service.
- Room temperature and humidity are measured locally with a single digital sensor mounted away from heat sources on the PCB.
Bill of Materials
Compatibility Notes
- The ESP32-S3 family uses 3.3 V logic, so the SHT31-DIS-B and SSD1306-based display module should be powered and interfaced at 3.3 V unless the display module includes its own level shifting.
- SHT31-DIS-B uses I2C, which is a good fit for the ESP32-S3 and leaves SPI pins free if the display module needs them.
- If you use the existing Waveshare board in the prototype, confirm whether its display and sensor headers already expose 3.3 V I2C; for production, the custom PCB should place the SHT31 away from the ESP32 and regulator heat.
- WiFi current bursts from the ESP32-S3 can be substantial, so the power rail must handle peak load without brownouts; a buck regulator is safer than a small LDO for production.
You'll Also Need
- A real-time clock backup source such as a coin cell or supercapacitor if you want to keep time during power loss without WiFi sync.
- Enclosure, display window, mounting hardware, and sensor venting path so the humidity sensor can measure room air instead of trapped case air.
- Pull-up resistors for I2C, decoupling capacitors, and any required ESD protection on external connectors.
- If you want local weather trend indication from pressure, you would need to add a pressure sensor and decide whether that duplicates the room sensor function.
- Firmware, cloud/API selection, and time zone/DST handling are not hardware parts but are required for a production clock.
Estimated BOM Cost: $12-25 excluding the existing Waveshare ESP32-S3 d (based on live distributor pricing)
Design Considerations
Weather Indicator Architecture
For a clock product, the weather indicator should usually come from an online API rather than a local sensor. A local pressure sensor like BMP390 can only infer short-term pressure trends, which is useful for a simple icon but not for actual forecast accuracy. If you need true weather, design the firmware around periodic WiFi fetches, cached last-known-good data, and graceful fallback when the network is down.
Sensor Placement and Accuracy
The SHT31-DIS-B should be placed near a vent or opening and away from the ESP32-S3, regulator, and backlight/display heat. Even a few degrees of self-heating can bias humidity readings noticeably in a small enclosure. In production, use a thermal isolation cutout or edge placement and validate readings after 10-15 minutes of steady operation.
Power Integrity
ESP32-S3 WiFi transmit bursts can create current spikes that cause resets if the 3.3 V rail is weak. Budget for peak current, not just average current, and place local bulk capacitance near the module plus 0.1 uF decouplers at each IC. If the product is USB-powered, a buck regulator like ESP32-S3-WROOM-1-N16R8 gives better thermal headroom than an LDO.
Firmware Robustness
Use a state machine with separate tasks for time sync, weather fetch, sensor sampling, and display refresh. That makes it easier to recover from WiFi failures without freezing the UI. Add a watchdog and store the last valid time/weather state so the clock remains useful during network outages.
Display Readability
A 128x64 OLED is enough for a clock, date, and a small weather icon, but not for dense weather text. Keep the UI high contrast and use large numerals, because production devices are often viewed from several meters away. If you later need richer graphics, you will need more RAM and a more capable display pipeline than a simple monochrome OLED.
Production Reliability
Humidity sensors drift if exposed to condensation, dust, or direct airflow from fans and vents. Add a protective mesh or vent membrane if the enclosure environment is harsh, and define a calibration or replacement strategy for long-term accuracy. Also test cold-start behavior, WiFi reconnects, and power cycling to make sure the clock always boots into a valid display state.
Want to customize this project or build something different?
Try the Project Advisor


