How to make a security/ surveillance system for your home with arduino





Did you know you can make your own  security/surveillance system for your house???

In this project we have made such a system consisting of temperature/humidity sensor(from air), gas/ smoke sensor, movement sensor, humidity(flooding) sensor, buzzer for noise alarm, a keypad to enable/disable some sensors when you are home and a gsm module for moments when you are not home.

To start you have to know how to connect the sensors above with arduino. So in links below are the steps for that(previous posts):

dht 11 temperature/ air humidity sensor

MQ2 smoke, gas sensor

PIR(movement sensor)

humidity sensor(in case of flooding)



gsm module to receive messages on you phone

Now, if you have read the posts above we must say that in this project we may change some pin association between sensors and arduino, because it was easier to manage the wires when we have mounted the system to breadboard like in the picture:


security/surveillance sistem


As you can see because we have multiple sensors we must power the entire system from a separate power supply. So we have mounted a 7805 voltage regulator(it must have a radiator, our is from a old pc power source, ugly but it works ).  Another thing you must know is that you have to go with multiple wires from 7805 because if you use only one pair(VCC and GND) you will have problem with voltage drop(at least we have).

Why we use these sensors??

The DHT 11 show the temperature and air humidity on the LCD, MQ2 is a gas/smoke sensor and so if you have something problems with your stove or gas pipes or something just set on fire, it alert you.

The flood sensor is for  water pipes with problems and the PIR sensor is for when you are not at home and someone could enter without your permission.

In the image below you have the wiring diagram for all parts of the system:

system security wiring diagram

Some of the sensors of the system are active even if you are home like DHT11, MQ2, Flood Sensor,Buzzer.



The PIR sensor(movement) is enabled when you go out, and disabled when you are home. We have implement a PIN option in the program that , when you left house you introduce a PIN(in our case 6543) number which enable the PIR sensor with a 10 seconds delay(it can be easy modified) to get out and another PIN(in our case 1234) when you came back also with a delay because the sensor is active when you enter and you must enter the PIN without receiveing a message.

So if you introduce the second PIN before the finish of the countdown the PIR sensor will be disabled until you introduce again the first PIN.

Also the second PIN reset all sensor to initial state. If a sensor was triggered you must introduce the second PIN to reset it and shut down the buzzer.

We left the sim 800 module active even if you are home, not only the buzzer consider it a double alarm method. So if the MQ2 sensor detect smoke or gas it start the buzzer and also send you a message.

You can download the program from here.


Please let us in the comment zone any suggestions that you think will improve the article!

If you like the article click the follow button from social media to stay in touch with us!


A short video:


Related posts

Leave a Comment

Show Buttons
Hide Buttons