Skip to content

The Smart Socket project aims to create an intelligent socket using the ESP32 microcontroller, offering features such as remote control, energy monitoring, and schedule configuration. Users can easily manage their electrical devices and optimize energy usage through the intuitive web interface provided by the system.

License

Notifications You must be signed in to change notification settings

jkskw/smart_socket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Smart Socket

Table of contents

About The Project

The Smart Socket project aims to create an intelligent socket based on the ESP32 microcontroller. The goal is to design a versatile socket that enables remote control, measurement and data transmission.

Getting Started

In this section you will find required hardware components and necessary software to start Smart Socket project.

Hardware Requirements

Component Description
Hi-Link HLK-PM01 5VDC Power supply unit
ESP32 Low-power system on a chip with integrated Wi-Fi
SRD-05VDC Relay Module
ACS712-20A Current Sensor
ZMPT101B Voltage Sensor
DHT11 Temperature and Humidity Sensor
HC-SR501 PIR Motion Sensor
DS1307 Real-Time Clock
4.7kΩ Resistor DHT11 pull-up resistor
2x100kΩ Resistor Divide voltage for measurement
2x200kΩ Resistor Divide voltage for measurement

Circuit Diagram

Software Requirements

  • Arduino IDE or PlatformIO or any IDE that can be used to program ESP32.
  • CP210x driver for Computer (This is a driver that allows you to communicate with ESP32 via USB).

Setup

After connecting the socket to power, an access point (AP) named Smart Socket with the password automation is automatically created, requiring users to log in for further configuration.

After successfully logging into the access point, users need to fill in the data. Based on the entered SSID and Wi-Fi network password, the ESP32 in station mode connects to the access point integrated with the home router.

After correctly entering the Wi-Fi network data, the following message will appear on the webpage: ESP will restart, then connect to the router and go to IP address: XXX.XXX.XXX.XXX If there is no connection, please fill out the form again under IP address: XXX.XXX.XXX.XXX

At the end, users need to log in to the website using the following credentials:

  • Username: admin
  • Password: admin

Features

Remote Control via Wi-Fi

Users can control the socket remotely through a web interface.

Energy Monitoring

The smart socket provides real-time insights into energy consumption, including current, voltage, active power consumption, and total energy usage. This data enables users to analyze their electricity usage patterns, optimize consumption, and ultimately reduce costs.

Schedule Configuration

The "Schedule" tab allows users to set up on/off schedules for the smart socket based on specific hours and days of the week, utilizing the precision of the RTC DS1307 clock to maintain accurate timekeeping even in the absence of power supply.

Night Light Mode

The "Night Light Mode" enables users to set up the socket to activate upon motion detection by the PIR HC-SR501 sensor. This feature, named for its primary function of providing nighttime illumination, allows users to customize the duration for which the smart socket remains activated after motion is detected, thus creating an efficient night light tailored to individual preferences.

Temperature Mode

The "Temperature Mode" allows users to define the logic for turning the smart socket on and off based on ambient temperature values. This feature serves as a versatile tool suitable for both heating and cooling purposes within a room, utilizing connected devices to regulate temperature efficiently.

Safety Configuration

The "Safety" page enables users to configure overload and thermal protections. Implementing these safety measures in the smart socket prevents overloads and excessive heating, minimizing the risk of electrical damage and fires.

The screenshots below depict alarm messages indicating the activation of protections, corresponding to overload and thermal protections. These messages include the date and time of the protection activation, as well as the last recorded measurement data before the protection triggered. This allows users to promptly understand the cause of the alarm and take appropriate steps to resolve the issue. The occurrence of any alarm message results in the immediate shutdown of the smart socket and deactivation of all activated modes.

User Profile

The "User" tab allows users to modify the login credentials required to access the "Smart Socket" webpage.

License

Distributed under the MIT License. See LICENSE for more information.

About

The Smart Socket project aims to create an intelligent socket using the ESP32 microcontroller, offering features such as remote control, energy monitoring, and schedule configuration. Users can easily manage their electrical devices and optimize energy usage through the intuitive web interface provided by the system.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published