Introduction: LinkIt One Texting Door Alarm

Doors that send you an e-mail just don’t cut it any more.

Sure, e-mails go to our phone, but we need 3G/4G or be near WiFi. To counter all of this, today we will create a door alarm that Texts you (that’s right, a genuine SMS text) every time somebody opens up your front door. That way no matter where you are, you get know when someone is entering your house!

Supplies Needed:

1. LinkIT One board by MediaTek

2. Seed Studio Grove PIR Motion Sensor

3. Active Sim Card

Step 1: Configure Your LinkIt One Board

We'll need to modify some of the switches on the LinkIt One board in order to make it work. Along with the image attached, make sure that you have done the following

1. Set the MS -- UART switch to UART

2. Set the USB -- BAT switch to USB

3. Set the SPI -- SD switch to SPI

Step 2: Insert Your SIM Card

I know that most people probably don't have a pre-paid SIM card laying around. If you are just prototyping and want to see a proof of concept, feel free to remove it from your current cell phone (or one of your friends) just to try it out. If you get serious and want to make this a full-time gig, you will have to pony up for a pre-paid SIM.

Inserting the SIM card is a fairly straight forward process. Flip over your LinkIt One and look at the smaller big metal piece. You can see in the figure where I inserted my SIM card if you are confused.

Step 3: Connect Your Grove PIR Motion Sensor and GSM Antenna

Next we'll want to connect our Grove PIR Motion Sensor. Connecting it is a fairly straight forward process. You just plug it in.

Next You can connect the GSM Antenna. The GSM Antenna is the big black rectangle looking antenna that came with your LinkIt One. Make sure to connect it to the LinkIt One back that is labeled "GSM ANT" otherwise it won't work.

Step 4: Code Your LinkIt One

Code Time!

The code for this is fairly straight forward. We basically have "if" logic that says if the door is open (we detect movement) then send a text. This unfortunately will have the consequence of sending a text when the door opens and also when the door closes. But hey, better two texts than no texts!

Download the attached code file and deploy to your LinkIt Board! Awesome! You've created a working home alarm!

Step 5: Going Forward

Now that you have created your very own door alarm, here are a few ideas on how to expand:

  • Create logic so that the alarm only goes off at certain periods of the day (like at night, and when you aren't home)
  • Have the Text message sent to different numbers throughout the day (work phone versus mobile phone)
  • Put in logic for the LinkIt One to receive messages in order to disable the Alarm when you know it is just a false Alarm!

References and Resources

Seed Studio PIR Motion Sensor Github

LinkIt One SMS Tutorial Instructable

MediaTek LinkIt One Developer's Guide