ARDUINO Burglar Alarm Using Infrared Emitter-Detector pair

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

**To see more simple arduino projects check out my blog


  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 .

ARDUINO Burglar Alarm Using Infrared Emitter Detector pairStep 2: CIRCUIT DIAGRAM :


int dtect=8;
int sense=A0;
int buzzpin=9;
void setup()
void loop()
  int val=analogRead(sense);

void buzz(unsigned char time)


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 .

ARDUINO Burglar Alarm Using Infrared Emitter Detector pair SchematicNow 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 .


For more detail: ARDUINO Burglar Alarm Using Infrared Emitter-Detector pair

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top