Remember to maintain security and privacy. Do not share sensitive information. Procedimento.com.br may make mistakes. Verify important information. Termo de Responsabilidade

Security+System using Arduino: A Comprehensive Guide

Importance and Utility of Security+System

In today's world, security is of utmost importance, whether it is for our homes, offices, or any other valuable assets. With the advancement in technology, it has become easier to implement security systems that provide effective surveillance and protection. Arduino, being a versatile microcontroller platform, can be used to create a Security+System that is customizable, cost-effective, and efficient. This article aims to guide you through the process of building a Security+System using Arduino, providing you with the necessary knowledge and examples to get started.

Project: Security+System using Arduino

The project we will be creating is a basic Security+System that utilizes various sensors and modules to detect and respond to potential security threats. The objectives of this project are as follows:

  1. Detect unauthorized access to a secured area.
  2. Trigger an alarm or notification when a security breach is detected.
  3. Provide real-time monitoring and logging of security events.

Functionalities of the Security+System:

  1. PIR (Passive Infrared) Sensor: Detects motion within its range and triggers an alarm.
  2. Magnetic Door Sensor: Detects the opening or closing of doors and windows, triggering an alarm if unauthorized access is detected.
  3. Keypad: Allows authorized users to arm or disarm the security system using a predefined code.
  4. Buzzer: Produces an audible alarm sound when a security breach is detected.
  5. LCD Display: Provides real-time monitoring of the system status and displays relevant information.
  6. GSM Module (optional): Sends SMS notifications to predefined phone numbers when a security breach is detected.

List of Components:

  1. Arduino UNO R3 - 1x Link
  2. PIR Sensor - 1x Link
  3. Magnetic Door Sensor - 1x Link
  4. Keypad - 1x Link
  5. Buzzer - 1x Link
  6. LCD Display - 1x Link
  7. GSM Module (optional) - 1x Link

Examples: Example 1: PIR Sensor Alarm

// PIR Sensor Alarm

int pirPin = 2; // PIR sensor output connected to digital pin 2
int alarmPin = 3; // Buzzer output connected to digital pin 3

void setup() {
  pinMode(pirPin, INPUT);
  pinMode(alarmPin, OUTPUT);
}

void loop() {
  int pirState = digitalRead(pirPin);

  if (pirState == HIGH) {
    digitalWrite(alarmPin, HIGH);
    delay(1000);
    digitalWrite(alarmPin, LOW);
  }
}

Example 2: Magnetic Door Sensor Alarm

// Magnetic Door Sensor Alarm

int doorPin = 2; // Door sensor output connected to digital pin 2
int alarmPin = 3; // Buzzer output connected to digital pin 3

void setup() {
  pinMode(doorPin, INPUT);
  pinMode(alarmPin, OUTPUT);
}

void loop() {
  int doorState = digitalRead(doorPin);

  if (doorState == HIGH) {
    digitalWrite(alarmPin, HIGH);
    delay(1000);
    digitalWrite(alarmPin, LOW);
  }
}

Example 3: Keypad Security Control

// Keypad Security Control

#include <Keypad.h>

const int ROW_NUM    = 4; // four rows
const int COLUMN_NUM = 4; // four columns

char keys[ROW_NUM][COLUMN_NUM] = {
  {'1','2','3','A'},
  {'4','5','6','B'},
  {'7','8','9','C'},
  {'*','0','#','D'}
};

byte pin_rows[ROW_NUM] = {9, 8, 7, 6}; // connect to the row pinouts of the keypad
byte pin_column[COLUMN_NUM] = {5, 4, 3, 2}; // connect to the column pinouts of the keypad

Keypad keypad = Keypad(makeKeymap(keys), pin_rows, pin_column, ROW_NUM, COLUMN_NUM);

void setup() {
  Serial.begin(9600);
}

void loop() {
  char key = keypad.getKey();

  if (key) {
    Serial.println(key);

    if (key == '#') {
      // Perform security system actions (e.g., arm or disarm)
    }
  }
}

To share Download PDF

Gostou do artigo? Deixe sua avaliação!
Sua opinião é muito importante para nós. Clique em um dos botões abaixo para nos dizer o que achou deste conteúdo.