Arduino Home Security System

18,562

39

86

About: Give positive feedback only!!!

This a Home Security System using Arduino Mega 2560, which will trigger alarm when any door is opened or movement detected in the room when the system is activated. Its a nice project for anyone in final year in the university. you can upgrade it even much better. will be here to help. Have fun!!

Step 1: Items Needed

the items needed are shown in the pictures, not forgetting the camera, you can use a dashcam from the ones use in a car. you can also add IP camera to broadcast live videos online.

all this components can be purchased cheap on eBay

> Arduino Mega 2560 is the main brain for the system

> Arduino Uno is for the lights in the house

> keypad for entering pin to activate and de-activate the system

>breadboard for the components and connection

>Servo for the movement of the camera with respect to the sensor or motion detected

>PIR motion sensor for the rooms to detect any movement

> 20X4 LCD display screen for display of the results and indicating the location of the motion detected, alarm status etc

>Magnetic Door rid switch, this is attached to the doors to detect when door is open or closed

> buzzer for the alarm

> Jumper wires for connection

>DS 1305 for interrupt input

>RGB led

>camera

> 1KOhm resistorsX4

>4.7KOhm potentiometers X2

>Relay to control camera on and off status and the LED if you using 12V LEDs if not you can choose to ignore the relay and power up the camera with your laptop and any low voltage LED's with 3V-5V can power up with the Arduino..

this devices will be connected using the circuit diagram shown in next stage.

Step 2: Circuit Diagrams of the Connection

With the circuit diagram the circuit creation begins following the pattern arranged on the diagram.

I must say that this isn't for beginners new to Arduino and programming in Arduino but can challenge you to learn more as you create it, am here to help every step of the way to help you build and make it better than mine.

Step 3: Connection of the Devices

First test the LCD screen display with the short code. test the components functionality with code as you build along to solve error problems and avoid a system that dosn't work. a complete system with error can be hard to solve if it was handled step-by-step. most of the problem that will arise are due to either wrong connection, code error or defective component used. be sure to watch out for those alone the way

NB: remember to attach 1KOhm resistor to the positive leads of the PIR sensor to act as pull-up resistor.

Step 4: Build Your House Model

the model depends on how you want it to look like, chose a design and build, that will help to test the device in a real-time situation. i used plywood at first, and later tried it with cardboard paper. Any can be great for the job.

it doesn't matter the compartments you choose to build, if you build 3 bedrooms, you will need 3 PIR sensors and an additional code which is similar to the others but different pin-outs and it will still work great. you can also have a garage or make it more complex.

the roof i used a cardboard and cut out a print of patterns from A4 paper.

Step 5: Assembly Components Into the Model House

The Magnetic door rid's go behind the front door and backdoor, while the PIR sensors go in the rooms, label the rooms as bedroom 1 and bedroom 2 or 3 if you chose to add more.

Now perform a test on the servo's operation, be sure its moving the right direction and angle required. you will have to update the code if your model house isn't the exact shape and size as mine. That's just to change the position in the code.

Step 6: Final Phase

Put all stuffs together and give it one more trial. each door opening should trigger the alarm and the screen displays which door is opened. any motion in the rooms should also trigger the alarm and displayed onscreen the point of movement.

attached is the code!!

attac

HAVE FUN!!!!

Step 7: Code and a Short Video I Made Before Completing This Project

Attached is a short video during the assembling testing and the code. hope this inspires you to do more and better. have fun. am here if you face any challenges...Adios!!

Share

    Recommendations

    • Party Challenge

      Party Challenge
    • Classroom Science Contest

      Classroom Science Contest
    • Gardening Contest

      Gardening Contest

    86 Discussions

    0
    None
    mindoba

    14 days ago

    Hello. can I use keypad 4x4key 12key or 4x4 16 key keyboard?

    this project complete connection but arduino mega program error because i am a use 16×2 lcd display how to solve this problem.

    0
    None

    With 16X2 LCD you will have to update the code. You will have to update code to either show in turn TIME,DATE and the Device status or probably get rid of one or more of the other to allow Status only and perhaps with time.

    0
    None
    HeshamR3

    Question 3 months ago

    Hello sir, dear
    I spend more than 150 dollar and I both everything
    but still not function. I will be glad if somebody send me the schematic of the
    project connection.

    DSC_0001.JPGDSC_0002.JPG
    2 answers
    0
    None
    vishalsolanki687HeshamR3

    Answer 4 weeks ago

    bhai mene bhi 16 x2 lcd use ki he but run nahi ho raha please send me code and schematic

    0
    None
    barzillialloydHeshamR3

    Answer 3 months ago

    Oh wow!! I love ur design, nice work. The schematic u need to follow is the main one. There are two but the other is just for the Bluetooth lightening which probably not everyone needs. When all connections are rightly done pls take time to go through the code and have all libraries install. I’ll be here waiting to hear from u after that done and still not working, we will consider few more possibilities.

    0
    None
    Deniz0948

    Question 2 months ago

    Merhaba! this projects is perfect but in order to do this project, I need to connect with wifi and manage it remotely. Can you help me for it?

    1 answer
    0
    None
    barzillialloydDeniz0948

    Answer 4 weeks ago

    Yh it’s possible and easy to add a WiFi module to connect through WiFi and control it.

    0
    None
    HeshamR3HeshamR3

    Reply 2 months ago

    I have DS1305 how can I use that and what is the connection can I use the connection which I fund in maximcom.
    would you please be patient with me

    0
    None
    barzillialloydHeshamR3

    Reply 2 months ago

    Hi Hesham, sorry been abit busy. U can use digital pin 20 and 4. For arduino mega, if u using another board then SDA to SDA and SCL to SCL if use the analogue pins. If u take time to study the code u will find it in. Hope that helps. Just hit me up am free tonight so can help

    0
    None
    HeshamR3HeshamR3

    Reply 2 months ago

    what is the pin layout from keypad to arduino mega

    0
    None
    barzillialloydHeshamR3

    Reply 2 months ago

    The Row from keypad goes to pin 46, 47, 48 and 49 on the Arduino Digital pins and the Columns from keypad goes to pins 50, 51, 52 and 53 on the Arduino digital pin.

    0
    None
    HeshamR3barzillialloyd

    Reply 2 months ago

    I know that but what is the number because
    the keyboard pin is from 1 to 8 so which one goes to Arduino.

    and if I look at the photo of the LCD, there is no 4.7 Kohms optimeter.

    0
    None
    HeshamR3barzillialloyd

    Reply 2 months ago

    If I connect the buzzer to pin 37 thin it will make noise otherwise the pin 35 not funktion

    0
    None
    barzillialloydHeshamR3

    Reply 2 months ago

    From the code, speaker pin is set to digital pin 35 and will only be activated when system triggered. Connecting it to pin 37 (green led pin) makes it active but out of sync with system. Try setting speaker pin to 37 and the green led to 35 and see if there’s a difference.