Home Security Alarm or a Motion Detector Using Arduino,P.I.R Sensor and LCD.




Introduction: Home Security Alarm or a Motion Detector Using Arduino,P.I.R Sensor and LCD.

Hi Everybody,

Today I am Going to show you how to make a interesting,wonderful,cheap home security alarm.This Gadget Helps you to protect your house from thieves.In this project i am going to use a Freeduino Board(Arduino Compatible),P.I.R Sensor module,LCD and some other components.This Project can either powered with 9V Battery or with U.S.B of your computer.

How this Project Works?

All the body generate some heat energy in the form of infrared which is invisible to human eyes.But,It can be detected by electronic sensor.These type of sensor is made up of crystaline material that is Pyroelectric.In this project,we are using P.I.R. Motion Sensor Module as an infrared sensor that generates electric charge when exposed in heat and sends a signal to arduino.According to level of the infrared in front of sensor,Arduino displays the status on L.C.D and start buzzing speaker and glows the L.E.D.A simple program is running on arduino which checks sensor if anything is moved or new object has been detected.

Materials Required:-

1. 1 x Arduino Uno(You can use any compatible)

2. 1 x P.I.R Sensor Module.

3. 1 x L.C.D(16 X 2)

4. 1 x 9V Battery

5. 1 x 9V Battery Clip

6. 1 x L.E.D

7. 1 x Piezo Buzzer(I am using Speaker instead)

8. 1 x Breadboard

9. Some Jumper Wires

10. An USB Cable(Only for programming)

11. A Computer(Only for programming)

Step 1: Connecting the P.I.R Sensor to Arduino..

1.Connect Vcc pin of P.I.R sensor to positive terminal of Arduino(5V).

2.Connect Gnd pin of P.I.R sensor to any ground pin of Arduino.

3.Connect Out pin of P.I.R sensor to Pin no. -7 of Arduino.

Step 2: Connecting L.E.D and Piezo Buzzer to Arduino..

Connecting L.E.D:-----

Connect Positive terminal(Longer Lead) Of L.E.D To Arduino Pin no. 13.

Connect Negative terminal(Shorter Lead) Of L.E.D To Any Ground Pin.

Connecting Piezo Buzzer:-----

Connect Positive terminal(Red Wire) Of Buzzer To Arduino Pin no. 10.

Connect Negative terminal(Black Wire) Of Buzzer To Any Ground Pin.

Step 3: Connecting L.C.D to Arduino

To wire your LCD screen to your Arduino, connect the following pins:
LCD RS pin to digital pin 12

LCD Enable pin to digital pin 11

LCD D4 pin to digital pin 5

LCD D5 pin to digital pin 4

LCD D6 pin to digital pin 3

LCD D7 pin to digital pin 2

Additionally, wire a 10K pot to +5V and GND, with it's wiper (output) to LCD screens VO pin (pin3).

Step 4: Programming Arduino..

1.Download Arduino IDE 1.0.6 from https://www.arduino.cc/en/main/software.

2.Connect Your Arduino to your computer using USB Cable.

3.Open Arduino IDE,choose your correct board from Tools--Boards
4.Choose Your Correct Port from Tools--Serial Port
5.Click On Pir_Sensor.ino which is given below in the Attachment.

6.Copy the following sketch which appears in your Web Browser to your Arduino Sketch Page.

7.Click On Upload Icon or Goto File--Upload
****That's It.****

Step 5: Conclusion.

Now,All the hard works are done.it's time to enjoy with your new gadget.Just plugin your arduino to your computer or plug the 9v battery on VIN and GND pin of your arduino and mount it to appropriate place.

If you have any problem or question about this project,please leave a comment or call me on +917277989686.You can also send me an email on zishantips@gmail.com.

For your convienience,I added the circuit diagram on the conclusion page and arduino sketch file in the attachment.

If you like this project please vote,share and like this instructable.




  • Tiny Home Contest

    Tiny Home Contest
  • Fix It! Contest

    Fix It! Contest
  • Metalworking Contest

    Metalworking Contest

30 Discussions

Please Vote Me,If you like this project.

Great work. I need to connect 5 pir motion sensor in arduino . how to do this? Please help

2 replies

I just found you question and was wondering if you ever figured out how to add the additional sensors? I would like to do the same so I can name the different sensors (zones) so when activated, it will tell me what area was activated. Thank you for your time.



Well I will try to make a video on this..

how to change duration of alarm? I want it to beep for like 1 sec, but i tried to change every number and it started to make only different sound...

2 replies

Sorry for the late response..You can't change the duration of Beep using the Arduino Program..The delay time can be adjusted using the Potentiometer given on the breakout board.The potentiometer helps you to adjust the time for HIGH n LOW signal from 0.3 seconds to 5 minutes.


What is the name of thus potentiometer which save the alarm soome time

I have problem when i try to define some digital output in the sameprogram which contain LCD . Arduino give me error during compiling.
Help me to find the problem


1 year ago

I'm doing this bro, wish me luck

How can I add a 4 x 4 hex keypad to this project? I would like to arm and disarm the system by using the keypad and add an LED to indicate that it is armed.

1 reply

Well for this you must visit the arduino forum.. They will help you with this.


NICE PROJECT !!! can i use a voice sound in this project ?? what is code for voice sound ?? can you help me !!

1 reply

i made it man...thanks a lot for your project n your precious time helping me out with the program. thank you

1 reply

Hey sks.rock224677,

I really appreciate your effort in building this project.I m really happy that you liked my project.



2 years ago

Looks like a good project but would be better if a camera was added to take a picture of the intruder perhaps like a dash cam with a storage card would be good, any ideas Thanks Bob

1 reply

Yeah you are correct.I should make that one soon.Thanks for your idea.

i made it man...thanks a lot for your project n your precious time helping me out with the program. thank you

I figured it out!!!

Great project with this IR sensor.
I could use this in my own project (alarm with arduino and rpi)
You can check it out at http://dev.kprod.net/?q=intrusion-alarm-arduino-raspberrypi-camera-motion-aalarm