The rise of the Internet of Things (IoT) has driven the development of smart home systems that enhance comfort, energy efficiency, and security. Traditional systems are either limited in scope or prohibitively expensive. This paper proposes a low-cost, real-time, wireless home automation system based on the ESP32 microcontroller and Google Firebase, incorporating multiple sensors and actuators. The system is designed to allow real-time control and monitoring via a mobile application developed using MIT App Inventor. A user-friendly mobile application developed using MIT App Inventor allows remote monitoring and control. The solution offers an efficient, scalable, and cost-effective platform for modern smart home implementations.
Introduction
Overview:
This project presents a smart home automation system designed to modernize traditional electrical appliances by enabling remote wireless control through affordable and open-source technologies. The system leverages the ESP32 microcontroller, Google Firebase, and MIT App Inventor to provide real-time control and monitoring of household devices, eliminating the need for costly smart appliances.
Key Features:
Centralized Control: Manages lighting, temperature, air quality, and security via a mobile app.
Wireless Operation: Uses Wi-Fi through ESP32 for seamless connectivity.
Real-time Feedback: Firebase Realtime Database enables instant cloud-based data syncing.
Environmental Monitoring: Sensors track temperature, humidity, light, and presence.
Custom Automation: Devices operate automatically based on sensor input and predefined logic.
Software Components:
Arduino IDE: Used to program the ESP32 in C/C++.
Firebase: Acts as the cloud database for storing and retrieving sensor values and device states in real time.
MIT App Inventor: Develops an Android app that acts as the user interface, providing easy control over appliances and viewing sensor data.
Hardware Components:
ESP32: A Wi-Fi-enabled microcontroller that handles all processing and communication.
Relay Modules: Used to switch electrical appliances (e.g., light bulb, air purifier, AC).
Sensors:
DHT11: Measures temperature and humidity for AC regulation.
LDR: Detects ambient light to automatically turn lights on/off.
Ultrasonic Sensor: Detects presence to optimize device usage.
PCB: Compact board design integrating all components for stable operation.
Functionality & Automation Logic:
Air Conditioner: Controlled via DHT11; also triggers air purifier and lights.
Air Purifier: Automatically turns on with AC.
Light Bulb: Automatically activated by low light levels (LDR).
Presence Detection: Ultrasonic sensor can deactivate devices if the room is empty.
Remote Control: Mobile app allows device operation from anywhere, even before arriving home.
Manual Override: Buttons available for use during internet outages.
Working Mechanism:
Internet Check: ESP32 connects to Wi-Fi.
Firebase Sync: Retrieves and updates relay status via Firebase.
Sensor Feedback: Controls relays based on environmental data.
App Interaction: User commands from the app modify Firebase data, triggering device actions.
Fallback: Manual buttons ensure continued control without internet.
Results & Impact:
Successfully controls appliances via app, sensors, and manual input.
Enables custom automation scenarios, like pre-cooling a room or watering plants remotely.
Increases energy efficiency and user convenience.
Combines affordability, simplicity, and functionality for broad user accessibility.
Limitations & Precautions:
Power outages require manual control.
Internet is required for full remote functionality.
Conclusion
This project successfully demonstrates a scalable and real-time smart home automation system using Firebase and ESP32. With sensor integration and a mobile interface, it enables intelligent monitoring and appliance control. Future improvements may include machine learning for predictive automation and integration with voice assistants.
References
[1] Srivastava, \"IoT Based Home Automation using Firebase and ESP32,\" International Journal of Advanced Research in Computer Science, vol. 11, no. 4, pp. 142-146, 2023.
[2] M. Patel and R. Singh, \"Design of Smart Home System Using LDR and DHT11,\" IEEE Conference on IoT Systems, 2022.
[3] D. Giusto, A. Iera, G. Morabito, and L. Atzori, The Internet of Things: 20th Tyrrhenian Workshop on Digital Communications, Springer, 2010.
[4] Espressif Systems, “ESP32 Technical Reference Manual,” [Online]. Available:
https://www.espressif.com/sites/default/files/documentation/esp32_technical_reference_manual_en.pdf
[5] Google Firebase, “Firebase Realtime Database,” [Online]. Available: https://firebase.google.com/docs/database
[6] M. Collina, “MQTT Essentials – A Lightweight IoT Protocol,” IEEE Internet Computing, vol. 22, no. 1, pp. 14–18, Jan.–Feb. 2018.
[7] MIT App Inventor, “MIT App Inventor Official Documentation,” [Online]. Available: https://appinventor.mit.edu/explore/documentation
[8] S. Misra, A. Mukherjee, and M. S. Obaidat, “Smart Environment Monitoring Using Wireless Sensor Networks in Internet of Things,” IEEE Internet of Things Journal, vol. 4, no. 5, pp. 1328–1339, Oct. 2017.
[9] A. Al-Fuqaha, M. Guizani, M. Mohammadi, M. Aledhari, and M. Ayyash, “Internet of Things: A Survey on Enabling Technologies, Protocols, and Applications,” IEEE Communications Surveys & Tutorials, vol. 17, no. 4, pp. 2347–2376, 2015.
[10] R. Piyare, “Internet of Things: Ubiquitous Home Control and Monitoring System using Android based Smart Phone,” International Journal of Internet of Things, vol. 2, no. 1, pp. 5–11, 2013.
[11] M. J. Khan, S. M. Rizvi, and F. Anwar, \"Design and Implementation of a Cloud Based Real-time Smart Home Automation System,\" 2020 IEEE International Conference on Computing, Power and Communication Technologies (GUCON), Greater Noida, India, 2020, pp. 923–928.