Monday, 18 August 2014

ARDUINO Burglar Alarm Using Infrared Emitter-Detector pair

Basic Idea:

In this tutorial i will show you , how to make a simple Inexpensive Intrusion Detection(Burglar alarm) using an Arduino Uno board . This project uses the Infrared Emitter-Detector pair to detect intrusion and triggers an alarm as soon as the object crosses the infrared field .
** To see a Similar Project Made with an LDR  click here

  1. Arduino uno R3
  2. Breadboard
  3. Connecting wires / Jumper cables
  4. Infrared Emitter and Detector pair LED(not the sensor module) 
  5. PCB mount BUZZER
  6. 1kohm Resistor 
  7. 10kohm Potentiometer
** the white LED is the Infrared emitter ,While the black is the Infrared Detector .



First build the circuit according to the circuit diagram provided .
Now i will explain to you how the circuit works .

  • The white Led you see in the pictures is an Infrared Emitter . You power it on like a normal LED . 
  • Now if this is your first time with an IR Led , its very common that you'll mistake your LED to be spoiled as you wont find it glowing ,but that isn't the case really . 
  • Infrared light is out of the visible spectrum range so even if it is glowing , you wont be able to see it with naked eyes .
  •  To see if your emitter LED(White) is working properly : switch on your cell phone camera and see the LED through it , you will see that there is a purple Glow . 
  • This ensures that your IR emitter (White ) is working perfectly and it is emitting light of a particular range of frequency . 
  • Now lets come to the Black LED . The back LED is the IR detector. 
  • The reason that it is made black is that Black color has the highest absorption ; so it Absorbs most of the infrared light Emitted by the Emitter . 
  • Now what happens if an object stands in between the Emitter and the detector ?? . OBVIOUSLY the amount of infrared radiations intercepted by the detector will now be lesser due to the obstruction .
  • This is the catch !! . When such a situation occurs , I trigger the alarm to denote Intrusion . 

Now that you've got your concept right , LETS FOCUS ON THE CODE . 

  • In line 10 we begin the serial communication to see the values being intercepted on the serial monitor 
  • for both the cases  i.e  
  • case 1.) no obstruction in the path of the emitter and the detector . 
  • case 2.)obstruction in the path of the emitter and the detector .
  • for both these cases , we have to observe the values being reflected on the serial monitor , based on which we will decide for which value being exceeded we will be triggering the alarm .
  • Note that for my experiment the threshold value was set to 1005 . This might not be the case for you. 
  • Hence try to monitor the values that you are intercepting and choose your threshold accordingly .

Well , hope I have covered all the concepts in detail regarding this project . If you face problems or if you need further detailing on any sub-topic , then please do leave me a comment .



  1. Sorry for the late reply.
    For this specific project , you wont be requiring the Potentiometer essentially . But nonetheless its good to have it because you might be testing the proper amount of resistance you require for the LED's you purchase . The LED's i used in the experiment are damn cheap and of very poor quality . So i needed the POT to actually see the limiting current .
    Thanking you for your interest .
    In case you have any more queries , please do get back to me . And If you have built this with modifications , You can post a screenshot right out in the comment section .

  2. This comment has been removed by the author.

  3. Thanks for sharing such informative blog article with us which is very beneficial and useful as user point of view. Please keep sharing more.

    Vancouver home automation | Security vancouver | Best Security Vancouver

    1. Thanks a lot Alex. I will surely keep posting more stuff like this :)

  4. Nice it seems to be good post... It will get readers engagement on the article since readres engagement plays an vital role in every blog.. i am expecting more updated posts from your hands.

    Home Automation in Chennai
    smart home in Chennai
    Home security in Chennai
    Burglar alarm in Chennai
    Wifi Camera Chennai

  5. This comment has been removed by the author.

  6. pinMode (dtect,INPUT) is the correct code. It was really helpful.