0% found this document useful (0 votes)
27 views

Arduino-Home-Security-System

The document outlines a project for creating a home security system using Arduino Mega 2560, which triggers an alarm upon door openings or detected movements. It includes a list of necessary components, circuit diagrams, and step-by-step instructions for assembly and testing. Additionally, the document offers troubleshooting tips and encourages users to seek help if they encounter challenges during the project.

Uploaded by

molasa45
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Arduino-Home-Security-System

The document outlines a project for creating a home security system using Arduino Mega 2560, which triggers an alarm upon door openings or detected movements. It includes a list of necessary components, circuit diagrams, and step-by-step instructions for assembly and testing. Additionally, the document offers troubleshooting tips and encourages users to seek help if they encounter challenges during the project.

Uploaded by

molasa45
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

instructables

Arduino Home Security System

by barzillialloyd

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!!

Arduino Home Security System: Page 1


Step 1: Items Needed

the items needed are shown in the pictures, not > keypad for entering pin to activate and de-activate
forgetting the camera, you can use a dashcam from the system
the ones use in a car. you can also add IP camera to
broadcast live videos online. >breadboard for the components and connection

all this components can be purchased cheap on eBay >Servo for the movement of the camera with respect
to the sensor or motion detected
> Arduino Mega 2560 is the main brain for the system
>PIR motion sensor for the rooms to detect any
> Arduino Uno is for the lights in the house movement

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

>Magnetic Door rid switch, this is attached to the >4.7KOhm potentiometers X2


doors to detect when door is open or closed
>Relay to control camera on and off status and the
> buzzer for the alarm LED if you using 12V LEDs if not you can choose to
ignore the relay and power up the camera with your
> Jumper wires for connection laptop and any low voltage LED's with 3V-5V can
power up with the Arduino..
>DS 1305 for interrupt input
this devices will be connected using the circuit
>RGB led diagram shown in next stage.

Arduino Home Security System: Page 2


Arduino Home Security System: Page 3
Arduino Home Security System: Page 4
Arduino Home Security System: Page 5
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.

1
1
1. Testing the buzzer as circuit begins 1. Master circuit diagram of the circuit

1. this is for those adding Bluetooth for the lighting in the house.

Arduino Home Security System: Page 6


Step 3: Connection of the Devices

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

Arduino Home Security System: Page 7


Step 4: Build Your House Model

the model depends on how you want it to look like, sensors and an additional code which is similar to the
chose a design and build, that will help to test the others but different pin-outs and it will still work great.
device in a real-time situation. i used plywood at first, you can also have a garage or make it more complex.
and later tried it with cardboard paper. Any can be
great for the job. the roof i used a cardboard and cut out a print of
patterns from A4 paper.
it doesn't matter the compartments you choose to
build, if you build 3 bedrooms, you will need 3 PIR

Arduino Home Security System: Page 8


Arduino Home Security System: Page 9
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.

Arduino Home Security System: Page 10


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!!!!

Arduino Home Security System: Page 11


Arduino Home Security System: Page 12
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!!

https://youtu.be/BPOASl6pUjc

Download
https://www.instructables.com/ORIG/FBA/LKVS/J2GF8WRF/FBALKVSJ2GF8WRF.txt

can I use arduino mega compateble

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
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
what is the pin layout from keypad to arduino mega

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.
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.
Yes you can

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

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.
He
what is the purpose of the switch button and which type switch I have to use
Hi, the switch in the circuit diagram is not button switch. It’s the magnetic door reed or also called
magnetic door switch.
I bought everything and now connecting the devices but I realized I forgot the reed switch, can the
project work without the magnetic switch?
Yes pls, it should work just fine with only the PIR sensors and the rest.

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- [email protected]

Arduino Home Security System: Page 13


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
BOSS. where is the DS 1305 for interrupt input wiring diagram? thank you

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

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?
can i know what are the codes?

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

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 [email protected]. Waiting to hear from you, thanks again :)
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.
Thank you, my email [email protected]

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.
I'm doing a circuit in Proteus, can I send you to see if I'm right or not?

Thank you, my email [email protected]

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.
Hello, I wanted to know why there are 3 circuits, which one is the main circuit?

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
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.
Please, it was up to 10 seconds to implement the exit time?
Please send the code to : [email protected]
I would not have had to put the camera in the spinane desert and maybe even a GSM module
through which would come up with a sms for the number thank you
Please, need your help urgently,
I bought all the project components,and connect circuit same as your diagram but it doesn’t work
,just screen lighting without text.
If you can help me answered me and i will contact you by e.mail

Arduino Home Security System: Page 14


Most problem with display has to do with either the connection of the potentiometer. Try to
reconnect again and be mindful of the keypad Row and column to the Arduino pins. Adjust the
potentiometer to reduce brightness if need be. Hit me up if it works. Cheers
Connection to Arduino or the potentiometer I meant..thnks

Thanks for replying to me, i finally knew the reasons, there’s two missing wires not in the diagram
but i found solution from internet.
My problem now is the rotation of servo motor after arriving to true postion still rotating.
My question is ther’s any trick in the code or it’s completely correct .
What is your advice to me.
All system now working perfect except motor.
Yh the motor will rotate but since the model u built may not be exactly the same size as mine the
servo will not get the exact position right unless u update the code. If you go through the code
carefully u will see where that servo code is and the position I set was, 65, 145, 10 etc. This can be
changed depending on how you want it but try playing with it and test it till u get the right angle
needed. Thnks
I already changed servo motor with new one, and it works well , the old one was damage, now i
have another problem . After connecting motor the lcd had badly effect, do you have solution to me
to these problem
Hope you answered me today.
Thanks
need to know the voltage of power supply to project and if you have solution to missbehave of lcd
when connecting motor to system
Thanks
1. Did you use a potentiometer for the LCD? if yes, adjusting it can help the display to project.
2. Try making the connection to the arduino using power cable to wall socket instead of USB to
computer. give it a shot and let me know
Yes, I actually use potentiometer for lcd , i will try to use wall socket and telling you what happens.
Thanks,
Thanks for reply but I think the problem in my servo motor not angle

Hi. May I know if I can use an action camera instead of a Dash Cam?
Thanks!
Hopefully you could, give it a try and let’s see how it goes.

Hi sir. May I know how did you connect the dash cam?

and what would be the changes if I use an action camera instead of a dash cam?

hi sir i loved ur work and i too started to work on this project , but i have some issues
plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
can... u help me please:)))
Ok am here to help, jus let me know what kind help you need. thnks

NB: you will need to download all the libraries I've indicated in the code either with the site i
provided or others. Cheers!
Pls give me library for RTClib

I can't download the pdf....if i want to make an app to control the home...the circuit diagram will
have a major change?

Arduino Home Security System: Page 15


The code won’t change, u jus hav to add the code for the transfer instruction of all the data through
either GSM or Bluetooth to the overall code and it will work. For the pdf it works fine, dnt knw why
u having problem downloading try with another browser.

Arduino Home Security System: Page 16

You might also like