Arduino Home Security System

12,657

35

58

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

    • Optics Contest

      Optics Contest
    • Plastics Contest

      Plastics Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018

    58 Discussions

    0
    None
    AjaxhanA

    1 hour ago

    BOSS. where is the DS 1305 for interrupt input wiring diagram? thank you

    0
    None
    Bruna Oliveira

    5 weeks ago

    Hello, I'm a Brazilian student and I'm making this project for school, I'm based on the connection scheme that is half incomplete and I need the electronic schema, could you make it available for me, please?

    0
    None
    barzillialloydMarkC562

    Reply 6 weeks ago

    The code is at the bottom of the project...click on download to download the full code.

    0
    None
    MohamedF177

    Question 2 months ago

    Thank you for sharing your project, It's very helpful. I had few questions and I hope you can help me with? :/

    Currently I'm trying to run the program on IDE but it's giving me an error "exit status 1

    Error compiling for board Arduino/Genuino Mega or Mega 2560." although I downloaded all libraries?

    2 more answers
    0
    None
    barzillialloydMohamedF177

    Answer 2 months ago

    Firstly check if the right port has been selected frm the IDE.
    Secondly, I’ll come consider looking at the error status if it has to do with the library uploaded.
    Thirdly take time to go through the code carefully sometimes during edit just a letter can be deleted resulting in error messages. If all checks out I’ll advice to re-download the code again, upload the libraries and start over am sure that will work.
    Hope that helps

    1
    None
    MohamedF177barzillialloyd

    Reply 2 months ago

    Thank you for the reply, brother! It's working now and I do highly appreciate your help. This project is important to my current academic year and I'd like to use/upgrade it. I would be very grateful if I can be in contact with you on a closer level in case I needed your help & guidance. I have sent you a message on facebook or if you prefer contact via email please let me know of your email, here is mine mdfaisalka@hotmail.com. Waiting to hear from you, thanks again :)

    0
    None
    mindoba

    3 months ago

    OLA, I WANT TO KNOW HOW CAMERA LEADS WITHOUT NEED TO PRESS THE BOOT, WE CAN TALK IN EMAIL ?, I WANT ITS EMAIL, AND HOW I DO TO TURN ON THE LIGHTS VIA BLUETHO.

    4 replies
    0
    None
    barzillialloydmindoba

    Reply 3 months ago

    Hi wats up with the camera?, for the Bluetooth to work u need to download Bluetooth app on playstore or iOS and it will connect to the Bluetooth model to allow u to control the lights. Any Arduino Bluetooth app will work jus fine.

    0
    None
    Barroso21barzillialloyd

    Reply 3 months ago

    I'm doing a circuit in Proteus, can I send you to see if I'm right or not?

    0
    None
    barzillialloydBarroso21

    Reply 2 months ago

    I used fritzing for designing those circuits, am sure you can re-design it in proteus similarly. give it a try!

    would have love to do that for you, but its gonna take some time due to my busy schedule. hit me up if you able to or else i might find some time to give it a shot for you.

    0
    None
    mindoba

    3 months ago

    Hello, I wanted to know why there are 3 circuits, which one is the main circuit?

    2 replies
    0
    None
    barzillialloydmindoba

    Reply 3 months ago

    The second is the main circuit. The first was primary test circuit for lcd operation check and the last circuit for the Bluetooth test. Thnks

    0
    None
    mindobabarzillialloyd

    Reply 3 months ago

    OLA, I WANT TO KNOW HOW CAMERA LEADS WITHOUT NEED TO PRESS THE BOOT, WE CAN TALK IN EMAIL ?, I WANT ITS EMAIL, AND HOW I DO TO TURN ON THE LIGHTS VIA BLUETHO.

    0
    None
    IvanS263

    Question 3 months ago on Introduction

    1.hola me gusto mucho el proyecto pero tengo un error de compilacion:- sketch_aug02a.ino: 6: 20: error fatal: RTClib.h: No existe tal archivo o directorio tengo esa libreria pero no la reconoce y tambien con el codigo "now" me podrias ayudar?????

    0
    None
    Madalina Petrina

    Question 6 months ago

    How you connect the two arduino's?

    0
    None
    RomanŠ127

    Question 7 months ago

    Helou,,

    Please how did it look like with the edit code for me? Thank you very much Roman email. roman.skarda@seznam.cz