• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Need circuit help? Post them in the comments! I've answered over 50,000!

Blog | Categories | About | Contact | Calculators-online
You are here: Home / Arduino Projects / Make this Home Security Project Using Arduino – Tested and Working

Make this Home Security Project Using Arduino – Tested and Working

Last Updated on December 5, 2024 by Swagatam 2 Comments

In this article we are going to see how to build a home security system circuit using arduino which might save your home from intruders one day.

Housebreaking happens every few seconds in the world. By the time you read this sentence, crooks already broke into someone’s house.

A golden rule: Prevention is better than cure, it is always better to prevent the crooks by deterring them (in any form such as loud alarm) than to log a complaint in police station aftermath the incident.

The PIR Sensor

The brain and heart of the project is arduino and PIR sensor respectively. The PIR sensor senses the motion of object which emits infra red waves such as human or animal.

It detects any thing comes into its range and also detects anything gone out of its range. The PIR sensor is very sensitive to tiny changes; even small a moment by a human or an animal can detect changes and gives out the signal, but it can guaranty that it never gives false alarm.

The PIR sensor gives out 3.3V active high signal when motion is detected for pre-set period. This active high signal is fed to arduino which decides what to do next.

The Circuit Layout:

This Arduino home security project can be build from junk box parts, which holds some I/Os for the user.

Use your creativity for layout design so that it looks good and neat.

The PIR sensor should expose outside, all the buttons also placed outside for easy access. Make sure cutout for main siren should adequately open so that alarm don’t get muffled, or place whole siren outside the junk box as shown in picture.

Make sure the whole system is well placed on the wall and must not fall out easily. You may drill or use double sided tape in combination with super glue to stick with wall, if your junk box doesn’t have indent for nailing. Use “arduino pro mini” if your junk box is small.

P 20160519 183117 HDR 2

Here is author’s prototype:

In this prototype I’ve used pencil box for the whole setup, one 1 watt white led is fixed on the ceiling for intruder alert lighting.

This 1watt LED lights up small area reasonably bright during dark situations which might deter the intruder. Make an onboard UPS system for this project within the junk box, so that it will be active even during power failure.

P 20160511 170801 2

The Design:

The whole project is build based on arduino pro mini, but you can do the same with your favorite arduino board.

Note: Try not to modify anything given in the schematic if you are newbie to arduino. If you do so, change the code appropriately to your modification.

Program Code:

//---------Program Starts--------//
//----------Developed by R.Girish------//
int input=2;
int alarm=3;
int buzzer=4;
int start=5;
int test=6;
int led=7;
int green=8;
int red=9;
void setup ()
{
pinMode(input,INPUT);
pinMode(alarm,OUTPUT);
pinMode(buzzer,OUTPUT);
pinMode(start,INPUT);
pinMode(test,INPUT);
pinMode(led,OUTPUT);
pinMode(green,OUTPUT);
pinMode(red,OUTPUT);
}
void loop ()
{
digitalWrite(alarm,1);
digitalWrite(green,0);
digitalWrite(led,1);
digitalWrite(buzzer,1);
delay(250);
digitalWrite(buzzer,0);
inactive:
if(digitalRead(test)==1)
{
digitalWrite(green,1);
digitalWrite(buzzer,1);
delay(250);
digitalWrite(buzzer,0);
delay(10000); // Test delay
digitalWrite(buzzer,1);
delay(250);
digitalWrite(buzzer,0);
trig:
if(digitalRead(input)==1)
{
digitalWrite(led,0);
digitalWrite(buzzer,1);
digitalWrite(red,1);
delay(2000);
digitalWrite(buzzer,0);
digitalWrite(led,1);
digitalWrite(green,0);
digitalWrite(red,0);
}
else
{
delay(1);
goto trig;
}
}
if(digitalRead(start)==1)
{
digitalWrite(green,1);
digitalWrite(buzzer,1);
delay(100);
digitalWrite(buzzer,0);
delay(100);
digitalWrite(buzzer,1);
delay(100);
digitalWrite(buzzer,0);
delay(20000);
delay(20000);
delay(20000);
delay(20000);
delay(20000);
delay(20000);
digitalWrite(buzzer,1);
delay(100);
digitalWrite(buzzer,0);
delay(100);
digitalWrite(buzzer,1);
delay(100);
digitalWrite(buzzer,0);
active:
if(digitalRead(input)==1)
{
digitalWrite(led,0);
digitalWrite(red,1);
delay(20000);
digitalWrite(alarm,0);
digitalWrite(buzzer,1);
delay(10000);
delay(10000);
delay(10000);
delay(10000);
delay(10000);
delay(10000);
digitalWrite(alarm,1);
digitalWrite(led,1);
digitalWrite(buzzer,0);
delay(1);
goto active;
}
else
{
delay(1);
goto active;
}
}
delay(10);
goto inactive;
}
//----------Developed by R.Girish------//
//---------Program Ends---------//

Scan 7

The home security system circuit using Arduino Uno is shown above, but you can use any of the arduino boards.

The circuit may look complicated but, actually not. R3 is reset button is connected to Reset pin of the arduino and grounded.

All the transistors are PNP type. If you want use NPN transistor, do the appropriate changes in the code. There is 5v buzzer to give audio feed back to the user when any button is pressed.

Note: A pull down resistor 10K must be connected to #Pin 2 of the arduino, which is not shown in the schematic.

Direction for testing:

After completing the build and upload of the code, do the following instruction for testing.

· Power the circuit and press “test” button; you will hear a beep and green LED on, indicating the circuit is ready for test mode and go away immediately from the circuit. After 10 second you’ll here another beep, signifying the setup is ready to detect motion.

