Mini Security System

by DESHBOT in Circuits > Arduino

29 Views, 0 Favorites, 0 Comments

Mini Security System

WhatsApp Image 2026-09-21 at 10.43.51 AM.jpeg

To design a simple security system using an Arduino Nano that detects motion with a PIR sensor and provides an alert using a buzzer and OLED display.

Supplies

des 1.jpeg
uno.jpeg
oled.jpeg
WhatsApp Image 2026-09-05 at 4.49.23 PM.jpeg

Deshbot shield

Arduino Nano

PIR Motion Sensor

128×64 OLED Display

Buzzer (inbuild)

Jumper Wires

Pin Connections


ComponentArduino Nano

PIR VCC - 5V

PIR GND - GND

PIR OUT - D9

Buzzer + - D11

Buzzer − GND

OLED VCC - 5V

OLED GND - GND

OLED SDA - A4

OLED SCL - A5

Downloads

Working Principle

WhatsApp Image 2026-09-21 at 10.44.09 AM.jpeg
WhatsApp Image 2026-09-21 at 10.45.03 AM.jpeg


The PIR sensor continuously checks for movement in its surroundings.

When no movement is detected:

  1. The buzzer remains OFF.
  2. The OLED displays SYSTEM SAFE.

When motion is detected:

  1. The PIR sensor sends a HIGH signal to the Arduino Nano.
  2. The Arduino turns ON the buzzer.
  3. The OLED displays WARNING! MOTION DETECTED.

When the motion is no longer detected, the buzzer turns OFF and the OLED returns to the safe state.

Program Flow

  1. Start the Arduino Nano.
  2. Initialize the PIR sensor and buzzer.
  3. Initialize the OLED display.
  4. Display SECURITY SYSTEM ON.
  5. Read the PIR sensor.
  6. If motion is detected:
  7. Turn ON the buzzer.
  8. Display the warning message.
  9. If no motion is detected:
  10. Turn OFF the buzzer.
  11. Display SYSTEM SAFE.
  12. Repeat continuously.

OLED Display

When the system starts:

SECURITY
SYSTEM ON

When there is no motion:

SYSTEM
SAFE

When motion is detected:

WARNING!
MOTION
DETECTED


Conclusion


This project demonstrates how an Arduino Nano can be used with a PIR sensor, buzzer, and OLED display to create a simple motion-based security system. The PIR sensor detects movement, the buzzer provides an audible alert, and the OLED provides a visual indication of the security status.