Microproject: Microprocessor-Based Burglar Alarm System
1. Title Page
Microprocessor-Based Burglar Alarm System
Your Name
Date
Course: Design and Technology
2. Introduction
A burglar alarm system is designed to detect unauthorized entry into a property. By employing
sensors and a microprocessor, this system can provide real-time alerts, enhancing security in homes
and businesses. Microprocessors play a crucial role in automating the response to security breaches,
allowing for quicker reactions and improved monitoring.
3. Objectives
Design and build a burglar alarm system using a microprocessor.
Understand the functionality and integration of sensors and output devices.
Learn basic programming for controlling the alarm system.
4. Components List
Microprocessor: Arduino Uno
Sensors:
o PIR Motion Sensor: Detects movement within a specified range.
o Magnetic Door/Window Sensor: Triggers the alarm when the door or window is
opened.
Output Devices:
o Buzzer: Emits a loud sound to alert about a breach.
o LED: Provides a visual indication of the system status.
Power Supply: 9V battery or AC adapter
Optional: GSM module for sending SMS alerts
5. Circuit Design
Schematic Diagram:
The circuit connects the PIR sensor and magnetic sensors to the digital input pins of the Arduino. The
buzzer and LED are connected to the output pins. The schematic will look something like this (you
can create your own using Fritzing or Tinkercad).
Connections:
PIR Sensor: Pin to digital pin 2, VCC to 5V, GND to GND.
Magnetic Sensor: Pin to digital pin 3, VCC to 5V, GND to GND.
Buzzer: Pin to digital pin 8, VCC to 5V, GND to GND.
LED: Pin to digital pin 13, VCC to 5V, GND to GND.
6. Programming the Microprocessor
Here’s a sample code to control the alarm system:
cpp
Copy code
int pirPin = 2; // PIR sensor pin
int buzzerPin = 8; // Buzzer pin
int ledPin = 13; // LED pin
void setup() {
pinMode(pirPin, INPUT);
pinMode(buzzerPin, OUTPUT);
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
void loop() {
int motion = digitalRead(pirPin);
if (motion) {
digitalWrite(buzzerPin, HIGH); // Activate alarm
digitalWrite(ledPin, HIGH); // Turn on LED
Serial.println("Motion detected!");
} else {
digitalWrite(buzzerPin, LOW); // Deactivate alarm
digitalWrite(ledPin, LOW); // Turn off LED
delay(100);
This code checks for motion detected by the PIR sensor. If motion is detected, it activates the buzzer
and turns on the LED.
7. Assembly Instructions
1. Gather Components: Collect all necessary components listed above.
2. Connect Sensors: Follow the circuit diagram to connect the PIR sensor and magnetic sensor
to the Arduino.
3. Connect Output Devices: Wire the buzzer and LED as indicated.
4. Power the System: Ensure the power supply is connected properly.
5. Upload the Code: Use the Arduino IDE to upload the code to the microcontroller.
Tip: Use jumper wires for easier connections and breadboards for a cleaner setup.
8. Testing and Troubleshooting
Testing:
o Walk in front of the PIR sensor to see if it triggers the buzzer and LED.
o Open the door/window with the magnetic sensor to check if the alarm activates.
Troubleshooting:
o If the alarm doesn’t trigger, check the wiring and ensure all connections are secure.
o Test each sensor individually to ensure they are functioning correctly.
o Use the Serial Monitor to check for messages in the code.
9. Conclusion
The microprocessor-based burglar alarm system effectively detects unauthorized access using
motion and magnetic sensors. This project not only demonstrates the practical application of
microcontrollers in security systems but also highlights the importance of integrating various
components for a functional design. Future improvements could include adding a GSM module for
remote notifications and implementing a user-friendly interface.
10. References
Arduino Documentation
Electronics textbooks and online resources for circuit design
Tutorials from DIY electronics websites
Feel free to customize any sections based on your specific requirements or findings. If you need more
details or adjustments, just let me know!