Making your own laser tripwire alarm with an Arduino is a fun electronics project that can be done on a budget. With just a few simple components, you can build a working alarm system to detect intruders crossing a laser beam.

What You Will Need

To build the laser tripwire alarm, you will need the following components:

Arduino Uno

The Arduino Uno is the microcontroller board that will control the alarm. It can be purchased for around $10.

Laser diode module

A laser diode module is used to produce the laser beam for the tripwire. These can be found for just a few dollars.

Photoresistor

A photoresistor or light dependent resistor (LDR) will detect when the laser beam is broken. Only a couple of dollars.

Resistors

Resistors are needed to properly control the laser and photoresistor. You'll need two 10K ohm resistors. Just a few cents each.

Breadboard

A breadboard is used to easily connect the components without soldering. Can be bought for around $5.

Jumper wires

Jumper wires connect the components on the breadboard. A bundle can be bought for a few dollars.

Buzzer

An electronic buzzer will sound the alarm when the beam is broken. Just $1-2.

9V battery & holder

A 9V battery and holder will power the alarm. Around $5 total.

So as you can see, all the components can be sourced for around $15!

How the Laser Tripwire Alarm Works

Here is a quick overview of how the DIY laser tripwire alarm works:

So breaking the laser beam with your hand or an object will sound the alarm. Pretty simple!

Now let's look at how to put the components together.

Setting Up the Circuit

The first step is to build the circuit on the breadboard.

Here is a circuit diagram showing how everything should be connected:

Circuit diagram for laser tripwire alarm

With the circuit complete, now the code can be added.

Programming the Arduino

The Arduino code for the laser tripwire alarm does the following:

Here is the full Arduino sketch:

```cpp
// Set pin numbers
const int laser = 3;
const int buzzer = 11;
const int photoresistor = A0;

// Threshold for triggering alarm
int threshold = 400;

void setup() {

// Set laser and buzzer as outputs
pinMode(laser, OUTPUT);
pinMode(buzzer, OUTPUT);

// Set photoresistor pin as input
pinMode(photoresistor, INPUT);
}

void loop() {

// Read photoresistor value
int val = analogRead(photoresistor);

// Check if beam is broken
if (val < threshold) {

// Trigger alarm
digitalWrite(buzzer, HIGH);

}
else{

// Disable alarm
digitalWrite(buzzer, LOW);

}

delay(10);
}
```

This code can be uploaded to the Arduino board using the Arduino IDE.

Now it's ready to test!

Testing and Using the Laser Tripwire

To test the alarm:

To use the tripwire:

Troubleshooting

If the alarm isn't working, double check the wiring matches the circuit diagram. Also try adjusting the threshold value up or down until the alarm reliably triggers.

And that's it! With just a few cheap components, you can build your own DIY Arduino laser tripwire alarm for under $15.