This is an Arduino based door alarm that uses a magnetic reed switch to determine the door state and has an audible alarm and a text message based alarm.
- Arduino Uno
- Arduino Uno Ethernet Shield
- 3x LEDs
- 2x SPST Switches
- 1x Momentary Push Button
- 2x LCD Screens
- 1x Passive Buzzer
- 1x Magnetic Reed Switch
Mount the Reed switch
Put the piece with the terminals on the frame of the door. Place the magnetic portion on the door right under the switch so it will still toggle the switch. You can use a multimeter or listen to see if the switch activates when the door is opened or closed.
Set Up the Alert Messages
First, create a twilio.com account, you can use the free version. Just create a project and a phone number and write down the Account SID and Auth Token.
Upload the Twilio PHP Master to your web server from https://packagist.org/packages/twilio/sdk
Upload the alert.php code to the same directory. You will have to change the file extension to remove the .txt from the end.
Open the script and change lines 10 and 11 to the Account SID and Auth Token. Change line 17 to your phone number and line 20 to the phone number you got from Twilio. Change line 22 to the text that you want to receive.
Use the Alarm:
Set the switches to if you want to receive an alert text or have the alarm sound and arm the system with the push button. When the door is opened, the alarm will go off until the button is pressed to reset the system
Tags: 201801, W5100, Ethernet, Arduino, Door Alarm