Project tutorial
Burglar Alarm

Burglar Alarm © CC BY-NC-SA

A simple burglar alarm built using an ATtiny45. You can attach it anywhere and will it will inform when someone tries to steal something.

  • 3,482 views
  • 0 comments
  • 12 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)
Lasercutter
Laser cutter (generic)

Apps and online services

About this project

We are going to build a burglar alarm, for that we need to use sensor that sense presence or something as input device and we also need output device as a alarm the people here we are using buzzer. first we need to choose the sensor, I selected Hall effect sensor because it's very simple and easy to use, it's working based on the proximity of magnet, so we can measure the magnetic field based on the output voltage and if we can put the sensor and magnet between our door and we can program it to alarm when the magnetic field is low. and it's very low power and smaller footprint, so let's get start to make.

here Iam using A1302-Linear Hall-Effect Sensor (datasheet), and you can use any Hall-effect sensor for this project.

Sensor - A1302 - Continuous-Time Ratiometric Linear Hall-Effect Sensor

Features

  • Low-noise output
  • Fast power-on time
  • Ratiometric rail-to-rail output
  • 4.5 to 6.0 V operation
  • Solid-state reliability
  • Factory-programmed at end-of-line for optimum performance
  • Robust ESD performance

Output Device - Piezo Buzzer

Piezo buzzer is an electronic device commonly used to produce sound. Light weight, simple construction and low price make it usable in various applications like car/truck reversing indicator, computers, call bells etc.

Piezo buzzer is based on the inverse principle of piezo electricity discovered in 1880 by Jacques and Pierre Curie. It is the phenomena of generating electricity when mechanical pressure is applied to certain materials and the vice versa is also true. Such materials are called piezo electric materials. Piezo electric materials are either naturally available or man made. Piezo-ceramic is class of man made material, which poses piezo electric effect and is widely used to make disc, the heart of piezo buzzer.

When subjected to an alternating electric field they stretch or compress, in accordance with the frequency of the signal thereby producing sound.

A piezoelectric disk generates a voltage when deformed (change in shape is greatly exaggerated).

Sensor Testing

First we arr testing the hall-effect sensor and Buzzer with using arduino after that we are going to design custom pcb and make it next level.

Testing Video

now we can confirm sensor and code are working fine, next we are going to make mill a custom pcb using CNC milling machine.

Circuit Design

I used Eagle to design the circuit.

and routed and completed the PCB designing

PCB Milling

I exported board file as Monochrome PNG image file and milled with Modela MDX CNC machine.

for milling I used Flame Resist grade PCB, and milling completed perfectly.

Soldering Components

  • ATtiny45/85 x 1
  • Buzzer x 1
  • Hall-effect sensor x 1
  • 0.1 uF Cap x 1
  • Coil cell battery x 1
  • Coil cell battery Holder x 1
  • ISP header x 1

soldered components successfully,

void setup()
 { 
  pinMode(2, INPUT_PULLUP);
  pinMode(3, OUTPUT);
 }
void loop()
 {  
    int data = analogRead(2);
    if (data >= 500 ) {   
        digitalWrite(3, HIGH);
        }  
    else{   
         digitalWrite(3, LOW);  
        }
 }

I Uploaded code using a ISP, you can also use a Arduino as ISP to upload program.

Demonstration

the same alarm we can use it in multiple places.

Thank you!

Code

Burglar Alarm Code Arduino
void setup() {

  pinMode(2, INPUT_PULLUP);

  pinMode(3, OUTPUT);

}

void loop() {
  int data = analogRead(2);

  if (data >= 500 )
  {
    digitalWrite(3, HIGH);
  }
  else
  {
    digitalWrite(3, LOW);
  }

}

Schematics

Burglar Alarm Circuit Diagram
0022 2mabuogqn7
Burglar Alarm Circuit Design
009 6aon7ylz3q

Comments

Similar projects you might like

Plant watering alarm system with arduino

Project tutorial by Giannis Arvanitakis

  • 3,394 views
  • 1 comment
  • 5 respects

Low Power RF Beacon for Remote Sensing & Communication

Project tutorial by Shahariar

  • 2,094 views
  • 1 comment
  • 16 respects

SERENA: Alarm Control Panel

Project tutorial by Michael Marinis

  • 6,895 views
  • 0 comments
  • 13 respects

A Very Compact Alarm with Card Reader and Real-Time Clock

Project tutorial by Simone Adobs

  • 6,528 views
  • 3 comments
  • 31 respects

Backpack Alarm

Project tutorial by Tomi Chen

  • 5,908 views
  • 12 comments
  • 36 respects

Buzzer Alarm System With Help Of Arduino

by Team ONYX

  • 37,878 views
  • 5 comments
  • 21 respects
Add projectSign up / Login