Time-Controlled Switch with ESP32 Web Server and DS3231 RTC

Added:

Project Intro
Setup & Code
Safety Demo
Mobile Control

Project Intro

0:00
Playing Section
  • 1

    Introduces converting any switch into a time-controlled device.

  • 2

    Covers controlling large loads with set start and stop times.

  • 3

    Lists required hardware components for the build.

Fundamentals of ESP32 microcontroller programming using the Arduino IDE, including GPIO digital output control.
Basic web development and networking concepts, specifically how HTTP requests function and how to host a local web server on a microcontroller.
Understanding the I2C communication protocol, which is essential for interfacing the ESP32 with the DS3231 Real-Time Clock (RTC) module.
Safe handling of electrical relays and basic electronics principles for switching high-voltage AC or DC loads.
Integrating Network Time Protocol (NTP) to automatically synchronize and calibrate the DS3231 RTC via an internet connection.
Utilizing non-volatile storage file systems (such as LittleFS or SPIFFS) on the ESP32 to permanently save user-configured start/stop times across power cycles.
Transitioning from a local web server to an IoT cloud-based protocol like MQTT for remote monitoring and control over the internet.
Implementing security measures on the ESP32, including HTTP Basic Authentication and secure Wi-Fi handling, to prevent unauthorized access to the switch control panel.
3K views67likes6:48@ElectroniClinicOriginal Release: 2024-06-02

This video demonstrates how to create a time-controlled switch or relay using an ESP32 Wi-Fi + Bluetooth module, DS3231 Real-Time Clock (RTC), and a 5V SPDT relay. The system allows users to automatically turn any electrical device on or off at specific times by setting a start time and stop time through a web interface. The ESP32 serves as both the microcontroller and web server, enabling remote control via any device connected to the same Wi-Fi network. The DS3231 RTC provides accurate timekeeping for scheduling, while the relay handles the actual switching of electrical loads. This project can control various devices including water pumps, heaters, refrigerators, street lights, generators, door locks, and blinds.