Introduction: Laser Maze Security System

This is an Instructable that tells you how to make a laser tripwire or laser maze, just like in the movies!

All you need:

* Arduino 
* Buzzer/alarm/Led
* Led (optional)
* 1 resistor (any value)
* 1 LDR
* Laser pen
* A box to house the entire set up.
* Some tape

See it in Action:

http://www.youtube.com/watch?v=74KYPlzEGqc


http://www.youtube.com/watch?v=56aGdz3GAW0

Step 1: Step 1

*  Attach the resistor to A0 and Gnd pins.
* Attach LDR to A0 and 5 V pins.
* Place an LED with longer side in pin 7 and shorter side in pin 6.
* Also place the buzzer with longer side in pin 11 and shorter side in Gnd pin.

Step 2: Step 3:

*Place the contraption in the box (to make it look neat as well as keep it hidden )

*Upload the following program on arduino:

///PROGRAM STARTS FROM BELOW

int sensorPin = A0;  
int sensorValue = 0;
int buzzPin=11;

void setup() {
    pinMode(buzzPin, OUTPUT);
  pinMode(sensorPin, INPUT);
  pinMode(7, OUTPUT);
  pinMode(6, OUTPUT);
  digitalWrite(7,HIGH);
  digitalWrite(6,LOW);
  delay(5000);
  digitalWrite(7,LOW);
}

void loop() {

  sensorValue = analogRead(sensorPin);   
if(sensorValue<=500)
{digitalWrite(buzzPin, HIGH);
delay(3000);}
else
{digitalWrite(buzzPin, LOW);}
sensorValue=1000;
}



*Now tape the button on the laser to keep it on.
*Finally place the laser away from the box and make sure that its light is concentrated on the LDR.

Step 3: FINALLY!!

POWER UP AND ENJOY!!

You can add mirrors to form a maze by reflecting the laser light. 
You can also place this in front of a door or window and it will act like an alarm if the door or window opens.
It can also be placed across the ends of a room and be used as a motion sensor

To actually see the laser light ( like in the photo) all you have to do is shroud the room in smoke. The laser light can be seen in smoke.
 If you liked this Instructable, please follow me and view my other instructables.

Feel free to ask any doubts and please give me feedback and other suggestions.

Thank you.

Comments

author
phoenix708 made it!(author)2016-10-29

I am trying to use your idea for one of our escape rooms. the code verifies. The led lights up, and then goes off. I am using a red gun laser for testing purposes. When I break the beam nothing happens. I have tried changing the sensor variables but it still doesn't work. I have also tried 2 different photo cells. Is there a way to see if the Arduino is getting input from the photocell? Any help is appreciated.

Steve

author
prabhavguddati made it!(author)2016-05-02

i am making it

author
isha_0305 made it!(author)2015-03-09

do you have to use any specific arduino?

author
prabhavguddati made it!(author)2016-05-02

a uno is more convineint

author
Kamruzzaman made it!(author)2016-01-20

uno or mega any one

author
RishabhS26 made it!(author)2015-12-22

what if i want to add a 12v buzzer

???? pplz help

author
RishabhS26 made it!(author)2015-12-22

what if i want to add a 12v buzzer

???? pplz help

author
RishabhS26 made it!(author)2015-12-22

please please please tell me please that why have you written 'resister(any value)'........I am getting confused , why 'ANY VALUE' ? ??????? ? ? ? ? ?

author
sandeepnelavala made it!(author)2015-10-07

what power of laser should i us so that they can see the laser path also

author
skulljo made it!(author)2015-02-07

I will try to make it to dude

author
skulljo made it!(author)2015-02-07

I will try to make it to dude

author
skulljo made it!(author)2015-02-07

I will try to make it to dude

author
skulljo made it!(author)2015-02-07

I will try to make it to dude

author
skulljo made it!(author)2015-02-07

I will try to make it to dude

author
skulljo made it!(author)2015-02-07

I will try to make it to dude

author
skulljo made it!(author)2015-02-07

I will try to make it to dude

author
skulljo made it!(author)2015-02-07

I will try to make it to dude

author
ehadiddiansyah made it!(author)2013-10-16

i have tried but i failed
buzzer cant beeping and LDR cant response laser
what should i do?

author
CharanC made it!(author)2014-12-17

Make sure that all the connections are correct.If so use a 10K resistor which will help you give better results..I think this helped.

author
crazyhippie420 made it!(author)2013-07-26

if one were to rig this so that it send a signal back to the program when tripped, instead of sounding a buzzer or turning on a light, how would one change the programming to do other things, such as turn on a webcam? or play back a certain audio file. I am not very familiar with arduino, maybe you know of a manual i could read to learn this?

author
sidgupta made it!(author)2013-07-27

I don't know that much about these things myself but i found an Instructable that might help you:

https://www.instructables.com/id/Twittering-Laser-Tripwire-with-Webcam-Capture/?ALLSTEPS

author
brodylittle011 made it!(author)2013-06-11

why did you change the sensor value to 1000 at the end?

author
sidgupta made it!(author)2013-06-13

Good Observation,
Actually, you do not need that part. I had put that line while troubleshooting the code and checking the sensor values to make sure that the ldr was not loose. , and it looks like i forgot to remove it! Thanks for asking.

author
us241098 made it!(author)2013-06-01

Thanks bro !! I decreased the sensor value and it worked .... My laser was less powerful ..... I also removed dat led code it was creating problem ..... And BTW ur laser security was simplest and best on instructables keep it up bro!! U on fb ... I am new on arduino aged 14 would u help me !! :)

author
us241098 made it!(author)2013-05-31

Does it really work .. I mean I made it but its alarm automatically turns on in 5 sec whether light is concentrated or not ... Plzz help man. I really want to make it

author
sidgupta made it!(author)2013-05-31

Hi,
Change to if(sensorValue<=300). Hopefully it should work
Can you put up some pictures( it will be easier for me to diagnose the problem), but chances are that the problem lies with the laser. The buzzer will make noise when the laser is not concentrated. Try to use a stronger laser or a bigger LDR. If the LDR does not work then you will have the same problem so make sure the LDR works.. If you dont want to, try to change the program. Actually use the serial library of arduino to check the values of your LDR in the light of the laser and in the dark. You can then change the if(sensorValue=..)to a value below what it is in the laser and above what it is in the dark. Also see if it works a the dark environment. To use serial library:
In void setup type:
serial.begin(9600);
in void loop() type:(after the sensorValue=analogRead(sensorPin));
serial.println(sensorValue);

After this go to tools and click on serial monitor
see the nos. when the laser is pointing at the LDR and when it is not.
If you get one continuous value that does not change much when the laser if switched off then the LDR is not working.

author
us241098 made it!(author)2013-05-31

Does it really work .. I mean I made it but its alarm automatically turns on in 5 sec whether light is concentrated or not ... Plzz help man. I really want to make it

About This Instructable

24,940views

68favorites

License:

Bio: Love simple robotics, electronics, sensors, arduino projects and generally building, modifying and opening up stuff
More by sidgupta:Make A Simple Bipedal Humanoid Robot (Servo Walking Robot)How to make ChaasHow to use a push button switch with arduino
Add instructable to: