Back to Parent

Outcome


Problem Statement

I designed this device for my girlfriend, who has a life long fear of home invaders. I figured that if she had some reliable way to know immediately and precisely when the doorknob has been turned, she might feel a bit safer when home alone.


Goal

In this project, I set out to create a device that could be affixed to a doorknob. When the doorknob is twisted, the device will indicate locally using an LED (to verify proper function), and send an alert to the cloud, logging the time which the event occurred. There will also be a switch to manually disable the device when a user is home.


Process

2 - 220Ω resistors

1 - 1kΩ resistor

1 - 10kΩ resistor

1 - Latching button switch

1 - Red LED

1 - Tilt Ball #173 sensor

1 - Particle Photon

various Jumper Wires


Img 0298.thumb
Show Advanced Options

A bit more organized for clarity:

Homehack1.thumb
Show Advanced Options

The code is a substantially modified version of a SparkFun repository, which they provide on the order page for the tilt sensor.  I had to reverse engineer the wiring for the sensor from the frustratingly short video on that order page.  After I had it operational, the next challenge was to integrate some variables for debugging, and add a publish function so that the alerts would be logged and viewable remotely.  This was accomplished using experience from our class tutorials.  The final step was to wire up a kill switch, so that the alerts could be disabled while at home.  After some digging in the lab, I found one latching button.  About a dozen configurations later, Steffen helped me solve the floating voltage issues and I had a solid on/off signal.  A few more lines of code to define the status of the switch (and add it to the IF statements) and the device was fully operational.

Show Advanced Options

Outcome

The final product works as intended, though admittedly the package is a bit unwieldily.  It can easily be attached to a doorknob using rubber bands or adhesive, but the bulky breadboard prevents easy operation of the knob itself.  The power source (USB cable or battery pack) doesn't help either.  It really requires a more elegant enclosure.

While encasing the device is a longer-term goal, a more immediate improvement would be the addition of better notification services.  The cloud logs are nice, but SMS alerts would be much more noticeable.  One more thing to look at is idle power consumption.  Ideally, the circuit should be extremely lean, and I have not tested this aspect of performance yet.


Reflection

This project was highly informative for me, and a great hands-on learning experience.  I work closely with several electronics engineers on a daily basis, and I am consistently baffled by the complexity of their work.  Building this device gives me an even greater respect for what they can do.  That said, I felt that I achieved the goal I set out to reach (even if I did receive considerable assistance), and now feel inspired to continue developing more advanced devices.  I'll be pressing on with a new, but appropriately restrained sense of optimism.

Drop files here or click to select

You can upload files of up to 20MB using this form.