Table of Contents

Smart Home Lights & Power Outlet Control

Author: Dragos Macovei ACES 2023
Source code on Github:
Firebase App
Presentation link

Description

This project explains how to control sockets and lights in houses of any size in order to save more energy and enjoy your comfort. An ESP32 WROOM module will be connected individually to each socket in the room using relays and there will also be 2 PIR modules in 2 different rooms. Depending on the activity detected in the house, the program will have 2 states:

  1. Manual Mode, when the user is at home: all the switches are controlled by the user. Moreover, if the PIR sensor doesn't detect movement for more than 30 minutes, it switches to Auto Mode.
  2. Auto Mode, when the user is not home: all the sockets are turned off (except those that the user wants to keep permanently on) and all the lights are turned down.

When the user enters the house or he gets out of bed in the morning, he will be detected by the PIR sensor, all elements will be turned on and the program will switch to Manual Mode.

Hardware

Hardware components play an important role in electronic projects by providing physical functionality, improving performance, increasing safety and reliability, and facilitating the development and testing process. Keeping these ideas in mind, I chose the following components.

The final diagram of all the components can be seen below and was made with the help of the EasyEDA program.

Software

Libraries

Conclusions

A module has been implemented that registers the temperature and detects movement in a room. Depending on the presence/absence of the person in the room, the program switches to manual or auto mode.

Resources

Pictures sources

Software sources