Introduction: Hidden Burglar Alarming System
Hello pals, welcome back with another new Instructables. In this Instructables I'll be teaching you how to make a Hidden Burglar Alarm System with a micro-controller called Arduino. It can be a very useful gadget. This small cube can be hidden into nearly anything, so that people doesn't come to know that it's a hidden alarm. I got this idea while making my obstacle avoiding robot for my school's maker fair's project. It took me 4 hours to make. Taking videos and pictures for each steps and then editing took me nearly a whole day.
For better guidance I've posted a video for you, taking you through each details step by step. Here is the link to my video:
PLEASE DON'T FORGET TO VOTE FOR ME! :-)
Step 1: What Is an Ultrasonic Distance Sensor?
As the name says, it's a sensor which can measure distance between two objects. The sensor has two eyes like things. Near one of the eyes there will be a "T" which means "Transmitter". It sends out sound waves and if there's an object in front of it then the pulses will rebound and come back to the other eyes "R" which is the "Receiver". So it knows the time it took for the pulses to go and come back. In your program you have to change the time into distance. That is how this sensor works.
I hope you guys understood how this sensor functions. If you guys are facing any difficulties then please feel free to ask me in the comments below. I'll try and answer as quickly as possible.
Step 2: The Components Needed to Make This Project
Here are the components to make this amazing project:
1) Arduino Uno
2) Ultrasonic Distance Sensor
3) MIni Breadboard
4) USB Cable
5) Male to Male Jumper Wires
6) Buzzer
7) 2x LEDs
8) Battery Holder and 9v Battery
9) Cardboard pieces
Step 3: Let's Start Making!
Now get your mini breadboard and fix the ultrasonic sensor on it as the schema shows. I have some real life photos of how I had done it. The circuit is quite simple, all you need to do is to copy the schema. Make sure each wiring is correct or else the circuit won't work.
Step 4: Polishing the Wiring
After you finish making the circuit, you'll realize how messy the whole wiring looks. So try and make it as com packed and neatly as possible, because if you've made any mistake in the circuit then it will be easy to find out what's the problem.
Step 5: Time for Coding!!!!
Okay, so the coding part is a little complicated (if you're a beginner) or else if you know c++ then it's nothing tough. Here is the code, you can copy and paste in your Arduino software.
int buzzer = 7;
int numBlink = 7;
int timeOn = 100;
int timeOff = 100;
int led1 = 4;
int led2 = 3;
int trigPin = 6;
int echoPin = 5;
float duration;
float targetDistance;
float speedOfSound = 867.3;
void setup () {
Serial.begin (9600);
pinMode (trigPin, OUTPUT);
pinMode (echoPin, INPUT);
pinMode (led1, OUTPUT);
pinMode (led2, OUTPUT);
pinMode (buzzer, OUTPUT);
}
void loop () {
digitalWrite (trigPin, LOW);
delayMicroseconds (3000);
digitalWrite (trigPin, HIGH);
delayMicroseconds (15);
digitalWrite (trigPin, LOW);
duration = pulseIn (echoPin, HIGH);
duration = duration/1000000.;
duration = duration/3600.;
targetDistance = speedOfSound * duration;
targetDistance = targetDistance/2;
targetDistance = targetDistance*160934;
if (targetDistance <= 80)
for (int j=1; j<=numBlink; j=j+1) {
digitalWrite (buzzer, HIGH);
digitalWrite (led1, HIGH);
digitalWrite (led2, HIGH);
delay (timeOn);
digitalWrite (led1, LOW);
digitalWrite (led2, LOW);
digitalWrite (buzzer, LOW);
delay (timeOff);
}
else {
digitalWrite (led1, LOW);
digitalWrite (led2, LOW);
digitalWrite (buzzer, LOW);
}
Serial.println (targetDistance);
delay (500);
}
Step 6: Let's Make a Box With Cardboard
Now once you've finished making the electrical part, we will move to make a covering for our box so that it's not obvious to strangers that it's some kind of electronic gadget. The main idea is to hide the circuit with cardboard. I used a rubber band to stick the Arduino with the cardboard base. You could even use double sided tape to stick the battery and the mini breadboard, but as I had finished my double sided tape I used ordinary scotch tape.
Step 7: Finishing the Mysterious Box
Cover the wiring very carefully so that not a single wire is sticking out. This is how it will look. Make sure to make two holes for the sensor's eyes.
Step 8: Final Look
This is how it will look once you've completed. Now you can hide this smart device anywhere in your house. No one will be able to identify that's it's a burglar alarming system. Isn't it worth it? :-)
Here is a last picture where I had kept this gadget hidden between the stairs, so if someone's coming up then we will get alarmed.
If you found this Instructables helpful then please vote for me and favorite it. I'll be really happy if you do me this small favor.
If you have any question then please I'm repeating, feel free to ask me and for sure I'll reply to you.
Bye Bye !!!!!!!