DIY | Easy Arduino Laser Tripwire Security System!




About: Hi there visitor! First of all thank you for checking out my profile! My name is Youri. I study Technical Computer Science in the Netherlands. I especially love the electronical part of my study. Since I l...

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 -

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

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".

1 Person Made This Project!


  • Made with Math Contest

    Made with Math Contest
  • Multi-Discipline Contest

    Multi-Discipline Contest
  • Robotics Contest

    Robotics Contest

41 Discussions


3 years ago

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?

2 replies

Reply 1 year ago

or using an am radio frequency. That would be nice


Reply 3 years ago

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.


2 years ago

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?



2 years ago

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


2 years ago

thanks.its working


2 years ago

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


2 years ago

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


3 years ago

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?


3 years ago

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 ?


3 years ago

Great project!!!

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


2 replies

3 years ago

Pretty neat project...any idea if fog could be detected using this?

1 reply

3 years ago

in the code, the function " alarmTone(); " is being repeated from line 42 - 91....
So, is there any special reason why a "for loop" hasn't been implemented.... thanks in advance

1 reply

3 years ago

if you go to they sell the whole kit for around $10 I think and it comes complete with a laser and mirrors.

2 replies

Reply 3 years ago

You are missing the main point. Instructables is not about money, it's about fun of making things yourself!


Reply 3 years ago

The main point of instructables is to have fun making thing's on the cheap. Meaning, for as little or no money possible. Also, there are people out here who are new or have little knowledge as to where to source parts let alone put them together. Some can't read schematics and others would like to make these ibles as quickly and easily as possible just to say they've made it. Which is why I suggested the KipkayKits site. I'm not upset or anything as I understand what you mean but there's more than one point to instrucables.

I recall wanting to do have of these ibles but not knowing where to start even though all parts and instructions were on the page. I recall asking questions and getting even more confused because the answers were written in a language all its own sometimes and that is the Instructable language, the electronic and computer language. Heck, I was once told to get a basics in electronics course then come back and try to do the ible when I have a better understanding. None of it is fair and we as EE,PC Engineers and Engineers in general should be more than willing to help the new person on instructable. This is why I suggested KipkayKits. They help you and explain to you in detail what you need to know. They will stay online with you and keep at it until you learn or at least understand the concept of what you're trying to do. It's not about making money. I sure as heck am not making anything by telling people to check out the site or even buy something from it except satisfaction in knowing if they do they will get kits on the cheap or at least low costing, they will learn because Kipkay offers videos as well as step by step instructions and you could go online,type in your question and have Jonathan,Gadgetron,Josh or one of the many other moderators that are on hand to help you as well as others who have completed their kit and are more than willing to help. This is the reason why I would always tell people about KipkayKits. It helped me ALOT, it's helped others and I'm certain they will always be there to help when needed. Their kits are easy to read and understand, they have 3 different kit options from novice to expert and as I said before, they will always help you when you get stumped. If you get a kit and a part is missing or doesn't work, they send you another no questions asked. This is why I suggested KipkayKits. Not because of the money aspect of it but because I read a few comments asking where could they find the parts for this ible and no one responded so I did. And because I responded I have someone tell me I'm missing the point,LoL,smh. It's ok, I get your point and I hope you understand mine. Thank you for the comment.

Have a great day.