Back to School with STEM-Limited-Time Event(Aug 6-Sep 5)

user-img

Dharani Creations

+ Follow

Motion detection security system using pir sensor

This DIY system is designed to detect motion using a PIR sensor and notify the user via the Blynk mobile app. It uses a NodeMCU (ESP8266) as the core IoT microcontroller, connecting wirelessly to your home network to send real-time alerts whenever motion is detected

Motion detection security system using pir sensor
 
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
 

Hardware Components

  • NodeMCU

    X 1
  • crowbits-pir-sensor

    X 1
  • 12v SMD Buzzer

    X 1
  • Jumper Wires

    X 1
  • Power Supply SMPS 5V 12V 24V AC-DC 220V TO 12V 24V 5V 1A 1.5A 2A

    X 1 fenxiang

Tools, APP Software Used etc.

  • Arduino IDE

    Arduino IDE

    Arduino
  • Fritzing

  • Blynk

Story

 

Project Overview

This DIY system is designed to detect motion using a PIR sensor and notify the user via the Blynk mobile app. It uses a NodeMCU (ESP8266) as the core IoT microcontroller, connecting wirelessly to your home network to send real-time alerts whenever motion is detected 


 Key Components

  • NodeMCU (ESP8266) – Wi-Fi-enabled microcontroller

  • PIR Sensor (e.g., HC‑SR501) – Detects infrared changes from movement

  • LED indicator – Visual feedback on detection

  • Buzzer (optional) – Audible alarm on motion detection

  • Smartphone with Blynk App – For remote notifications


 How It Works

  1. PIR Sensor monitors infrared radiation and outputs a digital HIGH signal upon detecting motion within its field of view (~3–7 meters, ~110°) .

  2. NodeMCU reads this digital signal on a GPIO pin. If level-shifting is needed (5V → 3.3V), a voltage divider is used.

  3. Upon motion detection:

    • LED lights up (e.g., red for alert, green for idle).

    • Buzzer starts beeping (if included).

    • A push notification is sent via the Blynk app to the user’s smartphone .


 Circuit Layout

  • PIR Sensor → NodeMCU digital input (example: D1/GPIO5), with power (VCC, GND)

  • LEDs → NodeMCU output (e.g. D7/GPIO13) via 220 Ω resistor (one LED for normal state, another for alert) 

  • Voltage Divider (if needed) to ensure safe voltage levels between PIR output and NodeMCU input


 Software & Blynk Integration

  1. Setup in Blynk App:

    • Create a project using NodeMCU as the device.

    • Network type: Wi-Fi.

    • You’ll receive an Auth Token via email.

    • Add widgets: Toggle switch (e.g., to enable/disable monitoring) and Notification widget .

  2. Arduino Code:

    • Connect NodeMCU to Wi-Fi using SSID, password, and Auth Token.

    • Regularly read PIR input:

      • If HIGH → update LED/buzzer → send Blynk.notify("Motion detected").

      • If LOW → reset indicators accordingly.

    • Add debouncing or timers to avoid frequent alerts.


 Project Benefits & Applications

  • Use Cases:

    • Low-cost home or office security alert system

    • Room occupancy sensing

    • Motion-triggered LED or alarm activation

  • Advantages:

    • Affordable and accessible for beginners

    • Wireless (Wi-Fi) operation via NodeMCU

    • Real-time app notifications anywhere with internet access

    • Easily extendable for SMS, email, or camera integrations 


 Summary Table

Feature Description
Detection Range PIR sensor ~3–7 m, ~110° field of view
Microcontroller NodeMCU ESP8266 (3.3 V logic, built-in Wi-Fi)
Alert Mechanisms LED, buzzer, push notification via Blynk
Connectivity Wi-Fi network and Blynk cloud
Best For Basic motion alert systems via smartphone

 Extensions & Enhancements

  • Send SMS or email alerts using WebHooks/API integration

  • Attach a camera (ESP32-CAM or similar) to capture snapshots on motion

  • Integrate with cloud dashboards or databases for longer-term logging

  • Automate alarms, lights, or voice announcements upon detection


 

In conclusion, this project offers a straightforward and practical approach to building a motion detection alert system using NodeMCU, PIR sensor, and the Blynk platform. It's ideal for learning IoT fundamentals, sensor interfacing, and remote monitoring.

Code
  • CODE

    https://github.com/DharaniCreations/Motion-detection-security-system-using-pir-sensor/blob/main/arduino%20code.txt
    View
Schematic and Layout
  • Diagram

    https://github.com/DharaniCreations/Motion-detection-security-system-using-pir-sensor/blob/main/Circuit%20diagram.png
    View
CAD-Custom parts and enclosures

Motion detection security system using pir sensor

This DIY system is designed to detect motion using a PIR sensor and notify the user via the Blynk mobile app. It uses a NodeMCU (ESP8266) as the core IoT microcontroller, connecting wirelessly to your home network to send real-time alerts whenever motion is detected

27
 
4
0
0

Share your project on social media to expand its influence! Get more people to support it.

  • Comments( 0 )
  • Like( 4 )
/1000
Upload a photo:
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP

You May Also Like

View All
Add to cart
Board Type : GerberFile :
Layer : Dimensions :
PCB Qty :
Different PCB Design
PCB Thickness : PCB Color :
Surface Finish : Castellated Hole :
Copper Weight : 1 oz Production Time :
Total: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.

PCB Assembly

PCBA Qty: BomFile:
NO. OF UNIQUE PARTS: NO. of Components:
Country: Shipping Way:
Assembly Cost: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
3dPrintingFile : Size :
Unit : Volumn :
3D Printing Qty : Material :
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Acrylic Type : AcrylicFile :
Dimensions: Engrave:
Acrylic Qty :
Acrylic Thickness:
Acrylic Color:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
CNC Milling File : Size:
Unit: Volumn:
CNC Milling Qty : Material:
Type of Aluminum: Surface Finish:
Tolerance:
Surface Roughness:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Item Price Qty Subtotal Delete
Total: US $0.00
Certified Product | Supported Purchase: Full After-sales Protection