Differences

This shows you the differences between two versions of the page.

Link to this comparison view

iothings:proiecte:2022:smart_home_lights_power_outlet_control [2023/01/19 22:03]
catalina.sirbu [Description]
iothings:proiecte:2022:smart_home_lights_power_outlet_control [2023/01/20 09:02] (current)
nicolae.macovei [Libraries]
Line 1: Line 1:
 ====== Smart Home Lights & Power Outlet Control ====== ====== Smart Home Lights & Power Outlet Control ======
  
-Author: Dragos Macovei \\ +Author: Dragos Macovei ​ACES 2023 \\ 
-Source code on Github: \\ +[[https://​github.com/​dragosmacovei/​esp32-firebase-realtime-db/​tree/​main/​Arduino/​Smart-home-esp32|Source code on Github:]] \\ 
-Youtube video+[[https://​smart-home-e56a9.web.app/​|Firebase App]] \\ 
 +[[https://​www.canva.com/​design/​DAFYKV9A1PY/​jS_xeHC05D4Sf9gvD_ivzw/​view?​utm_content=DAFYKV9A1PY&​utm_campaign=designshare&​utm_medium=link2&​utm_source=sharebutton|Presentation link]] \\
  
 ===== Description ===== ===== Description =====
Line 11: Line 11:
 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. 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: Depending on the activity detected in the house, the program will have 2 states:
-  - 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. +  - **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. 
-  - 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. +  - **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, he will be detected by the PIR sensor, all elements ​are turned on and the program will switch to Manual Mode.+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. 
 + 
 +{{ :​iothings:​proiecte:​2022:​proiect-dragos.jpeg?​500 |}} 
 +===== 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 **ESP32 WROOM** is a microcontroller produced by Espressif Systems that is based on the 32-bit dual-core Xtensa LX6 microprocessor. The WROOM variant of the ESP32 comes with integrated Wi-Fi and Bluetooth capabilities,​ making it a popular choice for IoT and other wireless applications. Overall, this board is a powerful, versatile, and low-power microcontroller that is well-suited for IoT and wireless projects. It's a great choice for many use cases, from low-power sensors to high-performance applications 
 +{{ :​iothings:​proiecte:​2022:​esp32-dragos-macovei.png?​200 |}} 
 +  * A **PIR** (Passive Infrared) sensor is a type of sensor that detects motion by measuring infrared (heat) radiation emitted by objects in its field of view. It is commonly used in security systems, automatic lighting control systems, and other applications that require motion detection. PIR sensors have several advantages over other types of motion detectors, such as low power consumption,​ reliability,​ and a wide field of view. They are also relatively inexpensive and easy to use. 
 +{{ :​iothings:​proiecte:​2022:​senzor-pir-miscare-dragos-macovei.jpg?​200 |}} 
 +  * The **DHT11** sensor is a low-cost digital **temperature and humidity sensor** that is commonly used in various applications such as home automation, weather stations, and HVAC systems. The sensor uses a capacitive humidity sensing element and a thermistor to measure the surrounding air's humidity and temperature. 
 +{{ :​iothings:​proiecte:​2022:​tempdht11-dragos-macovei.jpg?​200 |}} 
 +  * This **Relay module** with 2 5V channels is used to take control of devices in the house that operate at high voltage. It can be easily controlled by a microcontroller and is compatible with Arduino. 
 +{{ :​iothings:​proiecte:​2022:​modul-cu-releu-cu-doua-canale_macovei.jpg?​200 |}} 
 + 
 + 
 +The final diagram of all the components can be seen below and was made with the help of the EasyEDA program. 
 + 
 +{{ :​iothings:​proiecte:​2022:​smart-home-dragos-macovei.png?​500 |}} 
 + 
 + 
 +===== Software ===== 
 + 
 +==== Libraries ==== 
 +  * [[https://​github.com/​adafruit/​Adafruit_Sensor|Adafruit Sensor]] 
 +  * [[https://​github.com/​me-no-dev/​AsyncTCP|AsyncTCP]] - This is a fully asynchronous TCP library, aimed at enabling trouble-free,​ multi-connection network environment for Espressif'​s ESP32 MCUs. 
 +  * [[https://​github.com/​adafruit/​DHT-sensor-library|DHT Sensor]] - An Arduino library for the DHT series of low-cost temperature/​humidity sensors. 
 +  * [[https://​github.com/​mobizt/​Firebase-ESP-Client|Firebase-ESP-Client]] - The managed, complete, fast and secure Firebase Client Library that supports ESP8266 and ESP32 MCU from Espressif 
 + 
 +===== 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 === 
 +  * [[https://​www.sigmanortec.ro/​placa-dezvoltare-esp32-cu-wifi-si-bluetooth?​fast_search=fs|ESP32 WROOM]] 
 +  * [[https://​www.sigmanortec.ro/​Senzor-PIR-miscare-p126182136|PIR Sensor]] 
 +  * [[https://​www.sigmanortec.ro/​senzor-temperatura-si-umiditate-dht22|Temperature and humidity sensor DTH11]] 
 +  * [[https://​www.optimusdigital.ro/​ro/​electronica-de-putere-module-cu-releu/​39-modul-cu-releu-cu-doua-canale.html|Relay module]] 
 +=== Software sources === 
 +  * [[https://​docs.espressif.com/​projects/​esp-idf/​en/​latest/​esp32/​_images/​esp32-devkitC-v4-pinout.png|ESP32 WROOM Pinout]] 
 +  * [[https://​cloud.google.com/​firestore/​docs/​client/​get-firebase|Firebase Tutorial]] 
 +  * [[https://​randomnerdtutorials.com/​esp32-pir-motion-sensor-interrupts-timers/​|PIR Motion Sensor]]
iothings/proiecte/2022/smart_home_lights_power_outlet_control.1674158581.txt.gz · Last modified: 2023/01/19 22:03 by catalina.sirbu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0