Alarm System
Are you looking to build your own secure, programmable alarm system? This project is perfect for learning about electronics, Arduino programming, and creating something practical for everyday use. With this DIY arming mechanism, you can use a 4-digit pin to control an alarm. It's simple to set up, fun to build, and a great way to learn the hardware basics.
Supplies
Assemble the Circuit
Connect the LCD Display
- Ground Pin to ground
- VCC Pin (power) to power
- SDA Pin to A4
- SCL Pin to A5
Connect the Keypad
- Rows to pins 10, 9, 8, 7, 6, 5, 4, 3 (in order from left to right)
PIR Sensor
- Signal Pin to pin 2
- Power Pin to 3.3V
- Ground Pin directly to ground
Piezo (buzzer)
- Positive to A0
- Negative to ground
Power the Arduino
- Connect via USB to a computer
LOOK AT DIAGRAM ABOVE FOR BETTER IDEA
Code
Test the System
Startup Screen: Upon powering the Arduino, the LCD will ask you to enter a pin.
Locking and Unlocking:
- Enter a 4-digit PIN on the keypad (the default is 1234#)
- If the PIN matches the saved code, the lcd will display an arming countdown
- If the PIN is incorrect, the LCD will show a "Wrong Pin!" message
- Once the system is armed, you may disarm it by inputting the password again
PIR Motion:
- When armed, if motion is detected, the lcd will display "Motion Detected!" and start a countdown
- You have 20 seconds to disarm the system with the code, otherwise an alarm will sound
Other Features:
- The "*" pin clears the screen if you input the password wrong
- The buzzer makes a loud beeping sound, mimicking an actual alarm system
- Press 'D' when armed to sound the alarm
Final Notes
Congratulations! You've finally built a fully functional alarm mechanism powered by an Arduino. This project not only mimics an alarm system but also gives you a hands-on experience with programming, wiring, and hardware.
ALL CREDIT GOES TO: https://projecthub.arduino.cc/1higgin/simple-alarm-system-e5958f#section0