Make Tripwire Security Alarm Using Arduino

About the project

Hey friends welcome back today in this articlei will show you how to Make Tripwire security Alarm using Arduino.

Items used in this project

Hardware components

LDR, 5 Mohm LDR, 5 Mohm x 1
9V battery (generic) 9V battery (generic) x 1
Laser Diode, 2 Pins Laser Diode, 2 Pins x 1
Arduino Nano R3 Arduino Nano R3 x 1

Software apps and online services

Arduino IDE Arduino IDE


Hey friends welcome back today in this tutorial I will show you how to Make Tripwire security Alarm using Arduino.

A tripwire is one of the most basic ways to set up a very simple security system. You cross a line across a pathway. Whenever someone walks through the beam, the buzzer alarm activate. This project is very simple to build since we won't have to modify any parts.

You can watch the tutorial and finished product right here - Make-arduino-laser

You can find all of my projects on

Thank You NextPCB

This project is successfully completed because of the help and support from NextPCB.

Guys if you have a PCB project, please visit their website and get exciting discounts and coupons.

Only 0$ for 10pcs 1-4 layer PCBs

Let's get started!

Step 1: You Will Need the Following Required Components and Materials:




Arduino Nano (

Buzzer (

Battery Holder (

Battery (

Laser (

LDR Sensor (

wire (

Step 2: Circuit Diagram

1 / 2

Circuit diagram

Circuit diagram

Here is the Schematics Diagram for this project. as you can see the circuit diagram is very easy and simple. follow circuit diagram and connect the all components.

Step 3: Connecting the Buzzer and LDR to the Arduino

1 / 3Assemble



Plug our Buzzer into GND and Pin D8 of the Arduino.

The LDR will go into GND and Pin D2 of the Arduino.

I provided a image with all pins tagged to make things easier for you.

Step 4: Program Your Arduino




Connect the Arduino with your laptop or PC using usb cable and program your Arduino using the code provided in below.

First, download the Arduino sketch from here

const int photo = 2;
const int Buzzer= 8;
void setup()
pinMode(Buzzer, OUTPUT);
digitalWrite(Buzzer, LOW);
pinMode(photo, INPUT_PULLUP);
void loop() {//if/else loop checks if photoresistor is high or low
digitalWrite(Buzzer, HIGH);
digitalWrite(Buzzer, LOW);

Step 5: Testing

1 / 3testing



Mount the Laser Pointer and the Alarm Circuit to Form a Single Beam Tripwire

The simplest way to set up your alarm is as a single beam tripwire. In this configuration the laser pointer is mounted to one side of the walk way and the alarm circuit is mounted to the other. For the tripwire to work, the laser pointer needs to be constantly on. The easiest way to accomplish this is by tightly wrapping a piece of tape around the button.

I hope You like this project

Step 6: Working Video

Please follow me for more intriguing projects -:)




Schematics, diagrams and documents

circuit Design


Code snippet #1


Leave your feedback...