Introduction: Arduino Burglar Alarm V1

About: I love nature, electronics, and mechanics. I love to reuse whatever trash I find. I love building random projects and gardening.

Many people waste nearly $1000 just on buying a security system. I built my own for just around $70. With this, the burglar will kick in the door, gets scared of the buzzing sound, and jumps through the kicked-down doorway. This thing makes very loud (70-90 dB) sounds at 60 hz.

Supplies

  • NPN transistor
  • arduino mega 2560
  • 8Ω 0.5w speaker (cannot be piezo chip or transducer, as we are not using AC current to drive the sound element)
  • pulldown resistor
  • small screws
  • piezo disc

Step 1: Salvage the Piezo

If you are getting your piezo disc from some device, open it and get it out. I took two smashed smoke alarms from the garage and got their piezos out.

Step 2: Build the Circuit

I made a circuit diagram using MacOS's Freeform application.

Note: I made my own homemade NPN transistor. It is only capable of switching, not amplifying. If you don't want to build it, then I suggest just buying a small switching transistor.

Step 3: Code

This is the code. It is also included as a ".ino" file.

const int alarm = 22; // pin with buzzer connected
const int piezo = A0;
const int threshold = 1;
int piezoReading = 0;
void setup(){
pinMode(alarm, OUTPUT);
}


void loop(){
piezoReading = analogRead(piezo);
if(piezoReading >= threshold){
tone(alarm, 60);
}
}

Step 4: Secure

I used screws and staples to secure it to a wooden board. You should use as many screws and staples as you need. The staples are used for holding down strips of tape that can't withstand the mechanical stress.

Key: "circle" = screw

"box" = staple(s)

Note: The two red circles on the speaker are actually for screws used to hold the speaker from its backplate. However, if you are using a common bare-bones magnetic buzzer, don't use screws as I did (I used a speaker with a small plastic case, which came from my snap circuits kit, so I just used the backplate of its case), as you will destroy its diaphram. Use tape + staples instead.

Step 5: Performance Evaluation

This device can only detect sounds that are extremely loud. However, if you set a weight to drop on the buzzer, it will trigger the alarm. This device is excellent at detecting shock. You can attach it to the bottom of a window and the burglar will be scared when he breaks the tempered glass. Make sure to secure it to the window frame so it doesn't fall with the window and break. The problems of not detecting normal sound and no power backup will be solved in V2.

Step 6: V1.5

The alarm may not be sensitive enough to sense the loud sound of a burglar kicking in the door to gain forced entry from its hiding spot. If I put it in plain view next to the door, the burglar may find the alarm and disconnect it. Now I have added long wires running from the alarm in its hiding spot to the piezo disc, which is inconspicuously hidden behind a large object.

Step 7: Supplies

  • wire nuts (if you don't know what these are, look at the image above)
  • 2 long wires

Step 8: Connect

Strip a bit of the end of the wires off, and then twist the wires with the arduino's wires. Twist the wire nuts over the bare connections. Tape the other ends of the longer wires to the two faces of the piezo disc. Binder clip them after taping.

Step 9: Hide

You will need to hide the piezo disc, the alarm, and the long wires. For the alarm, hide it behind a large object. You can tape the the wires against the trim of the wall. I taped my piezo disc onto the doorframe and put a big pumpkin in front of the box. My alarm was hidden behind a large cardboard box, which also hid a wall outlet.

Step 10: Performance Evaluation

This alarm works perfectly now whenever the door is slammed or kicked in. It detects any vibrations from the door.