· Come near to the PIR sensor, immediately you will hear beep for 2 second along with 1 watt led ON. Then it goes to idle state.

· If the above following instruction works, your security system is ready for use. Do frequent testing to prolong working span of the system.

Direction for use: Understand the following instructions carefully.

· Lock the doors and press “Start button” when gives double beep indicating you may leave now. After 2 minutes it will give another double beep (by the time you won’t be present at home) indicating the system is active and ready to detect motion.

· If any motion is triggered by the intruder, firstly the 1 watt white led lights up and red LED also turns ON. This is first stage to deter the crook. The intruder may think someone is still left in the home.

· After 20 seconds the alarm starts, this is second stage for deter the crook. The alarm will pull the attention of many near the area.

· After 1 minute the alarm stops 1 watt LED turns OFF but RED led stays on, indicating someone triggered the system.

· When owner of the house returns he will trigger the system, but it gives 20 second to deactivate the system by pressing “Reset”. By doing so it will go to idle mode. If it was a crook he/she don’t know the presence of security system and alarm triggered after 20 seconds.

Where to place the Arduino security system:

When you build this or buy similar stuff from market, don’t tell anyone about it. Telling to someone may alert the crook and may try to bypass it.

· If you are living in apartment, place it inside the room near the door. Placing outside the door when there is a common way for going many people, may trigger false alarm because it could be your neighbor.

· If you are living in house with compound, place it outside the door. If someone tries to jump the compound wall the alarm gets triggered.

· If you have pets try to keep them away from security system. They will trigger false alarm.

· Always use your imaginations and predictions for placing the security system.

You'll also like:

  • 1.  Arduino Automatic School/College Bell System
  • 2.  Playing a Melody Using the Tone() function in Arduino
  • 3.  How to Make a Wireless Robotic Arm using Arduino
  • 4.  Arduino Musical Tune Generator Circuit
  • 5.  Introduction to EEPROM in Arduino
  • 6.  LCD 220V Mains Timer Circuit – Plug and Play Timer

About Swagatam

I am an electronics engineer with over 15 years of hands-on experience. I am passionate about inventing, designing electronic circuits and PCBs, and helping hobbyists bring their projects to life. That is why I founded homemade-circuits.com, a website where I share innovative circuit ideas and tutorials. Have a circuit related question? Leave a comment.... I guarantee a reply!

Previous Post: « How to Set IC 741 for Auto Cut-oFF
Next Post: Make this 18V Cordless Drill Battery Charger Circuit »

Reader Interactions

Comments

  1. swixxknight says

    January 14, 2018 at 1:54 pm

    can more than one Pir sensor be used

    Reply
    • Swagatam says

      January 14, 2018 at 9:14 pm

      may be yes, by using isolating diodes 1N4148 with each PIR output

      Reply

Need Help? Please Leave a Comment! We value your input—Kindly keep it relevant to the above topic! Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Subscribe to New Circuit Ideas

Categories

  • Arduino Projects (87)
  • Audio and Amplifier Projects (132)
  • Automation Projects (17)
  • Automobile Electronics (101)
  • Battery Charger Circuits (82)
  • Datasheets and Components (102)
  • Electronics Theory (143)
  • Free Energy (37)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (19)
  • Health related Projects (25)
  • Home Electrical Circuits (12)
  • Indicator Circuits (14)
  • Inverter Circuits (87)
  • Lamps and Lights (142)
  • Meters and Testers (69)
  • Mini Projects (46)
  • Motor Controller (64)
  • Oscillator Circuits (27)
  • Pets and Pests (15)
  • Power Supply Circuits (108)
  • Remote Control Circuits (50)
  • Security and Alarm (64)
  • Sensors and Detectors (100)
  • Solar Controller Circuits (59)
  • Temperature Controllers (42)
  • Timer and Delay Relay (49)
  • Transmitter Circuits (29)
  • Voltage Control and Protection (37)
  • Water Controller (36)

Calculators

  • Battery Back up Time Calculator
  • Capacitance Reactance Calculator
  • IC 555 Astable Calculator
  • IC 555 Monostable Calculator
  • Inductance Calculator
  • LC Resonance Calculator
  • LM317, LM338, LM396 Calculator
  • Ohm’s Law Calculator
  • Phase Angle Phase Shift Calculator
  • Power Factor (PF) Calculator
  • Reactance Calculator
  • Transistor Astable Calculator
  • Transistor base Resistor Calculator
  • Voltage Divider Calculator
  • Wire Current Calculator
  • Zener Diode Calculator
  • Filter Capacitor Calculator
  • Buck Converter Calculator
  • Boost Converter Calculator
  • Solar Panel, Inverter, Battery Calculator
  • Wire Current Calculator
  • SMPS Transformer Calculator
  • IC SG3525, SG3524 Calculator
  • Inverter LC Filter Calculator

People Also Search

555 Circuits | 741 Circuits | LM324 Circuits | LM338 Circuits | 4017 Circuits | Ultrasonic Projects | SMPS Projects | Christmas Projects | MOSFETs | Radio Circuits | Laser Circuits | PIR Projects |

Recent Comments

  • Swagatam on Simple Delay Timer Circuits Explained
  • Swagatam on The Role of Inductor Coil in SMPS
  • Swagatam on 7 Modified Sine Wave Inverter Circuits Explored – 100W to 3kVA
  • Swagatam on 7 Modified Sine Wave Inverter Circuits Explored – 100W to 3kVA
  • Victor on 7 Modified Sine Wave Inverter Circuits Explored – 100W to 3kVA

Company

  • Privacy Policy
  • Cookie Policy
  • About Me
  • Contact
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Quora
  • Stack Exchange
  • Linkedin
  • © 2025 · Swagatam Innovations