Instructables
loading
loading

In this project I will discuss how you can make a cheap wireless home security system.Though during starting of this project the main objective was only for security alarm but later I found this device can be used to solve several problems.These are the few practical problems which I have faced in the past :

1. Few years ago my friend's new bike was stolen from the parking premises of our apartment.

2. Mangoes are stolen from our garden.

3. One of my friend always worried for his new born baby when sleeping on a bed but no one is there to monitor him.

By modifying few things in my device you can solve all these problems very easily.

My device uses a PIR motion sensor to detect the human motion and this information is transmitted without wire by using a RF transmitter-receiver module to give some sort of alert.I choose a RF module for wire less communication because compared to the existing wireless systems like blue tooth,XBee or WiFi ,it is user friendly and very cheap.You can get it from eBay @ less than $ 2.

You could use IR, but that has a limited range and can only work within a line of sight of the receiver.But using the cheap RF module we can communicate within the range of around 100m.

At the end I will give you few tips to reduce the power consumption.

I divide the entire project in to 3 major parts;

1.TRANSMITTER : To sense the human motion and transmit the data to receiver

2. RECEIVER : Receive the data from transmitter and activate alarm system and camera or sending a sms etc

3.SOFTWARE : That operates the entire hardware used in this project.

You can see my new instructable ARDUINO MPPT SOLAR CHARGE CONTROLLER (version-3.0)

 
Remove these adsRemove these ads by Signing Up

Step 1: PARTS AND TOOLS REQUIRED

Picture of PARTS AND TOOLS REQUIRED
53dcc1172f7cc6780b000038.jpeg

1. ARDUINO UNO/ARDUINO MINI/ARDUINO NANO or similar board (Tx)

2. ARDUINO UNO /ARDUINO MINI/ARDUINO NANO or similar board (Rx)

3. RF Transmitter and Receiver Module (433 MHZ)

4. PIR sensor

4. 9V battery ( 2 nos) and connectors

5. Buzzer

6. LED

7. Resistor (220 ohm)

8. Bread Board

9. Jumper Wires

10. perforated Board

11. Header connectors

12.Switches

13. Project Enclosure

14. Black Paper

15. Scotch Mounting Pad

TOOLS REQUIRED :

1.Hobby Knife

2.Glue Gun

3.Soldering Iron

4.Wire cutter /Stripper

5.Tin Snips

You can buy the items very cheaply from eBay .These are links from where I have bought my parts.

Arduino Nano from eBay

Arduino Pro Mini from eBay

RF Transmitter and Receiver Module from eBay

PIR Sensor from eBay

Step 2: TRANSMITTER

Picture of TRANSMITTER
53d28c562f7cc6299c00002b.jpeg
53d28d832f7cc604e4000241.jpeg
53d28d332f7cc66e7700000d.jpeg

The transmitter is consists of

1. PIR sensor to detect the human motion

2.Arduino to process the data from PIR sensor

3. RF transmitter to transmit the data to the receiver

Passive infrared sensors work by measuring incoming infrared from human or animal. They do not emit energy themselves, which is why they are called "passive". Humans and animals both release infrared energy. Passive infrared sensors(sometimes called pyro electric detectors) detect this energy and give a signal to the ARDUINO.

For working of the PIR sensor you can click here

For transmitter I used a Arduino Nano board to reduced the cost. Of course your Arduino Uno also works fine.You can also use a Arduino mini Pro which cheaper than nano.As now I do not have a FTDI module to program the mini board I choose the nano board.

Before going to make the entire transmitter module check the PIR sensor and have a fun.

Connect the PIR sensor

PIR Pin Arduino Pin

vcc -----> 5v

GND . ......> GND

Out ........> D2

You can also refer the fritzing schematic.

Before uploading the code set the correct board and serial port in the Arduino IDE. Then upload the sketch given bellow.

In the software part I attached the pics for setting the board and serial port .Just check it.

When there is motion in front of the sensor the LED will glow.You can see the message also by opening your serial monitor.

test code.txt550 bytes

Step 3: Connect The RF Transmitter

Picture of Connect The RF Transmitter
53d52dd92f7cc63fb600000e.jpeg

In the previous step you confirmed that your PIR sensor is working fine.Now lets add the RF transmitter to the board.

The RF transmitter has 3 pins( VCC, GND, and Data).

Connect the VCC pin to the 5V pin of the Arduino board that you are using (In my case it is Nano).

Connect the GND to the GND of the Arduino board.

Connect the data pin to the pin number 12 of the Arduino board.

Step 4: RECEIVER

Picture of RECEIVER
53dcc61e2f7cc67da200002a.jpeg
53dcc4442f7cc6872d000031.jpeg

The Receiver is consists of

1. RF Receiver module to receive data from transmitter

2. Arduino to process the data from RF Tx and give an out put (alarm,sms,email etc)

3. Out Put : buzzer

Connect the VCC pin to the 5V pin of the Arduino board that you are using (In my case it is Uno).

Connect the GND to the GND of the Arduino board.

Connect the data pin to the pin number 12 of the Arduino board.

Refer the above schematics for connection

Step 5: SOFTWARE

Picture of SOFTWARE
53e3115b182470de30000004.jpeg
53e3118418247021ea000005.jpeg
53e311b5182470eca7000004.jpeg
53e311ec18247038d0000001.jpeg
Screenshot 2014-08-02 15.28.18.png

The software is wholly depends on a virtual wire library.So first download it. Click here to download.

After downloading extract the folder and then place it in the Arduino library folder.

Software for Transmitter:

Before going to upload the sketch to the transmitter board, you have to set few things in the IDE

1.Board -> Arduino Nano (what board you have used)

2.Serial Port -> COM XX (check the com port in which your device is connected )

See the above picture for clear understanding.

After setting the above things,down the code wireless_tx and upload it.

Software for Receiver :

Similar to the above set the following for receiver board

1.Board -> Arduino UNO (what board you have used)

2.Serial Port -> COM XX (check the com port in which your device is connected)

See the above picture for clear understanding.

After setting the above things,down the code wireless_rx and upload it.

Note : The tone generation code is taken from MAKE PROJECTS

Step 6: BREAD BOARD TEST

Picture of BREAD BOARD TEST
53de0a6b2f7cc6cdc10000fe.jpeg

After uploading the code to both transmitter and receiver board ,now it is time to check whether every thing works correctly or not.

Remove the Usb cable from both the board

Provide external power (battery ) to the both the board.( positive terminal goes to Vin )

Then shake your hand in front of the PIR sensor.

If the buzzer in the receiver board starts to make noise then every thing works fine.

Now it is time to make a portable device for practical use.In the next two steps I will show you how to make a beautiful gadget for your home security.

Step 7: MAKE THE TRANSMITTER MODULE

Cut header connectors for arduino nano (15 pins 2nos ),PIR sensor (3 pins),RF transmitter (3 pins) and Power (2 pins).I used a tin snips to cut the header.

Solder the header according to the schematic.

Place the arduino nano board over the header and connect jumper wires to PIR sensor and RF transmitter.

Prepare the Enclosure

Make a circular hole in the enclosure to insert the PIR sensor.

Glue it to the surrounding in such a way that it will fix perfectly.

Make a rectangular hole to insert the power switch and glue it.

Wrap a color paper (black) on the front surface of the enclosure.I made this to hide everything inside the enclosure.

It also gives a better look to the device.

Place everything inside

I used scotch mounting pad to fix the perforated board and battery inside the enclosure.

Switch on the switch to check the power.


Step 8: MAKE THE RECEIVER MODULE

Bind the mini bread board and arduino uno by a rubber band

Place the RF receiver module on the bread board

Connect everything by jumper wires as per schematics

Prepare the Enclosure :

Mark a circle and rectangle on the front side of the enclosure.

Cut the marked portion.

Insert buzzer in the circular hole and switch in the rectangular hole.Then glue them.

Place every thing inside.I uses scotch mounting pad to hold the battery and board firmly.

After making the both modules,place the transmitter module to the location where you want to protect.I kept it at our parking place.The receiver module should be placed inside your room.

Step 9: How to Increase The Range

The range without antennae is very limited. Putting an antenna on only the TX or RX will greatly extend your range, but putting one on each will extend it even farther. Most of the people think the tiny spiral copper wire on the module is an antenna but in reality it is an inductor.

If you look carefully in to the RF transmitter and receiver module there is no external antenna included. A small hole "ANT" is provided in the module to solder an external antenna.

How to Calculate Antenna Length :

The way to calculate the antenna length is to divide the speed of light by the frequency to calculate the wavelength, and divide that by 4 to get a quarter length.

In my case the frequency is 433Mhz

Speed of the light is 3x10^8 m/s

Wavelength = Speed of light (c) / Frequency (f)

= ( 3x10^8) / (433x10^6)

= 0.69284 m

Antenna length = Wavelength /4

=0.69284/4 = 0.1732 m =17.32 cm or 6.82 inch

From the above calculation it comes out to about 17.3 cm or 6.8 inches. Just cut a piece of wire 6.8 inches long and solder it into that hole marked with ANT, on each module. putting the wires on there makes a great difference.

Step 10: POWER SUPPLY AND OPTIMIZATION

Picture of POWER SUPPLY AND OPTIMIZATION

During the uploading of code,the board is powered by USB cable but when ever you want to use it in the real world,you need an external power supply.it is usually impractical to run long power cables out to the sensor’s location.So for external power supply battery is the best option I think.There are several types of battery exist in the market.So choose according to your choice.In this project I used 9V battery.A high capacity battery pack can be used for longer life.

Connecting a 9V battery directly to the arduino board is some what tricky.Connect the positive terminal of the battery to the Vin pin of the arduino and negative terminal of the battery to the GND pin of the arduino. After connecting the battery, I measured the voltage across 5v and GND pin it is 4.97v which is safe for our operation.

How many days you can run your system by using a 9V battery ? Hardly 2 to 3 days.The main power consuming element in the board is led for power indication and the voltage regulator.So how can you run this system for a month or year by using a smaller battery pack ??All these possible by using some additional hardware and software.

Power Optimization

Your module will run when the voltage level is sufficient. When the voltage in the pack drops below a certain threshold, the sensor system shuts down, even though there is still some remaining “juice” in the battery cells.

This little juice can be successfully extracted by using a boost converter.

If your transmitter module is exposed to sunlight then I think you are lucky.How ??

Because you can use a small solar panel to charge the battery pack.Though the amount of sunlight is a great factor but using a boost converter solved all these problems.

Step 11: Ideas to take the projects to a higher level

Picture of Ideas to take the projects to a higher level

Though in this project I have just shown you to make some sound for alert but you can do lot of things by modifying few things in hardware and software.If you made this project successful then I think you can easily modify my device according to your requirement.

Use a relay instead of buzzer which can be used to

1. DOOR OPEN / CLOSE

2. APPLIANCES ON/OFF

See the above schematics for relay connection.

Use a camera to take pictures when there is a motion and send it to your email.This can be used to monitor your sleeping baby :)

You can send sms to your mobile when there is a motion.Read the following article to get some idea.

Arduino SMS Alarm

You can read the following article to make email sending motion detector .

email-sending-movement-detector

Hope you have enjoyed by reading my project.

Thank you for reading my article.

Suggestion are always welcome.Just comments it bellow...

1-40 of 66Next »
nag98k10 days ago

Would it be possible to have multiple motion sensors in different locations that would trigger the receiver?

b0br0ff2 months ago

Hi. Could you possibly help me with following issue. I was able to assemble this project on bread board everything works fine. After this I prepared transmitter on a printed and again works fine when Arduino Nano is powered from mini USB, however when schema is powered from 9V battery it does not work. I made 2 tests:

1) Power from USB: measurement on a 5V pin shows 4.66V;

2) Power from 9V battery: measurement on a 5V pin shows 4.96V;

Is it possible that 0.3V makes difference and schema doe not work? Because the only difference between workable and no workable schema is power supply USB (5V) or 9V battery.

Thanks in advance.

deba168 (author)  b0br0ff12 days ago

It should not be.But I am also puzzled.

Can you show your schematic?

markellis512 months ago

Made it and it works! Thanks! Now I want to change the buzzer to a LED which I did and that works but I want to change the code so the light will come on and blink 3-4 times for say 15 seconds each time. Not really good at coding can you give me some ideas? Thanks!

deba168 (author)  markellis5112 days ago

Wow its good news.Share your project pics here.

You can do it very easily by changing some line in reviver code.Write a function for flashing the led.Let flash_led () be the function.The code will be like this.

if(buf[0]=='1')

{

Serial.println("Motion detected!");

digitalWrite(led_pin,1);

flash_led();

}


if(buf[0]=='0')

{

Serial.println("Motion ended!");

digitalWrite(led_pin,0);

delay(300);


}

justmknit1 month ago

I want it to snap pictures when there is movement and send it to my phone. How do I go about that and if you already posted that here can you instruct me where to look?

deba168 (author)  justmknit12 days ago

Till now not done.

DausMohamad2 months ago

Sir, can i replace the arduino board with arduino yun? it is possible?

deba168 (author)  DausMohamad2 months ago

Hey I have never used YUN.You can try it.

DausMohamad2 months ago

Sir.. is the project can be enhance by applying the notification via text messaging besides it make alarm sound? hopefully you can help me..

deba168 (author)  DausMohamad2 months ago

You can display the text message on your serial monitor or on LCD.

See my instructable on weather station, I have displayed the sensor parameters.

how about via smartphone? is it possible?

sajanali1142 months ago

sir,,,,,,,,,i want to make this project plz help me thankss

deba168 (author)  sajanali1142 months ago
Let start the project. I will help you.

sir,,,,,how can i buy the arduino and complete circuits

baaldzzz4 months ago

sir/maam i want to make this project for my research study. I just want to ask if how can I buy the arduino that you have listed above.

deba168 (author)  baaldzzz3 months ago
waheeda4 months ago

where to buy the same uno that u have used?

deba168 (author)  waheeda3 months ago
baaldzzz3 months ago

is it necessarily to buy arduino (pro mini)? or ill just use one ardiuno Nano for the transmitter

deba168 (author)  baaldzzz3 months ago

Not mandatory.You can buy a arduino Nano.It will work fine.

Romer1233 months ago

sir can you give me an idea how to get the software of this project

deba168 (author)  Romer1233 months ago
MarkF113 months ago

Did you get much range from the FS1000A /XD-RF transmitter/receiver? I've never had any luck with them. Even with antennae installed, the range and noise was unacceptable. Perhaps I just got a bad batch. On the other hand, I've been very happy with the nRF24L01+ transceivers.

waheeda4 months ago

what is the specification for arduino nano used in this project??

please help

i want to make this project.

deba168 (author)  waheeda4 months ago
MicrocontrollerATmega328
Operating Voltage (logic level)5 V
Input Voltage (recommended)7-12 V
Input Voltage (limits)6-20 V
Digital I/O Pins14 (of which 6 provide PWM output)
Analog Input Pins8
DC Current per I/O Pin40 mA
Flash Memory32 KB (ATmega328) of which 2 KB used by bootloader
SRAM2 KB (ATmega328)
EEPROM1 KB (ATmega328)
Clock Speed16 MHz
Dimensions0.73" x 1.70"
hey,i don't undertand the connection in the perforated board(mind explain a little bit to me) and about the switches(which type??i know you only used 1 in your project) and also the header connectors(male/female?) and lastly what's the use of the scotch mounting pad?? Please reply me ASAP as i love this project very much .
deba168 (author)  desmond.choong.716 months ago

Use any ON/OFF switch.Follow the written document for connection.If any difficulty you still faced then ask me I will help you.

The header pins are for mounting the Arduino nano board and for external connection.

The scotch mounting pad is optional it is just stick the board to the enclosure.

http://www.instructables.com/id/ARDUINO-WIRELESS-H...

http://www.instructables.com/file/FL7Q40HHYC6CDQY

justinkpelai6 months ago

Good work, please how may i get the pdf document for the code used by Jun Peng in his project on wireless home security?

justinkpelai6 months ago

i am face with a task to develop three devices:

Device 1 is a remote control device. its can be used with LCD screen, Device 2 controls the exterior of the house. it controls the outside light (turning it on automatically when it detects movement). It houses the door bell switch, which operates a buzzer on device 1. It also operates the gates with a servo, controlled by device1. Device3 controls the interior. it detects intruders passing through doorways into two rooms, notifying device 1 through audio and text. In one of these rooms is my priceless Ming vase. The vase sits on a pressure switch. when lifted, the buzzer is sounded at device1 and flashing lights are activated on device3. the three devices should be integrated with a mobile web/App interface with the system designed and created in part1.

How do I go about this task to achieved the results?

justinkpelai6 months ago

how do i get step by step algorithm of the wireless home security system that monitor an intruder notify the LCD with message and buzzer alarm.

deba168 (author)  justinkpelai6 months ago

For display the message on a LCD you can refer my tutorial on weather station.It may help you.

datuk.sim6 months ago

Hi, izit the schematic diagram and what you do on your breadboard is difference? Because now my problem is my RF transmitter and receiver is unable to work.

My transmitter part i think is okay already, because when my PIR sensor sensed the motion the LED will light up, but at my receiver side is nth happen.

i have bought the second set of RF transmitter and receiver but also cant work.Can i know which thing or which part should i troubleshoot?

Thank you

deba168 (author)  datuk.sim6 months ago

The transmitter part include the PIR sensor and Receiver include the buzzer and led.Are you sure you are connected everything correctly.

To check the RF module you should try this first.If it works then my project definitely work.

http://www.instructables.com/id/RF-315433-MHz-Transmitter-receiver-Module-and-Ardu/step3/Arduino-Virtual-Wire-Library/

datuk.sim deba1686 months ago

Bro~ Thank you very muchhhhhhhhhh. It's WORK ~!!! THX THX THX

deba168 (author)  datuk.sim6 months ago

Wow !!!

Now enjow with your new project :)

datuk.sim deba1686 months ago

Bro~ Thank you very muchhhhhhhhhh. It's WORK ~!!! THX THX THX

cwy_sharon6 months ago

Hi, if i would like to include the sensor together with the receiver, is it possible? Which means i would only need one Arduino and the buzzer is connected on the same breadbox as the sensor. How do i assemble it? Thank you.

deba168 (author)  cwy_sharon6 months ago

Yes it is possible.You need not required the RF module.Only PIR sensor and buzzer is enough.

http://makezine.com/projects/pir-sensor-arduino-alarm/

1-40 of 66Next »