Skip to content

Mahmoudbat/Smart-Home-Security-Hub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ESP32 Smart Home Security Hub

A versatile IoT device built to provide remote monitoring and control for home security and environment. This project uses an ESP32 microcontroller to collect data from multiple sensors and leverages the Blynk IoT platform to provide real-time mobile notifications and a user-friendly control panel.

Project Photo

Features

  • Instant Motion Alerts: Utilizes a PIR sensor to detect motion and sends a real-time push notification to a mobile device via the Blynk cloud, providing immediate security alerts.
  • Remote Appliance Control: Includes a relay module that can be toggled remotely from the Blynk mobile app, allowing for the control of lamps, fans, or other small appliances from anywhere.
  • Real-time Climate Monitoring: Integrates a DHT11 sensor to continuously measure ambient temperature and humidity, displaying the live data on the mobile dashboard.
  • Software-Configurable Debug Mode: A debugging flag in the code enables detailed Serial output and a physical LED motion indicator for easy testing and troubleshooting without affecting the core functionality.

Hardware & Software

Hardware Components

  • ESP32 Development Board
  • PIR Motion Sensor (HC-SR501)
  • DHT11 Temperature and Humidity Sensor
  • 5V Single Channel Relay Module
  • Indicator LED

Software & Cloud

  • C++ (in Arduino IDE)
  • Blynk IoT Platform

Challenges & Lessons Learned

During this project, I encountered and solved key challenges on both the software and hardware fronts, providing valuable learning experiences.

  • Software Integration: A key software challenge was integrating with the Blynk IoT platform for the first time. This involved learning the Blynk library's asynchronous model, using BlynkTimer for non-blocking sensor reads, and understanding the BLYNK_WRITE and Blynk.virtualWrite functions to manage two-way communication between the ESP32 and the cloud service. This taught me how to effectively connect embedded hardware to a remote user interface.

  • Hardware Calibration: On the hardware side, a practical challenge was calibrating the HC-SR501 PIR sensor for reliable performance. I learned through experimentation that the two onboard potentiometers control sensitivity (detection range) and time delay (output duration). It required careful, iterative adjustments to find the optimal balance that would prevent false triggers while ensuring responsiveness, teaching me the importance of hardware tuning for real-world deployment.


About

a smart home using esp32 and blynk

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages