Arduino Home Security System

14,338

36

63

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

    • Warm and Fuzzy Contest

      Warm and Fuzzy Contest
    • Faux-Real Contest

      Faux-Real Contest
    • Toys Contest

      Toys Contest

    63 Discussions

    0
    None
    RomanŠ127

    16 days ago

    Hello, I tried the code. But the paper still has this bug ->
    C: \ Users \ roman \ Documents \ Arduino \ Home_Security_System \ Home_Security_System.ino: 8: 0:
    D: \ libraries \ RTClib-master / RTClib.h: 79: 139: error: expected declaration before '
    enum Ds1307SqwPinMode {OFF = 0x00, ON = 0x80, SquareWave1HZ = 0x10, SquareWave4kHz = 0x11, SquareWave8kHz = 0x12, SquareWave32kHz = 0x13};
    Can you please help? email- roman.skarda@seznam.cz
    If it could even adjust to encode and decode and to use the keyboard and RFID loop I would like and the place of the servos to output the pointer siren and one output which if I do not enter within 20 sec code or rfid so would fit to enable the upload thank you

    0
    None
    HeshamR3

    23 days ago

    He
    what is the purpose of the switch button and which type switch I have to use

    1 reply
    0
    None
    barzillialloydHeshamR3

    Reply 23 days ago

    Hi, the switch in the circuit diagram is not button switch. It’s the magnetic door rid or also called magnetic door switch.

    0
    None
    AjaxhanA

    2 months ago

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

    1 reply
    0
    None
    barzillialloydAjaxhanA

    Reply 8 weeks ago

    Hi connect to analogue pin, any will work. and the power to +5v and ground to ground

    0
    None
    Bruna Oliveira

    3 months 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 3 months ago

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

    0
    None
    MohamedF177

    Question 4 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 answers
    0
    None
    barzillialloydMohamedF177

    Answer 4 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

    0
    None
    MohamedF177barzillialloyd

    Reply 4 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

    5 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 5 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 5 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 4 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.