Smart ESP8266 PIR Motion Detection System With KiwisIoT for Real-Time IoT Security Monitoring
by SUDHAKAR N in Circuits > Microcontrollers
72 Views, 1 Favorites, 0 Comments
Smart ESP8266 PIR Motion Detection System With KiwisIoT for Real-Time IoT Security Monitoring
In this project, we developed an IoT-based motion detection system using an ESP8266 NodeMCU and a PIR motion sensor.
The PIR sensor detects human movement and sends the motion status to the ESP8266. The ESP8266 processes the sensor data and sends the information to the KiwisIoT platform through Wi-Fi.
The motion detection status can be monitored remotely using the KiwisIoT dashboard. This makes the project suitable for developing smart security, home automation, and IoT monitoring applications.
Supplies
The following components are required:
Hardware Components
- ESP8266 NodeMCU
- PIR Motion Sensor (HC-SR501)
- Jumper Wires
- USB Cable
Software and Platform Requirements
- Arduino IDE
- ESP8266 Board Package for Arduino IDE
- Wi-Fi Connection
- KiwisIoT Account and Dashboard
- KiwisIoT library
Understanding the PIR Sensor :-
- A PIR sensor is used to detect motion by sensing changes in infrared radiation.
- When a person or object moves within the sensor's detection range, the PIR sensor produces a HIGH digital signal.
- When no motion is detected, the sensor output remains LOW.
- The ESP8266 continuously reads this output and sends the motion status to the KiwisIoT platform.
ESP8266 and PIR Sensor Connection :-
- Connect the PIR sensor to the ESP8266 NodeMCU as follows:
- Ensure that all the components have a common ground connection.
Configure the KiwisIoT Dashboard :-
To display the PIR sensor status remotely, create a panel on the KiwisIoT platform.
Follow these steps:
- Create a panel and provide a suitable panel name.
- Save the panel.
- Add the required widgets to display the PIR sensor status.
- Configure the correct channel number for the sensor data.
- Save the dashboard configuration.
Once the setup is complete, the ESP8266 will connect to the Wi-Fi network and transmit the PIR sensor values to the KiwisIoT dashboard, allowing you to monitor the motion sensor status remotely in real time.
Working Principle :-
- The PIR sensor continuously monitors the surrounding area for movement.
When motion is detected:
- The PIR sensor output becomes HIGH
- The ESP8266 reads the HIGH signal
- The motion status is updated
- The data is transmitted through Wi-Fi
- The KiwisIoT dashboard displays the detected motion
When there is no motion:
- The PIR sensor output remains LOW
- The ESP8266 detects no movement
- The dashboard displays the corresponding status
Upload the Code to the ESP8266 Board :-
After completing the circuit connections and configuring the KiwisIoT dashboard, upload the program to the ESP8266 NodeMCU board using the Arduino IDE.
Follow these steps:
- Connect the ESP8266 NodeMCU to your computer using a USB cable.
- Open the Arduino IDE and paste the PIR Motion Detection System code.
- Enter your Wi-Fi Name, Wi-Fi Password, and KiwisIoT Topic ID in the code.
- Select the correct ESP8266 NodeMCU board from the Tools → Board menu.
- Select the correct Port from the Tools → Port menu.
- Click the Upload button to upload the code to the ESP8266 board.
- Wait until the code is successfully uploaded.
Testing the Project :-
After connecting the ESP8266 to the Wi-Fi network and configuring the KiwisIoT dashboard:
- Power ON the ESP8266.
- Wait for the PIR sensor to stabilize.
- Move in front of the PIR sensor.
- The sensor detects motion.
- The ESP8266 reads the sensor output.
- The motion status is sent to the KiwisIoT platform.
- The updated value can be viewed remotely on the dashboard.
Result :-
1) The ESP8266 PIR Motion Detection System with KiwisIoT was successfully implemented. The PIR sensor detected motion and sent the sensor status to the KiwisIoT dashboard through the ESP8266 Wi-Fi connection.
- Motion Detected: Value 1 / HIGH
- No Motion Detected: Value 0 / LOW
2) The sensor status was successfully monitored remotely in real time using the KiwisIoT dashboard.
Applications :-
This project can be used in:
- Smart Home Security Systems
- Motion Detection Systems
- Intruder Detection
- Automatic Lighting
- Energy Management
- Office Security Systems
- IoT-Based Monitoring Systems
Conclusion
- In this project, we successfully developed an IoT-based motion detection system using an ESP8266 and a PIR sensor.
- The PIR sensor detects movement, and the ESP8266 reads the sensor output. Using Wi-Fi connectivity, the motion status is transmitted to the KiwisIoT platform, where the values can be monitored remotely through a dashboard.
- This project demonstrates how IoT technology can be used to create an efficient and low-cost smart monitoring system. The system can be further enhanced by adding notifications, alarms, cameras, or automated control features.
Frequently Asked Questions (FAQ)
1. What is the purpose of this project?
This project detects motion using a PIR sensor and sends the motion status to the KiwisIoT dashboard through the ESP8266 Wi-Fi connection.
2. What values does the PIR sensor provide?
The PIR sensor provides a HIGH (1) signal when motion is detected and a LOW (0) signal when no motion is detected.
3. Can the PIR sensor status be monitored remotely?
Yes. The ESP8266 sends the PIR sensor values to the KiwisIoT dashboard through Wi-Fi, allowing real-time remote monitoring.
4. What are the applications of this project?
This system can be used for smart home security, intruder detection, automatic lighting, office security, and IoT-based monitoring systems.