0% found this document useful (0 votes)
303 views

Home Automation System Using ESP32 and Firebase

Uploaded by

sameersutane03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
303 views

Home Automation System Using ESP32 and Firebase

Uploaded by

sameersutane03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 4
2831.00 2022 IEEE | DOI: 10.1105/PDGCS6933 2022.10053309 i ed and Grid Comps 1, Dist 2022 Sevemh international Conference on Pra 2022 Seventh international Conference on Parallel, Distributed and Grid Computing (PDGC) Home Automation System Using ESP32 and Firebase Ankit Koushal, Rahul Gupte, Farman Jan, Kamaldeep, Vikram Kumar School of Eletrical Engineering Shri Mata Vaishno Devi University, Katra, Jammu and Kashmir, Indis [email protected], rahullandial2@email,com, janfarman] @gmsicom, [email protected], vikram. [email protected] Abstract This research work presents an approach for smart home automation using [oT which can be controlled The home automation system means monitoring and control home appliances remotely using the concept of internet of (OT). This is an Internet of Things project. Using ESP32 ‘microcontroller and Firebase, one can remotely control four relays with the internet. In this ESP32 project, four household apy can be controlled from smartphones as well as manual switches. If ‘there is no internet, the relay module ean be controlled by manual switches. If WHFI is available, the ESP32 will conneet to it automatically. The internet of things allows us fo control our home automation system from anywhere in the globe. It lowers the use of superfluous or excessive human effort and raises the level of iving in our society. Home automation with IOT is a low-cost and dependable automation technology which can minimize the energy usage while also providing convenience to the users. Keywords— ESP32, Firebase, Relay, NextJS, Internet of Things (on. 1. INTRODUCTION ‘The house automation is one kind of technology that can control and thus remain connected with our home, Home automation refers to the interconnection of all home products, and devices, A central microcontroller panel, for example, may be able to manage anything from heating to ordinary electrical equipment [1-2]. With Home Automation we can remotely control the features of our home through a computer or any mobile device and thus programming electronic devices based ‘on the situations or scenarios, or centralizing control of several devices in a single control center, It is vital that various controlled devices communicate with one another. The primary goal of home automation is to regulate or monitor signals from various devices or critical services. A Smartphone may be used to operate or monitor the home automation system [3-4] Home automation is secure and reliable; because ofthis itis guite beneficial. Today, home automation is far more powerful and accurate in monitoring all houschold equipment. Home automation systems are inexpensive, and smart home systems are easily available. It offers essential features to ensure the customer's happiness and comfort The main goal in this project is to control the normal electrical appliances which don't support modem technology like Wi-Fi to control them using specific software, So this project is made to control the devices and make life easier with the help of technology [5] In this paper, the home automation is built using ESP32 which is a microcontroller [6] and Firebase which is in this study a real time database to store data in the cloud [7-8]. A ‘website is also created for the virtual switches using Next JS and hosted on Vereel [9-11]. With this, one can remotely control four relays with the internet and thus can monitor the real time feedback. ‘The organization of this research paper is such that the introduction of the research paper is given in section 1, The software application is given in section Hl, The hardware specifications are given in section IIL and the working is given in section IV. The results are given in scetion V and finally the conclusion is given in section VI HL. SOFTWARE APPLICATION The code is written with Arduino IDE, it includes a text editor for coding. This IDE is open-source. The code is written in it and uploaded to the Arduino boards. It is compatible with almost all operating systems such Windows, Linus, MacOS Programming languages C and C++ are supported. Using a micro-USB cable, the ESP32 board is linked to the computer; the red LED on the module ensures power supply. This way the user can write in the Arduino IDE and then can be uploaded to the ESP32 and perform the desired function by executing the programs which are uploaded init Firebase is a backend as-a-service (BaaS). It offers a range of tools and services to developers so they can create high- quality apps, expand their user base and make money. It is, created using Google's technical framework. For this project, a Real time Database is used to store the data in the cloud. Also, a website is created using Next.JS framework and the ‘website is hosted at Vercel. Fig 1 Schematic Diagram IIL, HARDWARE SPECIFICATIONS It is a System on chip (SoC) microcontroller developed by Espressif Systems. It is cheap, making it accessible to most people, It is available in single-core and dual-core models which are integrated with Wi-Fi and Bluetooth as standard. The Autores oensed uae lied ta: K K Wagh Ina of Eng Euston and Research, Downloaded on August 242029 a 06:19:25 UTC from IEEE Xplor, Resttons spo. 978-1-6654-5401-8/22/$31,00 ©2022 IEEE 228 2022 Seventh international Canference on Parallel, Distributed and Grid Computing (PDGC) schematic of ESP32_is shown in Fig. 1. Some other B. Light Bulb specifications of ESP32 ae: ‘The relay connected will control the light bulb as showm in Fig. * 34 configurable GPIOs. 4 in this case and each relay has three terminals, one of them * Assingle or two cores, 32-bit LX6 microprocessor with will be connected to the bulb as a common terminal. The second aclock speed of up to 240 MHz terminal will be connected to the normal switch to control the Supports 802.11 b/gfn Wi-Fi comections atup to 150 Greuit manually. The third terminal will be connected to the Mbps. live wire and it will supply current to the eircuit when the relay ¢ 16KBofRTC SRAM, 520 KB of SRAM, and 448 KB ig ured on by the ESP32, of ROM. It can be powered with a mobile charger via the USB port provided on the ESP32 board, ig 4. Light Bulb We can control four devices with this relay but have only used a light bulb in this case. Fie 2 FSP IV. WORKING ‘The ESP32 is the central processing unit in this project as The flow chart explaining the working is shown in Fig. 5 shown in Fig. 2, the code will be uploaded to it and it will control the relay connected via GPIO pins. It includes other ‘components like a relay and a light bulb A Relay ‘The electronic and electromechanical switches known as relays ‘may close and open the circuits. An electrical signal is used by a relay to drive an electromagnet, which connects or disconnects another cireuit. The relay operates on the principle of electromagnetic induction. The relay module is shown in Fig, 3 Tum appfances ono of ‘coring he ala Fig $.Flowebant The hardware connection or circuit diagram showing Fig 3. Relay module connections between the light bulb, the relay module and the In this project, the Relay module is connected with the ESP32__ ESP32 board is shown in Fig. 6. cconiroller’s GPIO pin to provide an operating signal to the relay module. _Auorized loans uae lad to: K K Wagh lat ot Engg Euston and Resear, Doweloaded on August 24,2029 a 06:19:25 UTC from IEEE Xplor, Resttons spo. 229 2022 Seventh international Canference on Parallel, Distributed and Grid Computing (PDGC) Fig. 6, Hardware Cizeit ‘The ESP32 is connected to the Firebase and clicking on the virtual button on the website changes the data in the database. ‘This way the bulb tums on/off as desired. The program is \written in BSP32. Firstly check for Internet connection, if itis, not connected then it will keep on checking for the connection, Once connected to the internet, it will retrieve data from firebase and perform action based on the data received from fire base. te are) Realtime Database e a FREE Fig. 7. Creation ofa database in Firebase for different devices Here, a database is created in the firebase as shown in Fig. 710 store the values of different relays which will be read to turn on of off the relays respectively. = Controllers Sewn aw ao oun Fig 8. Viral Switches created on our website Next, the virtual switches as shown in Fig. 8 are created an with the help of these virtual relays, one can control the relays remotely. V. RESULTS In the results, the virtual button is turned on as shown in Fig. 9 which shows the controllers with four relays and its on or off status. Fig, 9. Viral Button Auorized loans uae lad to: K K Wagh lat of Engg Euston and Resear, Downloaded on August 24,2029 a 6:19:25 UTC from IEEE Xplor, Resttons spo. 230 2022 Seventh international Canference on Parallel, Distributed and Grid Computing (PDGC) certain features in our way we like and thus making things more convenient. This project aims at enabling remote access to our home appliances while also maintaining the manual controls available for there is no internet available. The following are the precautions that need to be taken to censure smooth functioning of the device 6 ° es Sane Ye ‘© In case of a power outage, we need to operate these = manually. erties ane ase © The automation system should have access t0 a reliable local area network, or any other private network, to ensure seamless functionality. VI. CONCLUSION Based on the performance of this project one can conclude that 7 stom remotely corel Rome aplinecs wing ESP, Relay, te Fresca New J Mus crew hone can conte he uadin. appliances from anywhere in the world over the internet with a simple circuit and if the project fails to perform its intended ‘works we can simply control the appliances manually without much hassle, It helps us to monitor the state of our appliances remotely and also helps us to control them which is very convenient, Fig. 10, The Realtime Database ‘The data corresponding to the virtual switches change the variables data in the database, The ESP32 is continuously reading that data from the Firebase real time database and ‘changing the relay’s output accordingly as shown in Fig. 10. Finally, the turned on condition of the bulb is shown in Fig. 11 References [1] U, Puja, NIB, Bebadure and M. Asnodkar, “Intemet of things based integrated smart home eulomaton system." 2nd Intemational Conference ‘on Communication & Information Processing (ICCTP), 2020, Y. Wenbo, W. Quanj and G, Zhen, "Smact home implementation based on Internat and WIFI technology” 2015 34th Chinese. Contol Conference (CCC), pp 9072-9077, 2018. (M.S. Mabamud, M.S.R.Zishan,S.1. Abad, A. R. Rabat, M. Hasan spd M.L, Rehman, "Domicile- An oT Based Smart Home Automation System," 2019 Intemational Conference on Robotics ectrical and Signal Processing Techniques (ICREST, pp 493-497, 2019, D. Vasice, 1. Jalowiczor, L. Sevik and M. Vora, "oT Smart Home Concept,” 26th Telecommusications Forum (TELFOR), pp. [-4, 2018. 1. Piya and S. R. Lee, "Smart home-control and monitoring system using smart phone" ICCA, ASTL.24, pp 83-86, 2018 itp ardsno len mainardsinolodLina ins ree goose om docs restore frestore ford, [8] L Moroney, “The frbase realtime databat.” In The Definitve Guide to Firebase. Apress, Beskeley, CA, pp. $1-71, 2017 [9]. Pimis, "Modern Website Development with Stropi and Nex. js 2622 [10] Hoy, “Build and Deploy a High-performance ill stack JavaScript Wed Application” 2021, [1L]M. Thakkar," Building React Apps with Server-Side Rendering”, press, Beskeley, CA, pp 95-137, 2020 (4) 15] (6) (7) Fig: He The tamed on condition of Bub ‘The smart home automation enables us to aceess high-tech functionality and elegance that was previously unattainable. Almost all house appliances may be controlled remotely and usually from a single app with home automation. We ean do a lot of things with home automation, like, we can customize Auorized loans veld to: K K Wagh lat of Engg Euston and Resear, Downloaded on August 24,2029 a 6:19:25 UTC from IEEE Xplor, Resttons spo. 231

You might also like