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

Alarm+Feature

The importance and usefulness of the Alarm+Feature

The Alarm+Feature is a project that combines the functionalities of an alarm system with additional features that can be customized according to specific needs. This project is particularly useful for home automation and security applications, as it allows users to create a flexible and personalized alarm system.

By using Arduino and various components, the Alarm+Feature project can be easily implemented and expanded upon. The project offers a wide range of functionalities, such as motion detection, door/window opening detection, temperature monitoring, and more. These features can be combined or used individually, depending on the requirements of the user.

Project: The Alarm+Feature project aims to create a customizable alarm system that can be easily integrated into existing home automation setups. The project includes the following objectives and functionalities:

  1. Motion detection: The system will detect any motion within a specified range using a passive infrared (PIR) sensor. When motion is detected, an alarm will be triggered.
  2. Door/window opening detection: Magnetic reed switches will be used to detect the opening and closing of doors or windows. When a door or window is opened, an alarm will be triggered.
  3. Temperature monitoring: A temperature sensor will be used to monitor the ambient temperature. If the temperature exceeds a predefined threshold, an alarm will be triggered.
  4. Alarm control: The system will provide options for arming and disarming the alarm, as well as configuring the alarm settings. This can be done through a user interface, such as a keypad or a mobile application.

List of components:

Examples:

Example 1: Motion detection

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>

#define PIR_PIN 2
#define LED_PIN 13

Adafruit_BME280 bme;

void setup() {
  pinMode(PIR_PIN, INPUT);
  pinMode(LED_PIN, OUTPUT);
  Serial.begin(9600);
  if (!bme.begin(0x76)) {
    Serial.println("Could not find a valid BME280 sensor, check wiring!");
    while (1);
  }
}

void loop() {
  int motion = digitalRead(PIR_PIN);
  if (motion == HIGH) {
    digitalWrite(LED_PIN, HIGH);
    Serial.println("Motion detected!");
    float temperature = bme.readTemperature();
    float humidity = bme.readHumidity();
    Serial.print("Temperature: ");
    Serial.print(temperature);
    Serial.print(" °C, Humidity: ");
    Serial.print(humidity);
    Serial.println(" %");
  } else {
    digitalWrite(LED_PIN, LOW);
  }
  delay(1000);
}

Example 2: Door/window opening detection

#define DOOR_PIN 3
#define LED_PIN 13

void setup() {
  pinMode(DOOR_PIN, INPUT);
  pinMode(LED_PIN, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  int doorStatus = digitalRead(DOOR_PIN);
  if (doorStatus == HIGH) {
    digitalWrite(LED_PIN, HIGH);
    Serial.println("Door/window opened!");
  } else {
    digitalWrite(LED_PIN, LOW);
  }
  delay(1000);
}

Example 3: Temperature monitoring

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>

#define TEMP_PIN A0
#define LED_PIN 13

Adafruit_BME280 bme;

void setup() {
  pinMode(LED_PIN, OUTPUT);
  Serial.begin(9600);
  if (!bme.begin(0x76)) {
    Serial.println("Could not find a valid BME280 sensor, check wiring!");
    while (1);
  }
}

void loop() {
  int tempReading = analogRead(TEMP_PIN);
  float temperature = map(tempReading, 0, 1023, -40, 85);
  if (temperature > 30) {
    digitalWrite(LED_PIN, HIGH);
    Serial.print("Temperature: ");
    Serial.print(temperature);
    Serial.println(" °C");
  } else {
    digitalWrite(LED_PIN, LOW);
  }
  delay(1000);
}

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.