Back to Parent

Outcome


Problem Statement

The device that I am designing is intended for my housemates. I chose them because they live with me and it is more convenient than to design for a friend that lives elsewhere. A common problem for homeowners regards home security. Sometimes a housemate might forget to lock the door when leaving the house. An Internet of Things device could certainly help remind to lock the door. It would notify them immediately after closing the door to lock it. They could also check whether or not the door is locked remotely. This could definitely reduce instances of unlocked front doors, increasing the home security.

Goal

I want to create a device that will remind homeowners to lock their door after they close it. It will use a reed switch in conjunction with a magnet to sense if the door is closed. It will use a tilt sensor to determine if the door is locked or not. If the door is not locked, an LED will flash rapidly, notifying the homeowner that their door is unlocked. This way, whenever a homeowner leaves their house without locking it, the flashing will get their attention and remind them to lock the door.

Process

Components Used:

1. Photon

2. Breadboard

3. Reed Switch and Magnet

4. Purple LED

5. Tilt Sensor

6. 1k Ohm Resistor

7. Various Wires

Pictures:



Img 3525.jpg.thumb
Show Advanced Options

Initial wiring testing the Hall Effect Sensor

Img 3526.jpg.thumb
Show Advanced Options

Replaced the Hall Effect sensor with reed switch and magnet


Img 3527.jpg.thumb
Show Advanced Options

Board with both reed switch and tilt sensor


Img 3528.jpg.thumb
Show Advanced Options

Close up of previous wiring


Img 3529.jpg.thumb
Show Advanced Options

Board with reed switch, tilt sensor, and LED


Img 3530.jpg.thumb
Show Advanced Options

Close up of previous wiring


Code.thumb
Show Advanced Options

  Picture of the code  

Challenges:

There were a few challenges I encountered through the building process. The first issue was with the Particle IDE. It would not flash code to the Photon, giving weird errors. I ended up using the online IDE as a workaround.

The first hardware issue was a finicky tilt sensor. It would not always change values when tilted, and had odd values over 1000. I had to use the internal pulldown resistor and used digital pins instead of analog pins, and the tile sensor started reading correct values.

The next issue involved a Hall Effect sensor, originally intended to be used with a magnet to tell if a door is closed. When I tried using a Hall Effect (both low and high) sensor, it seemed that the Hall Effect sensors were latching, not suitable for my project. A more feasible plan included the usage of a reed switch. I was able to find a reed switch in plastic casing with a matching magnet in plastic casing. This worked perfectly for my device.

I also was unable to connect to my home network, and tried various fixes and methods, including but not limited to using the Serial Monitor, ParticleDev, Particle CLI, disabling Wi-Fi authentication, etc. In the end I just worked on the project at school to use the school’s Wi-Fi.

Outcome

The prototype is reasonably complete, although it is quite rough and messy looking. Although I was unable to test it at home due to the internet connection issues, the device works well for its purpose. The next steps in improving it would probably be to create a case for the electronics so they are not just dangling about. I can also set it up so that in addition to using Particle.publish, it could send an email when the door is unlocked. It could also include a speaker to emit a noise to better get the attention of the homeowner. I can perhaps add notifications for when the door is left open as well. Another large improvement would be to use an external power source, since currently it requires the connection to a laptop for energy.

Reflection

I had some basic circuitry knowledge coming into this course, but this project was able to refresh my memory. I learned about the existence of latching vs non-latching Hall Effect sensors, as well as the reed switch. The internet connectivity aspect is also new to me, as my basic circuitry knowledge came with non-connected Arduinos. I learned how difficult and fickle internet connectivity can be with the Photon, as I was unable to get it to work on the home network.

If I were to do things differently, I would build a neater case to hold the electronic components. This would protect the wiring as well as improve the look of the device. I would also use softer wires so the tilt sensor can be turned more easily. I would also use an external power source so it would not need to be connected to the laptop.

Summary Description (<140 Characters):

Using a reed switch, LED, and tilt sensor, I made a device to alert a homeowner when they forget to lock their door after closing it. 

Drop files here or click to select

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