Arduino Maker Series Under 1000: Mini Smart Door Alarm
Arduino Maker Series Under 1000: Mini Smart Door Alarm
Welcome to the Arduino Maker Series Under 1000! 🚪 Today, we are building a Mini Smart Door Alarm that detects when a door is opened and triggers a buzzer or LED alert. This is perfect for home security enthusiasts, beginners, and makers looking for a practical Arduino project under ₹1000.
Table of Contents
- Introduction
- Required Hardware
- Arduino IDE Setup
- Wiring the Components
- Arduino Code
- How It Works
- Testing Your Project
- Advanced Modifications
- Common Issues and Troubleshooting
- Learning Insights
- Conclusion
1. Introduction
The Mini Smart Door Alarm detects door openings using a magnetic reed switch or IR sensor and immediately triggers a buzzer or LED alert. This project teaches:
- Digital input and output in Arduino
- Working with sensors for practical applications
- Creating simple security systems
- Basic troubleshooting and logic building
2. Required Hardware
- Arduino Uno (~₹500)
- Magnetic Reed Switch or IR Sensor (~₹100)
- Buzzer (~₹50)
- LED (optional) (~₹10)
- Resistors: 220Ω and 10kΩ (~₹20)
- Jumper wires & breadboard (~₹100)
- USB cable for Arduino (~₹100)
- Battery pack 5V–7.4V (~₹150)
3. Arduino IDE Setup
- Install Arduino IDE on your PC.
- Connect Arduino Uno via USB.
- Select the correct board: Tools > Board > Arduino Uno.
- Select the correct COM port: Tools > Port > (your Arduino port).
4. Wiring the Components
- Reed Switch: One pin → D2, other → GND (with 10kΩ pull-up to 5V if needed)
- Buzzer: Positive → D9, Negative → GND
- LED (optional): Anode → D10 via 220Ω resistor, Cathode → GND
5. Arduino Code
Upload this code to your Arduino:
const int sensorPin = 2; // Reed switch or IR sensor const int buzzerPin = 9; // Buzzer const int ledPin = 10; // Optional LED void setup() { pinMode(sensorPin, INPUT_PULLUP); pinMode(buzzerPin, OUTPUT); pinMode(ledPin, OUTPUT); } void loop() { int doorState = digitalRead(sensorPin); if(doorState == LOW){ // Door opened digitalWrite(buzzerPin, HIGH); digitalWrite(ledPin, HIGH); } else { // Door closed digitalWrite(buzzerPin, LOW); digitalWrite(ledPin, LOW); } }
6. How It Works
The sensor detects when the door opens. The reed switch closes or opens its circuit depending on the magnet’s position. Arduino reads this digital input and triggers the buzzer and LED accordingly. This creates an immediate audible and visual alert whenever the door is opened.
7. Testing Your Project
- Upload the code to Arduino.
- Place the reed switch and magnet on the door and frame.
- Power the Arduino.
- Open the door to check if buzzer and LED trigger immediately.
- Close the door to ensure the alarm stops.
8. Advanced Modifications
- Add Wi-Fi module (ESP8266/ESP32) to send mobile notifications.
- Use multiple sensors for doors and windows in a home security system.
- Add a keypad or RFID module to disarm the alarm.
- Integrate with a GSM module to send SMS alerts.
- Use a rechargeable battery and power-saving mode for portability.
9. Common Issues and Troubleshooting
- Alarm not triggering: Check sensor wiring and magnet alignment.
- Buzzer or LED always ON: Verify pull-up resistor and sensor orientation.
- Arduino not responding: Check COM port and proper code upload.
- False triggers: Ensure reed switch or sensor is not too close to other magnets or electrical interference.
10. Learning Insights
- Learn how digital sensors detect physical events.
- Understand alert systems using buzzer and LED.
- Practice Arduino logic for conditional actions.
- Foundation for more advanced home automation and security projects.
11. Conclusion
This Mini Smart Door Alarm project is a practical, educational, and fun addition to the Arduino Maker Series Under 1000. It’s affordable, teaches core electronics concepts, and can be extended into a full home security system with notifications and multiple sensors.
By Kaushal Haladi
Comments
Post a Comment