Discreet Text Alarm System
September 18th, 2015
The Discreet Text Alarm System is a silent door alarm that texts the owner of intruders. The setting is late at night. You're away on vacation. The thief knows this. He picks the lock and walks in. He immediately notices a blinking light next to the door and unplugs the device disabling it before it can alert you of his presence. He then proceeds to steal all your belongings. Clearly, my project is in its infancy. As of now, the intruder can just unplug the Arduino before the text is sent.
This project was inspired by MakerBee's instructable. We'll be borrowing heavily from their designs.
Let me walk you through how the system works using the above state diagram. On reset the system is in state S0. In S0, the door sensor is disabled and the system is listening for a button press. On button press the system enters the wait period, S1, where the LED blinks on and off for a set amount of time before entering the armed state, S2. In S2 the system listens to the door sensor, which is tripped when the door is open. Once the door sensor is tripped the system enters the second wait period, S3. In this wait period the system again listens for a button press. If the button is pressed, the system returns to S0. If no button press and the wait time is up, the system enters S4 where a text is sent. After S4 the system returns to S0 and the cycle repeats.
Step 1: Materials + Tools
- Arduino Yun from adafruit
- Temboo account
- Twilio account
- 9V, 250mA or more, 2.1mm center pin positive adapter or alternative Arduino power supply
- Magnetic contact switch (door sensor) from adafruit
- 10kOhm (brown black orange gold) resistor x2
- 5mm red LED
- SPST momentary ON pushbutton switch
- breadboarding wire
- Arduino IDE from Arduino
Step 2: Setup Temboo and Twilio Accounts
Begin by following Step 2 of MakerBee's instructable. Their instructions are are clear and concise as can be.
Step 3: Setup Arduino Yun
Follow Step 3 of MakerBee's instructable.
Step 4: Setup Arduino IDE
Follow Step 4 of MakerBee's instructable.
Step 5: Assemble the Circuit
Follow the below pictorial diagram and schematic to assemble your circuit.
Step 6: Upload the Code
Connect your Arduino Yun to your computer via wifi or cable. Copy and paste the linked code into your Arduino IDE. Enter your specific Temboo Account, Temboo Application, Temboo Key, Twilio Account SID, Twilio Auth Token, Twilio number, and personal number in the appropriate define statements. Run Verify and then Upload. Give it a test run to make sure everything is working nicely. Adjust the waitTime and codeTime variables if necessary.
Step 7: Install by the Door
I taped a small wooden project box next the door to act as a shelf for the system. I also used some cork to help level the door sensor. This is probably the easiest setup. You might want to try something else. Just remember, if you're powering your Arduino via a wall charger, to place the system within range of a wall outlet.
Step 8: Enjoy
Plug in your system, arm it, close the door, and invite a thief over.
The next step would be to add a wireless code panel and hide the Arduino Yun out of sight. This way if someone disables the code panel the Arduino Yun can still send a text.