DIY | Easy Arduino Laser Tripwire Security System!





Introduction: DIY | Easy Arduino Laser Tripwire Security System!

In this tutorial I will be teaching you how you can build your own Laser Tripwire Security System at home!

You will need the following components and materials:

  • LED light
  • Laser Module
  • Laser Sensor Module
  • Speaker or Piezo Buzzer
  • 2 Small Breadboards with sticky tape on the back
  • Arduino
  • Breadboard wires
  • USB Cable (to program the Arduino)

This project is very simple to build since we won't have to modify any parts.

You can watch the video tutorial and finished product right here -

Step 1: Aligning the Laser Modules

First off, we plug our laser module and sensor into the mini breadboards.
Make sure you align them properly, otherwise your alarm will start beeping as soon as you upload the code.

Step 2: Connecting the Speaker and LED to the Arduino

We will plug our speaker into GND and Pin 7 of the Arduino.
The LED will go into GND and Pin 13 of the Arduino.

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

Step 3: Connecting the Laser and Sensor to the Arduino

Starting off with the sensor, the pins should be connected like this:

Sensor - Arduino
OUT → Pin 2
VCC → 5V

And now the laser module:

Laser - Arduino
Middle → 5V
- → GND

I suggest using longer cables to connect the laser module, since you'd probably attach it to the other side of the room / door.

Once again I provided images to make things easier.

Step 4: Program Your Arduino

Connect the Arduino to your PC and program your Arduino using the code provided in this step.

You can change the alarm by editing the void "alarmTone" and the void "alarm".

If you don't want a delay or you need a longer delay in order to disable the alarm you can change the value "3000" in "delay(3000);" in the void "alarm".



    • Paper Contest 2018

      Paper Contest 2018
    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Science of Cooking

      Science of Cooking

    We have a be nice policy.
    Please be positive and constructive.




    I'm looking for some code that could read four lasers 'laser 1 thru 4' if momentary 1 2 3 4 then do nothing- if momentary 4 3 2 1 then alarm. Any ideas?


    Can someone please share the model number / make of the 3 wire laser sensor used in the module. Thanks!

    thanks.its working

    Nice work. I would like to know if this would work with an external laser pointer. e.g battery powered laser pointer??

    sir please help me the alarm is going on the lazer is on the ldr module

    I have my Keyes laser attached to a breadboard with jumpers coming from the YwRobot 545043 module at 5V using the USB connect. Brighter than 3.3 V. I guess I can just use the Arduino for the sensor part?

    Hi I have to connect the laser on Arduino ? Or I can also laser to an external power source connection and only the laser sensor on the Arduino Connecting ?

    This is great, Iv made one similar from another post. Could you use two arduinos so the tripwire is outside and the alarm/speaker is inside? Bluetooth or wifi possibly?

    Yes! If you can think of it you can build it with Arduino, since the possibilities are endless!

    I'd love to hear back from you if you manage to get it to work.

    Great project!!!

    Can you tell me what is a maximum distance from laser modul to the sensor modul?