ESP32-S3-AsyncWebServer-10Pump-Logging
This project is designed to control up to 10 relays via a web interface using an ESP32-S3 microcontroller.
Project Purpose
This project is designed to control up to 10 relays via a web interface using an ESP32-S3 microcontroller. The system supports multiple clients with asynchronous updates, allowing users to view and control the state of each relay in real-time. Additionally, the project can manage temperature zones for radiant heating or forced air systems, incorporating temperature sensors to automate the control of these zones.
Key Features
Web Interface for Relay Control
- Displays the state of all 10 pumps (relays/output pins) on a webpage with user-selectable mode changes (Auto, On, Off).
- Output pins can be easily configured individually as on=high/off=low or on=low/off=high.
Network Connectivity
- Uses a W5500 Ethernet adapter connected to the ESP32-S3-DevkitC-1 microcontroller for network connectivity.
- The W5500 is used because it offers stable and reliable Ethernet connectivity with low power consumption and supports high-speed SPI communication, which is ideal for the ESP32-S3's capabilities.
RTC and NTP Synchronization
- Utilizes the DS3231 RTC to synchronize system time with NTP (Network Time Protocol).
- System time is broadcast every second through a websocket and is available system-wide to ensure all times are synchronized.
File System and Logging
- Uses the LittleFS file system to store favicon icons and log files.
- Implements a full logging system to track pump run times on a daily, monthly, and yearly basis.
- Logs are managed to minimize file size by aggregating data and deleting source logs periodically.
Additional Web Page
- Provides a second webpage at
/second-page
where elapsed pump runtimes can be viewed for the current day, month, year, and total.
Code Organization
- Code is organized into multiple separate files based on function for better manageability and readability.
Major Use Cases
- Heating System Control: Automate and control heating systems using multiple zone valves or dampers.
- Real-time Monitoring: Monitor and control relay states in real-time via a web interface accessible by multiple clients.
Additional Information on W5500
The W5500 Ethernet adapter is a key component in this project for the following reasons:
- Stable Ethernet Connectivity: Provides a stable and reliable connection to the network, which is crucial for real-time control and monitoring.
- Low Power Consumption: The W5500 is designed to consume low power, making it efficient for continuous operation.
- High-Speed SPI Communication: Supports high-speed SPI (Serial Peripheral Interface) communication, which aligns well with the capabilities of the ESP32-S3 microcontroller, ensuring fast and efficient data transfer.
- Ease of Integration: The W5500 is easy to integrate with the ESP32-S3, simplifying the hardware setup and software development.
This project, developed using the Arduino IDE, combines an intuitive web interface with a robust logging system, making it versatile for various applications.