An Arduino based burglar alarm that sends an SMS when motion is detected. It will send an SMS to you every 30 minutes while motion is detected (configurable).
- Python
- Python library pyserial installed
- Python library requests installed
- A TelAPI account
- An Arduino
- A Parallax PIR sensor
- Some female-female jumper wires
- Some break-away headers (to convert female to male)
- Attach + on the PIR sensor to 5v on the Arduino
- Attach - on the PIR sensor to GND on the Arduino
- Attach OUT on the PIR sensor to DIGITAL 2 on the Arduino
- Plug your Arduino into your computer
- Open the
arduino_pir/arduino_pit.ino
sketch with the Arduino IDE - Select your serial port (Tools>Serial Port) and click Upload
Your arduino LED will now be blnking. This means the PIR sensor is calibrating.
- Open server.py with a text editor
- Change the value of
SERIAL_PORT
to the serial port you set in the Arduino IDE. For Windows it might look like COM2, for Posix systems, it might look like /dev/tty.usbserial-AH00PP05 - Change the value of
SMS_FROM
to the number in your TelAPI account numbers (You can set this to another number, such as your own phone and it will cost a little extra. This is what I do.) - Change the value
SMS_TO
to your cell phone - Change the value of
TELAPI_ACCOUNT_SID
to yourAccount SID
as found at your TelAPI dashboard - Change the value of
TELAPI_TOKEN
to yourAccount Token
as found at your TelAPI dashboard
- Open up your terminal and run
python server.py
(assuming the terminal is CD'd to the directory where server.py is) - The Arduino will blink it's LED for 60 seconds. Get out of the sensor's sight while it calibrates.
Now, whevever motion is detected in the infra-red spectrum (think body heat), server.py
will send you an SMS up to once every 30 minutes.
- Get some plastic case, like one from a hummus & pretzel snack
- Cut a hole in the top for the sensor to be exposed (like R2D2 in an X-Wing)
- Cut a hole for the USB cable to stick out
- Tape or screw the sensor to the top
- Finit!
Quick video on youtube: http://youtu.be/9AuOZ4iV9zY
BEEP BEEP WHISTLE
YUM (Makes a nice case)
Free $25 credit when you sign up for a TelAPI account!