Wednesday, July 26By Kids For Kids

Samarth Arduino Project – Burglar’s Alarm

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 .  Please see the instructions and code below

 

 

Step 1: REQUIREMENT :

REQUIREMENT :
  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 .

Step 2: CIRCUIT DIAGRAM :

CIRCUIT DIAGRAM :

Step 3: SOURCE CODE:

int dtect=8;
int sense=A0;
int buzzpin=9;
void setup()
{
  pinMode(dtect,OUTPUT);
  pinMode(sense,INPUT);
  pinMode(buzzpin,OUTPUT);
  digitalWrite(dtect,HIGH);
  Serial.begin(9600);
}
void loop()
{
  int val=analogRead(sense);
  Serial.println(val);
  if(val>=1005)
  {
    buzz(50);
  }
  
  
}
void buzz(unsigned char time)
  {
    analogWrite(buzzpin,170);
    delay(time);
    analogWrite(buzzpin,0);
    delay(time);
  }
(Visited 25 times, 1 visits today)
0

One Comment

Leave a Reply

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