Laser alarm with RFID module
More info and updates in https://rogerbit.com/wprb/2024/08/alarma-laser-rfid/
In this project, we build a security alarm using a laser detection system, a laser receiver sensor, a buzzer and an RFID-RC522 module, all controlled by an Arduino. The goal is to create a system that can detect the interruption of a laser beam and trigger an audible alarm, as well as allowing the arming and disarming of the alarm using a specific RFID card.
Project Operation:
Laser Detection System:
The system relies on a constant laser beam aimed at a laser receiver sensor. This sensor is configured to detect the presence or absence of the laser beam. Under normal conditions, the laser reaches the sensor and the system recognizes this condition as a “safe” state.
Laser Detection System:
The system relies on a constant laser beam aimed at a laser receiver sensor. This sensor is configured to detect the presence or absence of the laser beam. Under normal conditions, the laser reaches the sensor and the system recognizes this condition as a “safe” state.
Alarm Activation:
When the laser beam is interrupted (for example, by a person passing through the beam), the receiving sensor detects the absence of the laser. This change of state is detected by the Arduino, which in turn activates a buzzer to emit an audible alarm. This mechanism acts as a security barrier, alerting of an intrusion or unauthorized access.
Alarm Activation:
When the laser beam is interrupted (for example, by a person passing through the beam), the receiving sensor detects the absence of the laser. This change of state is detected by the Arduino, which in turn activates a buzzer to emit an audible alarm. This mechanism acts as a security barrier, alerting of an intrusion or unauthorized access.
Arming and Disarming Control with RFID:
The project includes an RFID-RC522 module that allows the alarm to be armed and disarmed using a specific RFID card. By presenting the authorized card, the system switches between armed and disarmed states. This means that, when the alarm is armed, any interruption of the laser beam will activate the buzzer. When disarming the alarm, the system will not react to beam interruptions, avoiding false alarms.
Arming and Disarming Control with RFID:
The project includes an RFID-RC522 module that allows the alarm to be armed and disarmed using a specific RFID card. By presenting the authorized card, the system switches between armed and disarmed states. This means that, when the alarm is armed, any interruption of the laser beam will activate the buzzer. When disarming the alarm, the system will not react to beam interruptions, avoiding false alarms.
Alarm Status Indicator:
In addition to the buzzer, a laser connected to the Arduino indicates the alarm status. This laser turns on when the alarm is armed and turns off when the alarm is disarmed, providing a visual indication of the system status.
Alarm Status Indicator:
In addition to the buzzer, a laser connected to the Arduino indicates the alarm status. This laser turns on when the alarm is armed and turns off when the alarm is disarmed, providing a visual indication of the system status.
Reading and Displaying RFID Card UID:
Each time an RFID card is brought close to the module, the system reads its UID (Unique Identifier) and displays it on the serial monitor. This allows verification of whether the presented card is the one authorized to control the alarm or not. Even if the card is not authorized, the UID is displayed to facilitate access monitoring and control.
Reading and Displaying RFID Card UID:
Each time an RFID card is brought close to the module, the system reads its UID (Unique Identifier) and displays it on the serial monitor. This allows verification of whether the presented card is the one authorized to control the alarm or not. Even if the card is not authorized, the UID is displayed to facilitate access monitoring and control.
Applications and Expansion:
This laser alarm system can be used in a variety of security applications, such as protecting entrances, windows, or restricted areas. In addition, the project is easily expandable; multiple laser sensors can be added to cover a larger area, or more functionalities can be incorporated such as SMS alerts, integration with home automation systems, or even remote monitoring via the Internet.
With this project, you not only learn how to work with components like laser sensors, RFID modules, and Arduino, but you also get a hands-on introduction to security and access control systems. It's a great way to explore the intersection between hardware and software, and how the two can be combined to create practical, effective real-world solutions.
Arduino Nano
The Arduino Nano is a small, full-featured, breadboard-compatible board based on the ATmega328 (Arduino Nano 3.x). It has more or less the same functionality as the Arduino Duemilanove, but in a different package. It only lacks a DC power connector and is powered by a Mini-B USB cable instead of a standard one.
A socket for arduino
Female pins
Dupont cables female male
Module Laser ky-008
This module specially designed for Arduino emits easily, quickly and accurately a laser beam produced by this component
It is a Laser Emitting Diode that operates at 5V and emits at a wavelength of 650nm.
Technical characteristics:
Working voltage: 5V
Wavelength: 650nm
Power 5 mW
Color: Red
Material: PCB
Dimensions: 2.3×1.5×0.9cm
Laser Receiver Module
Description
Detecting the light beam of a laser pointer will now be easier with the help of this sensor.
When light is focused on the sensor, it changes the voltage at its output.
It can be used together with the laser module to build counting systems, intrusion detection, remote data transmission.
TECHNICAL SPECIFICATIONS
Operating voltage: 5V DC
Salida digital TTL
Output high level (5V) when receiving laser signal
Low level output (0V) when no laser signal is received
RC522 RFID Module
Rfid Module Rc522 13.56mhz Card And Keychain Arduino
The module uses 3.3V as a supply voltage and is controlled via the SPI protocol, making it compatible with almost any microcontroller, Arduino or development board.
The RC522 uses an advanced modulation and demodulation system for all types of 13.56Mhz passive devices. The device handles ISO14443A and supports Quick CRYPTO1 and MIFARE encryption algorithms.
The RC522 MF circuit is used for 13.56Mhz wireless communication to write or read data for low power, low cost and small size applications. Ideal for portable devices or cards.
Features Model: MF522-ED
Operating current: 13-26mA at 3.3V
Standby current: 10-13mA at 3.3V
Sleep-mode current: <80µA
Peak current: 30mA
Operating frequency: 13.56Mhz
Reading distance: 0 to 60mm
Communication protocol: SPI
Maximum data rate: 10Mbit/s
Dimensions: 40 x 60 mm
Operating temperature: -20 to 80ºC
Operating humidity: 5%-95%
Maximum SPI speed: 10Mbit/s
Descargar PCB –> pcb ardunano
Circuit
#include <SPI.h>
#include <MFRC522.h>
//SDA (SS) a Pin 10 del Arduino
//SCK a Pin 13 del Arduino
//MOSI a Pin 11 del Arduino
//MISO a Pin 12 del Arduino
//IRQ a N/C (no conectado)
//GND a GND del Arduino
//RST a Pin 9 del Arduino
//3.3V a 3.3V del Arduino
const int pinReceptorLaser = 8; // Pin digital donde está conectado el receptor láser
const int pinBuzzer = A4; // Pin digital donde está conectado el buzzer
const int pinRST = 9; // Pin RST del módulo RFID-RC522
const int pinSS = 10; // Pin SDA del módulo RFID-RC522
int estadoReceptorLaser = 0; // Variable para almacenar el estado del receptor láser
bool alarmaArmada = false; // Variable para controlar si la alarma está armada
bool alarmaActiva = false; // Variable para controlar el estado de la alarma
const int pinLED = 2; // Pin digital donde está conectado el LED
MFRC522 lectorRFID(pinSS, pinRST); // Crear instancia del objeto MFRC522
// UID de la tarjeta autorizada
byte UIDAutorizado[] = {0xC5, 0x81, 0xB6, 0x35};
void setup() {
pinMode(pinReceptorLaser, INPUT);
pinMode(pinLED, OUTPUT); // Configurar el pin del emisor Laser como salida
pinMode(pinBuzzer, OUTPUT);
Serial.begin(9600); // Iniciar comunicación serial para debug
SPI.begin(); // Iniciar bus SPI
lectorRFID.PCD_Init(); // Iniciar módulo MFRC522
Serial.println("Coloca la tarjeta RFID...");
}
void loop() {
estadoReceptorLaser = digitalRead(pinReceptorLaser); // Leer el estado del receptor láser
Serial.print("Estado del receptor láser: ");
Serial.println(estadoReceptorLaser);
// Verificar si hay una tarjeta RFID
if (lectorRFID.PICC_IsNewCardPresent() && lectorRFID.PICC_ReadCardSerial()) {
digitalWrite(pinLED, HIGH); // Encender el LED cuando la alarma esté armada
if (esAutorizada(lectorRFID.uid.uidByte, lectorRFID.uid.size)) {
alarmaArmada = !alarmaArmada; // Alternar el estado de armado de la alarma
alarmaActiva = false; // Resetear el estado de la alarma
if (alarmaArmada) {
Serial.println("Tarjeta RFID autorizada detectada, alarma armada.");
} else {
Serial.println("Tarjeta RFID autorizada detectada, alarma desarmada.");
digitalWrite(pinLED, LOW); // Apagar el LED cuando la alarma esté desarmada
}
} else {
Serial.println("Tarjeta RFID no autorizada detectada.");
}
lectorRFID.PICC_HaltA(); // Detener lectura de la tarjeta
}
// Activar la alarma si está armada y el receptor láser está en LOW
if (alarmaArmada) {
alarmaActiva = true;
}
// Controlar el buzzer basado en el estado de la alarma
if (alarmaActiva) {
estadoReceptorLaser = digitalRead(pinReceptorLaser); // Leer el estado del receptor láser
if (estadoReceptorLaser == 0) {
digitalWrite(pinBuzzer, HIGH); // Encender el buzzer si la alarma está activa
}
} else {
digitalWrite(pinBuzzer, LOW); // Apagar el buzzer si la alarma no está activa
}
delay(100); // Pequeña pausa para evitar lecturas erráticas
}
bool esAutorizada(byte *uid, byte tamanoUID) {
// Verificar si el UID leído coincide con el UID autorizado
if (tamanoUID != sizeof(UIDAutorizado)) {
return false;
}
for (byte i = 0; i < tamanoUID; i++) {
if (uid[i] != UIDAutorizado[i]) {
return false;
}
}
return true;
}
Laser alarm with RFID module
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by CarlosVolt Tutoriales
- Infrared stepper motor control with speed control More info and updates https://rogerbit.com/wprb/2024/09/motor-paso-a-paso-x-infrarrojo/In this proje...
- Uploading BME280 Sensor Data to ThingSpeak Using ESP32 In this tutorial, we will show you how to connect a BME280 sensor to an ESP32 to read temperature, h...
- Water pump control for irrigation via telegram and esp32 Water Pump Control by Telegram and ESP32 is an automated system that allows you to remotely control ...
- Air conditioning on/off control via telegram and esp32 In this tutorial we will see how to control an air conditioner, with an esp32 and the telegram appli...
- 35 watt stereo amplifier In this video we will see how to build an audio amplifier, with the TDA7377 integrated circuit, and ...
- Laser alarm with RFID module More info and updates in https://rogerbit.com/wprb/2024/08/alarma-laser-rfid/In this project, we bui...
- Control lights by voice commands and keys In this tutorial we will see how to create a device to control lights by voice commands, with a modu...
- Stepper motor control x bluetooth and app In this tutorial we will see a circuit, which controls a stepper motor, with an application made in ...
- DFplayermini x bluetooth mp3 player control More info and updates in https://rogerbit.com/wprb/2022/12/dfplayermini-x-bluetooth/In this tutorial...
- Robot with WiFi control and servos driven by ESP32 More info and updates in https://rogerbit.com/wprb/2023/07/robot-wifi/A robot controlled by Wi-Fi, s...
- How to make a water level meter with uln2803 In this tutorial we will see how to make a water level meter circuit with the built-in uln2803.The p...
- Color Detector with Arduino and OLED display In this tutorial we will show you how to build a color detector using the TCS3200 sensor and an SH11...
- DTMF decoder for handy with arduino, control over several kilometers In this tutorial we will see how to make a circuit to connect to our handy, in this case a Baofeng U...
- Turn on light from thindspeak with esp32 In this tutorial, we will show you how to control lights over the Internet using an ESP32 and the Th...
- MP3 player control with webserver using ESP32 WIFI In this tutorial, you will learn how to build a web server using the ESP32 to control the YX5300 mod...
- Time clock with fingerprint IoT module, uploading data to thingspeak More info in and updates in https://rogerbit.com/wprb/2022/07/reloj-de-control-fingerprint/In this t...
- Make your own logic tip (includes printed circuit board) In this video tutorial we will see how to make a logic tip, on a printed circuit, with the integrate...
- Coil or inductor meter with Arduino and OLED display More info and updates in https://rogerbit.com/wprb/2022/06/medidor-inductores/In this tutorial we wi...
-
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
120 0 0 -
DIY Laser Power Meter with Arduino
170 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
157 0 2 -