• 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 | Hire Me | 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 May 14, 2026 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.

Table of Contents
  • The PIR Sensor
  • The Circuit Layout:
    • Here is author’s prototype:
    • The Design:
    • Program Code:
      • Where to place the Arduino security system:

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.

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.

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

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:

  • simulation2B1 1Transformerless AC Voltmeter Circuit Using Arduino
  • Cellphone Controlled Dog Feeder Circuit
  • Can EGS002 Work With a Standard 16 × 2 LCD?
  • P 20160813 150716Arduino Digital Clock Using RTC Module

Filed Under: Arduino Projects Tagged With: Arduino, Home, Project, Security, Tested, Working

About Swagatam

I am an electronics engineer and doing practical hands-on work from more than 15 years now. Building real circuits, testing them and also making PCB layouts by myself. I really love doing all these things like inventing something new, designing electronics and also helping other people like hobby guys who want to make their own cool circuits at home.

And that is the main reason why I started this website homemade-circuits.com, to share different types of circuit ideas..

If you are having any kind of doubt or question related to circuits then just write down your question in the comment box below, I am like always checking, so I guarantee I will reply you for sure!



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

Reader Interactions

Questions & Answers

Total Posts: 2
Newest Oldest
swixxknight
January 14, 2018 • 9 years ago #57641

can more than one Pir sensor be used

Reply
SwagatamAdmin
January 14, 2018 • 9 years ago #57651

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



Categories

  • Arduino Projects (95)
  • Audio and Amplifier Projects (134)
  • Automation Projects (18)
  • Automobile Electronics (104)
  • Battery Charger Circuits (90)
  • Datasheets and Components (109)
  • Electronics Theory (151)
  • Energy from Magnets and Earth (42)
  • Games and Sports Projects (11)
  • Grid and 3-Phase (20)
  • Health related Projects (27)
  • Home Electrical Circuits (13)
  • Indicator Circuits (16)
  • Inverter Circuits (98)
  • Lamps and Lights (161)
  • Meters and Testers (72)
  • Mini Projects (28)
  • Motor Controller (68)
  • Oscillator Circuits (30)
  • Pets and Pests (15)
  • Power Supply Circuits (91)
  • Remote Control Circuits (50)
  • Security and Alarm (65)
  • Sensors and Detectors (107)
  • SMPS and Converters (46)
  • Solar Controller Circuits (62)
  • Temperature Controllers (44)
  • Timer and Delay Relay (50)
  • Voltage Control and Protection (44)
  • Water Controller (37)
  • Wireless Circuits (31)



Circuit Simulator

circuit simulator image



Subscribe to get New Circuits in your Email



Other Links

  • Privacy Policy
  • Cookie Policy
  • Disclaimer
  • Copyright
  • Videos
  • Sitemap

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 Adjustable Voltage Regulator Circuit using LM324 IC with Over Current Protection
  • Swagatam on Adjustable Voltage Regulator Circuit using LM324 IC with Over Current Protection
  • David on Adjustable Voltage Regulator Circuit using LM324 IC with Over Current Protection
  • David on Adjustable Voltage Regulator Circuit using LM324 IC with Over Current Protection
  • Swagatam on How IC LM337 Works: Datasheet, Application Circuits

Social Profiles

  • Twitter
  • YouTube
  • Instagram
  • Pinterest
  • My Facebook-Page
  • Stack Exchange
  • Linkedin

Calculators

  • ZVS Induction Heater + Tank Calculator Tool
  • Zener Diode Calculator
  • Wire Current and Thickness Calculator (Ampacity Calculator)
  • Voltage Divider Calculator
  • Transistor Base Resistor Calculator
  • Transistor Astable Multivibrator Calculator
  • TL431 Calculator
  • Solar Panel, Inverter, Battery Calculator
  • Ferrite Core Air Gap Calculator Tool
  • Parallel MOSFET Calculator Tool: How to Connect MOSFETs in Parallel Safely
  • LC Resonance Calculator for EV Battery Charger Circuits
  • LED String Series Resistor Calculator
  • Calculator to Design a High Power 3kW PFC (Power Factor Correction) Circuit
  • Passive Power Factor Correction (PFC) Calculator
  • LM567 IC Calculator Tool
  • SMPS Flyback Boost Converter Calculator
  • Shunt Resistor Calculator for Ammeters
  • SCR and Triac Gate Resistor Calculator
  • Battery Back up Time Calculator
  • Boost Converter Calculator (Non-Isolated)
  • Bootstrap Capacitor Calculator
  • Buck Converter Calculator
  • Buck-Boost Converter Calculator
  • Capacitance Reactance Calculator
  • DCM Flyback Transformer & Wire Gauge Wire Size Calculator Tool
  • Filter Capacitor Calculator
  • IC 4047 Calculator (Frequency and PWM)
  • IC 4060 Calculator
  • IC 555 Astable Calculator
  • IC 555 Monostable Calculator
  • IC SG3525, SG3524 Calculator
  • Inductance Calculator
  • Induction Heater Inductor and Resonant Frequency Calculator
  • Induction Heater Work Coil Calculator
  • Inverter LC Filter Calculator
  • LC Resonance Calculator
  • LED Current Calculator
  • LM317, LM338, LM396 Calculator
  • NAND/NOT Gate RC Values Calculator
  • NOT, NAND Gate Frequency Calculator
  • Notch Filter Calculator Tool
  • Ohm’s Law Calculator
  • Phase Angle Phase Shift Calculator
  • Power Factor (PF) Calculator
  • RC Filter Calculator
  • Reactance Calculator
  • Sine Table Calculator for SPWM Arduino Code
  • Small Signal Transistor(BJT) and Diode Quick Datasheet
  • SMPS Calculator for Toroidal Ferrite Transformers
  • SMPS Flyback Transformer Calculator – Design by Target Duty Cycle
  • TL431 Calculator
  • Op-Amp Hysteresis Resistor Calculator

© 2026 · Swagatam Innovations