Motion Detecting Alarm Using Pir Sensor

We made a diy motion alarm for security at the door.

Step 1: Motion Detecting Alarm

What is it?

It is an motion detecting alarm made using arduino uno, PIR (motion) sensor and a buzzer

Why is it used?

Itis used to provide security in a shop or home, at the door.

Step 2: How to Make It

input- PIR sensor

processor- arduino uno

output- buzzer

requirements-

jumper wires (as required)

PIR sensor- 1

arduino uno- 1

breadboard- 1

power supply- 9V battery

buzzer- 1

Step 3: Procedure

steps-

  • 1. connect I/O pin 2 to the breadboard.
  • 2. connect 5V and Gnd to the breadboard.
  • 3. find Gnd, Vcc and Out pins on the PIR sensor.
  • 4. connect (-) pin to the Gnd on breadboard, (+) pin to the 5V and the Out pin to the digital pin 2.
  • 5. connect anode of the led to digital pin 13 and cathode to the Gnd.
  • 6. connect the red wire of the buzzer to digital pin 10 and the black wire to the Gnd.

Step 4: Code for the Alarm

void setup(){

pinMode(2, INPUT);

pinMode(10, OUTPUT);

pinMode(13, OUTPUT);

}

void loop(){

if(digitalRead(2)==HIGH)

{

digitalWrite(13, HIGH);

digitalWrite(10, HIGH);

delay(100);

digitalWrite(13, LOW);

digitalWrite(10, LOW);

delay(100);

}

}

Share

    Recommendations

    • Toys Contest

      Toys Contest
    • Big and Small Contest

      Big and Small Contest
    • First Time Author

      First Time Author

    2 Discussions

    0
    None
    gm280

    6 months ago

    I applaud your interest into such projects. I really do. It is always great to see people building electronic projects. I too was designing and going to built such projects for all our walk in closets so when you opened the doors the lights would come on. And then turn off as you closed the door. And I bought the PIR modules (same ones you used) to accomplish my build. Then I seen such sensors totally constructed and packages to do the same things for a song. I went the commerical package route and forgone the design and experimental build. It works perfectly as well. But I still enjoy your project. Education can never be taken from anybody.

    0
    None
    DIY Hacks and How Tos

    6 months ago

    Nice basic sensor tutorial. An excellent project for anyone getting started in Arduino.