Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

ESP32 Access Point Relay Control

An ESP32-based relay control system that provides two independent methods for manually controlling electrical appliances:

  • 🌐 Local Wi-Fi Web Interface
  • 👏 Clap Detection

The ESP32 operates in Access Point (AP) mode, allowing users to connect directly from a smartphone without requiring an internet connection or external router.

The project is designed using a 4-channel relay module with appliances connected through the Normally Closed (NC) contacts. Three relays are currently used, while the fourth relay is reserved for future expansion.

The firmware is completely non-blocking and uses millis() for timing, allowing clap detection and the web server to operate simultaneously without affecting each other.


Features

  • ESP32 Access Point Mode
  • No Internet Required
  • Built-in Web Server
  • Responsive Mobile-Friendly Web Interface
  • Independent Control of Three Relays
  • Clap Detection Using LM393 Sound Sensor
  • Single Clap → Turn ON All Appliances
  • Double Clap (Within 2 Seconds) → Turn OFF All Appliances
  • 200 ms Clap Debounce
  • Last Command Wins Logic
  • Non-Blocking Firmware
  • Future Expansion Support (Relay 4 Reserved)

Hardware

  • ESP32 DevKit (USB Type-C)
  • 4-Channel 5V Relay Module
  • LM393 Sound Sensor Module
  • 5V 2A Power Adapter

GPIO Configuration

GPIO Function
GPIO16 Relay 1
GPIO17 Relay 2
GPIO5 Relay 3
GPIO18 Relay 4 (Reserved)
GPIO15 Sound Sensor

Control Methods

Web Interface

Connect to the ESP32 Wi-Fi hotspot and open: http://192.168.4.1

Control each appliance independently through the browser.

Clap Control

  • 1 Clap → Turn ON All Appliances
  • 2 Claps (within 2 seconds) → Turn OFF All Appliances

Arduino Framework Firmware

The Arduino sketch for this project is available at:

  • ESP32_AccessPoint_Relay_Control.ino

Upload Steps

  1. Install ESP32 board support in Arduino IDE.
  2. Open ESP32_AccessPoint_Relay_Control.ino.
  3. Select your ESP32 board and port.
  4. Upload the sketch.
  5. Connect to Wi-Fi SSID ESP32-Relay-Control (password 12345678) and open http://192.168.4.1.

About

An ESP32-based relay control system featuring a built-in Wi-Fi web interface and clap detection for manual appliance control. Operates in Access Point mode without requiring an internet connection

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages