Home Alarm System using PIR sensor and buzzer(Simple)
Lately there has been tales of burglars walking around in my community. They make their way into homes and steal whatever they could find. Hearing this, I thought I should develop a security system that would atleast alert people of intruders into their houses.
The following are the things I used :
1. Arduino UNO
2. PIR sensor
3. Electric Buzzer 5V
4. 100 Ohm resistor
The circuit is pretty simple. The PIR sensor has three pins, Vin, GND and Vout. I connected the GND and Vin to GND and 5V respectively of Arduino. I connected Vout to pin 2.
Electric Buzzer has two pins Vin and ground that were connected to pin 10 and GND respectively. The buzzer heated up pretty fast so I connected 100 Ohm resistance between the ground and Arduino GND pins.
I found a code here that works with the setup I made. I uploaded it to the Arduino and tested it at different distances. I fixed it along the wall of the main hallway at the height of 5 ft to ensure its accuracy.
Our code initializes the sensor with no motion detected, i.e. pirState is low. For motion detected the pirState is changed to high. For this, the code checks digital value of inputPin, i.e. 1(HIGH) for motion detected and 0(LOW) for no motion detected.
Once motion is detected, function playTone() is called with arguments 300 and 160 which are the duration in milliseconds and frequency in Hertz respectively. The sound produced is similar to that of a siren buzz. The sound is distinct at nighttime, so the buzzer serves its purpose. If no motion is detected for three seconds, the sound turns off.
The setup is complete. I am thinking of connecting an even bigger speaker loud enough to wake people up. Hopefully for now, my house is safe.
The following are the things I used :
1. Arduino UNO
2. PIR sensor
3. Electric Buzzer 5V
4. 100 Ohm resistor
The circuit is pretty simple. The PIR sensor has three pins, Vin, GND and Vout. I connected the GND and Vin to GND and 5V respectively of Arduino. I connected Vout to pin 2.
Electric Buzzer has two pins Vin and ground that were connected to pin 10 and GND respectively. The buzzer heated up pretty fast so I connected 100 Ohm resistance between the ground and Arduino GND pins.
I found a code here that works with the setup I made. I uploaded it to the Arduino and tested it at different distances. I fixed it along the wall of the main hallway at the height of 5 ft to ensure its accuracy.
Our code initializes the sensor with no motion detected, i.e. pirState is low. For motion detected the pirState is changed to high. For this, the code checks digital value of inputPin, i.e. 1(HIGH) for motion detected and 0(LOW) for no motion detected.
Once motion is detected, function playTone() is called with arguments 300 and 160 which are the duration in milliseconds and frequency in Hertz respectively. The sound produced is similar to that of a siren buzz. The sound is distinct at nighttime, so the buzzer serves its purpose. If no motion is detected for three seconds, the sound turns off.
The setup is complete. I am thinking of connecting an even bigger speaker loud enough to wake people up. Hopefully for now, my house is safe.
Nice article. You can visit wireless buzzers which are perfect for game show scenarios to lock contestant answers or in offices or schools to raise a question.
ReplyDeleteNice article. You can visit wireless buzzers which are perfect for game show scenarios to lock contestant answers or in offices or schools to raise a question.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteWonderful article. Good start with the new mind and thoughts. Thanks for sharing this post. Non-Electric Water Level Indicator Sensor
ReplyDeleteThank you for putting all these strategies into a very readable place. It shows your ability and great skills. keep sharing such article in future. Install alarm system
ReplyDeleteThank you a bunch for this with all of us you actually realize what you are talking about! Bookmarked. Please also seek advice from my site =). We could have a hyperlink change contract between us! Dallas Home Security
ReplyDeleteNice to be visiting your blog once more, has been months for me. Well this article that I've been waited for therefore long. i want this article to finish my assignment within the faculty, and it has same topic together with your article. Thanks, nice share. Alarm Monitoring
ReplyDeleteYou have done a great job on article. It’s very readable and highly intelligent. You have even managed to make it understandable and easy to read. You have some real writing talent. Thank you. Security Companies
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThank you for sharing your blog. Your Blog Provides better information about the home alarm system. All the info shared here is in very simple language and even a common person can easily understand the working of motion sensors which is used to create this home alarm system.
ReplyDeleteVery good, This information is essential and informative which you have shared here. It is beneficial for beginners to develop their knowledge. It is very gainful information. Thanks for share it. Auto locksmith Baltimore
ReplyDeleteA very excellent blog post. I am thankful for your blog post.
ReplyDeleteResidential Security Systems