Introduction: The Digital Doormat

The digital doormat is a doormat that sends you an email when it is stepped on. Have you ever been curious about who is coming and going from your house? This simple electronics project can provide valuable information regarding the whereabouts of your visitors. It can also be easily modified to perform other functions such as taking pictures or activating a microphone. The possibilities are endless! I hope you enjoy this tutorial on an easy-to-build home automation device, and please vote for this instructable in the IOT and Rug contests!

SEE STEP 10 FOR A VIDEO OF THE FINISHED WORKING PRODUCT

Step 1: Gather Your Materials/tools

Materials:

  1. Pressure Sensor (or any other pressure sensor, but this one will definitely work)
  2. Photon
  3. Rug (the size doesn't matter, as long as it is big enough to cover the pressure sensor)
  4. tape (the tape is optional, it will be used to hide the cables)
  5. double sided tape (for mounting the photon housing)
  6. hot glue (the hot glue is also optional, it would be used to hide the cables)
  7. ic socket

Tools:

The total cost for this project varies depending on what tools/materials you already own. It cost me $20 as the only thing I needed to buy was the pressure sensor.

Step 2: First Try (it Didn't Work)

My first attempt did not work. I tried to use this thing called Velostat to make my own pressure sensing mat. Velostat is a material that changes resistance when pressure is applied, my idea was to make a big network of strips of Velostat and put it under the rug. Then, the Photon would continuously check for resistance: when the resistance changed the Photon would assume someone stepped on the rug and send an email. The Photon is like an Arduino, but is connected to the internet. To send the email, I would use the website called IFTTT.

I believe my first attempt did not work because of the Velostat. Velostat is very tricky to use, I'm not sure if i was using it correctly, but it was impossible to get it to be consistent. I do believe that Velostat could be used as a pressure sensor for this project; and you may be able to get it to work. But I didn't. However, the IFTTT and the Photon worked great, I know this because I got them to work using a simple LDR circuit to test it.

Step 3: Modify the Housing of the Pressure Senser

  1. Take the two screws out of the back of the alarm housing from the doormat alarm. Then open it.
  2. Once it is open, there should be a black and red wire holding the two halves of the housing together. One of the halves has the circuit board and most of the electronics. The other half has the speaker/buzzer in it. Cut the wires connecting the two halves as close to the buzzer side as possible. The picture shows where to cut.
  3. Cut off the cylinder that houses the speaker/buzzer.
  4. Position the Photon in the case where you plan to put it. Attach the power cord to it and mark where the case needs to be cut to allow the cord to go in and charge it.

Step 4: Modify the Housing: Part 2 (optional)

This step is totally optional. I 3d printed a curved piece of plastic to cover the hole made by cutting out the speaker. I did this to keep it tidy and make sure nothing got into it. This would be necessary if you were putting it outside, as it would be a good step towards waterproofing. If you don't have a 3d printer, you can just cover the hole with tape or hot glue or something else. But if you want to 3d print it, you can find the file, as well as a little more information on it here.

I attached it to the plastic housing with a lot of hot glue.

Step 5: Build the Circuit

The circuit is very simple.

  1. Attach the black wire to the gnd pin, and the red wire to A0.
  2. I soldered the red and black wires to an ic socket rather than soldering directing to the Photon, that way, I could use the Photon for something else if I wanted to.
  3. Solder the wires to the ic socket, and then connect the ic socket to the Photon.

Step 6: Code the Particle Photon

The code I used is shown below:


int boardled = D7;

int inPin = A0; // This sets A0 as the input for the doormat sensor

int val = 0; // Currently there is no voltage running through the circuit

int steppedOn = false; // The doormat does not have someone standing on it by default


void setup(){

pinMode(boardled, OUTPUT); // sets the digital pin 13 as output

pinMode(inPin, INPUT); // sets the digital pin 7 as input }


void loop() { val = digitalRead(inPin); // read the input pin

if (val > 0) { Particle.publish("SteppedOn?","yes",60,PRIVATE); /*sends an update to the live viewer, and triggers the IFTTT to send an email. */

steppedOn = true; //The doormat has been stepped on

delay(40000); /*this delays the reading of the input pin by 40 seconds (only after it has been stepped on) because the doormat triggers a chime that plays for about 40 seconds*/

}

}

Step 7: Coding: Part 2

  1. The first step is to make an account here (IFTTT).
  2. Follow the instructions provided by the pictures.
  3. Test the whole thing together to make sure it works.

Step 8: Close Up Your Photon in the Plastic Housing

You are ready to close up your case with the Photon in it. Make sure the case is fully closed before reinstalling the original screws.

Step 9: Mount the Photon Housing

This is going to be different for everyone. Use your skills as a maker to figure it out yourself. I will show you how I did it to get you started.

  1. Make a mental plan for how you are going to hide the wires.
  2. Put the sensor under the rug and work the wires towards the nearest outlet.
  3. Once it looks like it's going to work, start gluing or taping to hide the wires.
  4. Put double sided tape on the housing and use it to mount the alarm housing.

Step 10: You're Done!

I made a short video to show it working.

TROUBLESHOOTING

One of the problems that I had while working on this was that it just didn't send an email or update the live feed. My problem was that the alarm was off. To fix this, make sure your alarm system is on and has a battery in it.

Two ways to stop/pause the emails:

  • turn the alarm to the off position
  • turn off the IFTTT app

I hope you found this helpful and will try to make it.

Please vote for this in the Rug and IOT contests!

Feel free to ask questions or comment in the comment section below.

Comments

author
JohnC430 made it! (author)2016-12-01

Now all u need to add is a high voltage source and zap the intruder

author
degrooty made it! (author)degrooty2017-01-03

I agree

author
zposner made it! (author)2016-12-01

As a thank you for ten thousand views, here's a quick story (it's true).

I got an email at school that said "INTRUDER!". I thought it might be my dad, so I asked him. He denied it multiple times. Eventually I told him that I knew he entered my tiny house because I got an email. He blushed and said "Oh yeah, I went in to turn your heater off."

author
ColleenB24 made it! (author)2016-12-01

Love it! I bet you could rig something up to use a similar device to alert you when your garage door is open (just different code to say that if there is pressure then it's okay but if there is no pressure for over 15 minutes then send me an e-mail indicating the door has been open for more than 15 minutes). Neat project!

author
Cursh made it! (author)2016-12-01

I love the documented step of failure. Great job on this write up. Does your house have wheels?

author
zposner made it! (author)zposner2016-12-01

Yes, my house has wheels; nice job noticing. My dad and I built me a tiny house over the summer, I am now living in it

author
uberwald made it! (author)2016-12-01

It would be amusing if it took a photo and then overlaid the visitor's weight along with the time and date :)

author
zposner made it! (author)zposner2016-12-01

LOL

author
Srijal97 made it! (author)2016-12-01

Instead of taking a picture of your computer screen, take a screenshot on windows! You can use paint to highlight sections! :)

author
zposner made it! (author)zposner2016-12-01

Good idea! I'll keep it in mind next time.

author
wesleysuhler made it! (author)2016-12-01

I would avoid stepping on it just to avoid getting sent an email telling me that I just left or entered my house. Might be useful if I ever develop Alzheimer's disease.

Neato project, though!

author
zposner made it! (author)zposner2016-12-01

Yeah, I avoid stepping on it because I get a ton of email.

About This Instructable

18,062views

205favorites

License:

Bio: We're born, we make, and we die. So start making!
More by zposner:Apple + Peach Juice (Homemade)Chicken LadderAesthetic Cement Candle
Add instructable to: