ARDUINO laser tripwire burglar alarm

Lasers are a cheap and easy way to make a ARDUINO laser tripwire burglar alarm.  But a word of warning, a laser can blind you if shined in your eyes so do not use this anywhere a child or pet will be able to come in contact with!

The video above will walk you through how this circuit works and how to set it up, Below is the wiring schematic and the ARDUINO ide code for building the project…

Parts needed:

affiliate links:

  1. one ARDUINO board
  2. one resistor
  3. one photoresistor
  4. one laser pointer
  5. one speaker or piezo
  6. jumper wires
  7. breadboard
  8. power supply for laser

If you don’t have any of these parts just click on there link to find where to buy them cheap with fast shipping.

THE SCHEMATIC:

This schematic is for a ARDUINO UNO but if you use a different arduino board just modify to fit your board..

If you are using a laser pointer or the laser found in the parts description above I recommend adding a 220Ω resistor to the pos+ side to bring the voltage down to a safe level (under 5 volts), 5 volts will work but it will burn out faster (not last as long)…

laser_trip

THE ARDUINO IDE CODE:

void setup() {
Serial.begin(9600); //start serial
}

void loop() {
int light=(analogRead(A0)); //read photo eye
Serial.println(light); //print light value 4 testing
delay(10);  //delay for stability
if (light<600) //check if beam broken
{
for (int x = 0; x < 25; x++) //set alarm duration
{
tone(2,400,100); //set tone to be played
delay(200);
}
}
}

The ARDUINO ide forever alarm code:

// this alarm will not stop until you cut the power or hit the reset button on your arduino..

void setup() {
Serial.begin(9600); //start serial
}

void loop() {
int light=(analogRead(A0)); //read photo eye
Serial.println(light); //print light value 4 testing
delay(10);  //delay for stability
if (light<600) //check if beam broken
{
int x=1;

while (x==1)

{
tone(2,400,100); //set tone to be played
delay(200);
}
}
}

I hope this ARDUINO laser tripwire burglar alarm tutorial was helpful and if you have any comments or questions about this project please leave them on our Facebook page, also if you want to be notified when new projects and tutorials are uploaded to this website follow us on Facebook.  OUR FACEBOOK PAGE!!!