← Back to Basic Projects
Basic . Project #16

⚑ Laser Security Tripwire

Create an invisible security beam that triggers an alarm when the laser light is blocked.

πŸ“‹ Overview

By pointing a laser at an LDR (Photoresistor), we create a high-voltage signal. If anyone walks through the beam, the light is blocked, the LDR resistance jumps, and the alarm triggers.

What you'll learn: Optical sensing, threshold calibration, and security logic.

Estimated time: 30-45 minutes. Difficulty: ⭐⭐ Easy.

🧩 Components Needed

ComponentSpecificationQtyNotes
Arduino Uno R35V1
Laser Diode5V 5mW Red1KY-008 module
LDRPhotoresistor1
Piezo BuzzerAlarm1
Resistor10kOhm1For voltage divider

πŸ“– Step-by-Step Tutorial

1

Set Up Laser

Connect laser to 5V and GND. Aim it at the LDR from a distance.
2

Wire LDR

Create a voltage divider with 10kOhm resistor and connect to A0.
3

Wire Buzzer

Connect buzzer to pin 8.
4

Calibrate

Check Serial Monitor. Note the value when laser is hitting LDR vs when it is blocked. Set threshold accordingly.
πŸ’‘
Use a small tube (like a straw) over the LDR to block ambient light. This makes your tripwire much more reliable in bright rooms.

πŸ’» Arduino Code

laser_tripwire.ino
INO
// Laser Tripwire : Volt X
const int ldr = A0;
const int buzzer = 8;
int threshold = 800; // Adjust based on Serial Monitor

void setup() {
  pinMode(buzzer, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  int val = analogRead(ldr);
  if (val < threshold) { // Beam broken
    tone(buzzer, 2000, 500);
    delay(500);
  } else {
    noTone(buzzer);
  }
}

⭐Reviews & Ratings

β€”0 reviews
5β˜…
0
4β˜…
0
3β˜…
0
2β˜…
0
1β˜…
0
⏳

Loading reviews…