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

Intruder Alert System

Intruder Alert System

Introduction: The Intruder Alert System is a crucial application in security systems, aiming to detect and notify the presence of unauthorized individuals in a given area. This article will provide a detailed explanation of the project, including its objectives, functionalities, and relevant information. Additionally, a list of components required for the project will be provided, along with example codes and use cases.

Project: The project aims to create an Intruder Alert System using an Arduino board and various sensors. The system will be able to detect motion or the opening of a door/window and trigger an alarm or notification to alert the user. The main objectives of this project are to enhance security measures, provide real-time notifications, and deter potential intruders.

List of Components:

  1. Arduino Uno - 1x [Link: https://www.arduino.cc/en/Main/ArduinoBoardUno]

  2. PIR (Passive Infrared) Motion Sensor - 1x [Link: https://www.sparkfun.com/products/13285]

  3. Magnetic Door/Window Sensor - 1x [Link: https://www.adafruit.com/product/375]

  4. Buzzer - 1x [Link: https://www.sparkfun.com/products/7950]

  5. LED - 1x [Link: https://www.sparkfun.com/products/9590]

  6. Breadboard - 1x [Link: https://www.sparkfun.com/products/12615]

  7. Jumper Wires - As required [Link: https://www.sparkfun.com/products/11026]

Examples: Example 1: Motion Detection

int pirPin = 2; // PIR motion sensor connected to digital pin 2
int ledPin = 13; // LED connected to digital pin 13

void setup() {
  pinMode(pirPin, INPUT); // Set PIR pin as input
  pinMode(ledPin, OUTPUT); // Set LED pin as output
}

void loop() {
  int pirValue = digitalRead(pirPin); // Read PIR sensor value
  if (pirValue == HIGH) {
    digitalWrite(ledPin, HIGH); // Turn on LED if motion detected
  } else {
    digitalWrite(ledPin, LOW); // Turn off LED if no motion detected
  }
}

In this example, the PIR motion sensor is connected to digital pin 2 of the Arduino. The sensor's output is read, and if motion is detected, the LED connected to pin 13 is turned on.

Example 2: Door/Window Open Detection

int doorPin = 3; // Door/window sensor connected to digital pin 3
int buzzerPin = 4; // Buzzer connected to digital pin 4

void setup() {
  pinMode(doorPin, INPUT); // Set door/window sensor pin as input
  pinMode(buzzerPin, OUTPUT); // Set buzzer pin as output
}

void loop() {
  int doorValue = digitalRead(doorPin); // Read door/window sensor value
  if (doorValue == HIGH) {
    digitalWrite(buzzerPin, HIGH); // Activate buzzer if door/window is open
    delay(1000); // Wait for 1 second
    digitalWrite(buzzerPin, LOW); // Turn off buzzer
  }
}

In this example, the magnetic door/window sensor is connected to digital pin 3 of the Arduino. When the sensor detects an open state, the buzzer connected to pin 4 is activated for one second.

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.